#include <RecoTracker/CkfPattern/interface/BaseCkfTrajectoryBuilder.h>
The resulting trajectories may be mutually exclusive and require cleaning by a TrajectoryCleaner. The Trajectories are normally not smoothed.
Definition at line 41 of file BaseCkfTrajectoryBuilder.h.
typedef FreeTrajectoryState BaseCkfTrajectoryBuilder::FTS [protected] |
Definition at line 44 of file BaseCkfTrajectoryBuilder.h.
typedef std::pair<TSOS,std::vector<const DetLayer*> > BaseCkfTrajectoryBuilder::StateAndLayers [protected] |
Definition at line 47 of file BaseCkfTrajectoryBuilder.h.
typedef std::vector<TempTrajectory> BaseCkfTrajectoryBuilder::TempTrajectoryContainer |
Reimplemented in HICTrajectoryBuilder, and CkfTrajectoryBuilder.
Definition at line 52 of file BaseCkfTrajectoryBuilder.h.
typedef TrajectoryMeasurement BaseCkfTrajectoryBuilder::TM [protected] |
typedef std::vector<Trajectory> BaseCkfTrajectoryBuilder::TrajectoryContainer |
Reimplemented from TrajectoryBuilder.
Reimplemented in HICTrajectoryBuilder, and CkfTrajectoryBuilder.
Definition at line 51 of file BaseCkfTrajectoryBuilder.h.
typedef TrajectoryContainer::iterator BaseCkfTrajectoryBuilder::TrajectoryIterator |
typedef TrajectoryStateOnSurface BaseCkfTrajectoryBuilder::TSOS [protected] |
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 | |||
) |
Definition at line 24 of file BaseCkfTrajectoryBuilder.cc.
00031 : 00032 theUpdator(updator), 00033 thePropagatorAlong(propagatorAlong),thePropagatorOpposite(propagatorOpposite), 00034 theEstimator(estimator),theTTRHBuilder(recHitBuilder), 00035 theMeasurementTracker(measurementTracker), 00036 theLayerMeasurements(new LayerMeasurements(theMeasurementTracker)), 00037 theForwardPropagator(0),theBackwardPropagator(0), 00038 theFilter(filter) 00039 {}
BaseCkfTrajectoryBuilder::~BaseCkfTrajectoryBuilder | ( | ) | [virtual] |
Definition at line 41 of file BaseCkfTrajectoryBuilder.cc.
References theLayerMeasurements.
00041 { 00042 delete theLayerMeasurements; 00043 }
void BaseCkfTrajectoryBuilder::addToResult | ( | TempTrajectory & | traj, | |
TempTrajectoryContainer & | result | |||
) | const [protected] |
Definition at line 149 of file BaseCkfTrajectoryBuilder.cc.
References TempTrajectory::empty(), TempTrajectory::lastMeasurement(), TempTrajectory::pop(), qualityFilter(), and TrajectoryMeasurement::recHit().
00151 { 00152 // quality check 00153 if ( !qualityFilter(tmptraj) ) return; 00154 // discard latest dummy measurements 00155 TempTrajectory traj = tmptraj; 00156 while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop(); 00157 result.push_back( traj ); 00158 }
void BaseCkfTrajectoryBuilder::addToResult | ( | TempTrajectory & | traj, | |
TrajectoryContainer & | result | |||
) | const [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 138 of file BaseCkfTrajectoryBuilder.cc.
References Trajectory::empty(), Trajectory::lastMeasurement(), Trajectory::pop(), qualityFilter(), TrajectoryMeasurement::recHit(), and TempTrajectory::toTrajectory().
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::limitedCandidates().
00140 { 00141 // quality check 00142 if ( !qualityFilter(tmptraj) ) return; 00143 Trajectory traj = tmptraj.toTrajectory(); 00144 // discard latest dummy measurements 00145 while (!traj.empty() && !traj.lastMeasurement().recHit()->isValid()) traj.pop(); 00146 result.push_back( traj); 00147 }
virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger | ( | TempTrajectory & | traj, | |
std::vector< TrajectoryMeasurement > | meas, | |||
const MeasurementTracker * | theMeasurementTracker, | |||
const Propagator * | theForwardPropagator, | |||
const Chi2MeasurementEstimatorBase * | theEstimator, | |||
const TransientTrackingRecHitBuilder * | theTTRHBuilder | |||
) | const [inline, protected, virtual] |
Reimplemented in CkfDebugTrajectoryBuilder.
Definition at line 85 of file BaseCkfTrajectoryBuilder.h.
virtual bool BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger | ( | Trajectory & | traj, | |
std::vector< TrajectoryMeasurement > | meas, | |||
const MeasurementTracker * | theMeasurementTracker, | |||
const Propagator * | theForwardPropagator, | |||
const Chi2MeasurementEstimatorBase * | theEstimator, | |||
const TransientTrackingRecHitBuilder * | theTTRHBuilder | |||
) | const [inline, protected, virtual] |
Maximum number of lost hits per trajectory candidate.
Maximum number of consecutive lost hits per trajectory candidate.
Reimplemented in CkfDebugTrajectoryBuilder.
Definition at line 80 of file BaseCkfTrajectoryBuilder.h.
Referenced by CkfTrajectoryBuilder::limitedCandidates().
TempTrajectory BaseCkfTrajectoryBuilder::createStartingTrajectory | ( | const TrajectorySeed & | seed | ) | const [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 97 of file BaseCkfTrajectoryBuilder.cc.
References alongMomentum, TrajectorySeed::direction(), i, HLT_VtxMuL3::result, seedMeasurements(), theBackwardPropagator, and theForwardPropagator.
Referenced by GroupedCkfTrajectoryBuilder::rebuildSeedingRegion(), and CkfTrajectoryBuilder::trajectories().
00098 { 00099 TempTrajectory result( seed, seed.direction()); 00100 if ( seed.direction() == alongMomentum) { 00101 theForwardPropagator = &(*thePropagatorAlong); 00102 theBackwardPropagator = &(*thePropagatorOpposite); 00103 } 00104 else { 00105 theForwardPropagator = &(*thePropagatorOpposite); 00106 theBackwardPropagator = &(*thePropagatorAlong); 00107 } 00108 00109 std::vector<TM> seedMeas; 00110 seedMeasurements(seed, seedMeas); 00111 for (std::vector<TM>::const_iterator i=seedMeas.begin(); i!=seedMeas.end(); i++) 00112 result.push(*i); 00113 return result; 00114 }
virtual void BaseCkfTrajectoryBuilder::fillSeedHistoDebugger | ( | std::vector< TrajectoryMeasurement >::iterator | begin, | |
std::vector< TrajectoryMeasurement >::iterator | end | |||
) | const [inline, protected, virtual] |
Reimplemented in CkfDebugTrajectoryBuilder.
Definition at line 90 of file BaseCkfTrajectoryBuilder.h.
Referenced by seedMeasurements().
BaseCkfTrajectoryBuilder::StateAndLayers BaseCkfTrajectoryBuilder::findStateAndLayers | ( | const TempTrajectory & | traj | ) | const [protected] |
Definition at line 163 of file BaseCkfTrajectoryBuilder.cc.
References PTrajectoryStateOnDet::detId(), GeometricSearchTracker::detLayer(), TempTrajectory::direction(), TempTrajectory::empty(), TrajectoryStateOnSurface::freeState(), g, MeasurementTracker::geometricSearchTracker(), MeasurementTracker::geomTracker(), id, TrackingGeometry::idToDet(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), Propagator::magneticField(), DetLayer::nextLayers(), TempTrajectory::seed(), TrajectorySeed::startingState(), GeomDet::surface(), theForwardPropagator, theMeasurementTracker, TrajectoryStateTransform::transientState(), and TrajectoryMeasurement::updatedState().
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::findCompatibleMeasurements().
00164 { 00165 if (traj.empty()) 00166 { 00167 //set the currentState to be the one from the trajectory seed starting point 00168 PTrajectoryStateOnDet ptod = traj.seed().startingState(); 00169 DetId id(ptod.detId()); 00170 const GeomDet * g = theMeasurementTracker->geomTracker()->idToDet(id); 00171 const Surface * surface=&g->surface(); 00172 TrajectoryStateTransform tsTransform; 00173 00174 TSOS currentState = TrajectoryStateOnSurface(tsTransform.transientState(ptod,surface,theForwardPropagator->magneticField())); 00175 const DetLayer* lastLayer = theMeasurementTracker->geometricSearchTracker()->detLayer(id); 00176 return StateAndLayers(currentState,lastLayer->nextLayers( *currentState.freeState(), traj.direction()) ); 00177 } 00178 else 00179 { 00180 TSOS currentState = traj.lastMeasurement().updatedState(); 00181 return StateAndLayers(currentState,traj.lastLayer()->nextLayers( *currentState.freeState(), traj.direction()) ); 00182 } 00183 }
bool BaseCkfTrajectoryBuilder::qualityFilter | ( | const TempTrajectory & | traj | ) | const [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 131 of file BaseCkfTrajectoryBuilder.cc.
References TrajectoryFilter::qualityFilter(), and theFilter.
Referenced by addToResult(), and CkfTrajectoryBuilder::limitedCandidates().
00132 { 00133 return theFilter->qualityFilter(traj); 00134 }
void BaseCkfTrajectoryBuilder::seedMeasurements | ( | const TrajectorySeed & | seed, | |
std::vector< TrajectoryMeasurement > & | result | |||
) | const [private] |
Definition at line 47 of file BaseCkfTrajectoryBuilder.cc.
References TransientTrackingRecHitBuilder::build(), GeometricSearchTracker::detLayer(), fillSeedHistoDebugger(), 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().
00048 { 00049 TrajectoryStateTransform tsTransform; 00050 00051 TrajectorySeed::range hitRange = seed.recHits(); 00052 for (TrajectorySeed::const_iterator ihit = hitRange.first; 00053 ihit != hitRange.second; ihit++) { 00054 TransientTrackingRecHit::RecHitPointer recHit = theTTRHBuilder->build(&(*ihit)); 00055 const GeomDet* hitGeomDet = 00056 theMeasurementTracker->geomTracker()->idToDet( ihit->geographicalId()); 00057 00058 const DetLayer* hitLayer = 00059 theMeasurementTracker->geometricSearchTracker()->detLayer(ihit->geographicalId()); 00060 00061 TSOS invalidState( new BasicSingleTrajectoryState( hitGeomDet->surface())); 00062 if (ihit == hitRange.second - 1) { 00063 // the seed trajectory state should correspond to this hit 00064 PTrajectoryStateOnDet pState( seed.startingState()); 00065 const GeomDet* gdet = theMeasurementTracker->geomTracker()->idToDet( DetId(pState.detId())); 00066 if (&gdet->surface() != &hitGeomDet->surface()) { 00067 edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: the seed state is not on the surface of the detector of the last seed hit"; 00068 return; // FIXME: should throw exception 00069 } 00070 00071 TSOS updatedState = tsTransform.transientState( pState, &(gdet->surface()), 00072 theForwardPropagator->magneticField()); 00073 result.push_back(TM( invalidState, updatedState, recHit, 0, hitLayer)); 00074 } 00075 else { 00076 PTrajectoryStateOnDet pState( seed.startingState()); 00077 00078 TSOS outerState = tsTransform.transientState(pState, 00079 &((theMeasurementTracker->geomTracker()->idToDet( 00080 (hitRange.second - 1)->geographicalId()))->surface()), 00081 theForwardPropagator->magneticField()); 00082 TSOS innerState = theBackwardPropagator->propagate(outerState,hitGeomDet->surface()); 00083 if(innerState.isValid()) { 00084 TSOS innerUpdated = theUpdator->update(innerState,*recHit); 00085 result.push_back(TM( invalidState, innerUpdated, recHit, 0, hitLayer)); 00086 } 00087 } 00088 } 00089 00090 // method for debugging 00091 fillSeedHistoDebugger(result.begin(),result.end()); 00092 00093 }
virtual void BaseCkfTrajectoryBuilder::setDebugger | ( | CkfDebugger * | dbg | ) | const [inline, virtual] |
Reimplemented in CkfDebugTrajectoryBuilder.
Definition at line 70 of file BaseCkfTrajectoryBuilder.h.
virtual void BaseCkfTrajectoryBuilder::setEvent | ( | const edm::Event & | event | ) | const [pure virtual] |
Implements TrajectoryBuilder.
Implemented in HICTrajectoryBuilder, CkfTrajectoryBuilder, and GroupedCkfTrajectoryBuilder.
bool BaseCkfTrajectoryBuilder::toBeContinued | ( | TempTrajectory & | traj | ) | const [protected] |
Definition at line 117 of file BaseCkfTrajectoryBuilder.cc.
References TempTrajectory::foundHits(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), LogTrace, TempTrajectory::lostHits(), TempTrajectory::measurements(), TrajectoryMeasurement::predictedState(), DetLayer::subDetector(), theFilter, and TrajectoryFilter::toBeContinued().
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and CkfTrajectoryBuilder::limitedCandidates().
00118 { 00119 if (traj.measurements().size() > 400) { 00120 edm::LogError("Cropping Track After 400 Measurements"); 00121 LogTrace("Cropping Track After 400 Measurements") << 00122 "Last predicted state: " << traj.lastMeasurement().predictedState() << "\n" << 00123 "Last layer subdetector: " << (traj.lastLayer() ? traj.lastLayer()->subDetector() : -1) << "\n" << 00124 "Found hits: " << traj.foundHits() << ", lost hits: " << traj.lostHits() << "\n\n"; 00125 return false; 00126 } 00127 return theFilter->toBeContinued(traj); 00128 }
virtual TrajectoryContainer BaseCkfTrajectoryBuilder::trajectories | ( | const TrajectorySeed & | ) | const [pure virtual] |
Implements TrajectoryBuilder.
Implemented in HICTrajectoryBuilder, CkfTrajectoryBuilder, and GroupedCkfTrajectoryBuilder.
const Propagator* BaseCkfTrajectoryBuilder::theBackwardPropagator [mutable, protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 122 of file BaseCkfTrajectoryBuilder.h.
Referenced by createStartingTrajectory(), GroupedCkfTrajectoryBuilder::rebuildSeedingRegion(), and seedMeasurements().
const Chi2MeasurementEstimatorBase* BaseCkfTrajectoryBuilder::theEstimator [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 115 of file BaseCkfTrajectoryBuilder.h.
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), MuonCkfTrajectoryBuilder::collectMeasurement(), GroupedCkfTrajectoryBuilder::estimator(), CkfTrajectoryBuilder::findCompatibleMeasurements(), and CkfTrajectoryBuilder::limitedCandidates().
const TrajectoryFilter* BaseCkfTrajectoryBuilder::theFilter [private] |
Definition at line 134 of file BaseCkfTrajectoryBuilder.h.
Referenced by qualityFilter(), and toBeContinued().
const Propagator* BaseCkfTrajectoryBuilder::theForwardPropagator [mutable, protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 121 of file BaseCkfTrajectoryBuilder.h.
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), createStartingTrajectory(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), CkfTrajectoryBuilder::findCompatibleMeasurements(), findStateAndLayers(), CkfTrajectoryBuilder::limitedCandidates(), and seedMeasurements().
const LayerMeasurements* BaseCkfTrajectoryBuilder::theLayerMeasurements [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 118 of file BaseCkfTrajectoryBuilder.h.
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), MuonCkfTrajectoryBuilder::collectMeasurement(), CkfTrajectoryBuilder::findCompatibleMeasurements(), and ~BaseCkfTrajectoryBuilder().
const MeasurementTracker* BaseCkfTrajectoryBuilder::theMeasurementTracker [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 117 of file BaseCkfTrajectoryBuilder.h.
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), findStateAndLayers(), CkfTrajectoryBuilder::limitedCandidates(), seedMeasurements(), GroupedCkfTrajectoryBuilder::setEvent(), and CkfTrajectoryBuilder::setEvent().
const Propagator* BaseCkfTrajectoryBuilder::thePropagatorAlong [protected] |
const Propagator* BaseCkfTrajectoryBuilder::thePropagatorOpposite [protected] |
const TransientTrackingRecHitBuilder* BaseCkfTrajectoryBuilder::theTTRHBuilder [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 116 of file BaseCkfTrajectoryBuilder.h.
Referenced by CkfTrajectoryBuilder::limitedCandidates(), and seedMeasurements().
const TrajectoryStateUpdator* BaseCkfTrajectoryBuilder::theUpdator [protected] |
Reimplemented in HICTrajectoryBuilder.
Definition at line 112 of file BaseCkfTrajectoryBuilder.h.
Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), seedMeasurements(), CkfTrajectoryBuilder::updateTrajectory(), and GroupedCkfTrajectoryBuilder::updator().