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 Referenceabstract

#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 TrajectoryFilter *filter, const TrajectoryFilter *inOutFilter=0)
 
 BaseCkfTrajectoryBuilder (const BaseCkfTrajectoryBuilder &other)=default
 
virtual TempTrajectory buildTrajectories (const TrajectorySeed &seed, TrajectoryContainer &ret, const TrajectoryFilter *) const
 
virtual BaseCkfTrajectoryBuilderclone (const MeasurementTrackerEvent *data) const =0
 
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 MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
virtual bool analyzeMeasurementsDebugger (TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *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
 
void setData (const MeasurementTrackerEvent *data)
 
bool toBeContinued (TempTrajectory &traj, bool inOut=false) const
 

Protected Attributes

const PropagatortheBackwardPropagator
 
const
Chi2MeasurementEstimatorBase
theEstimator
 
const PropagatortheForwardPropagator
 
const MeasurementTrackerEventtheMeasurementTracker
 
const PropagatorthePropagatorAlong
 
const PropagatorthePropagatorOpposite
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder
 
const TrajectoryStateUpdatortheUpdator
 

Private Member Functions

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

Private Attributes

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

Member Typedef Documentation

Definition at line 50 of file BaseCkfTrajectoryBuilder.h.

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

Definition at line 53 of file BaseCkfTrajectoryBuilder.h.

Definition at line 58 of file BaseCkfTrajectoryBuilder.h.

Definition at line 52 of file BaseCkfTrajectoryBuilder.h.

Definition at line 57 of file BaseCkfTrajectoryBuilder.h.

typedef TrajectoryContainer::iterator BaseCkfTrajectoryBuilder::TrajectoryIterator

Definition at line 59 of file BaseCkfTrajectoryBuilder.h.

Definition at line 51 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 TrajectoryFilter filter,
const TrajectoryFilter inOutFilter = 0 
)

Definition at line 24 of file BaseCkfTrajectoryBuilder.cc.

References dtNoiseDBValidation_cfg::cerr, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

31  :
32  theUpdator(updator),
33  thePropagatorAlong(propagatorAlong),thePropagatorOpposite(propagatorOpposite),
34  theEstimator(estimator),theTTRHBuilder(recHitBuilder),
37  theFilter(filter),
38  theInOutFilter(inOutFilter)
39 {
40  if (conf.exists("clustersToSkip")) std::cerr << "ERROR: " << typeid(*this).name() << " with label " << conf.getParameter<std::string>("@module_label") << " has a clustersToSkip parameter set" << std::endl;
41 }
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 TransientTrackingRecHitBuilder * theTTRHBuilder
const MeasurementTrackerEvent * theMeasurementTracker
const Propagator * thePropagatorOpposite
const TrajectoryFilter * theInOutFilter
const Chi2MeasurementEstimatorBase * theEstimator
const Propagator * theForwardPropagator
BaseCkfTrajectoryBuilder::BaseCkfTrajectoryBuilder ( const BaseCkfTrajectoryBuilder other)
default
BaseCkfTrajectoryBuilder::~BaseCkfTrajectoryBuilder ( )
virtual

Definition at line 44 of file BaseCkfTrajectoryBuilder.cc.

44  {
45 }

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 154 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().

157 {
158  // quality check
159  if ( !qualityFilter(tmptraj, inOut) ) return;
160  Trajectory traj = tmptraj.toTrajectory();
161  traj.setSharedSeed(seed);
162  // discard latest dummy measurements
163  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop();
164  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a Trajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits()
165  <<" lost hits. Popped :"<<(tmptraj.measurements().size())-(traj.measurements().size())<<" hits.";
166  result.push_back(std::move(traj));
167 }
#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 171 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().

174 {
175  // quality check
176  if ( !qualityFilter(tmptraj, inOut) ) return;
177  // discard latest dummy measurements
178  TempTrajectory traj = tmptraj;
179  while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop();
180  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a TempTrajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits()
181  <<" lost hits. Popped :"<<(tmptraj.measurements().size())-(traj.measurements().size())<<" hits.";
182  result.push_back(std::move(traj));
183 }
#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:167
int lostHits() const
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

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

Definition at line 99 of file BaseCkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder::limitedCandidates().

103  {return true;}
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

Definition at line 104 of file BaseCkfTrajectoryBuilder.h.

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

Reimplemented in CkfTrajectoryBuilder, and GroupedCkfTrajectoryBuilder.

Definition at line 74 of file BaseCkfTrajectoryBuilder.h.

76  { assert(0==1); return TempTrajectory();}
virtual BaseCkfTrajectoryBuilder* BaseCkfTrajectoryBuilder::clone ( const MeasurementTrackerEvent data) const
pure virtual
TempTrajectory BaseCkfTrajectoryBuilder::createStartingTrajectory ( const TrajectorySeed seed) const
protected

Definition at line 97 of file BaseCkfTrajectoryBuilder.cc.

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

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

98 {
100  if ( seed.direction() == alongMomentum) {
101  theForwardPropagator = &(*thePropagatorAlong);
102  theBackwardPropagator = &(*thePropagatorOpposite);
103  }
104  else {
105  theForwardPropagator = &(*thePropagatorOpposite);
106  theBackwardPropagator = &(*thePropagatorAlong);
107  }
108 
109  seedMeasurements(seed, result);
110 
111  LogDebug("CkfPattern")
112  <<" initial trajectory from the seed: "<<PrintoutHelper::dumpCandidate(result,true);
113 
114  return result;
115 }
#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 109 of file BaseCkfTrajectoryBuilder.h.

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

Definition at line 202 of file BaseCkfTrajectoryBuilder.cc.

References PTrajectoryStateOnDet::detId(), GeometricSearchTracker::detLayer(), TempTrajectory::direction(), TempTrajectory::empty(), TrajectoryStateOnSurface::freeState(), g, MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::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().

203 {
204  if (traj.empty())
205  {
206  //set the currentState to be the one from the trajectory seed starting point
207  PTrajectoryStateOnDet const & ptod = seed.startingState();
208  DetId id(ptod.detId());
210  const Surface * surface=&g->surface();
211 
212 
215  return StateAndLayers(currentState,lastLayer->nextLayers( *currentState.freeState(), traj.direction()) );
216  }
217  else
218  {
219  TSOS const & currentState = traj.lastMeasurement().updatedState();
220  return StateAndLayers(currentState,traj.lastLayer()->nextLayers( *currentState.freeState(), traj.direction()) );
221  }
222 }
const TrackingGeometry * geomTracker() const
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 const * freeState(bool withErrors=true) const
const DetLayer * detLayer(const DetId &id) const
obsolete method. Use idToLayer() instead.
unsigned int detId() const
const MeasurementTrackerEvent * theMeasurementTracker
Definition: DetId.h:18
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 225 of file BaseCkfTrajectoryBuilder.cc.

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

225  {
226  assert(!traj.empty());
227 
228  TSOS const & currentState = traj.lastMeasurement().updatedState();
229  return StateAndLayers(currentState,traj.lastLayer()->nextLayers( *currentState.freeState(), traj.direction()) );
230 }
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 186 of file BaseCkfTrajectoryBuilder.cc.

References LogDebug, and qualityFilter().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

189 {
190  // quality check
191  if ( !qualityFilter(traj, inOut) ) return;
192  // discard latest dummy measurements
193  while (!traj.empty() && !traj.lastMeasurement().recHitR().isValid()) traj.pop();
194  LogDebug("CkfPattern")<<inOut<<"=inOut option. pushing a TempTrajectory with: "<<traj.foundHits()<<" found hits. "<<traj.lostHits();
195  // <<" lost hits. Popped :"<<(ttraj.measurements().size())-(traj.measurements().size())<<" hits.";
196  result.push_back(std::move(traj));
197 }
#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 140 of file BaseCkfTrajectoryBuilder.cc.

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

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

141 {
142  // Called after building a trajectory is completed, to see if it is good enough
143  // to keep.
144  if (inOut) {
145  if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
146  return theInOutFilter->qualityFilter(traj);
147  } else {
148  return theFilter->qualityFilter(traj);
149  }
150 }
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 79 of file BaseCkfTrajectoryBuilder.h.

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

Definition at line 49 of file BaseCkfTrajectoryBuilder.cc.

References TransientTrackingRecHitBuilder::build(), GeometricSearchTracker::detLayer(), TempTrajectory::emplace(), MeasurementTrackerEvent::geometricSearchTracker(), MeasurementTrackerEvent::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().

50 {
51 
52 
53  TrajectorySeed::range hitRange = seed.recHits();
54 
55  PTrajectoryStateOnDet pState( seed.startingState());
56  const GeomDet* gdet = theMeasurementTracker->geomTracker()->idToDet(pState.detId());
57  TSOS outerState = trajectoryStateTransform::transientState(pState, &(gdet->surface()),
59 
60 
61  for (TrajectorySeed::const_iterator ihit = hitRange.first; ihit != hitRange.second; ihit++) {
62 
64  const GeomDet* hitGeomDet = recHit->det();
65 
66  const DetLayer* hitLayer =
67  theMeasurementTracker->geometricSearchTracker()->detLayer(ihit->geographicalId());
68 
69  TSOS invalidState( hitGeomDet->surface());
70  if (ihit == hitRange.second - 1) {
71  // the seed trajectory state should correspond to this hit
72  if (&gdet->surface() != &hitGeomDet->surface()) {
73  edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: the seed state is not on the surface of the detector of the last seed hit";
74  return; // FIXME: should throw exception
75  }
76 
77  //TSOS updatedState = outerstate;
78  result.emplace(invalidState, outerState, recHit, 0, hitLayer);
79  }
80  else {
81  TSOS innerState = theBackwardPropagator->propagate(outerState,hitGeomDet->surface());
82  if(innerState.isValid()) {
83  TSOS innerUpdated = theUpdator->update(innerState,*recHit);
84  result.emplace(invalidState, innerUpdated, recHit, 0, hitLayer);
85  }
86  }
87  }
88 
89  // method for debugging
90  // fix somehow
91  // fillSeedHistoDebugger(result.begin(),result.end());
92 
93 }
const TrackingGeometry * geomTracker() const
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
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
Definition: Propagator.cc:12
const MeasurementTrackerEvent * 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
void BaseCkfTrajectoryBuilder::setData ( const MeasurementTrackerEvent data)
protected

Definition at line 233 of file BaseCkfTrajectoryBuilder.cc.

References data, and theMeasurementTracker.

Referenced by MuonCkfTrajectoryBuilder::clone(), GroupedCkfTrajectoryBuilder::clone(), and CkfTrajectoryBuilder::clone().

234 {
235  // possibly do some sanity check here
237 }
const MeasurementTrackerEvent * theMeasurementTracker
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual void BaseCkfTrajectoryBuilder::setDebugger ( CkfDebugger dbg) const
inlinevirtual

Reimplemented in CkfDebugTrajectoryBuilder.

Definition at line 89 of file BaseCkfTrajectoryBuilder.h.

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

Implements TrajectoryBuilder.

Definition at line 239 of file BaseCkfTrajectoryBuilder.cc.

References dtNoiseDBValidation_cfg::cerr, and theMeasurementTracker.

240 {
241  std::cerr << "ERROR SetEvent called on " << typeid(*this).name() << ( theMeasurementTracker ? " with valid " : "witout any ") << "MeasurementTrackerEvent" << std::endl;
242 }
const MeasurementTrackerEvent * 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 118 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().

119 {
120  if (traj.measurements().size() > 400) {
121  edm::LogError("BaseCkfTrajectoryBuilder_InfiniteLoop");
122  LogTrace("BaseCkfTrajectoryBuilder_InfiniteLoop") <<
123  "Cropping Track After 400 Measurements:\n" <<
124  " Last predicted state: " << traj.lastMeasurement().predictedState() << "\n" <<
125  " Last layer subdetector: " << (traj.lastLayer() ? traj.lastLayer()->subDetector() : -1) << "\n" <<
126  " Found hits: " << traj.foundHits() << ", lost hits: " << traj.lostHits() << "\n\n";
127  return false;
128  }
129  // Called after each new hit is added to the trajectory, to see if it is
130  // worth continuing to build this track candidate.
131  if (inOut) {
132  if (theInOutFilter == 0) edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: trying to use dedicated filter for in-out tracking phase, when none specified";
133  return theInOutFilter->toBeContinued(traj);
134  } else {
135  return theFilter->toBeContinued(traj);
136  }
137 }
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:167
const TrajectoryFilter * theInOutFilter
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
int lostHits() const
void BaseCkfTrajectoryBuilder::unset ( ) const
virtual

Reimplemented from TrajectoryBuilder.

Definition at line 244 of file BaseCkfTrajectoryBuilder.cc.

References dtNoiseDBValidation_cfg::cerr, and theMeasurementTracker.

245 {
246  std::cerr << "ERROR unSet called on " << typeid(*this).name() << ( theMeasurementTracker ? " with valid " : "witout any ") << "MeasurementTrackerEvent" << std::endl;
247 }
const MeasurementTrackerEvent * theMeasurementTracker

Member Data Documentation

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

Definition at line 158 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 159 of file BaseCkfTrajectoryBuilder.h.

Referenced by qualityFilter(), and toBeContinued().

const MeasurementTrackerEvent* BaseCkfTrajectoryBuilder::theMeasurementTracker
protected
const Propagator* BaseCkfTrajectoryBuilder::thePropagatorAlong
protected

Definition at line 139 of file BaseCkfTrajectoryBuilder.h.

const Propagator* BaseCkfTrajectoryBuilder::thePropagatorOpposite
protected

Definition at line 140 of file BaseCkfTrajectoryBuilder.h.

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