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 142 of file BaseCkfTrajectoryBuilder.cc.

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

References Trajectory::empty(), Trajectory::foundHits(), Trajectory::lastMeasurement(), LogDebug, Trajectory::lostHits(), TempTrajectory::measurements(), Trajectory::measurements(), eostools::move(), Trajectory::pop(), qualityFilter(), TrajectoryMeasurement::recHit(), mps_fire::result, fileCollector::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 161 of file BaseCkfTrajectoryBuilder.cc.

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

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, fileCollector::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 191 of file BaseCkfTrajectoryBuilder.cc.

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

References PTrajectoryStateOnDet::detId(), GeometricSearchTracker::detLayer(), TempTrajectory::direction(), TempTrajectory::empty(), forwardPropagator(), TrajectoryStateOnSurface::freeState(), g, MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::geomTracker(), triggerObjects_cff::id, TrackerGeometry::idToDet(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), HLT_FULL_cff::magneticField, NavigationSchool::nextLayers(), fileCollector::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 178 of file BaseCkfTrajectoryBuilder.cc.

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

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 131 of file BaseCkfTrajectoryBuilder.cc.

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

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

References backwardPropagator(), GeometricSearchTracker::detLayer(), forwardPropagator(), MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::geomTracker(), TrackerGeometry::idToDet(), TrajectoryStateOnSurface::isValid(), Propagator::magneticField(), Propagator::propagate(), rpcPointValidation_cfi::recHit, mps_fire::result, fileCollector::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 212 of file BaseCkfTrajectoryBuilder.cc.

212  {
213  // possibly do some sanity check here
215 }

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 217 of file BaseCkfTrajectoryBuilder.cc.

217  {
218  std::cerr << "ERROR SetEvent called on " << typeid(*this).name()
219  << (theMeasurementTracker ? " with valid " : "witout any ") << "MeasurementTrackerEvent" << std::endl;
220 }

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, and theMeasurementTracker.

◆ setEvent() [2/2]

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

Definition at line 227 of file BaseCkfTrajectoryBuilder.cc.

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

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 111 of file BaseCkfTrajectoryBuilder.cc.

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

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 222 of file BaseCkfTrajectoryBuilder.cc.

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

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::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().

TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
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
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
MeasurementTrackerEvent::geomTracker
const TrackerGeometry * geomTracker() const
Definition: MeasurementTrackerEvent.h:72
cms::cuda::assert
assert(be >=bs)
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:131
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
BaseCkfTrajectoryBuilder::setData
void setData(const MeasurementTrackerEvent *data)
Definition: BaseCkfTrajectoryBuilder.cc:212
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
fileCollector.seed
seed
Definition: fileCollector.py:127
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
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:87
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:60
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:681
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:233
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:73
BaseCkfTrajectoryBuilder::setEvent_
virtual void setEvent_(const edm::Event &iEvent, const edm::EventSetup &iSetup)=0
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
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
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
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
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:29
TempTrajectory::lastLayer
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
Definition: TempTrajectory.h:237
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
TRecHit5DParamConstraint
Definition: TRecHit5DParamConstraint.h:9
BaseCkfTrajectoryBuilder::theEstimatorName
const std::string theEstimatorName
Definition: BaseCkfTrajectoryBuilder.h:188
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
edm::Log
Definition: MessageLogger.h:70
alongMomentum
Definition: PropagationDirection.h:4
TempTrajectory::pop
void pop()
Definition: TempTrajectory.cc:44
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
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