CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
GroupedCkfTrajectoryBuilder Class Referencefinal

#include <GroupedCkfTrajectoryBuilder.h>

Inheritance diagram for GroupedCkfTrajectoryBuilder:
BaseCkfTrajectoryBuilder TrajectoryBuilder

Public Member Functions

TempTrajectory buildTrajectories (const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
 common part of both public trajectory building methods More...
 
double chiSquareCut ()
 
const Chi2MeasurementEstimatorBaseestimator () const
 
 GroupedCkfTrajectoryBuilder (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 constructor from ParameterSet More...
 
float lostHitPenalty ()
 
double mass ()
 Mass hypothesis used for propagation. More...
 
int maxCand ()
 
double ptCut ()
 Pt cut. More...
 
void rebuildSeedingRegion (const TrajectorySeed &, TrajectoryContainer &result) const override
 
void rebuildTrajectories (TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const override
 
TrajectoryContainer trajectories (const TrajectorySeed &) const override
 set Event for the internal MeasurementTracker data member More...
 
void trajectories (const TrajectorySeed &, TrajectoryContainer &ret) const override
 trajectories building starting from a seed, return in an already allocated vector More...
 
TrajectoryContainer trajectories (const TrajectorySeed &, const TrackingRegion &) const
 trajectories building starting from a seed with a region More...
 
void trajectories (const TrajectorySeed &, TrajectoryContainer &ret, const TrackingRegion &) const
 trajectories building starting from a seed with a region More...
 
const TrajectoryStateUpdatorupdator () const
 
 ~GroupedCkfTrajectoryBuilder () override
 destructor More...
 
- Public Member Functions inherited from BaseCkfTrajectoryBuilder
 BaseCkfTrajectoryBuilder (const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=0)
 
 BaseCkfTrajectoryBuilder (const BaseCkfTrajectoryBuilder &)=delete
 
const TransientTrackingRecHitBuilderhitBuilder () const
 
BaseCkfTrajectoryBuilderoperator= (const BaseCkfTrajectoryBuilder &)=delete
 
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 ~TrajectoryBuilder ()
 

Protected Member Functions

virtual void analyseMeasurements (const std::vector< TM > &meas, const Trajectory &traj) const
 
virtual void analyseResult (const TrajectoryContainer &result) const
 
virtual void analyseSeed (const TrajectorySeed &seed) const
 
void setEvent_ (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
- Protected Member Functions inherited from BaseCkfTrajectoryBuilder
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
 
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)
 
bool toBeContinued (TempTrajectory &traj, bool inOut=false) const
 

Private Types

enum  work_MaxSize_Size_ { work_MaxSize_ = 50 }
 

Private Member Functions

bool advanceOneLayer (const TrajectorySeed &seed, TempTrajectory &traj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &newCand, TempTrajectoryContainer &result) const
 
TempTrajectory backwardFit (TempTrajectory &candidate, unsigned int nSeed, const TrajectoryFitter &fitter, std::vector< const TrackingRecHit * > &remainingHits) const
 
void groupedIntermediaryClean (TempTrajectoryContainer &theTrajectories) const
 intermediate cleaning in the case of grouped measurements More...
 
unsigned int groupedLimitedCandidates (const TrajectorySeed &seed, TempTrajectory const &startingTraj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &result) const
 
void rebuildSeedingRegion (const TrajectorySeed &seed, TempTrajectory const &startingTraj, TempTrajectoryContainer &result) const
 try to find additional hits in seeding region More...
 
int rebuildSeedingRegion (const TrajectorySeed &seed, const std::vector< const TrackingRecHit * > &seedHits, TempTrajectory &candidate, TempTrajectoryContainer &result) const
 
bool tkxor (bool a, bool b) const
 
bool verifyHits (TempTrajectory::DataContainer::const_iterator rbegin, size_t maxDepth, const std::vector< const TrackingRecHit * > &hits) const
 Verifies presence of a RecHits in a range of TrajectoryMeasurements. More...
 

Static Private Member Functions

static PropagationDirection oppositeDirection (PropagationDirection dir)
 change of propagation direction More...
 

Private Attributes

float maxDPhiForLooperReconstruction
 
float maxPt2ForLooperReconstruction
 
bool theAlwaysUseInvalid
 
bool theBestHitOnly
 
double theChiSquareCut
 
TrajectoryFiltertheConfigurableCondition
 
float theFoundHitBonus
 
bool theIntermediateCleaning
 
bool theKeepOriginalIfRebuildFails
 
bool theLockHits
 
float theLostHitPenalty
 
double theMass
 
int theMaxCand
 
unsigned int theMinNrOf2dHitsForRebuild
 
unsigned int theMinNrOfHitsForRebuild
 
double theptCut
 
bool theRequireSeedHitsInRebuild
 

Additional Inherited Members

- Public Types inherited from BaseCkfTrajectoryBuilder
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
 
- Protected Types inherited from BaseCkfTrajectoryBuilder
typedef TrackingComponentsRecord Chi2MeasurementEstimatorRecord
 
typedef FreeTrajectoryState FTS
 
typedef std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 
- Static Protected Member Functions inherited from BaseCkfTrajectoryBuilder
static std::unique_ptr< TrajectoryFiltercreateTrajectoryFilter (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
- Protected Attributes inherited from BaseCkfTrajectoryBuilder
const Chi2MeasurementEstimatorBasetheEstimator
 
const MeasurementTrackerEventtheMeasurementTracker
 
const NavigationSchooltheNavigationSchool = 0
 
const PropagatorthePropagatorAlong
 
const PropagatorthePropagatorOpposite
 
const TransientTrackingRecHitBuildertheTTRHBuilder
 
const TrajectoryStateUpdatortheUpdator
 

Detailed Description

A highly configurable trajectory builder that allows full exploration of the combinatorial tree of possible continuations, and provides efficient ways of trimming the combinatorial tree.

Definition at line 24 of file GroupedCkfTrajectoryBuilder.h.

Member Enumeration Documentation

Enumerator
work_MaxSize_ 

Definition at line 208 of file GroupedCkfTrajectoryBuilder.h.

208 { work_MaxSize_ = 50 }; // if it grows above this number, it is forced to resize to half this amount when cleared

Constructor & Destructor Documentation

GroupedCkfTrajectoryBuilder::GroupedCkfTrajectoryBuilder ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)

constructor from ParameterSet

Definition at line 124 of file GroupedCkfTrajectoryBuilder.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), SiStripPI::max, maxDPhiForLooperReconstruction, maxPt2ForLooperReconstruction, theAlwaysUseInvalid, theBestHitOnly, theFoundHitBonus, theIntermediateCleaning, theKeepOriginalIfRebuildFails, theLockHits, theLostHitPenalty, theMaxCand, theMinNrOf2dHitsForRebuild, theMinNrOfHitsForRebuild, and theRequireSeedHitsInRebuild.

124  :
127  conf.getParameter<bool>("useSameTrajFilter") ?
130  )
131 {
132  // fill data members from parameters (eventually data members could be dropped)
133  //
134  theMaxCand = conf.getParameter<int>("maxCand");
135  theLostHitPenalty = conf.getParameter<double>("lostHitPenalty");
136  theFoundHitBonus = conf.getParameter<double>("foundHitBonus");
137  theIntermediateCleaning = conf.getParameter<bool>("intermediateCleaning");
138  theAlwaysUseInvalid = conf.getParameter<bool>("alwaysUseInvalidHits");
139  theLockHits = conf.getParameter<bool>("lockHits");
140  theBestHitOnly = conf.getParameter<bool>("bestHitOnly");
142  theRequireSeedHitsInRebuild = conf.getParameter<bool>("requireSeedHitsInRebuild");
143  theKeepOriginalIfRebuildFails = conf.getParameter<bool>("keepOriginalIfRebuildFails");
144  theMinNrOfHitsForRebuild = max(0,conf.getParameter<int>("minNrOfHitsForRebuild"));
145  maxPt2ForLooperReconstruction = conf.existsAs<double>("maxPtForLooperReconstruction") ?
146  conf.getParameter<double>("maxPtForLooperReconstruction") : 0;
148  maxDPhiForLooperReconstruction = conf.existsAs<double>("maxDPhiForLooperReconstruction") ?
149  conf.getParameter<double>("maxDPhiForLooperReconstruction") : 2.0;
150 
151 
152  /* ======= B.M. to be ported layer ===========
153  bool setOK = thePropagator->setMaxDirectionChange(1.6);
154  if (!setOK)
155  cout << "GroupedCkfTrajectoryBuilder WARNING: "
156  << "propagator does not support setMaxDirectionChange"
157  << endl;
158  // addStopCondition(theMinPtStopCondition);
159 
160  theConfigurableCondition = createAlgo<TrajectoryFilter>(componentConfig("StopCondition"));
161  ===================================== */
162 
163 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:161
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=0)
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
GroupedCkfTrajectoryBuilder::~GroupedCkfTrajectoryBuilder ( )
inlineoverride

Member Function Documentation

bool GroupedCkfTrajectoryBuilder::advanceOneLayer ( const TrajectorySeed seed,
TempTrajectory traj,
const TrajectoryFilter regionalCondition,
const Propagator propagator,
bool  inOut,
TempTrajectoryContainer newCand,
TempTrajectoryContainer result 
) const
private

Definition at line 461 of file GroupedCkfTrajectoryBuilder.cc.

References funct::abs(), BaseCkfTrajectoryBuilder::addToResult(), cmsutils::bqueue< T >::back(), PV3DBase< T, PVType, FrameType >::basicVector(), constexpr, gather_cfg::cout, TempTrajectory::empty(), PV3DBase< T, PVType, FrameType >::eta(), TransverseImpactPointExtrapolator::extrapolate(), f, lumiContext::fill, BaseCkfTrajectoryBuilder::findStateAndLayers(), BaseCkfTrajectoryBuilder::forwardPropagator(), TempTrajectory::foundHits(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TempTrajectory::incrementLoops(), TrajectoryStateOnSurface::isValid(), TempTrajectory::join(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), TrajectoryMeasurement::layer(), LayerTriplets::layers(), Bounds::length(), DetLayer::location(), LogDebug, TempTrajectory::lostHits(), maxDPhiForLooperReconstruction, maxPt2ForLooperReconstruction, TempTrajectory::measurements(), TrackingRecHit::missing, eostools::move(), BaseCkfTrajectoryBuilder::moveToResult(), N, NO_SEGMENTS_FOR_VALID_LAYERS, NOT_STOPPED, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), Propagator::propagationDirection(), hiDetachedQuadStep_cff::pt2, cmsutils::bqueue< T >::rbegin(), rejected(), cmsutils::bqueue< T >::rend(), TempTrajectory::setDPhiCacheForLoopersReconstruction(), TempTrajectory::setStopReason(), BarrelDetLayer::specificSurface(), lumiQTWidget::t, edmPickEvents::target, theAlwaysUseInvalid, theBestHitOnly, BaseCkfTrajectoryBuilder::theEstimator, theLockHits, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, BaseCkfTrajectoryBuilder::theUpdator, BaseCkfTrajectoryBuilder::toBeContinued(), TrajectoryStateOnSurface::transverseCurvature(), UNLIKELY, TrajectoryMeasurement::updatedState(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedLimitedCandidates().

468 {
469  std::pair<TSOS,std::vector<const DetLayer*> > && stateAndLayers = findStateAndLayers(seed,traj);
470 
471 
473  if(
474  //stateAndLayers.second.size()==0 &&
475  traj.lastLayer()->location()==0) {
476  float pt2 = stateAndLayers.first.globalMomentum().perp2();
478  pt2>(0.3f*0.3f)
479  )
480  stateAndLayers.second.push_back(traj.lastLayer());
481  }
482  }
483 
484  auto layerBegin = stateAndLayers.second.begin();
485  auto layerEnd = stateAndLayers.second.end();
486 
487  // if (nl.empty()) {
488  // addToResult(traj,result,inOut);
489  // return false;
490  // }
491 
492 #ifdef EDM_ML_DEBUG
493  LogDebug("CkfPattern")<<whatIsTheNextStep(traj, stateAndLayers);
494 #endif
495 
496  bool foundSegments(false);
497  bool foundNewCandidates(false);
498  for ( auto il=layerBegin; il!=layerEnd; il++) {
499 
500  TSOS stateToUse = stateAndLayers.first;
501 
502  double dPhiCacheForLoopersReconstruction(0);
503  if UNLIKELY(!traj.empty() && (*il)==traj.lastLayer()){
504 
506  // ------ For loopers reconstruction
507  //cout<<" self propagating in advanceOneLayer (for loopers) \n";
508  const BarrelDetLayer* sbdl = dynamic_cast<const BarrelDetLayer*>(traj.lastLayer());
509  if(sbdl){
510  HelixBarrelCylinderCrossing cylinderCrossing(stateToUse.globalPosition(),
511  stateToUse.globalMomentum(),
512  stateToUse.transverseCurvature(),
513  propagator->propagationDirection(),
514  sbdl->specificSurface());
515  if(!cylinderCrossing.hasSolution()) continue;
516  GlobalPoint starting = stateToUse.globalPosition();
517  GlobalPoint target1 = cylinderCrossing.position1();
518  GlobalPoint target2 = cylinderCrossing.position2();
519 
520  GlobalPoint farther = fabs(starting.phi()-target1.phi()) > fabs(starting.phi()-target2.phi()) ?
521  target1 : target2;
522 
523  const Bounds& bounds( sbdl->specificSurface().bounds());
524  float length = 0.5f*bounds.length();
525 
526  /*
527  cout << "starting: " << starting << endl;
528  cout << "target1: " << target1 << endl;
529  cout << "target2: " << target2 << endl;
530  cout << "dphi: " << (target1.phi()-target2.phi()) << endl;
531  cout << "length: " << length << endl;
532  */
533 
534  /*
535  float deltaZ = bounds.thickness()/2.f/fabs(tan(stateToUse.globalDirection().theta()) ) ;
536  if(stateToUse.hasError())
537  deltaZ += 3*sqrt(stateToUse.cartesianError().position().czz());
538  if( fabs(farther.z()) > length + deltaZ ) continue;
539  */
540  if(fabs(farther.z())*0.95f>length) continue;
541 
542  Geom::Phi<float> tmpDphi = target1.phi()-target2.phi();
543  if(std::abs(tmpDphi)>maxDPhiForLooperReconstruction) continue;
544  GlobalPoint target(0.5f*(target1.basicVector()+target2.basicVector()));
545  //cout << "target: " << target << endl;
546 
547 
548 
550  stateToUse = extrapolator.extrapolate(stateToUse, target, *propagator);
551  if (!stateToUse.isValid()) continue; //SK: consider trying the original? probably not
552 
553  //dPhiCacheForLoopersReconstruction = fabs(target1.phi()-target2.phi())*2.;
554  dPhiCacheForLoopersReconstruction = std::abs(tmpDphi);
555  traj.incrementLoops();
556  }else{ // not barrel
557  continue;
558  }
559  }else{ // loopers not requested (why else???)
560  // ------ For cosmics reconstruction
561  LogDebug("CkfPattern")<<" self propagating in advanceOneLayer.\n from: \n"<<stateToUse;
562  //self navigation case
563  // go to a middle point first
565  GlobalPoint center(0,0,0);
566  stateToUse = middle.extrapolate(stateToUse, center, *(forwardPropagator(seed)));
567 
568  if (!stateToUse.isValid()) continue;
569  LogDebug("CkfPattern")<<"to: "<<stateToUse;
570  }
571  } // last layer...
572 
573  //unsigned int maxCandidates = theMaxCand > 21 ? theMaxCand*2 : 42; //limit the number of returned segments
574  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
575  TrajectorySegmentBuilder layerBuilder(&layerMeasurements,
576  **il,*propagator,
579 
580 #ifdef EDM_ML_DEBUG
581  LogDebug("CkfPattern")<<whatIsTheStateToUse(stateAndLayers.first,stateToUse,*il);
582 #endif
583 
584  auto && segments= layerBuilder.segments(stateToUse);
585 
586  LogDebug("CkfPattern")<< "GCTB: number of segments = " << segments.size();
587 
588  if ( !segments.empty() ) foundSegments = true;
589 
590  for (auto is=segments.begin(); is!=segments.end(); is++ ) {
591  //
592  // assume "invalid hit only" segment is last in list
593  //
594  auto const & measurements = is->measurements();
595  if ( !theAlwaysUseInvalid && is!=segments.begin() && measurements.size()==1 &&
596  (measurements.front().recHit()->getType() == TrackingRecHit::missing) ) break;
597 
598 
599  //---- avoid to add the same hits more than once in the trajectory ----
600  bool toBeRejected(false);
601  for(auto revIt = measurements.rbegin(); revIt!=measurements.rend(); --revIt){
602  // int tmpCounter(0);
603  for(auto newTrajMeasIt = traj.measurements().rbegin();
604  newTrajMeasIt != traj.measurements().rend(); --newTrajMeasIt){
605  //if(tmpCounter==2) break;
606  if(revIt->recHitR().geographicalId()==newTrajMeasIt->recHitR().geographicalId()
607  && (revIt->recHitR().geographicalId() != DetId(0)) ){
608  toBeRejected=true;
609  goto rejected; //break; // see http://stackoverflow.com/questions/1257744/can-i-use-break-to-exit-multiple-nested-for-loops
610  }
611  // tmpCounter++;
612  }
613  }
614 
615  rejected:; // http://xkcd.com/292/
616  if(toBeRejected){
617 #ifdef VI_DEBUG
618  cout << "WARNING: neglect candidate because it contains the same hit twice \n";
619  cout << "-- discarded track's pt,eta,#found/lost: "
620  << traj.lastMeasurement().updatedState().globalMomentum().perp() << " , "
621  << traj.lastMeasurement().updatedState().globalMomentum().eta() << " , "
622  << traj.foundHits() << '/' << traj.lostHits() << "\n";
623 #endif
624  traj.setDPhiCacheForLoopersReconstruction(dPhiCacheForLoopersReconstruction);
625  continue; //Are we sure about this????
626  }
627  // ------------------------
628 
629  //
630  // create new candidate
631  //
632  TempTrajectory newTraj(traj);
633  traj.setDPhiCacheForLoopersReconstruction(dPhiCacheForLoopersReconstruction);
634  newTraj.join(*is);
635 
636  //std::cout << "DEBUG: newTraj after push found,lost: "
637  // << newTraj.foundHits() << " , "
638  // << newTraj.lostHits() << " , "
639  // << newTraj.measurements().size() << std::endl;
640 
641 
642 
643  //GIO// for ( vector<TM>::const_iterator im=measurements.begin();
644  //GIO// im!=measurements.end(); im++ ) newTraj.push(*im);
645  //if ( toBeContinued(newTraj,regionalCondition) ) { TOBE FIXED
646  if ( toBeContinued(newTraj, inOut) ) {
647  // Have added one more hit to track candidate
648 
649  LogDebug("CkfPattern")<<"GCTB: adding updated trajectory to candidates: inOut="<<inOut<<" hits="<<newTraj.foundHits();
650 
651  newTraj.setStopReason(StopReason::NOT_STOPPED);
652  newCand.push_back(std::move(newTraj));
653  foundNewCandidates = true;
654  }
655  else {
656  // Have finished building this track. Check if it passes cuts.
657 
658  LogDebug("CkfPattern")<< "GCTB: adding completed trajectory to results if passes cuts: inOut="<<inOut<<" hits="<<newTraj.foundHits();
659  moveToResult(std::move(newTraj), result, inOut);
660  }
661  } // loop over segs
662  } // loop over layers
663 
664  if ( !foundSegments ){
665  LogDebug("CkfPattern")<< "GCTB: adding input trajectory to result";
666  if (!stateAndLayers.second.empty())
668  addToResult(traj, result, inOut);
669  }
670  return foundNewCandidates;
671 }
#define LogDebug(id)
const_iterator rend() const
Definition: bqueue.h:164
virtual float length() const =0
T perp() const
Definition: PV3DBase.h:72
bool empty() const
True if trajectory has no measurements.
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
const DataContainer & measurements() const
virtual Location location() const =0
Which part of the detector (barrel, endcap)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const TrajectoryStateUpdator * theUpdator
GlobalPoint globalPosition() const
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
int foundHits() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is rejected(acceptEvent retursns false).There are 3 relevant cases of types of criteria
const TrajectoryMeasurement & lastMeasurement() const
void setDPhiCacheForLoopersReconstruction(float dphi)
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
void addToResult(boost::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
const_iterator rbegin() const
Definition: bqueue.h:163
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
const MeasurementTrackerEvent * theMeasurementTracker
Definition: DetId.h:18
void moveToResult(TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
T eta() const
Definition: PV3DBase.h:76
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
GlobalVector globalMomentum() const
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
void setStopReason(StopReason s)
TrajectoryStateOnSurface const & updatedState() const
Definition: Bounds.h:22
#define UNLIKELY(x)
Definition: Likely.h:21
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
def move(src, dest)
Definition: eostools.py:511
const Chi2MeasurementEstimatorBase * theEstimator
int lostHits() const
virtual void GroupedCkfTrajectoryBuilder::analyseMeasurements ( const std::vector< TM > &  meas,
const Trajectory traj 
) const
inlineprotectedvirtual

Definition at line 101 of file GroupedCkfTrajectoryBuilder.h.

102  {}
virtual void GroupedCkfTrajectoryBuilder::analyseResult ( const TrajectoryContainer result) const
inlineprotectedvirtual

Definition at line 103 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

103 {}
virtual void GroupedCkfTrajectoryBuilder::analyseSeed ( const TrajectorySeed seed) const
inlineprotectedvirtual

Definition at line 99 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

99 {}
TempTrajectory GroupedCkfTrajectoryBuilder::backwardFit ( TempTrajectory candidate,
unsigned int  nSeed,
const TrajectoryFitter fitter,
std::vector< const TrackingRecHit * > &  remainingHits 
) const
private

Definition at line 1010 of file GroupedCkfTrajectoryBuilder.cc.

References TempTrajectory::direction(), Trajectory::direction(), PrintoutHelper::dumpMeasurement(), PrintoutHelper::dumpMeasurements(), Trajectory::firstMeasurement(), TrajectoryFitter::fitOne(), TempTrajectory::foundHits(), TrackingRecHit::isValid(), Trajectory::isValid(), LIKELY, LogDebug, SiStripPI::max, Trajectory::measurements(), TempTrajectory::measurements(), ALCARECOTkAlBeamHalo_cff::nHitMin, TempTrajectory::nLoops(), Trajectory::nLoops(), oppositeDirection(), Trajectory::push(), Trajectory::recHits(), TrajectoryStateOnSurface::rescaleError(), Trajectory::setNLoops(), cmsutils::bqueue< T >::size(), theMinNrOfHitsForRebuild, UNLIKELY, and TrajectoryMeasurement::updatedState().

Referenced by rebuildSeedingRegion().

1013 {
1014  //
1015  // clear array of non-fitted hits
1016  //
1017  remainingHits.clear();
1018 
1019  LogDebug("CkfPattern")<<"nSeed " << nSeed << endl
1020  << "Old traj direction = " << candidate.direction() << endl
1022 
1023  //
1024  // backward fit trajectory.
1025  // (Will try to fit only hits outside the seeding region. However,
1026  // if there are not enough of these, it will also use the seeding hits).
1027  //
1028  // const unsigned int nHitAllMin(5);
1029  // const unsigned int nHit2dMin(2);
1030  unsigned int nHit(0); // number of valid hits after seeding region
1031  //unsigned int nHit2d(0); // number of valid hits after seeding region with 2D info
1032  // use all hits except the first n (from seed), but require minimum
1033  // specified in configuration.
1034  // Swapped over next two lines.
1035  unsigned int nHitMin = std::max(candidate.foundHits()-nSeed,theMinNrOfHitsForRebuild);
1036  // unsigned int nHitMin = oldMeasurements.size()-nSeed;
1037  // we want to rebuild only if the number of VALID measurements excluding the seed measurements is higher than the cut
1039 
1040  LogDebug("CkfPattern")/* << "nHitMin " << nHitMin*/ <<"Sizes: " << candidate.measurements().size() << " / ";
1041  //
1042  // create input trajectory for backward fit
1043  //
1044  Trajectory fwdTraj(oppositeDirection(candidate.direction()));
1045  fwdTraj.setNLoops(candidate.nLoops());
1046  //const TrajectorySeed seed = TrajectorySeed(PTrajectoryStateOnDet(), TrajectorySeed::recHitContainer(), oppositeDirection(candidate.direction()));
1047  //Trajectory fwdTraj(seed, oppositeDirection(candidate.direction()));
1048 
1049  const DetLayer* bwdDetLayer[candidate.measurements().size()];
1050  int nl=0;
1051  for ( auto const & tm : candidate.measurements() ) {
1052  const TrackingRecHit* hit = tm.recHitR().hit();
1053  //
1054  // add hits until required number is reached
1055  //
1056  if ( nHit<nHitMin ){//|| nHit2d<theMinNrOf2dHitsForRebuild ) {
1057  fwdTraj.push(tm);
1058  bwdDetLayer[nl++]=tm.layer();
1059  //
1060  // count valid / 2D hits
1061  //
1062  if LIKELY( hit->isValid() ) {
1063  nHit++;
1064  //if ( hit.isMatched() ||
1065  // hit.det().detUnits().front()->type().module()==pixel )
1066  //nHit2d++;
1067  }
1068  }
1069  //if (nHit==nHitMin) lastBwdDetLayer=im->layer();
1070  //
1071  // keep remaining (valid) hits for verification
1072  //
1073  else if ( hit->isValid() ) {
1074  //std::cout << "Adding a remaining hit" << std::endl;
1075  remainingHits.push_back(hit);
1076  }
1077  }
1078  //
1079  // Fit only if required number of valid hits can be used
1080  //
1081  if UNLIKELY( nHit<nHitMin ) return TempTrajectory();
1082 
1083  //
1084  // Do the backward fit (important: start from scaled, not random cov. matrix!)
1085  //
1086  TrajectoryStateOnSurface firstTsos(fwdTraj.firstMeasurement().updatedState());
1087  //cout << "firstTsos "<< firstTsos << endl;
1088  firstTsos.rescaleError(10.);
1089  //TrajectoryContainer bwdFitted(fitter.fit(fwdTraj.seed(),fwdTraj.recHits(),firstTsos));
1090  Trajectory && bwdFitted = fitter.fitOne(TrajectorySeed(PTrajectoryStateOnDet(), TrajectorySeed::recHitContainer(), oppositeDirection(candidate.direction())),
1091  fwdTraj.recHits(),firstTsos);
1092  if UNLIKELY(!bwdFitted.isValid()) return TempTrajectory();
1093 
1094 
1095  LogDebug("CkfPattern")<<"Obtained bwdFitted trajectory with measurement size " << bwdFitted.measurements().size();
1096  TempTrajectory fitted(fwdTraj.direction(),nSeed);
1097  fitted.setNLoops(fwdTraj.nLoops());
1098  vector<TM> const & tmsbf = bwdFitted.measurements();
1099  int iDetLayer=0;
1100  //this is ugly but the TM in the fitted track do not contain the DetLayer.
1101  //So we have to cache the detLayer pointers and replug them in.
1102  //For the backward building it would be enaugh to cache the last DetLayer,
1103  //but for the intermediary cleaning we need all
1104  for ( vector<TM>::const_iterator im=tmsbf.begin();im!=tmsbf.end(); im++ ) {
1105  fitted.emplace( (*im).forwardPredictedState(),
1106  (*im).backwardPredictedState(),
1107  (*im).updatedState(),
1108  (*im).recHit(),
1109  (*im).estimate(),
1110  bwdDetLayer[iDetLayer]
1111  );
1112 
1113  LogDebug("CkfPattern")<<PrintoutHelper::dumpMeasurement(*im);
1114  iDetLayer++;
1115  }
1116  /*
1117  TM lastMeas = bwdFitted.front().lastMeasurement();
1118  fitted.pop();
1119  fitted.push(TM(lastMeas.forwardPredictedState(),
1120  lastMeas.backwardPredictedState(),
1121  lastMeas.updatedState(),
1122  lastMeas.recHit(),
1123  lastMeas.estimate(),
1124  lastBwdDetLayer));
1125  */
1126 
1127 
1128  return fitted;
1129 }
#define LogDebug(id)
size
Write out results.
const DataContainer & measurements() const
#define LIKELY(x)
Definition: Likely.h:20
int foundHits() const
static std::string dumpMeasurement(const TrajectoryMeasurement &tm)
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
return((rh^lh)&mask)
PropagationDirection direction() const
static PropagationDirection oppositeDirection(PropagationDirection dir)
change of propagation direction
#define end
Definition: vmac.h:39
bool isValid() const
#define begin
Definition: vmac.h:32
#define UNLIKELY(x)
Definition: Likely.h:21
TempTrajectory GroupedCkfTrajectoryBuilder::buildTrajectories ( const TrajectorySeed seed,
GroupedCkfTrajectoryBuilder::TrajectoryContainer result,
unsigned int &  nCandPerSeed,
const TrajectoryFilter regionalCondition 
) const
overridevirtual

common part of both public trajectory building methods

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 258 of file GroupedCkfTrajectoryBuilder.cc.

References analyseResult(), analyseSeed(), EnergyCorrector::c, FastTrajectoryCleaner::clean(), gather_cfg::cout, BaseCkfTrajectoryBuilder::createStartingTrajectory(), Exception, BaseTrackerRecHit::firstClusterRef(), BaseCkfTrajectoryBuilder::forwardPropagator(), groupedLimitedCandidates(), trackerHitRTTI::isFromDet(), trackerHitRTTI::isUndef(), LogDebug, theFoundHitBonus, theLostHitPenalty, BaseCkfTrajectoryBuilder::theMeasurementTracker, and work_MaxSize_.

Referenced by trajectories().

262 {
263  if (theMeasurementTracker == nullptr) {
264  throw cms::Exception("LogicError") << "Asking to create trajectories to an un-initialized GroupedCkfTrajectoryBuilder.\nYou have to call clone(const MeasurementTrackerEvent *data) and then call trajectories on it instead.\n";
265  }
266 
267  statCount.seed();
268  //
269  // Build trajectory outwards from seed
270  //
271 
272  analyseSeed( seed);
273 
274  TempTrajectory const & startingTraj = createStartingTrajectory( seed);
275 
276  work_.clear();
277  const bool inOut = true;
278  nCandPerSeed = groupedLimitedCandidates(seed, startingTraj, regionalCondition, forwardPropagator(seed), inOut, work_);
279  if ( work_.empty() ) return startingTraj;
280 
281  // cleaning now done here...
283  cleaner.clean(work_);
284 
285  boost::shared_ptr<const TrajectorySeed> pseed(new TrajectorySeed(seed));
286  for (auto const & it : work_) if (it.isValid()) {
287  result.push_back( it.toTrajectory() ); result.back().setSharedSeed(pseed);
288  }
289  work_.clear();
290  if (work_.capacity() > work_MaxSize_) { TempTrajectoryContainer().swap(work_); work_.reserve(work_MaxSize_/2); }
291 
293 
294  LogDebug("CkfPattern")<< "GroupedCkfTrajectoryBuilder: returning result of size " << result.size();
295  statCount.traj(result.size());
296 
297 #ifdef VI_DEBUG
298  int kt=0;
299  for (auto const & traj : result) {
300 int chit[7]={};
301 for (auto const & tm : traj.measurements()) {
302  auto const & hit = tm.recHitR();
303  if (!hit.isValid()) ++chit[0];
304  if (hit.det()==nullptr) ++chit[1];
305  if ( trackerHitRTTI::isUndef(hit) ) continue;
306  if ( hit.dimension()!=2 ) {
307  ++chit[2];
308  } else if ( trackerHitRTTI::isFromDet(hit) ) {
309  auto const & thit = static_cast<BaseTrackerRecHit const&>(hit);
310  auto const & clus = thit.firstClusterRef();
311  if (clus.isPixel()) ++chit[3];
312  else if (thit.isMatched()) {
313  ++chit[4];
314  } else if (thit.isProjected()) {
315  ++chit[5];
316  } else {
317  ++chit[6];
318  }
319  }
320  }
321 
322 std::cout << "ckf " << kt++ << ": "; for (auto c:chit) std::cout << c <<'/'; std::cout<< std::endl;
323 }
324 #endif
325 
326  return startingTraj;
327 
328 }
#define LogDebug(id)
unsigned int groupedLimitedCandidates(const TrajectorySeed &seed, TempTrajectory const &startingTraj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &result) const
bool isFromDet(TrackingRecHit const &hit)
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
virtual void analyseSeed(const TrajectorySeed &seed) const
virtual void analyseResult(const TrajectoryContainer &result) const
const MeasurementTrackerEvent * theMeasurementTracker
std::vector< TempTrajectory > TempTrajectoryContainer
virtual OmniClusterRef const & firstClusterRef() const =0
bool isUndef(TrackingRecHit const &hit)
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
double GroupedCkfTrajectoryBuilder::chiSquareCut ( )
inline

Chi**2 Cut on the new Trajectory Measurements to consider

Definition at line 78 of file GroupedCkfTrajectoryBuilder.h.

const Chi2MeasurementEstimatorBase& GroupedCkfTrajectoryBuilder::estimator ( void  ) const
inline

Definition at line 73 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theEstimator.

Referenced by rebuildSeedingRegion().

73 {return *theEstimator;}
const Chi2MeasurementEstimatorBase * theEstimator
void GroupedCkfTrajectoryBuilder::groupedIntermediaryClean ( TempTrajectoryContainer theTrajectories) const
private

intermediate cleaning in the case of grouped measurements

im1->recHit()->hit()->sharesInput(im2->recHit()->hit(), TrackingRecHit::all) ) {

im1->recHit()->hit()->sharesInput(im2->recHit()->hit(), TrackingRecHit::all) ) {

Definition at line 706 of file GroupedCkfTrajectoryBuilder.cc.

References lumiContext::fill, align_cfg::firstValid, TempTrajectory::isValid(), LayerTriplets::layers(), cmsutils::bqueue< T >::rbegin(), cmsutils::bqueue< T >::rend(), TrackingRecHit::some, lumiQTWidget::t, and tkxor().

Referenced by groupedLimitedCandidates().

707 {
708  //if (theTrajectories.empty()) return TrajectoryContainer();
709  //TrajectoryContainer result;
710  if (theTrajectories.empty()) return;
711  //RecHitEqualByChannels recHitEqualByChannels(false, false);
712  LayersInTraj layers[theTrajectories.size()];
713  int ntraj=0;
714  for ( auto & t : theTrajectories) {
715  if ( t.isValid() && t.lastMeasurement().recHitR().isValid() )
716  layers[ntraj++].fill(t);
717  }
718 
719  if (ntraj<2) return;
720 
721  for (int ifirst=0; ifirst!=ntraj-1; ++ifirst) {
722  auto firstTraj = layers[ifirst].traj;
723  if (!firstTraj->isValid()) continue;
724  const TempTrajectory::DataContainer & firstMeasurements = firstTraj->measurements();
725 
726  int firstLayerSize = layers[ifirst].tot;
727  if ( firstLayerSize<4 ) continue;
728  auto const & firstLayers = layers[ifirst].layers;
729 
730  for (int isecond= ifirst+1; isecond!=ntraj; ++isecond) {
731  auto secondTraj = layers[isecond].traj;
732  if (!secondTraj->isValid()) continue;
733 
734  const TempTrajectory::DataContainer & secondMeasurements = secondTraj->measurements();
735 
736  int secondLayerSize = layers[isecond].tot;
737  //
738  // only candidates using the same last 3 layers are compared
739  //
740  if ( firstLayerSize!=secondLayerSize ) continue; // V.I. why equal???
741  auto const & secondLayers = layers[isecond].layers;
742  if ( firstLayers[0]!=secondLayers[0] ||
743  firstLayers[1]!=secondLayers[1] ||
744  firstLayers[2]!=secondLayers[2] ) continue;
745 
746  TempTrajectory::DataContainer::const_iterator im1 = firstMeasurements.rbegin();
747  TempTrajectory::DataContainer::const_iterator im2 = secondMeasurements.rbegin();
748  //
749  // check for identical hits in the last layer
750  //
751  bool unequal(false);
752  const DetLayer* layerPtr = firstLayers[0];
753  while ( im1!=firstMeasurements.rend()&&im2!=secondMeasurements.rend() ) {
754  if ( im1->layer()!=layerPtr || im2->layer()!=layerPtr ) break;
755  if ( !(im1->recHit()->isValid()) || !(im2->recHit()->isValid()) ||
756  !im1->recHit()->hit()->sharesInput(im2->recHit()->hit(), TrackingRecHit::some) ) {
758  unequal = true;
759  break;
760  }
761  --im1;
762  --im2;
763  }
764  if ( im1==firstMeasurements.rend() || im2==secondMeasurements.rend() ||
765  im1->layer()==layerPtr || im2->layer()==layerPtr || unequal ) continue;
766  //
767  // check for invalid hits in the layer -2
768  // compare only candidates with invalid / valid combination
769  //
770  layerPtr = firstLayers[1];
771  bool firstValid(true);
772  while ( im1!=firstMeasurements.rend()&&im1->layer()==layerPtr ) {
773  if ( !im1->recHit()->isValid() ) firstValid = false;
774  --im1;
775  }
776  bool secondValid(true);
777  while ( im2!=secondMeasurements.rend()&&im2->layer()==layerPtr ) {
778  if ( !im2->recHit()->isValid() ) secondValid = false;
779  --im2;
780  }
781  if ( !tkxor(firstValid,secondValid) ) continue;
782  //
783  // ask for identical hits in layer -3
784  //
785  unequal = false;
786  layerPtr = firstLayers[2];
787  while ( im1!=firstMeasurements.rend()&&im2!=secondMeasurements.rend() ) {
788  if ( im1->layer()!=layerPtr || im2->layer()!=layerPtr ) break;
789  if ( !(im1->recHit()->isValid()) || !(im2->recHit()->isValid()) ||
790  !im1->recHit()->hit()->sharesInput(im2->recHit()->hit(), TrackingRecHit::some) ) {
792  unequal = true;
793  break;
794  }
795  --im1;
796  --im2;
797  }
798  if ( im1==firstMeasurements.rend() || im2==secondMeasurements.rend() ||
799  im1->layer()==layerPtr || im2->layer()==layerPtr || unequal ) continue;
800 
801  if ( !firstValid ) {
802  firstTraj->invalidate();
803  break;
804  }
805  else {
806  secondTraj->invalidate(); // V.I. why break?
807  break;
808  }
809  } // second
810  } // first
811 /*
812  for (TempTrajectoryContainer::const_iterator it = theTrajectories.begin();
813  it != theTrajectories.end(); it++) {
814  if(it->isValid()) result.push_back( *it);
815  }
816 
817  return result;
818 */
819  theTrajectories.erase(std::remove_if( theTrajectories.begin(),theTrajectories.end(),
820  std::not_fn(&TempTrajectory::isValid)),
821  theTrajectories.end());
822 }
const_iterator rend() const
Definition: bqueue.h:164
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const_iterator rbegin() const
Definition: bqueue.h:163
bool isValid() const
bool tkxor(bool a, bool b) const
unsigned int GroupedCkfTrajectoryBuilder::groupedLimitedCandidates ( const TrajectorySeed seed,
TempTrajectory const &  startingTraj,
const TrajectoryFilter regionalCondition,
const Propagator propagator,
bool  inOut,
TempTrajectoryContainer result 
) const
private

Definition at line 332 of file GroupedCkfTrajectoryBuilder.cc.

References advanceOneLayer(), edmScanValgrind::buffer, objects.IsoTrackAnalyzer::candidates, TrajectoryStateOnSurface::charge(), IntermediateTrajectoryCleaner::clean(), TrajectoryStateOnSurface::curvilinearError(), PrintoutHelper::dumpCandidates(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), groupedIntermediaryClean(), mps_fire::i, checklumidiff::l, TempTrajectory::lastLayer(), LogDebug, CurvilinearTrajectoryError::matrix(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), ForwardDetLayer::specificSurface(), BarrelDetLayer::specificSurface(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, theFoundHitBonus, theIntermediateCleaning, theLostHitPenalty, theMaxCand, and PV3DBase< T, PVType, FrameType >::z().

Referenced by buildTrajectories(), and rebuildSeedingRegion().

338 {
339  unsigned int nIter=1;
340  unsigned int nCands=0; // ignore startingTraj
341  unsigned int prevNewCandSize=0;
343  TempTrajectoryContainer newCand;
344  candidates.push_back( startingTraj);
345 
346  while ( !candidates.empty()) {
347 
348  newCand.clear();
349  for (TempTrajectoryContainer::iterator traj=candidates.begin();
350  traj!=candidates.end(); traj++) {
351  if ( !advanceOneLayer(seed, *traj, regionalCondition, propagator, inOut, newCand, result) ) {
352  LogDebug("CkfPattern")<< "GCTB: terminating after advanceOneLayer==false";
353  continue;
354  }
355 
356  LogDebug("CkfPattern")<<"newCand(1): after advanced one layer:\n"<<PrintoutHelper::dumpCandidates(newCand);
357  // account only new candidates, i.e.
358  // - 1 candidate -> 1 candidate, don't increase count
359  // - 1 candidate -> 2 candidates, increase count by 1
360  nCands += newCand.size() - prevNewCandSize;
361  prevNewCandSize = newCand.size();
362 
363  if ((int)newCand.size() > theMaxCand) {
364  //ShowCand()(newCand);
365 
366  std::nth_element( newCand.begin(), newCand.begin()+theMaxCand, newCand.end(), GroupedTrajCandLess(theLostHitPenalty,theFoundHitBonus));
367  newCand.erase( newCand.begin()+theMaxCand, newCand.end());
368  }
369  LogDebug("CkfPattern")<<"newCand(2): after removing extra candidates.\n"<<PrintoutHelper::dumpCandidates(newCand);
370  }
371 
372  LogDebug("CkfPattern") << "newCand.size() at end = " << newCand.size();
373 /*
374  if (theIntermediateCleaning) {
375  candidates.clear();
376  candidates = groupedIntermediaryClean(newCand);
377  } else {
378  candidates.swap(newCand);
379  }
380 */
382 #ifdef STANDARD_INTERMEDIARYCLEAN
384 #else
385  groupedIntermediaryClean(newCand);
386 #endif
387 
388  }
389  candidates.swap(newCand);
390 
391  LogDebug("CkfPattern") <<"candidates(3): "<<result.size()<<" candidates after "<<nIter++<<" groupedCKF iteration: \n"
393  <<"\n "<<candidates.size()<<" running candidates are: \n"
394  <<PrintoutHelper::dumpCandidates(candidates);
395  }
396 
397  return nCands;
398 }
#define LogDebug(id)
static std::string dumpCandidates(collection &candidates)
static void clean(TempTrajectoryContainer &tracks)
void groupedIntermediaryClean(TempTrajectoryContainer &theTrajectories) const
intermediate cleaning in the case of grouped measurements
bool advanceOneLayer(const TrajectorySeed &seed, TempTrajectory &traj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &newCand, TempTrajectoryContainer &result) const
std::vector< TempTrajectory > TempTrajectoryContainer
float GroupedCkfTrajectoryBuilder::lostHitPenalty ( )
inline

Chi**2 Penalty for each lost hit.

Definition at line 85 of file GroupedCkfTrajectoryBuilder.h.

double GroupedCkfTrajectoryBuilder::mass ( )
inline

Mass hypothesis used for propagation.

Definition at line 94 of file GroupedCkfTrajectoryBuilder.h.

References iEvent, and BaseCkfTrajectoryBuilder::setEvent_().

Referenced by Particle.Particle::__str__(), and DiObject.DiMuon::__str__().

int GroupedCkfTrajectoryBuilder::maxCand ( )
inline

Maximum number of trajectory candidates to propagate to the next layer.

Definition at line 81 of file GroupedCkfTrajectoryBuilder.h.

static PropagationDirection GroupedCkfTrajectoryBuilder::oppositeDirection ( PropagationDirection  dir)
inlinestaticprivate

change of propagation direction

Definition at line 159 of file GroupedCkfTrajectoryBuilder.h.

References alongMomentum, dir, and oppositeToMomentum.

Referenced by backwardFit().

159  {
160  if ( dir==alongMomentum ) return oppositeToMomentum;
161  if ( dir==oppositeToMomentum ) return alongMomentum;
162  return dir;
163  }
dbl *** dir
Definition: mlp_gen.cc:35
double GroupedCkfTrajectoryBuilder::ptCut ( )
inline

Pt cut.

Tells whether an intermediary cleaning stage should take place during TB.

Definition at line 91 of file GroupedCkfTrajectoryBuilder.h.

void GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
TrajectoryContainer result 
) const
overridevirtual

trajectories re-building in the seeding region. It looks for additional measurements in the seeding region of the intial trajectories. Only valid trajectories are returned. Invalid ones are dropped from the input collection.

Reimplemented from TrajectoryBuilder.

Definition at line 215 of file GroupedCkfTrajectoryBuilder.cc.

References BaseCkfTrajectoryBuilder::createStartingTrajectory(), and rebuildTrajectories().

Referenced by rebuildSeedingRegion(), and rebuildTrajectories().

216  {
217  TempTrajectory const & startingTraj = createStartingTrajectory( seed);
218  rebuildTrajectories(startingTraj,seed,result);
219 
220 }
void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const override
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
TempTrajectory const &  startingTraj,
TempTrajectoryContainer result 
) const
private

try to find additional hits in seeding region

Definition at line 826 of file GroupedCkfTrajectoryBuilder.cc.

References backwardFit(), BaseCkfTrajectoryBuilder::backwardPropagator(), estimator(), BaseCkfTrajectoryBuilder::hitBuilder(), mps_fire::i, TempTrajectory::isValid(), LogDebug, eostools::move(), rebuildSeedingRegion(), TrajectorySeed::recHits(), theKeepOriginalIfRebuildFails, UNLIKELY, and updator().

829 {
830  //
831  // Rebuilding of trajectories. Candidates are taken from result,
832  // which will be replaced with the solutions after rebuild
833  // (assume vector::swap is more efficient than building new container)
834  //
835  LogDebug("CkfPattern")<< "Starting to rebuild " << result.size() << " tracks";
836  //
837  // Fitter (need to create it here since the propagation direction
838  // might change between different starting trajectories)
839  //
840  auto hitCloner = static_cast<TkTransientTrackingRecHitBuilder const *>(hitBuilder())->cloner();
841  KFTrajectoryFitter fitter(backwardPropagator(seed),&updator(),&estimator(),3,nullptr,&hitCloner);
842  //
843  TrajectorySeed::range rseedHits = seed.recHits();
844  std::vector<const TrackingRecHit*> seedHits;
845  //seedHits.insert(seedHits.end(), rseedHits.first, rseedHits.second);
846  //for (TrajectorySeed::recHitContainer::const_iterator iter = rseedHits.first; iter != rseedHits.second; iter++){
847  // seedHits.push_back(&*iter);
848  //}
849 
850  //unsigned int nSeed(seedHits.size());
851  unsigned int nSeed(rseedHits.second-rseedHits.first);
852  //seedHits.reserve(nSeed);
853  TempTrajectoryContainer rebuiltTrajectories;
854 
855  for ( TempTrajectoryContainer::iterator it=result.begin();
856  it!=result.end(); it++ ) {
857 
858  // Refit - keep existing trajectory in case fit is not possible
859  // or fails
860  //
861 
862  auto && reFitted = backwardFit(*it,nSeed,fitter,seedHits);
863  if UNLIKELY( !reFitted.isValid() ) {
864  rebuiltTrajectories.push_back(std::move(*it));
865  LogDebug("CkfPattern")<< "RebuildSeedingRegion skipped as backward fit failed";
866  // << "after reFitted.size() " << reFitted.size();
867  continue;
868  }
869  //LogDebug("CkfPattern")<<"after reFitted.size() " << reFitted.size();
870  //
871  // Rebuild seeding part. In case it fails: keep initial trajectory
872  // (better to drop it??)
873  //
874  int nRebuilt =
875  rebuildSeedingRegion (seed, seedHits,reFitted,rebuiltTrajectories);
876  // Loop over the last nRebuilt trajectories and propagate back the
877  // real cause that stopped the original in-out trajectory, since
878  // that's the one we want to monitor
879  for (size_t i = rebuiltTrajectories.size() - 1; i < rebuiltTrajectories.size() - nRebuilt - 1; --i) {
880  rebuiltTrajectories[i].setStopReason(it->stopReason());
881  }
882 
883  if ( nRebuilt==0 && !theKeepOriginalIfRebuildFails ) it->invalidate(); // won't use original in-out track
884 
885  if ( nRebuilt<0 ) rebuiltTrajectories.push_back(std::move(*it));
886  }
887  //
888  // Replace input trajectories with new ones
889  //
890  result.swap(rebuiltTrajectories);
891  result.erase(std::remove_if( result.begin(),result.end(),
892  std::not_fn(&TempTrajectory::isValid)),
893  result.end());
894 }
#define LogDebug(id)
void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const override
const TransientTrackingRecHitBuilder * hitBuilder() const
const Chi2MeasurementEstimatorBase & estimator() const
std::pair< const_iterator, const_iterator > range
TempTrajectory backwardFit(TempTrajectory &candidate, unsigned int nSeed, const TrajectoryFitter &fitter, std::vector< const TrackingRecHit * > &remainingHits) const
bool isValid() const
std::vector< TempTrajectory > TempTrajectoryContainer
range recHits() const
const TrajectoryStateUpdator & updator() const
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
#define UNLIKELY(x)
Definition: Likely.h:21
def move(src, dest)
Definition: eostools.py:511
int GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
const std::vector< const TrackingRecHit * > &  seedHits,
TempTrajectory candidate,
TempTrajectoryContainer result 
) const
private

Definition at line 897 of file GroupedCkfTrajectoryBuilder.cc.

References BaseCkfTrajectoryBuilder::backwardPropagator(), gather_cfg::cout, TrajectorySeed::direction(), TempTrajectory::direction(), PrintoutHelper::dumpCandidates(), PrintoutHelper::dumpMeasurements(), groupedLimitedCandidates(), LogDebug, TempTrajectory::measurements(), TrajectorySeed::nHits(), TempTrajectory::push(), TempTrajectory::setNLoops(), cmsutils::bqueue< T >::size(), theRequireSeedHitsInRebuild, and verifyHits().

901 {
902  //
903  // Starting from track found by in-out tracking phase, extrapolate it inwards through
904  // the seeding region if possible in towards smaller Tracker radii, searching for additional
905  // hits.
906  // The resulting trajectories are returned in result,
907  // the count is the return value.
908  //
909  TempTrajectoryContainer rebuiltTrajectories;
910 #ifdef DBG2_GCTB
911 /* const LayerFinderByDet layerFinder;
912  if ( !seedHits.empty() && seedHits.front().isValid() ) {
913  DetLayer* seedLayer = layerFinder(seedHits.front().det());
914  cout << "Seed hit at " << seedHits.front().globalPosition()
915  << " " << seedLayer << endl;
916  cout << "Started from "
917  << candidate.lastMeasurement().updatedState().globalPosition().perp() << " "
918  << candidate.lastMeasurement().updatedState().globalPosition().z() << endl;
919  pair<bool,TrajectoryStateOnSurface> layerComp(false,TrajectoryStateOnSurface());
920  if ( seedLayer ) layerComp =
921  seedLayer->compatible(candidate.lastMeasurement().updatedState(),
922  propagator(),estimator());
923  pair<bool,TrajectoryStateOnSurface> detComp =
924  seedHits.front().det().compatible(candidate.lastMeasurement().updatedState(),
925  propagator(),estimator());
926  cout << " layer compatibility = " << layerComp.first;
927  cout << " det compatibility = " << detComp.first;
928  if ( detComp.first ) {
929  cout << " estimate = "
930  << estimator().estimate(detComp.second,seedHits.front()).second ;
931  }
932  cout << endl;
933  }*/
934  cout << "Before backward building: #measurements = "
935  << candidate.measurements().size() ; //<< endl;;
936 #endif
937  //
938  // Use standard building with standard cuts. Maybe better to use different
939  // cuts from "forward" building (e.g. no check on nr. of invalid hits)?
940  //
941  const bool inOut = false;
942  groupedLimitedCandidates(seed, candidate, nullptr, backwardPropagator(seed), inOut, rebuiltTrajectories);
943 
944  LogDebug("CkfPattern")<<" After backward building: "<<PrintoutHelper::dumpCandidates(rebuiltTrajectories);
945 
946  //
947  // Check & count resulting candidates
948  //
949  int nrOfTrajectories(0);
950  bool orig_ok = false;
951  //const RecHitEqualByChannels recHitEqual(false,false);
952  //vector<TM> oldMeasurements(candidate.measurements());
953  for ( TempTrajectoryContainer::iterator it=rebuiltTrajectories.begin();
954  it!=rebuiltTrajectories.end(); it++ ) {
955 
956  TempTrajectory::DataContainer newMeasurements(it->measurements());
957  //
958  // Verify presence of seeding hits?
959  //
961  orig_ok = true;
962  // no hits found (and possibly some invalid hits discarded): drop track
963  if ( newMeasurements.size()<=candidate.measurements().size() ){
964  LogDebug("CkfPattern") << "newMeasurements.size()<=candidate.measurements().size()";
965  continue;
966  }
967  // verify presence of hits
968  //GIO//if ( !verifyHits(newMeasurements.begin()+candidate.measurements().size(),
969  //GIO// newMeasurements.end(),seedHits) ){
970  if ( !verifyHits(newMeasurements.rbegin(),
971  newMeasurements.size() - candidate.measurements().size(),
972  seedHits) ){
973  LogDebug("CkfPattern")<< "seed hits not found in rebuild";
974  continue;
975  }
976  }
977  //
978  // construct final trajectory in the right order
979  //
980  // save & count result
981  nrOfTrajectories++;
982  result.emplace_back(seed.direction(),seed.nHits());
983  TempTrajectory & reversedTrajectory = result.back();
984  reversedTrajectory.setNLoops(it->nLoops());
985  for (TempTrajectory::DataContainer::const_iterator im=newMeasurements.rbegin(), ed = newMeasurements.rend();
986  im != ed; --im ) {
987  reversedTrajectory.push(*im);
988  }
989 
990  LogDebug("CkgPattern")<<"New traj direction = " << reversedTrajectory.direction()<<"\n"
991  <<PrintoutHelper::dumpMeasurements(reversedTrajectory.measurements());
992  } // rebuiltTrajectories
993 
994  // If nrOfTrajectories = 0 and orig_ok = true, this means that a track was actually found on the
995  // out-in step (meeting those requirements) but did not have the seed hits in it.
996  // In this case when we return we will go ahead and use the original in-out track.
997 
998  // If nrOfTrajectories = 0 and orig_ok = false, this means that the out-in step failed to
999  // find any track. Two cases are a technical failure in fitting the original seed hits or
1000  // because the track did not meet the out-in criteria (which may be stronger than the out-in
1001  // criteria). In this case we will NOT allow the original in-out track to be used.
1002 
1003  if ( (nrOfTrajectories == 0) && orig_ok ) {
1004  nrOfTrajectories = -1;
1005  }
1006  return nrOfTrajectories;
1007 }
#define LogDebug(id)
PropagationDirection direction() const
unsigned int groupedLimitedCandidates(const TrajectorySeed &seed, TempTrajectory const &startingTraj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &result) const
static std::string dumpCandidates(collection &candidates)
const DataContainer & measurements() const
void setNLoops(signed char value)
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
PropagationDirection direction() const
bool verifyHits(TempTrajectory::DataContainer::const_iterator rbegin, size_t maxDepth, const std::vector< const TrackingRecHit * > &hits) const
Verifies presence of a RecHits in a range of TrajectoryMeasurements.
std::vector< TempTrajectory > TempTrajectoryContainer
unsigned int nHits() const
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
size_type size() const
Definition: bqueue.h:167
void push(const TrajectoryMeasurement &tm)
void GroupedCkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed seed,
TrajectoryContainer result 
) const
overridevirtual

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 223 of file GroupedCkfTrajectoryBuilder.cc.

References FastTrajectoryCleaner::clean(), eostools::move(), rebuildSeedingRegion(), theFoundHitBonus, theLostHitPenalty, and edmIntegrityCheck::work.

Referenced by rebuildSeedingRegion().

224  {
226 
227  TrajectoryContainer final;
228 
229  // better the seed to be always the same...
230  boost::shared_ptr<const TrajectorySeed> sharedSeed;
231  if (result.empty())
232  sharedSeed.reset(new TrajectorySeed(seed));
233  else sharedSeed = result.front().sharedSeed();
234 
235 
236  work.reserve(result.size());
237  for (auto && traj : result)
238  if(traj.isValid()) work.emplace_back(std::move(traj));
239 
240 
241  rebuildSeedingRegion(seed,startingTraj,work);
242 
243  // we clean here now
245  cleaner.clean(work);
246 
247  for (auto const & it : work) if (it.isValid()) {
248  final.push_back( it.toTrajectory() ); final.back().setSharedSeed(sharedSeed);
249  }
250 
251  result.swap(final);
252 
253  statCount.rebuilt(result.size());
254 
255 }
void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const override
std::vector< TempTrajectory > TempTrajectoryContainer
std::vector< Trajectory > TrajectoryContainer
def move(src, dest)
Definition: eostools.py:511
void GroupedCkfTrajectoryBuilder::setEvent_ ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements BaseCkfTrajectoryBuilder.

Definition at line 172 of file GroupedCkfTrajectoryBuilder.cc.

172  {
173 }
bool GroupedCkfTrajectoryBuilder::tkxor ( bool  a,
bool  b 
) const
inlineprivate
GroupedCkfTrajectoryBuilder::TrajectoryContainer GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed) const
overridevirtual

set Event for the internal MeasurementTracker data member

trajectories building starting from a seed

Implements TrajectoryBuilder.

Definition at line 176 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and tmp.

177 {
178  TrajectoryContainer ret;
179  ret.reserve(10);
180  unsigned int tmp;
181  buildTrajectories(seed, ret, tmp, nullptr);
182  return ret;
183 }
TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< Trajectory > TrajectoryContainer
void GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
GroupedCkfTrajectoryBuilder::TrajectoryContainer ret 
) const
overridevirtual

trajectories building starting from a seed, return in an already allocated vector

Reimplemented from TrajectoryBuilder.

Definition at line 198 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and tmp.

199 {
200  unsigned int tmp;
201  buildTrajectories(seed,ret,tmp,nullptr);
202 }
TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
GroupedCkfTrajectoryBuilder::TrajectoryContainer GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
const TrackingRegion region 
) const

trajectories building starting from a seed with a region

Definition at line 186 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and tmp.

188 {
189  TrajectoryContainer ret;
190  ret.reserve(10);
191  unsigned int tmp;
192  RegionalTrajectoryFilter regionalCondition(region);
193  buildTrajectories(seed, ret, tmp, &regionalCondition);
194  return ret;
195 }
TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::vector< Trajectory > TrajectoryContainer
void GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
GroupedCkfTrajectoryBuilder::TrajectoryContainer ret,
const TrackingRegion region 
) const

trajectories building starting from a seed with a region

Definition at line 205 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and tmp.

208 {
209  RegionalTrajectoryFilter regionalCondition(region);
210  unsigned int tmp;
211  buildTrajectories(seed,ret,tmp,&regionalCondition);
212 }
TempTrajectory buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
const TrajectoryStateUpdator& GroupedCkfTrajectoryBuilder::updator ( ) const
inline

Definition at line 72 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theUpdator.

Referenced by rebuildSeedingRegion().

72 {return *theUpdator;}
const TrajectoryStateUpdator * theUpdator
bool GroupedCkfTrajectoryBuilder::verifyHits ( TempTrajectory::DataContainer::const_iterator  rbegin,
size_t  maxDepth,
const std::vector< const TrackingRecHit * > &  hits 
) const
private

Verifies presence of a RecHits in a range of TrajectoryMeasurements.

Definition at line 1132 of file GroupedCkfTrajectoryBuilder.cc.

References LogDebug, CMSBoostedTauSeedingParameters_cfi::maxDepth, and TrackingRecHit::some.

Referenced by rebuildSeedingRegion().

1135 {
1136  //
1137  // verify presence of the seeding hits
1138  //
1139  LogDebug("CkfPattern")<<"Checking for " << hits.size() << " hits in "
1140  << maxDepth << " measurements" << endl;
1141 
1142  auto rend = rbegin;
1143  while (maxDepth > 0) { --maxDepth; --rend; }
1144  for ( auto ir=hits.begin(); ir!=hits.end(); ir++ ) {
1145  // assume that all seeding hits are valid!
1146  bool foundHit(false);
1147  for ( auto im=rbegin; im!=rend; --im ) {
1148  if ( im->recHit()->isValid() && (*ir)->sharesInput(im->recHit()->hit(), TrackingRecHit::some) ) {
1149  foundHit = true;
1150  break;
1151  }
1152  }
1153  if ( !foundHit ) return false;
1154  }
1155  return true;
1156 }
#define LogDebug(id)

Member Data Documentation

float GroupedCkfTrajectoryBuilder::maxDPhiForLooperReconstruction
private

Definition at line 205 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

float GroupedCkfTrajectoryBuilder::maxPt2ForLooperReconstruction
private

If the value is greater than zero, the reconstructions for looper is turned on for candidates with pt greater than maxPtForLooperReconstruction

Definition at line 203 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theAlwaysUseInvalid
private

Definition at line 186 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theBestHitOnly
private

Use only best hit / group when building segments

Definition at line 189 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

double GroupedCkfTrajectoryBuilder::theChiSquareCut
private

Chi**2 Cut on the new Trajectory Measurements to consider

Definition at line 172 of file GroupedCkfTrajectoryBuilder.h.

TrajectoryFilter* GroupedCkfTrajectoryBuilder::theConfigurableCondition
private

Definition at line 167 of file GroupedCkfTrajectoryBuilder.h.

float GroupedCkfTrajectoryBuilder::theFoundHitBonus
private

Chi**2 bonus for each found hit (favours candidates with more measurements)

Definition at line 181 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories(), GroupedCkfTrajectoryBuilder(), groupedLimitedCandidates(), and rebuildTrajectories().

bool GroupedCkfTrajectoryBuilder::theIntermediateCleaning
private

Tells whether an intermediary cleaning stage should take place during TB.

Definition at line 183 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

bool GroupedCkfTrajectoryBuilder::theKeepOriginalIfRebuildFails
private

Keep original trajectory if rebuilding fails.

Definition at line 198 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().

bool GroupedCkfTrajectoryBuilder::theLockHits
private

Lock hits when building segments in a layer

Definition at line 188 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

float GroupedCkfTrajectoryBuilder::theLostHitPenalty
private

Chi**2 Penalty for each lost hit.

Definition at line 180 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories(), GroupedCkfTrajectoryBuilder(), groupedLimitedCandidates(), and rebuildTrajectories().

double GroupedCkfTrajectoryBuilder::theMass
private

Mass hypothesis used for propagation

Definition at line 176 of file GroupedCkfTrajectoryBuilder.h.

int GroupedCkfTrajectoryBuilder::theMaxCand
private

Maximum number of trajectory candidates to propagate to the next layer.

Definition at line 178 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

unsigned int GroupedCkfTrajectoryBuilder::theMinNrOf2dHitsForRebuild
private

Minimum nr. of non-seed 2D hits required for rebuild.

Definition at line 196 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder().

unsigned int GroupedCkfTrajectoryBuilder::theMinNrOfHitsForRebuild
private

Minimum nr. of non-seed hits required for rebuild. If ==0 the seeding part will remain untouched.

Definition at line 193 of file GroupedCkfTrajectoryBuilder.h.

Referenced by backwardFit(), and GroupedCkfTrajectoryBuilder().

double GroupedCkfTrajectoryBuilder::theptCut
private

ptCut

Definition at line 174 of file GroupedCkfTrajectoryBuilder.h.

bool GroupedCkfTrajectoryBuilder::theRequireSeedHitsInRebuild
private

Only accept rebuilt trajectories if they contain the seed hits.

Definition at line 191 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().