CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/TrackCandidate/interface/TrackCandidate.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
00002 #define DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
00003 
00004 #include "DataFormats/Common/interface/RefToBase.h"
00005 #include "DataFormats/Common/interface/OwnVector.h"
00006 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00007 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
00008 
00009 
00010 #include <utility>
00011 
00023 class TrackCandidate{
00024 public:
00025   typedef edm::OwnVector<TrackingRecHit> RecHitContainer;
00026   typedef RecHitContainer::const_iterator const_iterator;
00027   typedef std::pair<const_iterator,const_iterator> range;
00028   
00029   TrackCandidate(): rh_(),  seed_(), state_(), seedRef_() {}
00030   virtual ~TrackCandidate(){}
00031 
00032   TrackCandidate(RecHitContainer & rh) :
00033     rh_(),  seed_(), state_(), seedRef_() {rh_.swap(rh);}
00034   
00035   TrackCandidate(RecHitContainer & rh,
00036                  TrajectorySeed const & s,
00037                  PTrajectoryStateOnDet const & st):
00038     rh_(), seed_(s), state_(st), seedRef_() {rh_.swap(rh);}
00039 
00040   
00041   TrackCandidate(RecHitContainer & rh,
00042                  TrajectorySeed const & s,
00043                  PTrajectoryStateOnDet const & st,
00044                  const edm::RefToBase<TrajectorySeed> & seedRef) :
00045     rh_(), seed_(s), state_(st), seedRef_(seedRef) {rh_.swap(rh);}
00046 
00047 
00048 
00049   
00050   PTrajectoryStateOnDet const & trajectoryStateOnDet() const { return state_;}
00051   
00052   range recHits() const {return std::make_pair(rh_.begin(), rh_.end());}
00053   
00054   TrajectorySeed const & seed() const {return seed_;}
00055  
00061   edm::RefToBase<TrajectorySeed> seedRef() const { return seedRef_; }
00062 
00063   void setSeedRef(edm::RefToBase<TrajectorySeed> & seedRef) { seedRef_ = seedRef ; } 
00064   
00065 private:
00066   RecHitContainer rh_;
00067   TrajectorySeed seed_;
00068   PTrajectoryStateOnDet state_;
00069   edm::RefToBase<TrajectorySeed> seedRef_;
00070 };
00071 #endif