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 
22 
28 
29 #include <tuple>
30 
31 class Propagator;
34 class TrackerGeometry;
35 class TrajectoryFitter;
37 class NavigationSchool;
44 
45 template <class T>
47 public:
49  using TrackView = typename Base::TrackView;
52 
53 public:
55  TrackProducerBase(bool trajectoryInEvent = false) : trajectoryInEvent_(trajectoryInEvent) {}
56 
58  virtual ~TrackProducerBase() noexcept(false);
59 
61  virtual void getFromES(const edm::EventSetup&,
68 
72  virtual void getFromEvt(edm::Event&, edm::Handle<TrackView>&, reco::BeamSpot&);
73 
75  virtual void produce(edm::Event&, const edm::EventSetup&) = 0;
76 
78  void initTrackProducerBase(const edm::ParameterSet& conf, edm::ConsumesCollector cc, const edm::EDGetToken& src);
79 
81  void setAlias(std::string alias) {
82  alias.erase(alias.size() - 6, alias.size());
83  alias_ = alias;
84  }
85 
87  T& track,
88  const Propagator* prop,
89  const MeasurementTrackerEvent* measTk,
90  const TrackerTopology* ttopo);
91 
92  const edm::ParameterSet& getConf() const { return conf_; }
93 
94 protected:
97 
98 protected:
104 
112 
114  bool useSchool_ = false;
115 };
116 
117 #include "RecoTracker/TrackProducer/interface/TrackProducerBase.icc"
118 
119 #endif
edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > measTkSrc_
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
edm::ParameterSet conf_
const edm::ParameterSet & getConf() const
edm::ESGetToken< TrajectoryFitter, TrajectoryFitter::Record > fitterSrc_
std::vector< TrackCandidate > TrackCandidateCollection
void setSecondHitPattern(Trajectory *traj, T &track, const Propagator *prop, const MeasurementTrackerEvent *measTk, const TrackerTopology *ttopo)
void initTrackProducerBase(const edm::ParameterSet &conf, edm::ConsumesCollector cc, const edm::EDGetToken &src)
Call this method in inheriting class&#39; constructor.
void setAlias(std::string alias)
set the aliases of produced collections
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorSrc_
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.
TrackProducerBase(bool trajectoryInEvent=false)
Constructor.
virtual ~TrackProducerBase() noexcept(false)
Destructor.
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackGeomSrc_
std::vector< AlgoProduct > AlgoProductCollection
edm::EDGetToken src_
edm::View< T > TrackView
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
fixed size matrix
HLT enums.
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfSrc_
edm::ESHandle< NavigationSchool > theSchool
edm::OrphanHandle< TrackCollection > rTracks_
long double T
edm::ESGetToken< NavigationSchool, NavigationSchoolRecord > schoolSrc_
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > builderSrc_
typename Base::TrackView TrackView
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.