CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
BaseCkfTrajectoryBuilder Class Reference

#include <BaseCkfTrajectoryBuilder.h>

Inheritance diagram for BaseCkfTrajectoryBuilder:
TrajectoryBuilder CkfTrajectoryBuilder GroupedCkfTrajectoryBuilder CkfDebugTrajectoryBuilder MuonCkfTrajectoryBuilder

Public Types

typedef std::vector
< TempTrajectory
TempTrajectoryContainer
 
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 edm::ParameterSet &conf, const TrajectoryStateUpdator *updator, const Propagator *propagatorAlong, const Propagator *propagatorOpposite, const Chi2MeasurementEstimatorBase *estimator, const TransientTrackingRecHitBuilder *RecHitBuilder, const MeasurementTracker *measurementTracker, const TrajectoryFilter *filter, const TrajectoryFilter *inOutFilter=0)
 
virtual TempTrajectory buildTrajectories (const TrajectorySeed &seed, TrajectoryContainer &ret, const TrajectoryFilter *) const
 
virtual void rebuildTrajectories (TempTrajectory const &startingTraj, const TrajectorySeed &seed, TrajectoryContainer &result) const
 
virtual void setDebugger (CkfDebugger *dbg) const
 
virtual void setEvent (const edm::Event &event) const
 
virtual void unset () const
 
virtual ~BaseCkfTrajectoryBuilder ()
 
- 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 FreeTrajectoryState FTS
 
typedef std::pair< TSOS,
std::vector< const DetLayer * > > 
StateAndLayers
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 

Protected Member Functions

void addToResult (boost::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 (Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTracker *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
virtual bool analyzeMeasurementsDebugger (TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTracker *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) 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
 
StateAndLayers findStateAndLayers (const TempTrajectory &traj) const
 
void moveToResult (TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
 
bool qualityFilter (const TempTrajectory &traj, bool inOut=false) const
 
bool toBeContinued (TempTrajectory &traj, bool inOut=false) const
 

Protected Attributes

const PropagatortheBackwardPropagator
 
const
Chi2MeasurementEstimatorBase
theEstimator
 
const PropagatortheForwardPropagator
 
const LayerMeasurementstheLayerMeasurements
 
const MeasurementTrackertheMeasurementTracker
 
const PropagatorthePropagatorAlong
 
const PropagatorthePropagatorOpposite
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder
 
const TrajectoryStateUpdatortheUpdator
 

Private Member Functions

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

Private Attributes

edm::InputTag clustersToSkip_
 
bool skipClusters_
 
const TrajectoryFiltertheFilter
 
const TrajectoryFiltertheInOutFilter
 

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 46 of file BaseCkfTrajectoryBuilder.h.

Member Typedef Documentation

Definition at line 49 of file BaseCkfTrajectoryBuilder.h.

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

Definition at line 52 of file BaseCkfTrajectoryBuilder.h.

Definition at line 57 of file BaseCkfTrajectoryBuilder.h.

Definition at line 51 of file BaseCkfTrajectoryBuilder.h.

Definition at line 56 of file BaseCkfTrajectoryBuilder.h.

typedef TrajectoryContainer::iterator BaseCkfTrajectoryBuilder::TrajectoryIterator

Definition at line 58 of file BaseCkfTrajectoryBuilder.h.

Definition at line 50 of file BaseCkfTrajectoryBuilder.h.

Constructor & Destructor Documentation

BaseCkfTrajectoryBuilder::BaseCkfTrajectoryBuilder ( const edm::ParameterSet conf,
const TrajectoryStateUpdator updator,
const Propagator propagatorAlong,
const Propagator propagatorOpposite,
const Chi2MeasurementEstimatorBase estimator,
const TransientTrackingRecHitBuilder RecHitBuilder,
const MeasurementTracker measurementTracker,
const TrajectoryFilter filter,
const TrajectoryFilter inOutFilter = 0 
)

Definition at line 23 of file BaseCkfTrajectoryBuilder.cc.

References clustersToSkip_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), and skipClusters_.

31  :
32  theUpdator(updator),
33  thePropagatorAlong(propagatorAlong),thePropagatorOpposite(propagatorOpposite),
34  theEstimator(estimator),theTTRHBuilder(recHitBuilder),
35  theMeasurementTracker(measurementTracker),
38  theFilter(filter),
39  theInOutFilter(inOutFilter)
40 {
41  if (conf.exists("clustersToSkip")){
42  skipClusters_=true;
43  clustersToSkip_=conf.getParameter<edm::InputTag>("clustersToSkip");
44  }
45  else
46  skipClusters_=false;
47 }
T getParameter(std::string const &) const
const Propagator * theBackwardPropagator
bool exists(std::string const &parameterName) const
checks if a parameter exists
const TrajectoryStateUpdator * theUpdator
const TrajectoryFilter * theFilter
const LayerMeasurements * theLayerMeasurements
const TransientTrackingRecHitBuilder * theTTRHBuilder
const MeasurementTracker * theMeasurementTracker
const Propagator * thePropagatorOpposite
const TrajectoryFilter * theInOutFilter
const Chi2MeasurementEstimatorBase * theEstimator
const Propagator * theForwardPropagator
BaseCkfTrajectoryBuilder::~BaseCkfTrajectoryBuilder ( )
virtual

Definition at line 49 of file BaseCkfTrajectoryBuilder.cc.

References theLayerMeasurements.

49  {
50  delete theLayerMeasurements;
51 }
const LayerMeasurements * theLayerMeasurements

Member Function Documentation

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

Definition at line 160 of file BaseCkfTrajectoryBuilder.cc.

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

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::limitedCandidates().

163 {
164  // quality check
165  if ( !qualityFilter(tmptraj, inOut) ) return;
166  Trajectory traj = tmptraj.toTrajectory();
167  traj.setSharedSeed(seed);
168  // discard latest dummy measurements
169  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop();
170  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a Trajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits()
171  <<" lost hits. Popped :"<<(tmptraj.measurements().size())-(traj.measurements().size())<<" hits.";
172  result.push_back(std::move(traj));
173 }
#define LogDebug(id)
bool empty() const
True if trajectory has no measurements.
Definition: Trajectory.h:246
int foundHits() const
Definition: Trajectory.h:236
int lostHits() const
Definition: Trajectory.h:243
ConstRecHitPointer const & recHit() const
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
DataContainer const & measurements() const
Definition: Trajectory.h:215
Trajectory toTrajectory() const
Convert to a standard Trajectory.
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:193
tuple result
Definition: query.py:137
void setSharedSeed(const boost::shared_ptr< const TrajectorySeed > &seed)
Definition: Trajectory.h:321
void pop()
Definition: Trajectory.cc:17
void BaseCkfTrajectoryBuilder::addToResult ( TempTrajectory const &  traj,
TempTrajectoryContainer result,
bool  inOut = false 
) const
protected

Definition at line 177 of file BaseCkfTrajectoryBuilder.cc.

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

180 {
181  // quality check
182  if ( !qualityFilter(tmptraj, inOut) ) return;
183  // discard latest dummy measurements
184  TempTrajectory traj = tmptraj;
185  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop();
186  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a TempTrajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits()
187  <<" lost hits. Popped :"<<(tmptraj.measurements().size())-(traj.measurements().size())<<" hits.";
188  result.push_back(std::move(traj));
189 }
#define LogDebug(id)
ConstRecHitPointer const & recHit() const
bool empty() const
True if trajectory has no measurements.
const DataContainer & measurements() const
int foundHits() const
obsolete name, use measurements() instead.
const TrajectoryMeasurement & lastMeasurement() const
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
tuple result
Definition: query.py:137
size_type size() const
Definition: bqueue.h:168
int lostHits() const
virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger ( Trajectory traj,
const std::vector< TrajectoryMeasurement > &  meas,
const MeasurementTracker theMeasurementTracker,
const Propagator theForwardPropagator,
const Chi2MeasurementEstimatorBase theEstimator,
const TransientTrackingRecHitBuilder theTTRHBuilder 
) const
inlineprotectedvirtual

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

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 95 of file BaseCkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder::limitedCandidates().

99  {return true;}
virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger ( TempTrajectory traj,
const std::vector< TrajectoryMeasurement > &  meas,
const MeasurementTracker theMeasurementTracker,
const Propagator theForwardPropagator,
const Chi2MeasurementEstimatorBase theEstimator,
const TransientTrackingRecHitBuilder theTTRHBuilder 
) const
inlineprotectedvirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 100 of file BaseCkfTrajectoryBuilder.h.

104  {return true;}
virtual TempTrajectory BaseCkfTrajectoryBuilder::buildTrajectories ( const TrajectorySeed seed,
TrajectoryContainer ret,
const TrajectoryFilter  
) const
inlinevirtual

Reimplemented in CkfTrajectoryBuilder, and GroupedCkfTrajectoryBuilder.

Definition at line 73 of file BaseCkfTrajectoryBuilder.h.

Referenced by cms::CkfTrackCandidateMakerBase::produceBase().

75  { assert(0==1); return TempTrajectory();}
TempTrajectory BaseCkfTrajectoryBuilder::createStartingTrajectory ( const TrajectorySeed seed) const
protected

Definition at line 103 of file BaseCkfTrajectoryBuilder.cc.

References alongMomentum, TrajectorySeed::direction(), PrintoutHelper::dumpCandidate(), LogDebug, query::result, seedMeasurements(), theBackwardPropagator, and theForwardPropagator.

Referenced by CkfTrajectoryBuilder::buildTrajectories(), GroupedCkfTrajectoryBuilder::buildTrajectories(), and GroupedCkfTrajectoryBuilder::rebuildSeedingRegion().

104 {
106  if ( seed.direction() == alongMomentum) {
107  theForwardPropagator = &(*thePropagatorAlong);
108  theBackwardPropagator = &(*thePropagatorOpposite);
109  }
110  else {
111  theForwardPropagator = &(*thePropagatorOpposite);
112  theBackwardPropagator = &(*thePropagatorAlong);
113  }
114 
115  seedMeasurements(seed, result);
116 
117  LogDebug("CkfPattern")
118  <<" initial trajectory from the seed: "<<PrintoutHelper::dumpCandidate(result,true);
119 
120  return result;
121 }
#define LogDebug(id)
PropagationDirection direction() const
const Propagator * theBackwardPropagator
void seedMeasurements(const TrajectorySeed &seed, TempTrajectory &result) const
tuple result
Definition: query.py:137
static std::string dumpCandidate(const Candidate &candidate, bool showErrors=false)
const Propagator * theForwardPropagator
virtual void BaseCkfTrajectoryBuilder::fillSeedHistoDebugger ( std::vector< TrajectoryMeasurement >::iterator  begin,
std::vector< TrajectoryMeasurement >::iterator  end 
) const
inlineprotectedvirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 105 of file BaseCkfTrajectoryBuilder.h.

106  {;}
BaseCkfTrajectoryBuilder::StateAndLayers BaseCkfTrajectoryBuilder::findStateAndLayers ( const TrajectorySeed seed,
const TempTrajectory traj 
) const
protected

Definition at line 208 of file BaseCkfTrajectoryBuilder.cc.

References PTrajectoryStateOnDet::detId(), GeometricSearchTracker::detLayer(), TempTrajectory::direction(), TempTrajectory::empty(), TrajectoryStateOnSurface::freeState(), g, MeasurementTracker::geometricSearchTracker(), MeasurementTracker::geomTracker(), TrackingGeometry::idToDet(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), Propagator::magneticField(), DetLayer::nextLayers(), TrajectorySeed::startingState(), theForwardPropagator, theMeasurementTracker, trajectoryStateTransform::transientState(), and TrajectoryMeasurement::updatedState().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::findCompatibleMeasurements().

209 {
210  if (traj.empty())
211  {
212  //set the currentState to be the one from the trajectory seed starting point
213  PTrajectoryStateOnDet const & ptod = seed.startingState();
214  DetId id(ptod.detId());
216  const Surface * surface=&g->surface();
217 
218 
221  return StateAndLayers(currentState,lastLayer->nextLayers( *currentState.freeState(), traj.direction()) );
222  }
223  else
224  {
225  TSOS const & currentState = traj.lastMeasurement().updatedState();
226  return StateAndLayers(currentState,traj.lastLayer()->nextLayers( *currentState.freeState(), traj.direction()) );
227  }
228 }
bool empty() const
True if trajectory has no measurements.
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
const TrajectoryMeasurement & lastMeasurement() const
PropagationDirection direction() const
FreeTrajectoryState * freeState(bool withErrors=true) const
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
const TrackingGeometry * geomTracker() const
unsigned int detId() const
Definition: DetId.h:20
const MeasurementTracker * theMeasurementTracker
PTrajectoryStateOnDet const & startingState() const
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
virtual const GeomDet * idToDet(DetId) const =0
virtual const MagneticField * magneticField() const =0
std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
TrajectoryStateOnSurface const & updatedState() const
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const GeometricSearchTracker * geometricSearchTracker() const
std::vector< const DetLayer * > nextLayers(Args &&...args) const
Definition: DetLayer.h:60
const Propagator * theForwardPropagator
BaseCkfTrajectoryBuilder::StateAndLayers BaseCkfTrajectoryBuilder::findStateAndLayers ( const TempTrajectory traj) const
protected

Definition at line 231 of file BaseCkfTrajectoryBuilder.cc.

References TempTrajectory::direction(), TempTrajectory::empty(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), DetLayer::nextLayers(), and TrajectoryMeasurement::updatedState().

231  {
232  assert(!traj.empty());
233 
234  TSOS const & currentState = traj.lastMeasurement().updatedState();
235  return StateAndLayers(currentState,traj.lastLayer()->nextLayers( *currentState.freeState(), traj.direction()) );
236 }
bool empty() const
True if trajectory has no measurements.
const TrajectoryMeasurement & lastMeasurement() const
PropagationDirection direction() const
std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
TrajectoryStateOnSurface const & updatedState() const
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
std::vector< const DetLayer * > nextLayers(Args &&...args) const
Definition: DetLayer.h:60
void BaseCkfTrajectoryBuilder::moveToResult ( TempTrajectory &&  traj,
TempTrajectoryContainer result,
bool  inOut = false 
) const
protected

Definition at line 192 of file BaseCkfTrajectoryBuilder.cc.

References LogDebug, and qualityFilter().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

195 {
196  // quality check
197  if ( !qualityFilter(traj, inOut) ) return;
198  // discard latest dummy measurements
199  while (!traj.empty() && !traj.lastMeasurement().recHitR().isValid()) traj.pop();
200  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a TempTrajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits();
201  // <<" lost hits. Popped :"<<(ttraj.measurements().size())-(traj.measurements().size())<<" hits.";
202  result.push_back(std::move(traj));
203 }
#define LogDebug(id)
bool empty() const
True if trajectory has no measurements.
int foundHits() const
obsolete name, use measurements() instead.
const TrajectoryMeasurement & lastMeasurement() const
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
tuple result
Definition: query.py:137
ConstRecHitPointer::element_type const & recHitR() const
int lostHits() const
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 146 of file BaseCkfTrajectoryBuilder.cc.

References TrajectoryFilter::qualityFilter(), theFilter, and theInOutFilter.

Referenced by addToResult(), CkfTrajectoryBuilder::limitedCandidates(), and moveToResult().

147 {
148  // Called after building a trajectory is completed, to see if it is good enough
149  // to keep.
150  if (inOut) {
151  if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
152  return theInOutFilter->qualityFilter(traj);
153  } else {
154  return theFilter->qualityFilter(traj);
155  }
156 }
const TrajectoryFilter * theFilter
virtual bool qualityFilter(const TempTrajectory &) const =0
const TrajectoryFilter * theInOutFilter
virtual void BaseCkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed seed,
TrajectoryContainer result 
) const
inlinevirtual

Reimplemented in GroupedCkfTrajectoryBuilder, and CkfTrajectoryBuilder.

Definition at line 78 of file BaseCkfTrajectoryBuilder.h.

Referenced by cms::CkfTrackCandidateMakerBase::produceBase().

79  { assert(0==1);}
void BaseCkfTrajectoryBuilder::seedMeasurements ( const TrajectorySeed seed,
TempTrajectory result 
) const
private

Definition at line 55 of file BaseCkfTrajectoryBuilder.cc.

References TransientTrackingRecHitBuilder::build(), GeometricSearchTracker::detLayer(), TempTrajectory::emplace(), MeasurementTracker::geometricSearchTracker(), MeasurementTracker::geomTracker(), TrackingGeometry::idToDet(), TrajectoryStateOnSurface::isValid(), Propagator::magneticField(), Propagator::propagate(), TrajectorySeed::recHits(), TrajectorySeed::startingState(), GeomDet::surface(), theBackwardPropagator, theForwardPropagator, theMeasurementTracker, theTTRHBuilder, theUpdator, trajectoryStateTransform::transientState(), and TrajectoryStateUpdator::update().

Referenced by createStartingTrajectory().

56 {
57 
58 
59  TrajectorySeed::range hitRange = seed.recHits();
60 
61  PTrajectoryStateOnDet pState( seed.startingState());
62  const GeomDet* gdet = theMeasurementTracker->geomTracker()->idToDet(pState.detId());
63  TSOS outerState = trajectoryStateTransform::transientState(pState, &(gdet->surface()),
65 
66 
67  for (TrajectorySeed::const_iterator ihit = hitRange.first; ihit != hitRange.second; ihit++) {
68 
70  const GeomDet* hitGeomDet = recHit->det();
71 
72  const DetLayer* hitLayer =
73  theMeasurementTracker->geometricSearchTracker()->detLayer(ihit->geographicalId());
74 
75  TSOS invalidState( hitGeomDet->surface());
76  if (ihit == hitRange.second - 1) {
77  // the seed trajectory state should correspond to this hit
78  if (&gdet->surface() != &hitGeomDet->surface()) {
79  edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: the seed state is not on the surface of the detector of the last seed hit";
80  return; // FIXME: should throw exception
81  }
82 
83  //TSOS updatedState = outerstate;
84  result.emplace(invalidState, outerState, recHit, 0, hitLayer);
85  }
86  else {
87  TSOS innerState = theBackwardPropagator->propagate(outerState,hitGeomDet->surface());
88  if(innerState.isValid()) {
89  TSOS innerUpdated = theUpdator->update(innerState,*recHit);
90  result.emplace(invalidState, innerUpdated, recHit, 0, hitLayer);
91  }
92  }
93  }
94 
95  // method for debugging
96  // fix somehow
97  // fillSeedHistoDebugger(result.begin(),result.end());
98 
99 }
const Propagator * theBackwardPropagator
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const =0
const TrajectoryStateUpdator * theUpdator
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
recHitContainer::const_iterator const_iterator
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
const TransientTrackingRecHitBuilder * theTTRHBuilder
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
std::pair< const_iterator, const_iterator > range
const TrackingGeometry * geomTracker() const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
const MeasurementTracker * theMeasurementTracker
PTrajectoryStateOnDet const & startingState() const
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
virtual const GeomDet * idToDet(DetId) const =0
range recHits() const
void emplace(Args &&...args)
virtual const MagneticField * magneticField() const =0
const GeometricSearchTracker * geometricSearchTracker() const
const Propagator * theForwardPropagator
virtual void BaseCkfTrajectoryBuilder::setDebugger ( CkfDebugger dbg) const
inlinevirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 85 of file BaseCkfTrajectoryBuilder.h.

85 {;}
void BaseCkfTrajectoryBuilder::setEvent ( const edm::Event event) const
virtual

Implements TrajectoryBuilder.

Definition at line 240 of file BaseCkfTrajectoryBuilder.cc.

References clustersToSkip_, MeasurementTracker::setClusterToSkip(), skipClusters_, theMeasurementTracker, and MeasurementTracker::update().

Referenced by cms::CkfTrackCandidateMakerBase::produceBase().

241  {
243  if (skipClusters_)
245  }
virtual void update(const edm::Event &) const =0
virtual void setClusterToSkip(const edm::InputTag &cluster, const edm::Event &event) const =0
const MeasurementTracker * theMeasurementTracker
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 124 of file BaseCkfTrajectoryBuilder.cc.

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

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::limitedCandidates().

125 {
126  if (traj.measurements().size() > 400) {
127  edm::LogError("BaseCkfTrajectoryBuilder_InfiniteLoop");
128  LogTrace("BaseCkfTrajectoryBuilder_InfiniteLoop") <<
129  "Cropping Track After 400 Measurements:\n" <<
130  " Last predicted state: " << traj.lastMeasurement().predictedState() << "\n" <<
131  " Last layer subdetector: " << (traj.lastLayer() ? traj.lastLayer()->subDetector() : -1) << "\n" <<
132  " Found hits: " << traj.foundHits() << ", lost hits: " << traj.lostHits() << "\n\n";
133  return false;
134  }
135  // Called after each new hit is added to the trajectory, to see if it is
136  // worth continuing to build this track candidate.
137  if (inOut) {
138  if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
139  return theInOutFilter->toBeContinued(traj);
140  } else {
141  return theFilter->toBeContinued(traj);
142  }
143 }
TrajectoryStateOnSurface const & predictedState() const
const DataContainer & measurements() const
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
int foundHits() const
obsolete name, use measurements() instead.
const TrajectoryFilter * theFilter
const TrajectoryMeasurement & lastMeasurement() const
#define LogTrace(id)
virtual bool toBeContinued(TempTrajectory &) const =0
size_type size() const
Definition: bqueue.h:168
const TrajectoryFilter * theInOutFilter
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
int lostHits() const
void BaseCkfTrajectoryBuilder::unset ( ) const
virtual

Member Data Documentation

edm::InputTag BaseCkfTrajectoryBuilder::clustersToSkip_
private

Definition at line 158 of file BaseCkfTrajectoryBuilder.h.

Referenced by BaseCkfTrajectoryBuilder(), and setEvent().

bool BaseCkfTrajectoryBuilder::skipClusters_
private

Filter used at end of in-out tracking

Definition at line 157 of file BaseCkfTrajectoryBuilder.h.

Referenced by BaseCkfTrajectoryBuilder(), setEvent(), and unset().

const Propagator* BaseCkfTrajectoryBuilder::theBackwardPropagator
mutableprotected
const Chi2MeasurementEstimatorBase* BaseCkfTrajectoryBuilder::theEstimator
protected
const TrajectoryFilter* BaseCkfTrajectoryBuilder::theFilter
private

Definition at line 154 of file BaseCkfTrajectoryBuilder.h.

Referenced by qualityFilter(), and toBeContinued().

const Propagator* BaseCkfTrajectoryBuilder::theForwardPropagator
mutableprotected
const TrajectoryFilter* BaseCkfTrajectoryBuilder::theInOutFilter
private

Filter used at end of complete tracking

Definition at line 155 of file BaseCkfTrajectoryBuilder.h.

Referenced by qualityFilter(), and toBeContinued().

const LayerMeasurements* BaseCkfTrajectoryBuilder::theLayerMeasurements
protected
const MeasurementTracker* BaseCkfTrajectoryBuilder::theMeasurementTracker
protected
const Propagator* BaseCkfTrajectoryBuilder::thePropagatorAlong
protected

Definition at line 134 of file BaseCkfTrajectoryBuilder.h.

const Propagator* BaseCkfTrajectoryBuilder::thePropagatorOpposite
protected

Definition at line 135 of file BaseCkfTrajectoryBuilder.h.

const TransientTrackingRecHitBuilder* BaseCkfTrajectoryBuilder::theTTRHBuilder
protected
const TrajectoryStateUpdator* BaseCkfTrajectoryBuilder::theUpdator
protected