CMS 3D CMS Logo

BaseCkfTrajectoryBuilder.h
Go to the documentation of this file.
1 #ifndef RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
2 #define RecoTracker_CkfPattern_BaseCkfTrajectoryBuilder_h
3 
12 
13 #include <cassert>
15 
16 class CkfDebugger;
18 class DetGroup;
21 class LayerMeasurements;
22 class MeasurementTracker;
25 class NavigationSchool;
26 class Propagator;
29 class TrajectoryContainer;
31 class TrajectoryFitter;
34 class Trajectory;
35 class TempTrajectory;
36 class TrajectoryFilter;
37 class TrackingRegion;
39 class TrajectoryCleaner;
41 namespace edm {
42  class ConsumesCollector;
43 }
44 
47 
48 #include <string>
49 
58 protected:
59  // short names
63  typedef std::pair<TSOS, std::vector<const DetLayer*> > StateAndLayers;
64 
65 public:
66  typedef std::vector<Trajectory> TrajectoryContainer;
67  typedef std::vector<TempTrajectory> TempTrajectoryContainer;
68  typedef TrajectoryContainer::iterator TrajectoryIterator;
69 
70  // Claims ownership of TrajectoryFilter pointers
73  std::unique_ptr<TrajectoryFilter> filter,
74  std::unique_ptr<TrajectoryFilter> inOutFilter = nullptr);
77  ~BaseCkfTrajectoryBuilder() override;
78 
80 
81  // new interface returning the start Trajectory...
84  unsigned int& nCandPerSeed,
85  const TrajectoryFilter*) const {
86  assert(0 == 1);
87  return TempTrajectory();
88  }
89 
90  virtual void rebuildTrajectories(TempTrajectory const& startingTraj,
91  const TrajectorySeed& seed,
92  TrajectoryContainer& result) const {
93  assert(0 == 1);
94  }
95 
97 
98  void setEvent(const edm::Event& event) const override;
99  void unset() const override;
100 
101  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup, const MeasurementTrackerEvent* data);
102 
103  virtual void setDebugger(CkfDebugger* dbg) const { ; }
104 
106  // int maxLostHit() {return theMaxLostHit;}
107 
109  // int maxConsecLostHit() {return theMaxConsecLostHit;}
110 
112 
113 protected:
114  static std::unique_ptr<TrajectoryFilter> createTrajectoryFilter(const edm::ParameterSet& pset,
116 
117  virtual void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) = 0;
118 
119  //methods for dubugging
121  const std::vector<TrajectoryMeasurement>& meas,
123  const Propagator* theForwardPropagator,
126  return true;
127  }
129  const std::vector<TrajectoryMeasurement>& meas,
131  const Propagator* theForwardPropagator,
134  return true;
135  }
136  virtual void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin,
137  std::vector<TrajectoryMeasurement>::iterator end) const {
138  ;
139  }
140 
141 protected:
143 
145  // If inOut is true, this is being called part-way through tracking, after the in-out tracking phase is complete.
146  // If inOut is false, it is called at the end of tracking.
147  bool toBeContinued(TempTrajectory& traj, bool inOut = false) const;
148 
150  bool qualityFilter(const TempTrajectory& traj, bool inOut = false) const;
151 
152  void addToResult(std::shared_ptr<const TrajectorySeed> const& seed,
153  TempTrajectory& traj,
155  bool inOut = false) const;
156  void addToResult(TempTrajectory const& traj, TempTrajectoryContainer& result, bool inOut = false) const;
157  void moveToResult(TempTrajectory&& traj, TempTrajectoryContainer& result, bool inOut = false) const;
158 
160 
161 private:
162  void seedMeasurements(const TrajectorySeed& seed, TempTrajectory& result, bool as5D) const;
163 
164 protected:
165  void setData(const MeasurementTrackerEvent* data);
166 
169  }
172  }
173 
174 protected:
176 
178  const Propagator* thePropagatorAlong = nullptr;
184 
185 private:
187 
188  std::unique_ptr<TrajectoryFilter> theFilter;
189  std::unique_ptr<TrajectoryFilter> theInOutFilter;
191  // for EventSetup
197 };
198 
199 #endif
BaseCkfTrajectoryBuilder & operator=(const BaseCkfTrajectoryBuilder &)=delete
virtual void fillSeedHistoDebugger(std::vector< TrajectoryMeasurement >::iterator begin, std::vector< TrajectoryMeasurement >::iterator end) const
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
TrajectoryStateOnSurface TSOS
virtual bool analyzeMeasurementsDebugger(TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
virtual TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
void setData(const MeasurementTrackerEvent *data)
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorAlongToken
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
ret
prodAgent to be discontinued
virtual void setDebugger(CkfDebugger *dbg) const
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
const TrajectoryStateUpdator * theUpdator
assert(be >=bs)
TrajectoryContainer::iterator TrajectoryIterator
void seedMeasurements(const TrajectorySeed &seed, TempTrajectory &result, bool as5D) const
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
int iEvent
Definition: GenABIO.cc:224
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
const TransientTrackingRecHitBuilder * theTTRHBuilder
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > theEstimatorToken
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
std::unique_ptr< TrajectoryFilter > theInOutFilter
virtual bool analyzeMeasurementsDebugger(Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
const MeasurementTrackerEvent * theMeasurementTracker
const TransientTrackingRecHitBuilder * hitBuilder() const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > thePropagatorOppositeToken
void moveToResult(TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
std::vector< TempTrajectory > TempTrajectoryContainer
void setNavigationSchool(NavigationSchool const *nv)
const Propagator * thePropagatorOpposite
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector iC, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)
virtual void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
TrackingComponentsRecord Chi2MeasurementEstimatorRecord
void addToResult(std::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
const NavigationSchool * theNavigationSchool
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theRecHitBuilderToken
void setEvent(const edm::Event &event) const override
const edm::ESGetToken< TrajectoryStateUpdator, TrackingComponentsRecord > theUpdatorToken
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator
Definition: event.py:1
std::unique_ptr< TrajectoryFilter > theFilter