CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
BaseCkfTrajectoryBuilder Class Referenceabstract

#include <BaseCkfTrajectoryBuilder.h>

Inheritance diagram for BaseCkfTrajectoryBuilder:
TrajectoryBuilder CkfTrajectoryBuilder GroupedCkfTrajectoryBuilder CkfDebugTrajectoryBuilder MuonCkfTrajectoryBuilder

Public Types

typedef std::vector< TempTrajectoryTempTrajectoryContainer
 
typedef std::vector< TrajectoryTrajectoryContainer
 
typedef TrajectoryContainer::iterator TrajectoryIterator
 
- Public Types inherited from TrajectoryBuilder
typedef std::vector< TrajectoryTrajectoryContainer
 
typedef TrajectoryContainer::iterator TrajectoryIterator
 

Public Member Functions

 BaseCkfTrajectoryBuilder (const BaseCkfTrajectoryBuilder &)=delete
 
 BaseCkfTrajectoryBuilder (const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)
 
virtual TempTrajectory buildTrajectories (const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const
 
const TransientTrackingRecHitBuilderhitBuilder () const
 
BaseCkfTrajectoryBuilderoperator= (const BaseCkfTrajectoryBuilder &)=delete
 
virtual void rebuildTrajectories (TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
 
virtual void setDebugger (CkfDebugger *dbg) const
 
void setEvent (const edm::Event &event) const override
 
void setEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup, const MeasurementTrackerEvent *data)
 
void setNavigationSchool (NavigationSchool const *nv)
 
void unset () const override
 
 ~BaseCkfTrajectoryBuilder () override
 
- Public Member Functions inherited from TrajectoryBuilder
virtual void rebuildSeedingRegion (const TrajectorySeed &, TrajectoryContainer &result) const
 
virtual TrajectoryContainer trajectories (const TrajectorySeed &) const =0
 
virtual void trajectories (const TrajectorySeed &seed, TrajectoryContainer &out) const
 
virtual ~TrajectoryBuilder ()
 

Protected Types

typedef TrackingComponentsRecord Chi2MeasurementEstimatorRecord
 
typedef FreeTrajectoryState FTS
 
typedef std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 

Protected Member Functions

void addToResult (std::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
 
void addToResult (TempTrajectory const &traj, TempTrajectoryContainer &result, bool inOut=false) const
 
virtual bool analyzeMeasurementsDebugger (TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
virtual bool analyzeMeasurementsDebugger (Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
const PropagatorbackwardPropagator (const TrajectorySeed &seed) const
 
TempTrajectory createStartingTrajectory (const TrajectorySeed &seed) const
 
virtual void fillSeedHistoDebugger (std::vector< TrajectoryMeasurement >::iterator begin, std::vector< TrajectoryMeasurement >::iterator end) const
 
StateAndLayers findStateAndLayers (const TrajectorySeed &seed, const TempTrajectory &traj) const
 
const PropagatorforwardPropagator (const TrajectorySeed &seed) const
 
void moveToResult (TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
 
bool qualityFilter (const TempTrajectory &traj, bool inOut=false) const
 
void setData (const MeasurementTrackerEvent *data)
 
virtual void setEvent_ (const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
 
bool toBeContinued (TempTrajectory &traj, bool inOut=false) const
 

Static Protected Member Functions

static std::unique_ptr< TrajectoryFiltercreateTrajectoryFilter (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 

Protected Attributes

const Chi2MeasurementEstimatorBasetheEstimator = nullptr
 
const MeasurementTrackerEventtheMeasurementTracker = nullptr
 
const NavigationSchooltheNavigationSchool = nullptr
 
const PropagatorthePropagatorAlong = nullptr
 
const PropagatorthePropagatorOpposite = nullptr
 
const TransientTrackingRecHitBuildertheTTRHBuilder = nullptr
 
const TrajectoryStateUpdatortheUpdator = nullptr
 

Private Member Functions

void seedMeasurements (const TrajectorySeed &seed, TempTrajectory &result, bool as5D) const
 

Private Attributes

const std::string theEstimatorName
 
std::unique_ptr< TrajectoryFiltertheFilter
 
std::unique_ptr< TrajectoryFiltertheInOutFilter
 
const std::string thePropagatorAlongName
 
const std::string thePropagatorOppositeName
 
const std::string theRecHitBuilderName
 
bool theSeedAs5DHit
 
const std::string theUpdatorName
 

Detailed Description

The component of track reconstruction that, strating from a seed, reconstructs all possible trajectories. The resulting trajectories may be mutually exclusive and require cleaning by a TrajectoryCleaner. The Trajectories are normally not smoothed.

Definition at line 53 of file BaseCkfTrajectoryBuilder.h.

Member Typedef Documentation

◆ Chi2MeasurementEstimatorRecord

Definition at line 168 of file BaseCkfTrajectoryBuilder.h.

◆ FTS

Definition at line 56 of file BaseCkfTrajectoryBuilder.h.

◆ StateAndLayers

typedef std::pair<TSOS, std::vector<const DetLayer*> > BaseCkfTrajectoryBuilder::StateAndLayers
protected

Definition at line 59 of file BaseCkfTrajectoryBuilder.h.

◆ TempTrajectoryContainer

Definition at line 63 of file BaseCkfTrajectoryBuilder.h.

◆ TM

Definition at line 58 of file BaseCkfTrajectoryBuilder.h.

◆ TrajectoryContainer

Definition at line 62 of file BaseCkfTrajectoryBuilder.h.

◆ TrajectoryIterator

typedef TrajectoryContainer::iterator BaseCkfTrajectoryBuilder::TrajectoryIterator

Definition at line 64 of file BaseCkfTrajectoryBuilder.h.

◆ TSOS

Definition at line 57 of file BaseCkfTrajectoryBuilder.h.

Constructor & Destructor Documentation

◆ BaseCkfTrajectoryBuilder() [1/2]

BaseCkfTrajectoryBuilder::BaseCkfTrajectoryBuilder ( const edm::ParameterSet conf,
std::unique_ptr< TrajectoryFilter filter,
std::unique_ptr< TrajectoryFilter inOutFilter = nullptr 
)

Definition at line 27 of file BaseCkfTrajectoryBuilder.cc.

30  : theSeedAs5DHit(conf.getParameter<bool>("seedAs5DHit")),
32  theInOutFilter(std::move(inOutFilter)),
33  theUpdatorName(conf.getParameter<std::string>("updator")),
34  thePropagatorAlongName(conf.getParameter<std::string>("propagatorAlong")),
35  thePropagatorOppositeName(conf.getParameter<std::string>("propagatorOpposite")),
36  theEstimatorName(conf.getParameter<std::string>("estimator")),
37  theRecHitBuilderName(conf.getParameter<std::string>("TTRHBuilder")) {
38  if (conf.exists("clustersToSkip"))
39  edm::LogError("BaseCkfTrajectoryBuilder")
40  << "ERROR: " << typeid(*this).name() << " has a clustersToSkip parameter set";
41 }

References edm::ParameterSet::exists().

◆ BaseCkfTrajectoryBuilder() [2/2]

BaseCkfTrajectoryBuilder::BaseCkfTrajectoryBuilder ( const BaseCkfTrajectoryBuilder )
delete

◆ ~BaseCkfTrajectoryBuilder()

BaseCkfTrajectoryBuilder::~BaseCkfTrajectoryBuilder ( )
override

Definition at line 43 of file BaseCkfTrajectoryBuilder.cc.

43 {}

Member Function Documentation

◆ addToResult() [1/2]

void BaseCkfTrajectoryBuilder::addToResult ( std::shared_ptr< const TrajectorySeed > const &  seed,
TempTrajectory traj,
TrajectoryContainer result,
bool  inOut = false 
) const
protected

Definition at line 146 of file BaseCkfTrajectoryBuilder.cc.

149  {
150  // quality check
151  if (!qualityFilter(tmptraj, inOut))
152  return;
153  Trajectory traj = tmptraj.toTrajectory();
154  traj.setSharedSeed(seed);
155  // discard latest dummy measurements
156  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid())
157  traj.pop();
158  LogDebug("CkfPattern") << inOut << "=inOut option. pushing a Trajectory with: " << traj.foundHits() << " found hits. "
159  << traj.lostHits()
160  << " lost hits. Popped :" << (tmptraj.measurements().size()) - (traj.measurements().size())
161  << " hits.";
162  result.push_back(std::move(traj));
163 }

References Trajectory::empty(), Trajectory::foundHits(), Trajectory::lastMeasurement(), LogDebug, Trajectory::lostHits(), TempTrajectory::measurements(), Trajectory::measurements(), eostools::move(), Trajectory::pop(), qualityFilter(), TrajectoryMeasurement::recHit(), mps_fire::result, SurveyInfoScenario_cff::seed, Trajectory::setSharedSeed(), cmsutils::bqueue< T >::size(), and TempTrajectory::toTrajectory().

Referenced by CkfTrajectoryBuilder::limitedCandidates().

◆ addToResult() [2/2]

void BaseCkfTrajectoryBuilder::addToResult ( TempTrajectory const &  traj,
TempTrajectoryContainer result,
bool  inOut = false 
) const
protected

Definition at line 165 of file BaseCkfTrajectoryBuilder.cc.

167  {
168  // quality check
169  if (!qualityFilter(tmptraj, inOut))
170  return;
171  // discard latest dummy measurements
172  TempTrajectory traj = tmptraj;
173  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid())
174  traj.pop();
175  LogDebug("CkfPattern") << inOut << "=inOut option. pushing a TempTrajectory with: " << traj.foundHits()
176  << " found hits. " << traj.lostHits()
177  << " lost hits. Popped :" << (tmptraj.measurements().size()) - (traj.measurements().size())
178  << " hits.";
179  result.push_back(std::move(traj));
180 }

References TempTrajectory::empty(), TempTrajectory::foundHits(), TempTrajectory::lastMeasurement(), LogDebug, TempTrajectory::lostHits(), TempTrajectory::measurements(), eostools::move(), TempTrajectory::pop(), qualityFilter(), TrajectoryMeasurement::recHit(), mps_fire::result, and cmsutils::bqueue< T >::size().

◆ analyzeMeasurementsDebugger() [1/2]

virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger ( TempTrajectory traj,
const std::vector< TrajectoryMeasurement > &  meas,
const MeasurementTrackerEvent theMeasurementTracker,
const Propagator theForwardPropagator,
const Chi2MeasurementEstimatorBase theEstimator,
const TransientTrackingRecHitBuilder theTTRHBuilder 
) const
inlineprotectedvirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 121 of file BaseCkfTrajectoryBuilder.h.

126  {
127  return true;
128  }

◆ analyzeMeasurementsDebugger() [2/2]

virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger ( Trajectory traj,
const std::vector< TrajectoryMeasurement > &  meas,
const MeasurementTrackerEvent theMeasurementTracker,
const Propagator theForwardPropagator,
const Chi2MeasurementEstimatorBase theEstimator,
const TransientTrackingRecHitBuilder theTTRHBuilder 
) const
inlineprotectedvirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 113 of file BaseCkfTrajectoryBuilder.h.

118  {
119  return true;
120  }

Referenced by CkfTrajectoryBuilder::limitedCandidates().

◆ backwardPropagator()

const Propagator* BaseCkfTrajectoryBuilder::backwardPropagator ( const TrajectorySeed seed) const
inlineprotected

Definition at line 163 of file BaseCkfTrajectoryBuilder.h.

163  {
165  }

References alongMomentum, SurveyInfoScenario_cff::seed, thePropagatorAlong, and thePropagatorOpposite.

Referenced by seedMeasurements().

◆ buildTrajectories()

virtual TempTrajectory BaseCkfTrajectoryBuilder::buildTrajectories ( const TrajectorySeed seed,
TrajectoryContainer ret,
unsigned int &  nCandPerSeed,
const TrajectoryFilter  
) const
inlinevirtual

Reimplemented in GroupedCkfTrajectoryBuilder, and CkfTrajectoryBuilder.

Definition at line 75 of file BaseCkfTrajectoryBuilder.h.

78  {
79  assert(0 == 1);
80  return TempTrajectory();
81  }

References cms::cuda::assert().

◆ createStartingTrajectory()

TempTrajectory BaseCkfTrajectoryBuilder::createStartingTrajectory ( const TrajectorySeed seed) const
protected

◆ createTrajectoryFilter()

std::unique_ptr< TrajectoryFilter > BaseCkfTrajectoryBuilder::createTrajectoryFilter ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)
staticprotected

Definition at line 45 of file BaseCkfTrajectoryBuilder.cc.

46  {
47  return TrajectoryFilterFactory::get()->create(pset.getParameter<std::string>("ComponentType"), pset, iC);
48 }

References get, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fillSeedHistoDebugger()

virtual void BaseCkfTrajectoryBuilder::fillSeedHistoDebugger ( std::vector< TrajectoryMeasurement >::iterator  begin,
std::vector< TrajectoryMeasurement >::iterator  end 
) const
inlineprotectedvirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 129 of file BaseCkfTrajectoryBuilder.h.

130  {
131  ;
132  }

◆ findStateAndLayers()

BaseCkfTrajectoryBuilder::StateAndLayers BaseCkfTrajectoryBuilder::findStateAndLayers ( const TrajectorySeed seed,
const TempTrajectory traj 
) const
protected

Definition at line 195 of file BaseCkfTrajectoryBuilder.cc.

196  {
197  if (traj.empty()) {
198  //set the currentState to be the one from the trajectory seed starting point
199  PTrajectoryStateOnDet const& ptod = seed.startingState();
200  DetId id(ptod.detId());
202  const Surface* surface = &g->surface();
203 
204  TSOS currentState(
207  return StateAndLayers(currentState,
208  theNavigationSchool->nextLayers(*lastLayer, *currentState.freeState(), traj.direction()));
209  } else {
210  TSOS const& currentState = traj.lastMeasurement().updatedState();
211  return StateAndLayers(
212  currentState, theNavigationSchool->nextLayers(*traj.lastLayer(), *currentState.freeState(), traj.direction()));
213  }
214 }

References PTrajectoryStateOnDet::detId(), GeometricSearchTracker::detLayer(), TempTrajectory::direction(), TempTrajectory::empty(), forwardPropagator(), TrajectoryStateOnSurface::freeState(), g, MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::geomTracker(), triggerObjects_cff::id, TrackingGeometry::idToDet(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), HLT_2018_cff::magneticField, NavigationSchool::nextLayers(), SurveyInfoScenario_cff::seed, theMeasurementTracker, theNavigationSchool, trajectoryStateTransform::transientState(), and TrajectoryMeasurement::updatedState().

Referenced by CkfTrajectoryBuilder::findCompatibleMeasurements().

◆ forwardPropagator()

const Propagator* BaseCkfTrajectoryBuilder::forwardPropagator ( const TrajectorySeed seed) const
inlineprotected

◆ hitBuilder()

const TransientTrackingRecHitBuilder* BaseCkfTrajectoryBuilder::hitBuilder ( ) const
inline

Maximum number of lost hits per trajectory candidate. Maximum number of consecutive lost hits per trajectory candidate.

Definition at line 104 of file BaseCkfTrajectoryBuilder.h.

104 { return theTTRHBuilder; }

References theTTRHBuilder.

Referenced by ConversionTrackFinder::setEventSetup(), InOutConversionTrackFinder::tracks(), and OutInConversionTrackFinder::tracks().

◆ moveToResult()

void BaseCkfTrajectoryBuilder::moveToResult ( TempTrajectory &&  traj,
TempTrajectoryContainer result,
bool  inOut = false 
) const
protected

Definition at line 182 of file BaseCkfTrajectoryBuilder.cc.

182  {
183  // quality check
184  if (!qualityFilter(traj, inOut))
185  return;
186  // discard latest dummy measurements
187  while (!traj.empty() && !traj.lastMeasurement().recHitR().isValid())
188  traj.pop();
189  LogDebug("CkfPattern") << inOut << "=inOut option. pushing a TempTrajectory with: " << traj.foundHits()
190  << " found hits. " << traj.lostHits();
191  // <<" lost hits. Popped :"<<(ttraj.measurements().size())-(traj.measurements().size())<<" hits.";
192  result.push_back(std::move(traj));
193 }

References LogDebug, eostools::move(), qualityFilter(), and mps_fire::result.

◆ operator=()

BaseCkfTrajectoryBuilder& BaseCkfTrajectoryBuilder::operator= ( const BaseCkfTrajectoryBuilder )
delete

◆ qualityFilter()

bool BaseCkfTrajectoryBuilder::qualityFilter ( const TempTrajectory traj,
bool  inOut = false 
) const
protected

Called at end of track building, to see if track should be kept

Definition at line 135 of file BaseCkfTrajectoryBuilder.cc.

135  {
136  // Called after building a trajectory is completed, to see if it is good enough
137  // to keep.
138  if (inOut) {
139  // if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
140  return theInOutFilter->qualityFilter(traj);
141  } else {
142  return theFilter->qualityFilter(traj);
143  }
144 }

References theFilter, and theInOutFilter.

Referenced by addToResult(), and moveToResult().

◆ rebuildTrajectories()

virtual void BaseCkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed seed,
TrajectoryContainer result 
) const
inlinevirtual

Reimplemented in GroupedCkfTrajectoryBuilder, and CkfTrajectoryBuilder.

Definition at line 83 of file BaseCkfTrajectoryBuilder.h.

85  {
86  assert(0 == 1);
87  }

References cms::cuda::assert().

◆ seedMeasurements()

void BaseCkfTrajectoryBuilder::seedMeasurements ( const TrajectorySeed seed,
TempTrajectory result,
bool  as5D 
) const
private

Definition at line 51 of file BaseCkfTrajectoryBuilder.cc.

51  {
52  TrajectorySeed::range hitRange = seed.recHits();
53 
54  PTrajectoryStateOnDet pState(seed.startingState());
55  const GeomDet* gdet = theMeasurementTracker->geomTracker()->idToDet(pState.detId());
56  TSOS outerState =
58 
59  if (as5D) {
61  TSOS invalidState(gdet->surface());
62  auto hitLayer = theMeasurementTracker->geometricSearchTracker()->detLayer(pState.detId());
63  result.emplace(invalidState, outerState, recHit, 0, hitLayer);
64  return;
65  }
66 
67  for (TrajectorySeed::const_iterator ihit = hitRange.first; ihit != hitRange.second; ihit++) {
68  TrackingRecHit::RecHitPointer recHit = ihit->cloneSH();
69  const GeomDet* hitGeomDet = recHit->det();
70 
71  const DetLayer* hitLayer = theMeasurementTracker->geometricSearchTracker()->detLayer(ihit->geographicalId());
72 
73  TSOS invalidState(hitGeomDet->surface());
74  if (ihit == hitRange.second - 1) {
75  // the seed trajectory state should correspond to this hit
76  if (&gdet->surface() != &hitGeomDet->surface()) {
77  edm::LogError("CkfPattern")
78  << "CkfTrajectoryBuilder error: the seed state is not on the surface of the detector of the last seed hit";
79  return; // FIXME: should throw exception
80  }
81 
82  //TSOS updatedState = outerstate;
83  result.emplace(invalidState, outerState, recHit, 0, hitLayer);
84  } else {
85  TSOS innerState = backwardPropagator(seed)->propagate(outerState, hitGeomDet->surface());
86 
87  // try to recover if propagation failed
88  if
89  UNLIKELY(!innerState.isValid())
91  pState, &(hitGeomDet->surface()), forwardPropagator(seed)->magneticField());
92 
93  if (innerState.isValid()) {
94  TSOS innerUpdated = theUpdator->update(innerState, *recHit);
95  result.emplace(invalidState, innerUpdated, recHit, 0, hitLayer);
96  }
97  }
98  }
99 
100  // method for debugging
101  // fix somehow
102  // fillSeedHistoDebugger(result.begin(),result.end());
103 }

References backwardPropagator(), GeometricSearchTracker::detLayer(), forwardPropagator(), MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::geomTracker(), TrackingGeometry::idToDet(), TrajectoryStateOnSurface::isValid(), Propagator::magneticField(), Propagator::propagate(), rpcPointValidation_cfi::recHit, mps_fire::result, SurveyInfoScenario_cff::seed, GeomDet::surface(), theMeasurementTracker, theUpdator, trajectoryStateTransform::transientState(), UNLIKELY, and TrajectoryStateUpdator::update().

Referenced by createStartingTrajectory().

◆ setData()

void BaseCkfTrajectoryBuilder::setData ( const MeasurementTrackerEvent data)
protected

Definition at line 216 of file BaseCkfTrajectoryBuilder.cc.

216  {
217  // possibly do some sanity check here
219 }

References data, and theMeasurementTracker.

Referenced by setEvent().

◆ setDebugger()

virtual void BaseCkfTrajectoryBuilder::setDebugger ( CkfDebugger dbg) const
inlinevirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 96 of file BaseCkfTrajectoryBuilder.h.

96 { ; }

◆ setEvent() [1/2]

void BaseCkfTrajectoryBuilder::setEvent ( const edm::Event event) const
overridevirtual

Implements TrajectoryBuilder.

Definition at line 221 of file BaseCkfTrajectoryBuilder.cc.

221  {
222  std::cerr << "ERROR SetEvent called on " << typeid(*this).name()
223  << (theMeasurementTracker ? " with valid " : "witout any ") << "MeasurementTrackerEvent" << std::endl;
224 }

References beam_dqm_sourceclient-live_cfg::cerr, and theMeasurementTracker.

◆ setEvent() [2/2]

void BaseCkfTrajectoryBuilder::setEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const MeasurementTrackerEvent data 
)

Definition at line 231 of file BaseCkfTrajectoryBuilder.cc.

233  {
235  edm::ESHandle<Propagator> propagatorAlongHandle;
236  edm::ESHandle<Propagator> propagatorOppositeHandle;
239 
240  iSetup.get<TrackingComponentsRecord>().get(theUpdatorName, updatorHandle);
241  iSetup.get<TrackingComponentsRecord>().get(thePropagatorAlongName, propagatorAlongHandle);
242  iSetup.get<TrackingComponentsRecord>().get(thePropagatorOppositeName, propagatorOppositeHandle);
243  iSetup.get<TrackingComponentsRecord>().get(theEstimatorName, estimatorHandle);
244  iSetup.get<TransientRecHitRecord>().get(theRecHitBuilderName, recHitBuilderHandle);
245 
246  theUpdator = updatorHandle.product();
247  thePropagatorAlong = propagatorAlongHandle.product();
248  thePropagatorOpposite = propagatorOppositeHandle.product();
249  theEstimator = estimatorHandle.product();
250  theTTRHBuilder = recHitBuilderHandle.product();
251 
252  setData(data);
253  if (theFilter)
254  theFilter->setEvent(iEvent, iSetup);
255  if (theInOutFilter)
256  theInOutFilter->setEvent(iEvent, iSetup);
257  setEvent_(iEvent, iSetup);
258 }

References data, edm::EventSetup::get(), get, iEvent, edm::ESHandle< T >::product(), setData(), setEvent_(), theEstimator, theEstimatorName, theFilter, theInOutFilter, thePropagatorAlong, thePropagatorAlongName, thePropagatorOpposite, thePropagatorOppositeName, theRecHitBuilderName, theTTRHBuilder, theUpdator, and theUpdatorName.

◆ setEvent_()

virtual void BaseCkfTrajectoryBuilder::setEvent_ ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
protectedpure virtual

Implemented in CkfTrajectoryBuilder, and MuonCkfTrajectoryBuilder.

Referenced by setEvent().

◆ setNavigationSchool()

void BaseCkfTrajectoryBuilder::setNavigationSchool ( NavigationSchool const *  nv)
inline

Definition at line 89 of file BaseCkfTrajectoryBuilder.h.

89 { theNavigationSchool = nv; }

References theNavigationSchool.

◆ toBeContinued()

bool BaseCkfTrajectoryBuilder::toBeContinued ( TempTrajectory traj,
bool  inOut = false 
) const
protected

Called after each new hit is added to the trajectory, to see if building this track should be continued

Definition at line 114 of file BaseCkfTrajectoryBuilder.cc.

114  {
115  if
116  UNLIKELY(traj.measurements().size() > 400) {
117  edm::LogError("BaseCkfTrajectoryBuilder_InfiniteLoop");
118  LogTrace("BaseCkfTrajectoryBuilder_InfiniteLoop")
119  << "Cropping Track After 400 Measurements:\n"
120  << " Last predicted state: " << traj.lastMeasurement().predictedState() << "\n"
121  << " Last layer subdetector: " << (traj.lastLayer() ? traj.lastLayer()->subDetector() : -1) << "\n"
122  << " Found hits: " << traj.foundHits() << ", lost hits: " << traj.lostHits() << "\n\n";
123  return false;
124  }
125  // Called after each new hit is added to the trajectory, to see if it is
126  // worth continuing to build this track candidate.
127  if (inOut) {
128  // if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
129  return theInOutFilter->toBeContinued(traj);
130  } else {
131  return theFilter->toBeContinued(traj);
132  }
133 }

References TempTrajectory::foundHits(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), LogTrace, TempTrajectory::lostHits(), TempTrajectory::measurements(), TrajectoryMeasurement::predictedState(), cmsutils::bqueue< T >::size(), DetLayer::subDetector(), theFilter, theInOutFilter, and UNLIKELY.

Referenced by CkfTrajectoryBuilder::limitedCandidates().

◆ unset()

void BaseCkfTrajectoryBuilder::unset ( ) const
overridevirtual

Reimplemented from TrajectoryBuilder.

Definition at line 226 of file BaseCkfTrajectoryBuilder.cc.

226  {
227  std::cerr << "ERROR unSet called on " << typeid(*this).name()
228  << (theMeasurementTracker ? " with valid " : "witout any ") << "MeasurementTrackerEvent" << std::endl;
229 }

References beam_dqm_sourceclient-live_cfg::cerr, and theMeasurementTracker.

Member Data Documentation

◆ theEstimator

const Chi2MeasurementEstimatorBase* BaseCkfTrajectoryBuilder::theEstimator = nullptr
protected

◆ theEstimatorName

const std::string BaseCkfTrajectoryBuilder::theEstimatorName
private

Definition at line 188 of file BaseCkfTrajectoryBuilder.h.

Referenced by setEvent().

◆ theFilter

std::unique_ptr<TrajectoryFilter> BaseCkfTrajectoryBuilder::theFilter
private

Definition at line 181 of file BaseCkfTrajectoryBuilder.h.

Referenced by qualityFilter(), setEvent(), and toBeContinued().

◆ theInOutFilter

std::unique_ptr<TrajectoryFilter> BaseCkfTrajectoryBuilder::theInOutFilter
private

Filter used at end of complete tracking

Definition at line 182 of file BaseCkfTrajectoryBuilder.h.

Referenced by qualityFilter(), setEvent(), and toBeContinued().

◆ theMeasurementTracker

const MeasurementTrackerEvent* BaseCkfTrajectoryBuilder::theMeasurementTracker = nullptr
protected

◆ theNavigationSchool

const NavigationSchool* BaseCkfTrajectoryBuilder::theNavigationSchool = nullptr
protected

◆ thePropagatorAlong

const Propagator* BaseCkfTrajectoryBuilder::thePropagatorAlong = nullptr
protected

Definition at line 171 of file BaseCkfTrajectoryBuilder.h.

Referenced by backwardPropagator(), forwardPropagator(), and setEvent().

◆ thePropagatorAlongName

const std::string BaseCkfTrajectoryBuilder::thePropagatorAlongName
private

Definition at line 186 of file BaseCkfTrajectoryBuilder.h.

Referenced by setEvent().

◆ thePropagatorOpposite

const Propagator* BaseCkfTrajectoryBuilder::thePropagatorOpposite = nullptr
protected

Definition at line 172 of file BaseCkfTrajectoryBuilder.h.

Referenced by backwardPropagator(), forwardPropagator(), and setEvent().

◆ thePropagatorOppositeName

const std::string BaseCkfTrajectoryBuilder::thePropagatorOppositeName
private

Definition at line 187 of file BaseCkfTrajectoryBuilder.h.

Referenced by setEvent().

◆ theRecHitBuilderName

const std::string BaseCkfTrajectoryBuilder::theRecHitBuilderName
private

Definition at line 189 of file BaseCkfTrajectoryBuilder.h.

Referenced by setEvent().

◆ theSeedAs5DHit

bool BaseCkfTrajectoryBuilder::theSeedAs5DHit
private

Definition at line 179 of file BaseCkfTrajectoryBuilder.h.

Referenced by createStartingTrajectory().

◆ theTTRHBuilder

const TransientTrackingRecHitBuilder* BaseCkfTrajectoryBuilder::theTTRHBuilder = nullptr
protected

◆ theUpdator

const TrajectoryStateUpdator* BaseCkfTrajectoryBuilder::theUpdator = nullptr
protected

◆ theUpdatorName

const std::string BaseCkfTrajectoryBuilder::theUpdatorName
private

Filter used at end of in-out tracking

Definition at line 185 of file BaseCkfTrajectoryBuilder.h.

Referenced by setEvent().

MeasurementTrackerEvent::geomTracker
const TrackingGeometry * geomTracker() const
Definition: MeasurementTrackerEvent.h:65
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TempTrajectory::direction
PropagationDirection direction() const
Definition: TempTrajectory.cc:118
GeomDet
Definition: GeomDet.h:27
BaseCkfTrajectoryBuilder::thePropagatorAlong
const Propagator * thePropagatorAlong
Definition: BaseCkfTrajectoryBuilder.h:171
DetLayer::subDetector
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel,...
DetLayer
Definition: DetLayer.h:21
TrajectorySeed::range
std::pair< const_iterator, const_iterator > range
Definition: TrajectorySeed.h:21
HLT_2018_cff.magneticField
magneticField
Definition: HLT_2018_cff.py:348
BaseCkfTrajectoryBuilder::theFilter
std::unique_ptr< TrajectoryFilter > theFilter
Definition: BaseCkfTrajectoryBuilder.h:181
TempTrajectory
Definition: TempTrajectory.h:40
BaseCkfTrajectoryBuilder::theEstimator
const Chi2MeasurementEstimatorBase * theEstimator
Definition: BaseCkfTrajectoryBuilder.h:173
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
cms::cuda::assert
assert(be >=bs)
TrajectorySeed::const_iterator
recHitContainer::const_iterator const_iterator
Definition: TrajectorySeed.h:20
Surface
Definition: Surface.h:36
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
Propagator::magneticField
virtual const MagneticField * magneticField() const =0
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
Trajectory::foundHits
int foundHits() const
Definition: Trajectory.h:206
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
Trajectory::lostHits
int lostHits() const
Definition: Trajectory.h:217
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
BaseCkfTrajectoryBuilder::theSeedAs5DHit
bool theSeedAs5DHit
Definition: BaseCkfTrajectoryBuilder.h:179
BaseCkfTrajectoryBuilder::theInOutFilter
std::unique_ptr< TrajectoryFilter > theInOutFilter
Definition: BaseCkfTrajectoryBuilder.h:182
DetId
Definition: DetId.h:17
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrackingGeometry::idToDet
virtual const GeomDet * idToDet(DetId) const =0
PTrajectoryStateOnDet::detId
unsigned int detId() const
Definition: PTrajectoryStateOnDet.h:65
TrajectoryMeasurement::predictedState
TrajectoryStateOnSurface const & predictedState() const
Definition: TrajectoryMeasurement.h:174
NavigationSchool::nextLayers
std::vector< const DetLayer * > nextLayers(const DetLayer &detLayer, Args &&... args) const
Definition: NavigationSchool.h:33
TrajectoryStateOnSurface::freeState
FreeTrajectoryState const * freeState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:58
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
cmsutils::bqueue::size
size_type size() const
Definition: bqueue.h:201
BaseCkfTrajectoryBuilder::theUpdator
const TrajectoryStateUpdator * theUpdator
Definition: BaseCkfTrajectoryBuilder.h:170
Trajectory::setSharedSeed
void setSharedSeed(const std::shared_ptr< const TrajectorySeed > &seed)
Definition: Trajectory.h:316
TempTrajectory::lastMeasurement
const TrajectoryMeasurement & lastMeasurement() const
Definition: TempTrajectory.h:159
GeometricSearchTracker::detLayer
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
Definition: GeometricSearchTracker.h:53
TempTrajectory::measurements
const DataContainer & measurements() const
Definition: TempTrajectory.h:177
BaseCkfTrajectoryBuilder::backwardPropagator
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
Definition: BaseCkfTrajectoryBuilder.h:163
TempTrajectory::foundHits
int foundHits() const
Definition: TempTrajectory.h:184
edm::ESHandle< TrajectoryStateUpdator >
BaseCkfTrajectoryBuilder::thePropagatorAlongName
const std::string thePropagatorAlongName
Definition: BaseCkfTrajectoryBuilder.h:186
BaseCkfTrajectoryBuilder::theMeasurementTracker
const MeasurementTrackerEvent * theMeasurementTracker
Definition: BaseCkfTrajectoryBuilder.h:175
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
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
PrintoutHelper::dumpCandidate
static std::string dumpCandidate(const Candidate &candidate, bool showErrors=false)
Definition: PrintoutHelper.h:25
BaseCkfTrajectoryBuilder::theRecHitBuilderName
const std::string theRecHitBuilderName
Definition: BaseCkfTrajectoryBuilder.h:189
TrajectoryStateUpdator::update
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
BaseCkfTrajectoryBuilder::seedMeasurements
void seedMeasurements(const TrajectorySeed &seed, TempTrajectory &result, bool as5D) const
Definition: BaseCkfTrajectoryBuilder.cc:51
BaseCkfTrajectoryBuilder::thePropagatorOpposite
const Propagator * thePropagatorOpposite
Definition: BaseCkfTrajectoryBuilder.h:172
TempTrajectory::lostHits
int lostHits() const
Definition: TempTrajectory.h:194
TempTrajectory::toTrajectory
Trajectory toTrajectory() const
Convert to a standard Trajectory.
Definition: TempTrajectory.cc:176
MeasurementTrackerEvent::geometricSearchTracker
const GeometricSearchTracker * geometricSearchTracker() const
Definition: MeasurementTrackerEvent.h:66
BaseCkfTrajectoryBuilder::setEvent_
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition: beam_dqm_sourceclient-live_cfg.py:17
iEvent
int iEvent
Definition: GenABIO.cc:224
trajectoryStateTransform::transientState
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
Definition: TrajectoryStateTransform.cc:35
BaseCkfTrajectoryBuilder::theNavigationSchool
const NavigationSchool * theNavigationSchool
Definition: BaseCkfTrajectoryBuilder.h:176
BaseCkfTrajectoryBuilder::forwardPropagator
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
Definition: BaseCkfTrajectoryBuilder.h:160
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
Trajectory::pop
void pop()
Definition: Trajectory.cc:30
get
#define get
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
BaseCkfTrajectoryBuilder::thePropagatorOppositeName
const std::string thePropagatorOppositeName
Definition: BaseCkfTrajectoryBuilder.h:187
Trajectory
Definition: Trajectory.h:38
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
TempTrajectory::lastLayer
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
Definition: TempTrajectory.h:237
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TrajectoryMeasurement::recHitR
ConstRecHitPointer::element_type const & recHitR() const
Definition: TrajectoryMeasurement.h:186
mps_fire.result
result
Definition: mps_fire.py:303
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
TRecHit5DParamConstraint
Definition: TRecHit5DParamConstraint.h:9
BaseCkfTrajectoryBuilder::theEstimatorName
const std::string theEstimatorName
Definition: BaseCkfTrajectoryBuilder.h:188
alongMomentum
Definition: PropagationDirection.h:4
TempTrajectory::pop
void pop()
Definition: TempTrajectory.cc:44
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
TempTrajectory::empty
bool empty() const
True if trajectory has no measurements.
Definition: TempTrajectory.h:210
Trajectory::empty
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:233
TrackingComponentsRecord
Definition: TrackingComponentsRecord.h:12