CMS 3D CMS Logo

TrackProducerBase.h
Go to the documentation of this file.
1 #ifndef TrackProducerBase_h
2 #define TrackProducerBase_h
3 
10 #include "AlgoProductTraits.h"
11 
16 
19 
21 
27 
28 #include <tuple>
29 
30 class Propagator;
33 class TrackerGeometry;
34 class TrajectoryFitter;
36 class NavigationSchool;
37 
38 template <class T>
40 public:
42  using TrackView = typename Base::TrackView;
45 
46 public:
48  TrackProducerBase(bool trajectoryInEvent = false) : trajectoryInEvent_(trajectoryInEvent), rekeyClusterRefs_(false) {}
49 
51  virtual ~TrackProducerBase() noexcept(false);
52 
54  virtual void getFromES(const edm::EventSetup&,
61 
66 
68  virtual void produce(edm::Event&, const edm::EventSetup&) = 0;
69 
71  void setConf(const edm::ParameterSet& conf) { conf_ = conf; }
72 
74  void setSrc(const edm::EDGetToken& src,
77  src_ = src;
78  bsSrc_ = bsSrc;
79  mteSrc_ = mteSrc;
80  }
81 
84  alias.erase(alias.size() - 6, alias.size());
85  alias_ = alias;
86  }
87 
90  rekeyClusterRefs_ = true;
92  }
93 
95  T& track,
96  const Propagator* prop,
97  const MeasurementTrackerEvent* measTk,
98  const TrackerTopology* ttopo);
99 
100  const edm::ParameterSet& getConf() const { return conf_; }
101 
102 protected:
105 
106 protected:
112 
115 
117 };
118 
119 #include "RecoTracker/TrackProducer/interface/TrackProducerBase.icc"
120 
121 #endif
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
edm::ParameterSet conf_
edm::InputTag clusterRemovalInfo_
void setSecondHitPattern(Trajectory *traj, T &track, const Propagator *prop, const MeasurementTrackerEvent *measTk, const TrackerTopology *ttopo)
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.
std::vector< reco::GsfTrack > TrackCollection
virtual void produce(edm::Event &, const edm::EventSetup &)=0
Method where the procduction take place. To be implemented in concrete classes.
virtual ~TrackProducerBase()(false)
Destructor.
TrackProducerBase(bool trajectoryInEvent=false)
Constructor.
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
#define noexcept
std::vector< AlgoProduct > AlgoProductCollection
edm::EDGetToken src_
edm::View< T > TrackView
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
edm::ESHandle< NavigationSchool > theSchool
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.