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 
11 #include "AlgoProductTraits.h"
12 
17 
20 
22 
28 
29 #include<tuple>
30 
31 class Propagator;
34 class TrackerGeometry;
35 class TrajectoryFitter;
37 class NavigationSchool;
38 
39 template <class T>
41 public:
43  using TrackView = typename Base::TrackView;
46 public:
47 
49  TrackProducerBase(bool trajectoryInEvent = false):
50  trajectoryInEvent_(trajectoryInEvent),
52 
55 
57  virtual void getFromES(const edm::EventSetup&,
58  edm::ESHandle<TrackerGeometry>& ,
59  edm::ESHandle<MagneticField>& ,
60  edm::ESHandle<TrajectoryFitter>& ,
61  edm::ESHandle<Propagator>& ,
64 
66  virtual void getFromEvt(edm::Event&, edm::Handle<TrackCandidateCollection>&, reco::BeamSpot&);
68  virtual void getFromEvt(edm::Event&, edm::Handle<TrackView>&, reco::BeamSpot&);
69 
71  virtual void produce(edm::Event&, const edm::EventSetup&) = 0;
72 
74  void setConf(const edm::ParameterSet& conf){conf_=conf;}
75 
78  src_ = src; bsSrc_ = bsSrc; mteSrc_ = mteSrc;
79  }
80 
83  alias.erase(alias.size()-6,alias.size());
84  alias_=alias;
85  }
86 
89  rekeyClusterRefs_ = true;
91  }
92 
93  void setSecondHitPattern(Trajectory* traj, T& track,
94  const Propagator* prop, const MeasurementTrackerEvent* measTk,
95  const TrackerTopology* ttopo);
96 
97  const edm::ParameterSet& getConf() const {return conf_;}
98  protected:
101  protected:
107 
110 
112 
113 };
114 
115 #include "RecoTracker/TrackProducer/interface/TrackProducerBase.icc"
116 
117 #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_
std::vector< TrackCandidate > TrackCandidateCollection
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.
#define noexcept
void setAlias(std::string alias)
set the aliases of produced collections
void setConf(const edm::ParameterSet &conf)
Set parameter set.
tuple clusterRemovalInfo
Definition: Event.h:16
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
edm::EDGetToken src_
edm::View< T > TrackView
std::vector< AlgoProduct > AlgoProductCollection
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
edm::ESHandle< NavigationSchool > theSchool
volatile std::atomic< bool > shutdown_flag false
edm::OrphanHandle< TrackCollection > rTracks_
long double T
const edm::ParameterSet & getConf() const
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.