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

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, 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, 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 = 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 202 of file GroupedCkfTrajectoryBuilder.h.

202  {
203  work_MaxSize_ = 50
204  }; // 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 477 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(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TempTrajectory::incrementLoops(), 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_2024v12_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, theLockHits, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, BaseCkfTrajectoryBuilder::theUpdator, BaseCkfTrajectoryBuilder::toBeContinued(), TrajectoryStateOnSurface::transverseCurvature(), UNLIKELY, TrajectoryMeasurement::updatedState(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by groupedLimitedCandidates().

483  {
484  std::pair<TSOS, std::vector<const DetLayer*> >&& stateAndLayers = findStateAndLayers(seed, traj);
485 
487  if (
488  //stateAndLayers.second.size()==0 &&
489  traj.lastLayer()->location() == 0) {
490  float pt2 = stateAndLayers.first.globalMomentum().perp2();
491  if (pt2 < maxPt2ForLooperReconstruction && pt2 > (0.3f * 0.3f))
492  stateAndLayers.second.push_back(traj.lastLayer());
493  }
494  }
495 
496  auto layerBegin = stateAndLayers.second.begin();
497  auto layerEnd = stateAndLayers.second.end();
498 
499  // if (nl.empty()) {
500  // addToResult(traj,result,inOut);
501  // return false;
502  // }
503 
504 #ifdef EDM_ML_DEBUG
505  LogDebug("CkfPattern") << whatIsTheNextStep(traj, stateAndLayers);
506 #endif
507 
508  bool foundSegments(false);
509  bool foundNewCandidates(false);
510  for (auto il = layerBegin; il != layerEnd; il++) {
511  TSOS stateToUse = stateAndLayers.first;
512 
513  double dPhiCacheForLoopersReconstruction(0);
514  if UNLIKELY (!traj.empty() && (*il) == traj.lastLayer()) {
516  // ------ For loopers reconstruction
517  //cout<<" self propagating in advanceOneLayer (for loopers) \n";
518  const BarrelDetLayer* sbdl = dynamic_cast<const BarrelDetLayer*>(traj.lastLayer());
519  if (sbdl) {
520  HelixBarrelCylinderCrossing cylinderCrossing(stateToUse.globalPosition(),
521  stateToUse.globalMomentum(),
522  stateToUse.transverseCurvature(),
523  propagator->propagationDirection(),
524  sbdl->specificSurface());
525  if (!cylinderCrossing.hasSolution())
526  continue;
527  GlobalPoint starting = stateToUse.globalPosition();
528  GlobalPoint target1 = cylinderCrossing.position1();
529  GlobalPoint target2 = cylinderCrossing.position2();
530 
531  GlobalPoint farther =
532  fabs(starting.phi() - target1.phi()) > fabs(starting.phi() - target2.phi()) ? target1 : target2;
533 
534  const Bounds& bounds(sbdl->specificSurface().bounds());
535  float length = 0.5f * bounds.length();
536 
537  /*
538  cout << "starting: " << starting << endl;
539  cout << "target1: " << target1 << endl;
540  cout << "target2: " << target2 << endl;
541  cout << "dphi: " << (target1.phi()-target2.phi()) << endl;
542  cout << "length: " << length << endl;
543  */
544 
545  /*
546  float deltaZ = bounds.thickness()/2.f/fabs(tan(stateToUse.globalDirection().theta()) ) ;
547  if(stateToUse.hasError())
548  deltaZ += 3*sqrt(stateToUse.cartesianError().position().czz());
549  if( fabs(farther.z()) > length + deltaZ ) continue;
550  */
551  if (fabs(farther.z()) * 0.95f > length)
552  continue;
553 
554  Geom::Phi<float> tmpDphi = target1.phi() - target2.phi();
556  continue;
557  GlobalPoint target(0.5f * (target1.basicVector() + target2.basicVector()));
558  //cout << "target: " << target << endl;
559 
561  stateToUse = extrapolator.extrapolate(stateToUse, target, *propagator);
562  if (!stateToUse.isValid())
563  continue; //SK: consider trying the original? probably not
564 
565  //dPhiCacheForLoopersReconstruction = fabs(target1.phi()-target2.phi())*2.;
566  dPhiCacheForLoopersReconstruction = std::abs(tmpDphi);
567  traj.incrementLoops();
568  } else { // not barrel
569  continue;
570  }
571  } else { // loopers not requested (why else???)
572  // ------ For cosmics reconstruction
573  LogDebug("CkfPattern") << " self propagating in advanceOneLayer.\n from: \n" << stateToUse;
574  //self navigation case
575  // go to a middle point first
577  GlobalPoint center(0, 0, 0);
578  stateToUse = middle.extrapolate(stateToUse, center, *(forwardPropagator(seed)));
579 
580  if (!stateToUse.isValid())
581  continue;
582  LogDebug("CkfPattern") << "to: " << stateToUse;
583  }
584  } // last layer...
585 
586  //unsigned int maxCandidates = theMaxCand > 21 ? theMaxCand*2 : 42; //limit the number of returned segments
587  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
588  TrajectorySegmentBuilder layerBuilder(
589  &layerMeasurements, **il, *propagator, *theUpdator, *theEstimator, theLockHits, theBestHitOnly, theMaxCand);
590 
591 #ifdef EDM_ML_DEBUG
592  LogDebug("CkfPattern") << whatIsTheStateToUse(stateAndLayers.first, stateToUse, *il);
593 #endif
594 
595  auto&& segments = layerBuilder.segments(stateToUse);
596 
597  LogDebug("CkfPattern") << "GCTB: number of segments = " << segments.size();
598 
599  if (!segments.empty())
600  foundSegments = true;
601 
602  for (auto is = segments.begin(); is != segments.end(); is++) {
603  //
604  // assume "invalid hit only" segment is last in list
605  //
606  auto const& measurements = is->measurements();
607  if (!theAlwaysUseInvalid && is != segments.begin() && measurements.size() == 1 &&
608  (measurements.front().recHit()->getType() == TrackingRecHit::missing))
609  break;
610 
611  //---- avoid to add the same hits more than once in the trajectory ----
612  bool toBeRejected(false);
613  for (auto revIt = measurements.rbegin(); revIt != measurements.rend(); --revIt) {
614  // int tmpCounter(0);
615  for (auto newTrajMeasIt = traj.measurements().rbegin(); newTrajMeasIt != traj.measurements().rend();
616  --newTrajMeasIt) {
617  //if(tmpCounter==2) break;
618  if (revIt->recHitR().geographicalId() == newTrajMeasIt->recHitR().geographicalId() &&
619  (revIt->recHitR().geographicalId() != DetId(0))) {
620  toBeRejected = true;
621  goto rejected; //break; // see http://stackoverflow.com/questions/1257744/can-i-use-break-to-exit-multiple-nested-for-loops
622  }
623  // tmpCounter++;
624  }
625  }
626 
627  rejected:; // http://xkcd.com/292/
628  if (toBeRejected) {
629 #ifdef VI_DEBUG
630  cout << "WARNING: neglect candidate because it contains the same hit twice \n";
631  cout << "-- discarded track's pt,eta,#found/lost: "
632  << traj.lastMeasurement().updatedState().globalMomentum().perp() << " , "
633  << traj.lastMeasurement().updatedState().globalMomentum().eta() << " , " << traj.foundHits() << '/'
634  << traj.lostHits() << "\n";
635 #endif
636  traj.setDPhiCacheForLoopersReconstruction(dPhiCacheForLoopersReconstruction);
637  continue; //Are we sure about this????
638  }
639  // ------------------------
640 
641  //
642  // create new candidate
643  //
644  TempTrajectory newTraj(traj);
645  traj.setDPhiCacheForLoopersReconstruction(dPhiCacheForLoopersReconstruction);
646  newTraj.join(*is);
647 
648  //std::cout << "DEBUG: newTraj after push found,lost: "
649  // << newTraj.foundHits() << " , "
650  // << newTraj.lostHits() << " , "
651  // << newTraj.measurements().size() << std::endl;
652 
653  //GIO// for ( vector<TM>::const_iterator im=measurements.begin();
654  //GIO// im!=measurements.end(); im++ ) newTraj.push(*im);
655  //if ( toBeContinued(newTraj,regionalCondition) ) { TOBE FIXED
656  if (toBeContinued(newTraj, inOut)) {
657  // Have added one more hit to track candidate
658 
659  LogDebug("CkfPattern") << "GCTB: adding updated trajectory to candidates: inOut=" << inOut
660  << " hits=" << newTraj.foundHits();
661 
662  newTraj.setStopReason(StopReason::NOT_STOPPED);
663  newCand.push_back(std::move(newTraj));
664  foundNewCandidates = true;
665  } else {
666  // Have finished building this track. Check if it passes cuts.
667 
668  LogDebug("CkfPattern") << "GCTB: adding completed trajectory to results if passes cuts: inOut=" << inOut
669  << " hits=" << newTraj.foundHits();
670  moveToResult(std::move(newTraj), result, inOut);
671  }
672  } // loop over segs
673  } // loop over layers
674 
675  if (!foundSegments) {
676  LogDebug("CkfPattern") << "GCTB: adding input trajectory to result";
677  if (!stateAndLayers.second.empty())
679  addToResult(traj, result, inOut);
680  }
681  return foundNewCandidates;
682 }
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
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 96 of file GroupedCkfTrajectoryBuilder.h.

96 {}

◆ analyseResult()

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

Definition at line 97 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

97 {}

◆ analyseSeed()

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

Definition at line 94 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

94 {}

◆ backwardFit()

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

Definition at line 1014 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, TempTrajectory::measurements(), Trajectory::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().

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

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

References analyseResult(), analyseSeed(), HltBtagPostValidation_cff::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().

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

◆ estimator()

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

Definition at line 69 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theEstimator.

Referenced by rebuildSeedingRegion().

69 { 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 719 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().

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

References advanceOneLayer(), HLT_2024v12_cff::candidates, IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), groupedIntermediaryClean(), LogDebug, TrackCandidateProducer_cfi::propagator, mps_fire::result, fileCollector::seed, theFoundHitBonus, theIntermediateCleaning, theLostHitPenalty, and theMaxCand.

Referenced by buildTrajectories(), and rebuildSeedingRegion().

352  {
353  unsigned int nIter = 1;
354  unsigned int nCands = 0; // ignore startingTraj
355  unsigned int prevNewCandSize = 0;
357  TempTrajectoryContainer newCand;
358  candidates.push_back(startingTraj);
359 
360  while (!candidates.empty()) {
361  newCand.clear();
362  for (TempTrajectoryContainer::iterator traj = candidates.begin(); traj != candidates.end(); traj++) {
363  if (!advanceOneLayer(seed, *traj, regionalCondition, propagator, inOut, newCand, result)) {
364  LogDebug("CkfPattern") << "GCTB: terminating after advanceOneLayer==false";
365  continue;
366  }
367 
368  LogDebug("CkfPattern") << "newCand(1): after advanced one layer:\n" << PrintoutHelper::dumpCandidates(newCand);
369  // account only new candidates, i.e.
370  // - 1 candidate -> 1 candidate, don't increase count
371  // - 1 candidate -> 2 candidates, increase count by 1
372  nCands += newCand.size() - prevNewCandSize;
373  prevNewCandSize = newCand.size();
374 
375  if ((int)newCand.size() > theMaxCand) {
376  //ShowCand()(newCand);
377 
378  std::nth_element(newCand.begin(),
379  newCand.begin() + theMaxCand,
380  newCand.end(),
382  newCand.erase(newCand.begin() + theMaxCand, newCand.end());
383  }
384  LogDebug("CkfPattern") << "newCand(2): after removing extra candidates.\n"
385  << PrintoutHelper::dumpCandidates(newCand);
386  }
387 
388  LogDebug("CkfPattern") << "newCand.size() at end = " << newCand.size();
389  /*
390  if (theIntermediateCleaning) {
391  candidates.clear();
392  candidates = groupedIntermediaryClean(newCand);
393  } else {
394  candidates.swap(newCand);
395  }
396 */
398 #ifdef STANDARD_INTERMEDIARYCLEAN
400 #else
401  groupedIntermediaryClean(newCand);
402 #endif
403  }
404  candidates.swap(newCand);
405 
406  LogDebug("CkfPattern") << "candidates(3): " << result.size() << " candidates after " << nIter++
407  << " groupedCKF iteration: \n"
408  << PrintoutHelper::dumpCandidates(result) << "\n " << candidates.size()
409  << " running candidates are: \n"
411  }
412 
413  return nCands;
414 }
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
#define LogDebug(id)

◆ lostHitPenalty()

float GroupedCkfTrajectoryBuilder::lostHitPenalty ( )
inline

Chi**2 Penalty for each lost hit.

Definition at line 80 of file GroupedCkfTrajectoryBuilder.h.

◆ mass()

double GroupedCkfTrajectoryBuilder::mass ( )
inline

Mass hypothesis used for propagation.

Definition at line 89 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 77 of file GroupedCkfTrajectoryBuilder.h.

◆ oppositeDirection()

static PropagationDirection GroupedCkfTrajectoryBuilder::oppositeDirection ( PropagationDirection  dir)
inlinestaticprivate

change of propagation direction

Definition at line 152 of file GroupedCkfTrajectoryBuilder.h.

References alongMomentum, DeadROC_duringRun::dir, and oppositeToMomentum.

Referenced by backwardFit().

152  {
153  if (dir == alongMomentum)
154  return oppositeToMomentum;
155  if (dir == oppositeToMomentum)
156  return alongMomentum;
157  return dir;
158  }

◆ ptCut()

double GroupedCkfTrajectoryBuilder::ptCut ( )
inline

Pt cut.

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

Definition at line 86 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 BaseCkfTrajectoryBuilder::createStartingTrajectory(), rebuildTrajectories(), mps_fire::result, and fileCollector::seed.

Referenced by rebuildSeedingRegion(), and rebuildTrajectories().

221  {
222  TempTrajectory const& startingTraj = createStartingTrajectory(seed);
223  rebuildTrajectories(startingTraj, seed, result);
224 }
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const override

◆ rebuildSeedingRegion() [2/3]

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

try to find additional hits in seeding region

Definition at line 847 of file GroupedCkfTrajectoryBuilder.cc.

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

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

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 226 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

228  {
230 
231  TrajectoryContainer final;
232 
233  // better the seed to be always the same...
234  std::shared_ptr<const TrajectorySeed> sharedSeed;
235  if (result.empty())
236  sharedSeed.reset(new TrajectorySeed(seed));
237  else
238  sharedSeed = result.front().sharedSeed();
239 
240  work.reserve(result.size());
241  for (auto&& traj : result)
242  if (traj.isValid())
243  work.emplace_back(std::move(traj));
244 
245  rebuildSeedingRegion(seed, startingTraj, work);
246 
247  // we clean here now
249  cleaner.clean(work);
250 
251  for (auto const& it : work)
252  if (it.isValid()) {
253  final.push_back(it.toTrajectory());
254  final.back().setSharedSeed(sharedSeed);
255  }
256 
257  result.swap(final);
258 
259  statCount.rebuilt(result.size());
260 }
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 106 of file GroupedCkfTrajectoryBuilder.h.

References a, and b.

Referenced by groupedIntermediaryClean().

106 { 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
TempTrajectory 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
TempTrajectory 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
TempTrajectory 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
TempTrajectory 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 68 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theUpdator.

Referenced by rebuildSeedingRegion().

68 { 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 1135 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

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

Member Data Documentation

◆ maxDPhiForLooperReconstruction

float GroupedCkfTrajectoryBuilder::maxDPhiForLooperReconstruction
private

Definition at line 199 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 197 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theAlwaysUseInvalid

bool GroupedCkfTrajectoryBuilder::theAlwaysUseInvalid
private

Definition at line 180 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 183 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 166 of file GroupedCkfTrajectoryBuilder.h.

◆ theConfigurableCondition

TrajectoryFilter* GroupedCkfTrajectoryBuilder::theConfigurableCondition
private

Definition at line 161 of file GroupedCkfTrajectoryBuilder.h.

◆ theFoundHitBonus

float GroupedCkfTrajectoryBuilder::theFoundHitBonus
private

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

Definition at line 175 of file GroupedCkfTrajectoryBuilder.h.

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

◆ theIntermediateCleaning

bool GroupedCkfTrajectoryBuilder::theIntermediateCleaning
private

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

Definition at line 177 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

◆ theKeepOriginalIfRebuildFails

bool GroupedCkfTrajectoryBuilder::theKeepOriginalIfRebuildFails
private

Keep original trajectory if rebuilding fails.

Definition at line 192 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 182 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

◆ theLostHitPenalty

float GroupedCkfTrajectoryBuilder::theLostHitPenalty
private

Chi**2 Penalty for each lost hit.

Definition at line 174 of file GroupedCkfTrajectoryBuilder.h.

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

◆ theMass

double GroupedCkfTrajectoryBuilder::theMass
private

Mass hypothesis used for propagation

Definition at line 170 of file GroupedCkfTrajectoryBuilder.h.

◆ theMaxCand

int GroupedCkfTrajectoryBuilder::theMaxCand
private

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

Definition at line 172 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 190 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 187 of file GroupedCkfTrajectoryBuilder.h.

Referenced by backwardFit(), and GroupedCkfTrajectoryBuilder().

◆ theptCut

double GroupedCkfTrajectoryBuilder::theptCut
private

ptCut

Definition at line 168 of file GroupedCkfTrajectoryBuilder.h.

◆ theRequireSeedHitsInRebuild

bool GroupedCkfTrajectoryBuilder::theRequireSeedHitsInRebuild
private

Only accept rebuilt trajectories if they contain the seed hits.

Definition at line 185 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().