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 
16 
19 
21 
27 
28 class Propagator;
31 class TrackerGeometry;
32 class TrajectoryFitter;
34 class NavigationSchool;
35 
36 template <class T>
38 public:
39  typedef std::vector<T> TrackCollection;
40  typedef std::pair<Trajectory*, std::pair<T*,PropagationDirection> > AlgoProduct;
41  typedef std::vector< AlgoProduct > AlgoProductCollection;
42 public:
44  TrackProducerBase(bool trajectoryInEvent = false):
45  trajectoryInEvent_(trajectoryInEvent),
47 
49  virtual ~TrackProducerBase();
50 
52  virtual void getFromES(const edm::EventSetup&,
59 
64 
66  virtual void produce(edm::Event&, const edm::EventSetup&) = 0;
67 
70 
73 
75  void setAlias(std::string alias){
76  alias.erase(alias.size()-6,alias.size());
77  alias_=alias;
78  }
79 
81  void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo) {
82  rekeyClusterRefs_ = true;
83  clusterRemovalInfo_ = clusterRemovalInfo;
84  }
85 
86  void setSecondHitPattern(Trajectory* traj, T& track,
87  const Propagator* prop, const MeasurementTracker* measTk );
88 
89  const edm::ParameterSet& getConf() const {return conf_;}
90  private:
93  protected:
94  std::string alias_;
98 
101 
103 
104 };
105 
106 #include "RecoTracker/TrackProducer/interface/TrackProducerBase.icc"
107 
108 #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 setSecondHitPattern(Trajectory *traj, T &track, const Propagator *prop, const MeasurementTracker *measTk)
edm::InputTag src_
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
virtual void produce(edm::Event &, const edm::EventSetup &)=0
Method where the procduction take place. To be implemented in concrete classes.
edm::InputTag bsSrc_
void setConf(edm::ParameterSet conf)
Set parameter set.
TrackProducerBase(bool trajectoryInEvent=false)
Constructor.
std::vector< AlgoProduct > AlgoProductCollection
void setSrc(edm::InputTag src, edm::InputTag bsSrc)
set label of source collection
tuple conf
Definition: dbtoconf.py:185
virtual ~TrackProducerBase()
Destructor.
edm::ESHandle< NavigationSchool > theSchool
std::pair< Trajectory *, std::pair< T *, PropagationDirection > > AlgoProduct
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.