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 
46 
47 #include <string>
48 
57 protected:
58  // short names
62  typedef std::pair<TSOS, std::vector<const DetLayer*> > StateAndLayers;
63 
64 public:
65  typedef std::vector<Trajectory> TrajectoryContainer;
66  typedef std::vector<TempTrajectory> TempTrajectoryContainer;
67  typedef TrajectoryContainer::iterator TrajectoryIterator;
68 
69  // Claims ownership of TrajectoryFilter pointers
72  std::unique_ptr<TrajectoryFilter> filter,
73  std::unique_ptr<TrajectoryFilter> inOutFilter = nullptr);
76  ~BaseCkfTrajectoryBuilder() override;
77 
79 
80  // new interface returning the start Trajectory...
83  unsigned int& nCandPerSeed,
84  const TrajectoryFilter*) const {
85  assert(0 == 1);
86  return TempTrajectory();
87  }
88 
89  virtual void rebuildTrajectories(TempTrajectory const& startingTraj,
90  const TrajectorySeed& seed,
91  TrajectoryContainer& result) const {
92  assert(0 == 1);
93  }
94 
96 
97  void setEvent(const edm::Event& event) const override;
98  void unset() const override;
99 
100  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup, const MeasurementTrackerEvent* data);
101 
102  virtual void setDebugger(CkfDebugger* dbg) const { ; }
103 
105  // int maxLostHit() {return theMaxLostHit;}
106 
108  // int maxConsecLostHit() {return theMaxConsecLostHit;}
109 
111 
112 protected:
113  static std::unique_ptr<TrajectoryFilter> createTrajectoryFilter(const edm::ParameterSet& pset,
115 
116  virtual void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) = 0;
117 
118  //methods for dubugging
120  const std::vector<TrajectoryMeasurement>& meas,
122  const Propagator* theForwardPropagator,
125  return true;
126  }
128  const std::vector<TrajectoryMeasurement>& meas,
130  const Propagator* theForwardPropagator,
133  return true;
134  }
135  virtual void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin,
136  std::vector<TrajectoryMeasurement>::iterator end) const {
137  ;
138  }
139 
140 protected:
142 
144  // If inOut is true, this is being called part-way through tracking, after the in-out tracking phase is complete.
145  // If inOut is false, it is called at the end of tracking.
146  bool toBeContinued(TempTrajectory& traj, bool inOut = false) const;
147 
149  bool qualityFilter(const TempTrajectory& traj, bool inOut = false) const;
150 
151  void addToResult(std::shared_ptr<const TrajectorySeed> const& seed,
152  TempTrajectory& traj,
154  bool inOut = false) const;
155  void addToResult(TempTrajectory const& traj, TempTrajectoryContainer& result, bool inOut = false) const;
156  void moveToResult(TempTrajectory&& traj, TempTrajectoryContainer& result, bool inOut = false) const;
157 
159 
160 private:
161  void seedMeasurements(const TrajectorySeed& seed, TempTrajectory& result, bool as5D) const;
162 
163 protected:
164  void setData(const MeasurementTrackerEvent* data);
165 
168  }
171  }
172 
173 protected:
175 
177  const Propagator* thePropagatorAlong = nullptr;
183 
184 private:
186 
187  std::unique_ptr<TrajectoryFilter> theFilter;
188  std::unique_ptr<TrajectoryFilter> theInOutFilter;
190  // for EventSetup
196 };
197 
198 #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