CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackProducerBase.h
Go to the documentation of this file.
1 #ifndef TrackProducerBase_h
2 #define TrackProducerBase_h
3 
14 
17 
19 
25 
26 class Propagator;
29 class TrackerGeometry;
30 class TrajectoryFitter;
32 class NavigationSchool;
33 
34 template <class T>
36 public:
37  typedef std::vector<T> TrackCollection;
38  typedef std::pair<Trajectory*, std::pair<T*,PropagationDirection> > AlgoProduct;
39  typedef std::vector< AlgoProduct > AlgoProductCollection;
40 public:
42  TrackProducerBase(bool trajectoryInEvent = false):
43  trajectoryInEvent_(trajectoryInEvent),
45 
47  virtual ~TrackProducerBase();
48 
50  virtual void getFromES(const edm::EventSetup&,
57 
62 
64  virtual void produce(edm::Event&, const edm::EventSetup&) = 0;
65 
68 
71  src_ = src; bsSrc_ = bsSrc; mteSrc_ = mteSrc;
72  }
73 
76  alias.erase(alias.size()-6,alias.size());
77  alias_=alias;
78  }
79 
82  rekeyClusterRefs_ = true;
84  }
85 
86  void setSecondHitPattern(Trajectory* traj, T& track,
87  const Propagator* prop, const MeasurementTrackerEvent* measTk );
88 
89  const edm::ParameterSet& getConf() const {return conf_;}
90  private:
93  protected:
99 
102 
104 
105 };
106 
107 #include "RecoTracker/TrackProducer/interface/TrackProducerBase.icc"
108 
109 #endif
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
edm::ParameterSet conf_
std::vector< T > TrackCollection
edm::InputTag clusterRemovalInfo_
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
void setAlias(std::string alias)
set the aliases of produced collections
void setConf(const edm::ParameterSet &conf)
Set parameter set.
virtual void produce(edm::Event &, const edm::EventSetup &)=0
Method where the procduction take place. To be implemented in concrete classes.
void setSecondHitPattern(Trajectory *traj, T &track, const Propagator *prop, const MeasurementTrackerEvent *measTk)
TrackProducerBase(bool trajectoryInEvent=false)
Constructor.
std::vector< AlgoProduct > AlgoProductCollection
tuple conf
Definition: dbtoconf.py:185
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
void setSrc(const edm::EDGetToken &src, const edm::EDGetTokenT< reco::BeamSpot > &bsSrc, const edm::EDGetTokenT< MeasurementTrackerEvent > &mteSrc)
set label of source collection
virtual ~TrackProducerBase()
Destructor.
edm::EDGetToken src_
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
edm::ESHandle< NavigationSchool > theSchool
std::pair< Trajectory *, std::pair< T *, PropagationDirection > > AlgoProduct
volatile std::atomic< bool > shutdown_flag false
edm::OrphanHandle< TrackCollection > rTracks_
long double T
const edm::ParameterSet & getConf() const
virtual void getFromES(const edm::EventSetup &, edm::ESHandle< TrackerGeometry > &, edm::ESHandle< MagneticField > &, edm::ESHandle< TrajectoryFitter > &, edm::ESHandle< Propagator > &, edm::ESHandle< MeasurementTracker > &, edm::ESHandle< TransientTrackingRecHitBuilder > &)
Get needed services from the Event Setup.