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 
9 
10 #include <cassert>
12 
13 class CkfDebugger;
15 class DetGroup;
18 class LayerMeasurements;
19 class MeasurementTracker;
22 class NavigationSchool;
23 class Propagator;
26 class TrajectoryContainer;
28 class TrajectoryFitter;
30 class Trajectory;
31 class TempTrajectory;
32 class TrajectoryFilter;
33 class TrackingRegion;
35 class TrajectoryCleaner;
37 namespace edm {
38  class ConsumesCollector;
39 }
40 
43 
44 #include <string>
45 
54 protected:
55  // short names
59  typedef std::pair<TSOS, std::vector<const DetLayer*> > StateAndLayers;
60 
61 public:
62  typedef std::vector<Trajectory> TrajectoryContainer;
63  typedef std::vector<TempTrajectory> TempTrajectoryContainer;
64  typedef TrajectoryContainer::iterator TrajectoryIterator;
65 
66  // Claims ownership of TrajectoryFilter pointers
68  std::unique_ptr<TrajectoryFilter> filter,
69  std::unique_ptr<TrajectoryFilter> inOutFilter = nullptr);
72  ~BaseCkfTrajectoryBuilder() override;
73 
74  // new interface returning the start Trajectory...
77  unsigned int& nCandPerSeed,
78  const TrajectoryFilter*) const {
79  assert(0 == 1);
80  return TempTrajectory();
81  }
82 
83  virtual void rebuildTrajectories(TempTrajectory const& startingTraj,
84  const TrajectorySeed& seed,
85  TrajectoryContainer& result) const {
86  assert(0 == 1);
87  }
88 
90 
91  void setEvent(const edm::Event& event) const override;
92  void unset() const override;
93 
94  void setEvent(const edm::Event& iEvent, const edm::EventSetup& iSetup, const MeasurementTrackerEvent* data);
95 
96  virtual void setDebugger(CkfDebugger* dbg) const { ; }
97 
99  // int maxLostHit() {return theMaxLostHit;}
100 
102  // int maxConsecLostHit() {return theMaxConsecLostHit;}
103 
105 
106 protected:
107  static std::unique_ptr<TrajectoryFilter> createTrajectoryFilter(const edm::ParameterSet& pset,
109 
110  virtual void setEvent_(const edm::Event& iEvent, const edm::EventSetup& iSetup) = 0;
111 
112  //methods for dubugging
114  const std::vector<TrajectoryMeasurement>& meas,
116  const Propagator* theForwardPropagator,
119  return true;
120  }
122  const std::vector<TrajectoryMeasurement>& meas,
124  const Propagator* theForwardPropagator,
127  return true;
128  }
129  virtual void fillSeedHistoDebugger(std::vector<TrajectoryMeasurement>::iterator begin,
130  std::vector<TrajectoryMeasurement>::iterator end) const {
131  ;
132  }
133 
134 protected:
136 
138  // If inOut is true, this is being called part-way through tracking, after the in-out tracking phase is complete.
139  // If inOut is false, it is called at the end of tracking.
140  bool toBeContinued(TempTrajectory& traj, bool inOut = false) const;
141 
143  bool qualityFilter(const TempTrajectory& traj, bool inOut = false) const;
144 
145  void addToResult(std::shared_ptr<const TrajectorySeed> const& seed,
146  TempTrajectory& traj,
148  bool inOut = false) const;
149  void addToResult(TempTrajectory const& traj, TempTrajectoryContainer& result, bool inOut = false) const;
150  void moveToResult(TempTrajectory&& traj, TempTrajectoryContainer& result, bool inOut = false) const;
151 
153 
154 private:
155  void seedMeasurements(const TrajectorySeed& seed, TempTrajectory& result, bool as5D) const;
156 
157 protected:
158  void setData(const MeasurementTrackerEvent* data);
159 
162  }
165  }
166 
167 protected:
169 
171  const Propagator* thePropagatorAlong = nullptr;
177 
178 private:
180 
181  std::unique_ptr<TrajectoryFilter> theFilter;
182  std::unique_ptr<TrajectoryFilter> theInOutFilter;
184  // for EventSetup
190 };
191 
192 #endif
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
BaseCkfTrajectoryBuilder::addToResult
void addToResult(std::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
Definition: BaseCkfTrajectoryBuilder.cc:146
MeasurementEstimator
Definition: MeasurementEstimator.h:19
TrajectoryFilter
Definition: TrajectoryFilter.h:28
BaseCkfTrajectoryBuilder
Definition: BaseCkfTrajectoryBuilder.h:53
BaseCkfTrajectoryBuilder::thePropagatorAlong
const Propagator * thePropagatorAlong
Definition: BaseCkfTrajectoryBuilder.h:171
BaseCkfTrajectoryBuilder::TrajectoryIterator
TrajectoryContainer::iterator TrajectoryIterator
Definition: BaseCkfTrajectoryBuilder.h:64
BaseCkfTrajectoryBuilder::theFilter
std::unique_ptr< TrajectoryFilter > theFilter
Definition: BaseCkfTrajectoryBuilder.h:181
BaseCkfTrajectoryBuilder::setEvent
void setEvent(const edm::Event &event) const override
Definition: BaseCkfTrajectoryBuilder.cc:221
edm
HLT enums.
Definition: AlignableModifier.h:19
TempTrajectory
Definition: TempTrajectory.h:40
CkfDebugger
Definition: CkfDebugger.h:43
BaseCkfTrajectoryBuilder::TrajectoryContainer
std::vector< Trajectory > TrajectoryContainer
Definition: BaseCkfTrajectoryBuilder.h:62
BaseCkfTrajectoryBuilder::theEstimator
const Chi2MeasurementEstimatorBase * theEstimator
Definition: BaseCkfTrajectoryBuilder.h:173
BaseCkfTrajectoryBuilder::findStateAndLayers
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
Definition: BaseCkfTrajectoryBuilder.cc:195
cms::cuda::assert
assert(be >=bs)
BaseCkfTrajectoryBuilder::TSOS
TrajectoryStateOnSurface TSOS
Definition: BaseCkfTrajectoryBuilder.h:57
BaseCkfTrajectoryBuilder::~BaseCkfTrajectoryBuilder
~BaseCkfTrajectoryBuilder() override
Definition: BaseCkfTrajectoryBuilder.cc:43
TrajectoryMeasurement.h
BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger
virtual bool analyzeMeasurementsDebugger(TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
Definition: BaseCkfTrajectoryBuilder.h:121
BaseCkfTrajectoryBuilder::fillSeedHistoDebugger
virtual void fillSeedHistoDebugger(std::vector< TrajectoryMeasurement >::iterator begin, std::vector< TrajectoryMeasurement >::iterator end) const
Definition: BaseCkfTrajectoryBuilder.h:129
NavigationSchool
Definition: NavigationSchool.h:18
BaseCkfTrajectoryBuilder::qualityFilter
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
Definition: BaseCkfTrajectoryBuilder.cc:135
BaseCkfTrajectoryBuilder::setData
void setData(const MeasurementTrackerEvent *data)
Definition: BaseCkfTrajectoryBuilder.cc:216
BaseCkfTrajectoryBuilder::theTTRHBuilder
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: BaseCkfTrajectoryBuilder.h:174
end
#define end
Definition: vmac.h:39
BaseCkfTrajectoryBuilder::theSeedAs5DHit
bool theSeedAs5DHit
Definition: BaseCkfTrajectoryBuilder.h:179
BaseCkfTrajectoryBuilder::theInOutFilter
std::unique_ptr< TrajectoryFilter > theInOutFilter
Definition: BaseCkfTrajectoryBuilder.h:182
Propagator
Definition: Propagator.h:44
MeasurementTracker
Definition: MeasurementTracker.h:21
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
BaseCkfTrajectoryBuilder::BaseCkfTrajectoryBuilder
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)
Definition: BaseCkfTrajectoryBuilder.cc:27
BaseCkfTrajectoryBuilder::toBeContinued
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
Definition: BaseCkfTrajectoryBuilder.cc:114
LayerMeasurements
Definition: LayerMeasurements.h:18
BaseCkfTrajectoryBuilder::createTrajectoryFilter
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
Definition: BaseCkfTrajectoryBuilder.cc:45
TrajectoryBuilder.h
BaseCkfTrajectoryBuilder::theUpdator
const TrajectoryStateUpdator * theUpdator
Definition: BaseCkfTrajectoryBuilder.h:170
BaseCkfTrajectoryBuilder::backwardPropagator
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
Definition: BaseCkfTrajectoryBuilder.h:163
BaseCkfTrajectoryBuilder::thePropagatorAlongName
const std::string thePropagatorAlongName
Definition: BaseCkfTrajectoryBuilder.h:186
BaseCkfTrajectoryBuilder::theMeasurementTracker
const MeasurementTrackerEvent * theMeasurementTracker
Definition: BaseCkfTrajectoryBuilder.h:175
BaseCkfTrajectoryBuilder::hitBuilder
const TransientTrackingRecHitBuilder * hitBuilder() const
Definition: BaseCkfTrajectoryBuilder.h:104
BaseCkfTrajectoryBuilder::moveToResult
void moveToResult(TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
Definition: BaseCkfTrajectoryBuilder.cc:182
TrajectorySeed.h
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
BaseCkfTrajectoryBuilder::theUpdatorName
const std::string theUpdatorName
Definition: BaseCkfTrajectoryBuilder.h:185
BaseCkfTrajectoryBuilder::StateAndLayers
std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
Definition: BaseCkfTrajectoryBuilder.h:59
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BaseCkfTrajectoryBuilder::TempTrajectoryContainer
std::vector< TempTrajectory > TempTrajectoryContainer
Definition: BaseCkfTrajectoryBuilder.h:63
IntermediateTrajectoryCleaner
Definition: IntermediateTrajectoryCleaner.h:8
BaseCkfTrajectoryBuilder::theRecHitBuilderName
const std::string theRecHitBuilderName
Definition: BaseCkfTrajectoryBuilder.h:189
edm::ParameterSet
Definition: ParameterSet.h:36
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:15
BaseCkfTrajectoryBuilder::seedMeasurements
void seedMeasurements(const TrajectorySeed &seed, TempTrajectory &result, bool as5D) const
Definition: BaseCkfTrajectoryBuilder.cc:51
BaseCkfTrajectoryBuilder::FTS
FreeTrajectoryState FTS
Definition: BaseCkfTrajectoryBuilder.h:56
BaseCkfTrajectoryBuilder::thePropagatorOpposite
const Propagator * thePropagatorOpposite
Definition: BaseCkfTrajectoryBuilder.h:172
Event.h
BaseCkfTrajectoryBuilder::TM
TrajectoryMeasurement TM
Definition: BaseCkfTrajectoryBuilder.h:58
BaseCkfTrajectoryBuilder::setEvent_
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
BaseCkfTrajectoryBuilder::setNavigationSchool
void setNavigationSchool(NavigationSchool const *nv)
Definition: BaseCkfTrajectoryBuilder.h:89
BaseCkfTrajectoryBuilder::rebuildTrajectories
virtual void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
Definition: BaseCkfTrajectoryBuilder.h:83
iEvent
int iEvent
Definition: GenABIO.cc:224
BaseCkfTrajectoryBuilder::theNavigationSchool
const NavigationSchool * theNavigationSchool
Definition: BaseCkfTrajectoryBuilder.h:176
BaseCkfTrajectoryBuilder::forwardPropagator
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
Definition: BaseCkfTrajectoryBuilder.h:160
BaseCkfTrajectoryBuilder::Chi2MeasurementEstimatorRecord
TrackingComponentsRecord Chi2MeasurementEstimatorRecord
Definition: BaseCkfTrajectoryBuilder.h:168
edm::EventSetup
Definition: EventSetup.h:57
bqueue.h
Chi2MeasurementEstimatorBase
Definition: Chi2MeasurementEstimatorBase.h:14
BaseCkfTrajectoryBuilder::unset
void unset() const override
Definition: BaseCkfTrajectoryBuilder.cc:226
TrajectoryFitter
Definition: TrajectoryFitter.h:19
BaseCkfTrajectoryBuilder::thePropagatorOppositeName
const std::string thePropagatorOppositeName
Definition: BaseCkfTrajectoryBuilder.h:187
BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger
virtual bool analyzeMeasurementsDebugger(Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
Definition: BaseCkfTrajectoryBuilder.h:113
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
TrajectoryBuilder
Definition: TrajectoryBuilder.h:18
Trajectory
Definition: Trajectory.h:38
TrajectoryMeasurementGroup
Definition: TrajectoryMeasurementGroup.h:17
BaseCkfTrajectoryBuilder::operator=
BaseCkfTrajectoryBuilder & operator=(const BaseCkfTrajectoryBuilder &)=delete
TrajectorySeed
Definition: TrajectorySeed.h:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TrackingRegion
Definition: TrackingRegion.h:38
DetGroup
Definition: DetGroup.h:41
mps_fire.result
result
Definition: mps_fire.py:303
TrajectoryStateUpdator
Definition: TrajectoryStateUpdator.h:14
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
BaseCkfTrajectoryBuilder::buildTrajectories
virtual TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
Definition: BaseCkfTrajectoryBuilder.h:75
BaseCkfTrajectoryBuilder::theEstimatorName
const std::string theEstimatorName
Definition: BaseCkfTrajectoryBuilder.h:188
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
TempTrajectory.h
begin
#define begin
Definition: vmac.h:32
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
alongMomentum
Definition: PropagationDirection.h:4
BaseCkfTrajectoryBuilder::createStartingTrajectory
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
Definition: BaseCkfTrajectoryBuilder.cc:105
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
BaseCkfTrajectoryBuilder::setDebugger
virtual void setDebugger(CkfDebugger *dbg) const
Definition: BaseCkfTrajectoryBuilder.h:96
TrajectoryCleaner
Definition: TrajectoryCleaner.h:14
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
PrintoutHelper.h
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12