CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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

void 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 (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, edm::ConsumesCollector iC, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)
 
 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 ()
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &iDesc)
 
- Static Public Member Functions inherited from BaseCkfTrajectoryBuilder
static void fillPSetDescription (edm::ParameterSetDescription &iDesc)
 

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 (std::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
 
void addToResult (TempTrajectory const &traj, TempTrajectoryContainer &result, bool inOut=false) const
 
virtual bool analyzeMeasurementsDebugger (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, 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 = nullptr
 
const MeasurementTrackerEventtheMeasurementTracker = nullptr
 
const NavigationSchooltheNavigationSchool = nullptr
 
const PropagatorthePropagatorAlong = nullptr
 
const PropagatorthePropagatorOpposite = nullptr
 
const TransientTrackingRecHitBuildertheTTRHBuilder = nullptr
 
const TrajectoryStateUpdatortheUpdator = nullptr
 

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 22 of file GroupedCkfTrajectoryBuilder.h.

Member Enumeration Documentation

◆ work_MaxSize_Size_

Enumerator
work_MaxSize_ 

Definition at line 196 of file GroupedCkfTrajectoryBuilder.h.

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

Constructor & Destructor Documentation

◆ GroupedCkfTrajectoryBuilder()

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

constructor from ParameterSet

Definition at line 114 of file GroupedCkfTrajectoryBuilder.cc.

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

116  iC,
118  conf.getParameter<edm::ParameterSet>("trajectoryFilter"), iC),
119  conf.getParameter<bool>("useSameTrajFilter")
121  conf.getParameter<edm::ParameterSet>("trajectoryFilter"), iC)
123  conf.getParameter<edm::ParameterSet>("inOutTrajectoryFilter"), iC)) {
124  // fill data members from parameters (eventually data members could be dropped)
125  //
126  theMaxCand = conf.getParameter<int>("maxCand");
127  theLostHitPenalty = conf.getParameter<double>("lostHitPenalty");
128  theFoundHitBonus = conf.getParameter<double>("foundHitBonus");
129  theIntermediateCleaning = conf.getParameter<bool>("intermediateCleaning");
130  theAlwaysUseInvalid = conf.getParameter<bool>("alwaysUseInvalidHits");
131  theLockHits = conf.getParameter<bool>("lockHits");
132  theBestHitOnly = conf.getParameter<bool>("bestHitOnly");
134  theRequireSeedHitsInRebuild = conf.getParameter<bool>("requireSeedHitsInRebuild");
135  theKeepOriginalIfRebuildFails = conf.getParameter<bool>("keepOriginalIfRebuildFails");
136  theMinNrOfHitsForRebuild = max(0, conf.getParameter<int>("minNrOfHitsForRebuild"));
137  maxPt2ForLooperReconstruction = conf.getParameter<double>("maxPtForLooperReconstruction");
139  maxDPhiForLooperReconstruction = conf.getParameter<double>("maxDPhiForLooperReconstruction");
140 
141  /* ======= B.M. to be ported layer ===========
142  bool setOK = thePropagator->setMaxDirectionChange(1.6);
143  if (!setOK)
144  cout << "GroupedCkfTrajectoryBuilder WARNING: "
145  << "propagator does not support setMaxDirectionChange"
146  << endl;
147  // addStopCondition(theMinPtStopCondition);
148 
149  theConfigurableCondition = createAlgo<TrajectoryFilter>(componentConfig("StopCondition"));
150  ===================================== */
151 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector iC, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)

◆ ~GroupedCkfTrajectoryBuilder()

GroupedCkfTrajectoryBuilder::~GroupedCkfTrajectoryBuilder ( )
inlineoverride

destructor

Definition at line 28 of file GroupedCkfTrajectoryBuilder.h.

28 {}

Member Function Documentation

◆ advanceOneLayer()

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 456 of file GroupedCkfTrajectoryBuilder.cc.

References funct::abs(), BaseCkfTrajectoryBuilder::addToResult(), PV3DBase< T, PVType, FrameType >::basicVector(), gather_cfg::cout, TempTrajectory::empty(), PV3DBase< T, PVType, FrameType >::eta(), TransverseImpactPointExtrapolator::extrapolate(), f, BaseCkfTrajectoryBuilder::findStateAndLayers(), BaseCkfTrajectoryBuilder::forwardPropagator(), TempTrajectory::foundHits(), full, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TempTrajectory::incrementLoops(), createfilelist::int, TrajectoryStateOnSurface::isValid(), TempTrajectory::join(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), DetLayer::location(), LogDebug, TempTrajectory::lostHits(), maxDPhiForLooperReconstruction, maxPt2ForLooperReconstruction, TempTrajectory::measurements(), TrackingRecHit::missing, eostools::move(), BaseCkfTrajectoryBuilder::moveToResult(), NO_SEGMENTS_FOR_VALID_LAYERS, NOT_STOPPED, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), TrackCandidateProducer_cfi::propagator, HLT_2024v13_cff::pt2, cmsutils::bqueue< T >::rbegin(), cmsutils::bqueue< T >::rend(), mps_fire::result, fileCollector::seed, TempTrajectory::setDPhiCacheForLoopersReconstruction(), TempTrajectory::setStopReason(), BarrelDetLayer::specificSurface(), filterCSVwithJSON::target, theAlwaysUseInvalid, theBestHitOnly, BaseCkfTrajectoryBuilder::theEstimator, theFoundHitBonus, theLockHits, theLostHitPenalty, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, BaseCkfTrajectoryBuilder::theUpdator, BaseCkfTrajectoryBuilder::toBeContinued(), TrajectoryStateOnSurface::transverseCurvature(), UNLIKELY, TrajectoryMeasurement::updatedState(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedLimitedCandidates().

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

◆ analyseMeasurements()

virtual void GroupedCkfTrajectoryBuilder::analyseMeasurements ( const std::vector< TM > &  meas,
const Trajectory traj 
) const
inlineprotectedvirtual

Definition at line 92 of file GroupedCkfTrajectoryBuilder.h.

92 {}

◆ analyseResult()

virtual void GroupedCkfTrajectoryBuilder::analyseResult ( const TrajectoryContainer result) const
inlineprotectedvirtual

Definition at line 93 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

93 {}

◆ analyseSeed()

virtual void GroupedCkfTrajectoryBuilder::analyseSeed ( const TrajectorySeed seed) const
inlineprotectedvirtual

Definition at line 90 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

90 {}

◆ backwardFit()

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

Definition at line 1009 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

1012  {
1013  //
1014  // clear array of non-fitted hits
1015  //
1016  remainingHits.clear();
1017 
1018  LogDebug("CkfPattern") << "nSeed " << nSeed << endl
1019  << "Old traj direction = " << candidate.direction() << endl
1021 
1022  //
1023  // backward fit trajectory.
1024  // (Will try to fit only hits outside the seeding region. However,
1025  // if there are not enough of these, it will also use the seeding hits).
1026  //
1027  // const unsigned int nHitAllMin(5);
1028  // const unsigned int nHit2dMin(2);
1029  unsigned int nHit(0); // number of valid hits after seeding region
1030  //unsigned int nHit2d(0); // number of valid hits after seeding region with 2D info
1031  // use all hits except the first n (from seed), but require minimum
1032  // specified in configuration.
1033  // Swapped over next two lines.
1034  unsigned int nHitMin = std::max(candidate.foundHits() - nSeed, theMinNrOfHitsForRebuild);
1035  // unsigned int nHitMin = oldMeasurements.size()-nSeed;
1036  // we want to rebuild only if the number of VALID measurements excluding the seed measurements is higher than the cut
1038  return TempTrajectory();
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)
1082  return TempTrajectory();
1083 
1084  //
1085  // Do the backward fit (important: start from scaled, not random cov. matrix!)
1086  //
1087  TrajectoryStateOnSurface firstTsos(fwdTraj.firstMeasurement().updatedState());
1088  //cout << "firstTsos "<< firstTsos << endl;
1089  firstTsos.rescaleError(10.);
1090  //TrajectoryContainer bwdFitted(fitter.fit(fwdTraj.seed(),fwdTraj.recHits(),firstTsos));
1091  Trajectory&& bwdFitted =
1092  fitter.fitOne(TrajectorySeed({}, {}, oppositeDirection(candidate.direction())), fwdTraj.recHits(), firstTsos);
1093  if UNLIKELY (!bwdFitted.isValid())
1094  return TempTrajectory();
1095 
1096  LogDebug("CkfPattern") << "Obtained bwdFitted trajectory with measurement size " << bwdFitted.measurements().size();
1097  TempTrajectory fitted(fwdTraj.direction(), nSeed);
1098  fitted.setNLoops(fwdTraj.nLoops());
1099  vector<TM> const& tmsbf = bwdFitted.measurements();
1100  int iDetLayer = 0;
1101  //this is ugly but the TM in the fitted track do not contain the DetLayer.
1102  //So we have to cache the detLayer pointers and replug them in.
1103  //For the backward building it would be enaugh to cache the last DetLayer,
1104  //but for the intermediary cleaning we need all
1105  for (vector<TM>::const_iterator im = tmsbf.begin(); im != tmsbf.end(); im++) {
1106  fitted.emplace((*im).forwardPredictedState(),
1107  (*im).backwardPredictedState(),
1108  (*im).updatedState(),
1109  (*im).recHit(),
1110  (*im).estimate(),
1111  bwdDetLayer[iDetLayer]);
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  return fitted;
1128 }
PropagationDirection direction() const
bool isValid() const
Definition: Trajectory.h:257
RecHitRange recHits() const
#define LIKELY(x)
Definition: Likely.h:20
const DataContainer & measurements() const
static std::string dumpMeasurement(const TrajectoryMeasurement &tm)
void setNLoops(int8_t value)
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
DataContainer const & measurements() const
Definition: Trajectory.h:178
static PropagationDirection oppositeDirection(PropagationDirection dir)
change of propagation direction
int foundHits() const
virtual Trajectory fitOne(const Trajectory &traj, fitType type=standard) const =0
size_type size() const
Definition: bqueue.h:202
signed char nLoops() const
#define UNLIKELY(x)
Definition: Likely.h:21
#define LogDebug(id)

◆ buildTrajectories()

void 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 259 of file GroupedCkfTrajectoryBuilder.cc.

References analyseResult(), analyseSeed(), DummyCfis::c, FastTrajectoryCleaner::clean(), runTheMatrix::const, gather_cfg::cout, BaseCkfTrajectoryBuilder::createStartingTrajectory(), Exception, BaseCkfTrajectoryBuilder::forwardPropagator(), groupedLimitedCandidates(), trackerHitRTTI::isFromDet(), trackerHitRTTI::isUndef(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, mps_fire::result, fileCollector::seed, theFoundHitBonus, theLostHitPenalty, BaseCkfTrajectoryBuilder::theMeasurementTracker, and work_MaxSize_.

Referenced by trajectories().

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

◆ chiSquareCut()

double GroupedCkfTrajectoryBuilder::chiSquareCut ( )
inline

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

Definition at line 70 of file GroupedCkfTrajectoryBuilder.h.

◆ estimator()

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

Definition at line 65 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theEstimator.

Referenced by rebuildSeedingRegion().

65 { return *theEstimator; }
const Chi2MeasurementEstimatorBase * theEstimator

◆ fillPSetDescription()

void GroupedCkfTrajectoryBuilder::fillPSetDescription ( edm::ParameterSetDescription iDesc)
static

Definition at line 153 of file GroupedCkfTrajectoryBuilder.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), and BaseCkfTrajectoryBuilder::fillPSetDescription().

153  {
155 
156  iDesc.add<bool>("useSameTrajFilter", true);
157  iDesc.add<int>("maxCand", 5);
158  iDesc.add<double>("lostHitPenalty", 30.);
159  iDesc.add<double>("foundHitBonus", 10.);
160  iDesc.add<bool>("intermediateCleaning", true);
161  iDesc.add<bool>("alwaysUseInvalidHits", true);
162  iDesc.add<bool>("lockHits", true);
163  iDesc.add<bool>("bestHitOnly", true);
164  iDesc.add<bool>("requireSeedHitsInRebuild", true);
165  iDesc.add<bool>("keepOriginalIfRebuildFails", false);
166  iDesc.add<int>("minNrOfHitsForRebuild", 5);
167  iDesc.add<double>("maxPtForLooperReconstruction", 0.);
168  iDesc.add<double>("maxDPhiForLooperReconstruction", 2.0);
169 
171  psdTJ1.addNode(edm::PluginDescription<TrajectoryFilterFactory>("ComponentType", true));
172  iDesc.add<edm::ParameterSetDescription>("trajectoryFilter", psdTJ1);
173 
175  psdTJ2.addNode(edm::PluginDescription<TrajectoryFilterFactory>("ComponentType", true));
176  iDesc.add<edm::ParameterSetDescription>("inOutTrajectoryFilter", psdTJ2);
177 }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)

◆ groupedIntermediaryClean()

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 715 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by groupedLimitedCandidates().

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

◆ groupedLimitedCandidates()

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 342 of file GroupedCkfTrajectoryBuilder.cc.

References advanceOneLayer(), cms::cuda::assert(), HLT_2024v13_cff::candidates, IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), groupedIntermediaryClean(), LogDebug, TrackCandidateProducer_cfi::propagator, mps_fire::result, fileCollector::seed, theIntermediateCleaning, and theMaxCand.

Referenced by buildTrajectories(), and rebuildSeedingRegion().

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

◆ lostHitPenalty()

float GroupedCkfTrajectoryBuilder::lostHitPenalty ( )
inline

Chi**2 Penalty for each lost hit.

Definition at line 76 of file GroupedCkfTrajectoryBuilder.h.

◆ mass()

double GroupedCkfTrajectoryBuilder::mass ( )
inline

Mass hypothesis used for propagation.

Definition at line 85 of file GroupedCkfTrajectoryBuilder.h.

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

◆ maxCand()

int GroupedCkfTrajectoryBuilder::maxCand ( )
inline

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

Definition at line 73 of file GroupedCkfTrajectoryBuilder.h.

◆ oppositeDirection()

static PropagationDirection GroupedCkfTrajectoryBuilder::oppositeDirection ( PropagationDirection  dir)
inlinestaticprivate

change of propagation direction

Definition at line 146 of file GroupedCkfTrajectoryBuilder.h.

References alongMomentum, DeadROC_duringRun::dir, and oppositeToMomentum.

Referenced by backwardFit().

146  {
147  if (dir == alongMomentum)
148  return oppositeToMomentum;
149  if (dir == oppositeToMomentum)
150  return alongMomentum;
151  return dir;
152  }

◆ ptCut()

double GroupedCkfTrajectoryBuilder::ptCut ( )
inline

Pt cut.

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

Definition at line 82 of file GroupedCkfTrajectoryBuilder.h.

◆ rebuildSeedingRegion() [1/3]

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 221 of file GroupedCkfTrajectoryBuilder.cc.

References rebuildTrajectories(), mps_fire::result, and fileCollector::seed.

Referenced by rebuildSeedingRegion(), and rebuildTrajectories().

221  {
223 }
void rebuildTrajectories(const TrajectorySeed &, TrajectoryContainer &result) const override

◆ rebuildSeedingRegion() [2/3]

void GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
TempTrajectoryContainer result 
) const
private

try to find additional hits in seeding region

Definition at line 843 of file GroupedCkfTrajectoryBuilder.cc.

References cms::cuda::assert(), backwardFit(), BaseCkfTrajectoryBuilder::backwardPropagator(), runTheMatrix::const, estimator(), BaseCkfTrajectoryBuilder::hitBuilder(), mps_fire::i, TempTrajectory::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, eostools::move(), rebuildSeedingRegion(), mps_fire::result, fileCollector::seed, theKeepOriginalIfRebuildFails, UNLIKELY, and updator().

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

◆ rebuildSeedingRegion() [3/3]

int GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
const std::vector< const TrackingRecHit *> &  seedHits,
TempTrajectory candidate,
TempTrajectoryContainer result 
) const
private

Definition at line 902 of file GroupedCkfTrajectoryBuilder.cc.

References BaseCkfTrajectoryBuilder::backwardPropagator(), gather_cfg::cout, TempTrajectory::direction(), PrintoutHelper::dumpCandidates(), PrintoutHelper::dumpMeasurements(), groupedLimitedCandidates(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, TempTrajectory::measurements(), TempTrajectory::push(), mps_fire::result, fileCollector::seed, TempTrajectory::setNLoops(), cmsutils::bqueue< T >::size(), theRequireSeedHitsInRebuild, and verifyHits().

905  {
906  //
907  // Starting from track found by in-out tracking phase, extrapolate it inwards through
908  // the seeding region if possible in towards smaller Tracker radii, searching for additional
909  // hits.
910  // The resulting trajectories are returned in result,
911  // the count is the return value.
912  //
913  TempTrajectoryContainer rebuiltTrajectories;
914 #ifdef DBG2_GCTB
915  /* const LayerFinderByDet layerFinder;
916  if ( !seedHits.empty() && seedHits.front().isValid() ) {
917  DetLayer* seedLayer = layerFinder(seedHits.front().det());
918  cout << "Seed hit at " << seedHits.front().globalPosition()
919  << " " << seedLayer << endl;
920  cout << "Started from "
921  << candidate.lastMeasurement().updatedState().globalPosition().perp() << " "
922  << candidate.lastMeasurement().updatedState().globalPosition().z() << endl;
923  pair<bool,TrajectoryStateOnSurface> layerComp(false,TrajectoryStateOnSurface());
924  if ( seedLayer ) layerComp =
925  seedLayer->compatible(candidate.lastMeasurement().updatedState(),
926  propagator(),estimator());
927  pair<bool,TrajectoryStateOnSurface> detComp =
928  seedHits.front().det().compatible(candidate.lastMeasurement().updatedState(),
929  propagator(),estimator());
930  cout << " layer compatibility = " << layerComp.first;
931  cout << " det compatibility = " << detComp.first;
932  if ( detComp.first ) {
933  cout << " estimate = "
934  << estimator().estimate(detComp.second,seedHits.front()).second ;
935  }
936  cout << endl;
937  }*/
938  cout << "Before backward building: #measurements = " << candidate.measurements().size(); //<< endl;;
939 #endif
940  //
941  // Use standard building with standard cuts. Maybe better to use different
942  // cuts from "forward" building (e.g. no check on nr. of invalid hits)?
943  //
944  const bool inOut = false;
945  groupedLimitedCandidates(seed, candidate, nullptr, backwardPropagator(seed), inOut, rebuiltTrajectories);
946 
947  LogDebug("CkfPattern") << " After backward building: " << PrintoutHelper::dumpCandidates(rebuiltTrajectories);
948 
949  //
950  // Check & count resulting candidates
951  //
952  int nrOfTrajectories(0);
953  bool orig_ok = false;
954  //const RecHitEqualByChannels recHitEqual(false,false);
955  //vector<TM> oldMeasurements(candidate.measurements());
956  for (TempTrajectoryContainer::iterator it = rebuiltTrajectories.begin(); it != rebuiltTrajectories.end(); it++) {
957  TempTrajectory::DataContainer newMeasurements(it->measurements());
958  //
959  // Verify presence of seeding hits?
960  //
962  orig_ok = true;
963  // no hits found (and possibly some invalid hits discarded): drop track
964  if (newMeasurements.size() <= candidate.measurements().size()) {
965  LogDebug("CkfPattern") << "newMeasurements.size()<=candidate.measurements().size()";
966  continue;
967  }
968  // verify presence of hits
969  //GIO//if ( !verifyHits(newMeasurements.begin()+candidate.measurements().size(),
970  //GIO// newMeasurements.end(),seedHits) ){
971  if (!verifyHits(newMeasurements.rbegin(), newMeasurements.size() - candidate.measurements().size(), seedHits)) {
972  LogDebug("CkfPattern") << "seed hits not found in rebuild";
973  continue;
974  }
975  }
976  //
977  // construct final trajectory in the right order
978  //
979  // save & count result
980  nrOfTrajectories++;
981  result.emplace_back(seed.direction(), seed.nHits());
982  TempTrajectory& reversedTrajectory = result.back();
983  reversedTrajectory.setNLoops(it->nLoops());
984  for (TempTrajectory::DataContainer::const_iterator im = newMeasurements.rbegin(), ed = newMeasurements.rend();
985  im != ed;
986  --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 }
PropagationDirection direction() const
static std::string dumpCandidates(collection &candidates)
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
const DataContainer & measurements() const
void setNLoops(int8_t value)
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
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.
size_type size() const
Definition: bqueue.h:202
std::vector< TempTrajectory > TempTrajectoryContainer
unsigned int groupedLimitedCandidates(const TrajectorySeed &seed, TempTrajectory const &startingTraj, const TrajectoryFilter *regionalCondition, const Propagator *propagator, bool inOut, TempTrajectoryContainer &result) const
void push(const TrajectoryMeasurement &tm)
#define LogDebug(id)

◆ rebuildTrajectories()

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 225 of file GroupedCkfTrajectoryBuilder.cc.

References FastTrajectoryCleaner::clean(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, eostools::move(), rebuildSeedingRegion(), mps_fire::result, fileCollector::seed, theFoundHitBonus, theLostHitPenalty, and edmMakeDummyCfis::work.

Referenced by rebuildSeedingRegion().

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

◆ setEvent_()

void GroupedCkfTrajectoryBuilder::setEvent_ ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements BaseCkfTrajectoryBuilder.

Definition at line 186 of file GroupedCkfTrajectoryBuilder.cc.

186 {}

◆ tkxor()

bool GroupedCkfTrajectoryBuilder::tkxor ( bool  a,
bool  b 
) const
inlineprivate

Definition at line 102 of file GroupedCkfTrajectoryBuilder.h.

References a, and b.

Referenced by groupedIntermediaryClean().

102 { return (a || b) && !(a && b); }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ trajectories() [1/4]

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 188 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), runTheMatrix::ret, fileCollector::seed, and createJobs::tmp.

189  {
191  ret.reserve(10);
192  unsigned int tmp;
193  buildTrajectories(seed, ret, tmp, nullptr);
194  return ret;
195 }
ret
prodAgent to be discontinued
void buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
tmp
align.sh
Definition: createJobs.py:716
std::vector< Trajectory > TrajectoryContainer

◆ trajectories() [2/4]

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 207 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), runTheMatrix::ret, fileCollector::seed, and createJobs::tmp.

208  {
209  unsigned int tmp;
210  buildTrajectories(seed, ret, tmp, nullptr);
211 }
ret
prodAgent to be discontinued
void buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
tmp
align.sh
Definition: createJobs.py:716

◆ trajectories() [3/4]

GroupedCkfTrajectoryBuilder::TrajectoryContainer GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
const TrackingRegion region 
) const

trajectories building starting from a seed with a region

Definition at line 197 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), nano_mu_digi_cff::region, runTheMatrix::ret, fileCollector::seed, and createJobs::tmp.

198  {
200  ret.reserve(10);
201  unsigned int tmp;
202  RegionalTrajectoryFilter regionalCondition(region);
203  buildTrajectories(seed, ret, tmp, &regionalCondition);
204  return ret;
205 }
ret
prodAgent to be discontinued
void buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
tmp
align.sh
Definition: createJobs.py:716
std::vector< Trajectory > TrajectoryContainer

◆ trajectories() [4/4]

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 213 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), nano_mu_digi_cff::region, runTheMatrix::ret, fileCollector::seed, and createJobs::tmp.

215  {
216  RegionalTrajectoryFilter regionalCondition(region);
217  unsigned int tmp;
218  buildTrajectories(seed, ret, tmp, &regionalCondition);
219 }
ret
prodAgent to be discontinued
void buildTrajectories(const TrajectorySeed &seed, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
common part of both public trajectory building methods
tmp
align.sh
Definition: createJobs.py:716

◆ updator()

const TrajectoryStateUpdator& GroupedCkfTrajectoryBuilder::updator ( ) const
inline

Definition at line 64 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theUpdator.

Referenced by rebuildSeedingRegion().

64 { return *theUpdator; }
const TrajectoryStateUpdator * theUpdator

◆ verifyHits()

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 1130 of file GroupedCkfTrajectoryBuilder.cc.

References hfClusterShapes_cfi::hits, LogDebug, HLT_2024v13_cff::maxDepth, and TrackingRecHit::some.

Referenced by rebuildSeedingRegion().

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

Member Data Documentation

◆ maxDPhiForLooperReconstruction

float GroupedCkfTrajectoryBuilder::maxDPhiForLooperReconstruction
private

Definition at line 193 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ maxPt2ForLooperReconstruction

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 191 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theAlwaysUseInvalid

bool GroupedCkfTrajectoryBuilder::theAlwaysUseInvalid
private

Definition at line 174 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theBestHitOnly

bool GroupedCkfTrajectoryBuilder::theBestHitOnly
private

Use only best hit / group when building segments

Definition at line 177 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theChiSquareCut

double GroupedCkfTrajectoryBuilder::theChiSquareCut
private

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

Definition at line 160 of file GroupedCkfTrajectoryBuilder.h.

◆ theConfigurableCondition

TrajectoryFilter* GroupedCkfTrajectoryBuilder::theConfigurableCondition
private

Definition at line 155 of file GroupedCkfTrajectoryBuilder.h.

◆ theFoundHitBonus

float GroupedCkfTrajectoryBuilder::theFoundHitBonus
private

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

Definition at line 169 of file GroupedCkfTrajectoryBuilder.h.

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

◆ theIntermediateCleaning

bool GroupedCkfTrajectoryBuilder::theIntermediateCleaning
private

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

Definition at line 171 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

◆ theKeepOriginalIfRebuildFails

bool GroupedCkfTrajectoryBuilder::theKeepOriginalIfRebuildFails
private

Keep original trajectory if rebuilding fails.

Definition at line 186 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().

◆ theLockHits

bool GroupedCkfTrajectoryBuilder::theLockHits
private

Lock hits when building segments in a layer

Definition at line 176 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theLostHitPenalty

float GroupedCkfTrajectoryBuilder::theLostHitPenalty
private

Chi**2 Penalty for each lost hit.

Definition at line 168 of file GroupedCkfTrajectoryBuilder.h.

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

◆ theMass

double GroupedCkfTrajectoryBuilder::theMass
private

Mass hypothesis used for propagation

Definition at line 164 of file GroupedCkfTrajectoryBuilder.h.

◆ theMaxCand

int GroupedCkfTrajectoryBuilder::theMaxCand
private

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

Definition at line 166 of file GroupedCkfTrajectoryBuilder.h.

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

◆ theMinNrOf2dHitsForRebuild

unsigned int GroupedCkfTrajectoryBuilder::theMinNrOf2dHitsForRebuild
private

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

Definition at line 184 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder().

◆ theMinNrOfHitsForRebuild

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 181 of file GroupedCkfTrajectoryBuilder.h.

Referenced by backwardFit(), and GroupedCkfTrajectoryBuilder().

◆ theptCut

double GroupedCkfTrajectoryBuilder::theptCut
private

ptCut

Definition at line 162 of file GroupedCkfTrajectoryBuilder.h.

◆ theRequireSeedHitsInRebuild

bool GroupedCkfTrajectoryBuilder::theRequireSeedHitsInRebuild
private

Only accept rebuilt trajectories if they contain the seed hits.

Definition at line 179 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().