CMS 3D CMS Logo

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

#include <GroupedCkfTrajectoryBuilder.h>

Inheritance diagram for GroupedCkfTrajectoryBuilder:
BaseCkfTrajectoryBuilder TrajectoryBuilder

Public Member Functions

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

Protected Member Functions

virtual void analyseMeasurements (const std::vector< TM > &meas, const Trajectory &traj) const
 
virtual void analyseResult (const TrajectoryContainer &result) const
 
virtual void analyseSeed (const TrajectorySeed &seed) const
 
void setEvent_ (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
- Protected Member Functions inherited from BaseCkfTrajectoryBuilder
void addToResult (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 = 0
 
const MeasurementTrackerEventtheMeasurementTracker = 0
 
const NavigationSchooltheNavigationSchool = 0
 
const PropagatorthePropagatorAlong = 0
 
const PropagatorthePropagatorOpposite = 0
 
const TransientTrackingRecHitBuildertheTTRHBuilder = 0
 
const TrajectoryStateUpdatortheUpdator = 0
 

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

Enumerator
work_MaxSize_ 

Definition at line 200 of file GroupedCkfTrajectoryBuilder.h.

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

Constructor & Destructor Documentation

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

constructor from ParameterSet

Definition at line 112 of file GroupedCkfTrajectoryBuilder.cc.

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

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

Member Function Documentation

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

Definition at line 452 of file GroupedCkfTrajectoryBuilder.cc.

References funct::abs(), BaseCkfTrajectoryBuilder::addToResult(), cmsutils::bqueue< T >::back(), PV3DBase< T, PVType, FrameType >::basicVector(), constexpr, gather_cfg::cout, TempTrajectory::empty(), PV3DBase< T, PVType, FrameType >::eta(), TransverseImpactPointExtrapolator::extrapolate(), f, ntuplemaker::fill, BaseCkfTrajectoryBuilder::findStateAndLayers(), BaseCkfTrajectoryBuilder::forwardPropagator(), TempTrajectory::foundHits(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TempTrajectory::incrementLoops(), TrajectoryStateOnSurface::isValid(), TempTrajectory::join(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), TrajectoryMeasurement::layer(), hgcalTopologyTester_cfi::layers, Bounds::length(), DetLayer::location(), LogDebug, TempTrajectory::lostHits(), maxDPhiForLooperReconstruction, maxPt2ForLooperReconstruction, TempTrajectory::measurements(), TrackingRecHit::missing, eostools::move(), BaseCkfTrajectoryBuilder::moveToResult(), N, NO_SEGMENTS_FOR_VALID_LAYERS, NOT_STOPPED, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), Propagator::propagationDirection(), HLT_2018_cff::pt2, cmsutils::bqueue< T >::rbegin(), rejected(), cmsutils::bqueue< T >::rend(), TempTrajectory::setDPhiCacheForLoopersReconstruction(), TempTrajectory::setStopReason(), BarrelDetLayer::specificSurface(), OrderedSet::t, 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().

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

Definition at line 94 of file GroupedCkfTrajectoryBuilder.h.

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

Definition at line 95 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

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

Definition at line 92 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

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

Definition at line 997 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

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

common part of both public trajectory building methods

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 237 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by trajectories().

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

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

Definition at line 72 of file GroupedCkfTrajectoryBuilder.h.

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

Definition at line 67 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theEstimator.

Referenced by rebuildSeedingRegion().

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

intermediate cleaning in the case of grouped measurements

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

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

Definition at line 695 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by groupedLimitedCandidates().

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

Definition at line 322 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by buildTrajectories(), and rebuildSeedingRegion().

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

Chi**2 Penalty for each lost hit.

Definition at line 78 of file GroupedCkfTrajectoryBuilder.h.

double GroupedCkfTrajectoryBuilder::mass ( )
inline

Mass hypothesis used for propagation.

Definition at line 87 of file GroupedCkfTrajectoryBuilder.h.

References iEvent, and BaseCkfTrajectoryBuilder::setEvent_().

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

int GroupedCkfTrajectoryBuilder::maxCand ( )
inline

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

Definition at line 75 of file GroupedCkfTrajectoryBuilder.h.

static PropagationDirection GroupedCkfTrajectoryBuilder::oppositeDirection ( PropagationDirection  dir)
inlinestaticprivate

change of propagation direction

Definition at line 150 of file GroupedCkfTrajectoryBuilder.h.

References alongMomentum, DeadROC_duringRun::dir, and oppositeToMomentum.

Referenced by backwardFit().

150  {
151  if (dir == alongMomentum)
152  return oppositeToMomentum;
153  if (dir == oppositeToMomentum)
154  return alongMomentum;
155  return dir;
156  }
double GroupedCkfTrajectoryBuilder::ptCut ( )
inline

Pt cut.

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

Definition at line 84 of file GroupedCkfTrajectoryBuilder.h.

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

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

Reimplemented from TrajectoryBuilder.

Definition at line 196 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion(), and rebuildTrajectories().

196  {
197  TempTrajectory const& startingTraj = createStartingTrajectory(seed);
198  rebuildTrajectories(startingTraj, seed, result);
199 }
void rebuildTrajectories(TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const override
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
TempTrajectory const &  startingTraj,
TempTrajectoryContainer result 
) const
private

try to find additional hits in seeding region

Definition at line 823 of file GroupedCkfTrajectoryBuilder.cc.

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

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

Definition at line 890 of file GroupedCkfTrajectoryBuilder.cc.

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

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 201 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

203  {
205 
206  TrajectoryContainer final;
207 
208  // better the seed to be always the same...
209  std::shared_ptr<const TrajectorySeed> sharedSeed;
210  if (result.empty())
211  sharedSeed.reset(new TrajectorySeed(seed));
212  else
213  sharedSeed = result.front().sharedSeed();
214 
215  work.reserve(result.size());
216  for (auto&& traj : result)
217  if (traj.isValid())
218  work.emplace_back(std::move(traj));
219 
220  rebuildSeedingRegion(seed, startingTraj, work);
221 
222  // we clean here now
224  cleaner.clean(work);
225 
226  for (auto const& it : work)
227  if (it.isValid()) {
228  final.push_back(it.toTrajectory());
229  final.back().setSharedSeed(sharedSeed);
230  }
231 
232  result.swap(final);
233 
234  statCount.rebuilt(result.size());
235 }
void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const override
std::vector< TempTrajectory > TempTrajectoryContainer
std::vector< Trajectory > TrajectoryContainer
def move(src, dest)
Definition: eostools.py:511
void GroupedCkfTrajectoryBuilder::setEvent_ ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements BaseCkfTrajectoryBuilder.

Definition at line 161 of file GroupedCkfTrajectoryBuilder.cc.

161 {}
bool GroupedCkfTrajectoryBuilder::tkxor ( bool  a,
bool  b 
) const
inlineprivate

Definition at line 104 of file GroupedCkfTrajectoryBuilder.h.

References a, b, dso_internal, hfClusterShapes_cfi::hits, HLT_2018_cff::maxDepth, TrackCandidateProducer_cfi::propagator, and TrajectoryBuilder::rebuildSeedingRegion().

Referenced by groupedIntermediaryClean().

104 { return (a || b) && !(a && b); }
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
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 163 of file GroupedCkfTrajectoryBuilder.cc.

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

164  {
166  ret.reserve(10);
167  unsigned int tmp;
168  buildTrajectories(seed, ret, tmp, nullptr);
169  return ret;
170 }
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
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 182 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and createJobs::tmp.

183  {
184  unsigned int tmp;
185  buildTrajectories(seed, ret, tmp, nullptr);
186 }
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
GroupedCkfTrajectoryBuilder::TrajectoryContainer GroupedCkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
const TrackingRegion region 
) const

trajectories building starting from a seed with a region

Definition at line 172 of file GroupedCkfTrajectoryBuilder.cc.

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

173  {
175  ret.reserve(10);
176  unsigned int tmp;
177  RegionalTrajectoryFilter regionalCondition(region);
178  buildTrajectories(seed, ret, tmp, &regionalCondition);
179  return ret;
180 }
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
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 188 of file GroupedCkfTrajectoryBuilder.cc.

References buildTrajectories(), and createJobs::tmp.

190  {
191  RegionalTrajectoryFilter regionalCondition(region);
192  unsigned int tmp;
193  buildTrajectories(seed, ret, tmp, &regionalCondition);
194 }
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
const TrajectoryStateUpdator& GroupedCkfTrajectoryBuilder::updator ( ) const
inline

Definition at line 66 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theUpdator.

Referenced by rebuildSeedingRegion().

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

Verifies presence of a RecHits in a range of TrajectoryMeasurements.

Definition at line 1122 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

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

Member Data Documentation

float GroupedCkfTrajectoryBuilder::maxDPhiForLooperReconstruction
private

Definition at line 197 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

float GroupedCkfTrajectoryBuilder::maxPt2ForLooperReconstruction
private

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

Definition at line 195 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theAlwaysUseInvalid
private

Definition at line 178 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theBestHitOnly
private

Use only best hit / group when building segments

Definition at line 181 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

double GroupedCkfTrajectoryBuilder::theChiSquareCut
private

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

Definition at line 164 of file GroupedCkfTrajectoryBuilder.h.

TrajectoryFilter* GroupedCkfTrajectoryBuilder::theConfigurableCondition
private

Definition at line 159 of file GroupedCkfTrajectoryBuilder.h.

float GroupedCkfTrajectoryBuilder::theFoundHitBonus
private

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

Definition at line 173 of file GroupedCkfTrajectoryBuilder.h.

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

bool GroupedCkfTrajectoryBuilder::theIntermediateCleaning
private

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

Definition at line 175 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

bool GroupedCkfTrajectoryBuilder::theKeepOriginalIfRebuildFails
private

Keep original trajectory if rebuilding fails.

Definition at line 190 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().

bool GroupedCkfTrajectoryBuilder::theLockHits
private

Lock hits when building segments in a layer

Definition at line 180 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

float GroupedCkfTrajectoryBuilder::theLostHitPenalty
private

Chi**2 Penalty for each lost hit.

Definition at line 172 of file GroupedCkfTrajectoryBuilder.h.

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

double GroupedCkfTrajectoryBuilder::theMass
private

Mass hypothesis used for propagation

Definition at line 168 of file GroupedCkfTrajectoryBuilder.h.

int GroupedCkfTrajectoryBuilder::theMaxCand
private

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

Definition at line 170 of file GroupedCkfTrajectoryBuilder.h.

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

unsigned int GroupedCkfTrajectoryBuilder::theMinNrOf2dHitsForRebuild
private

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

Definition at line 188 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder().

unsigned int GroupedCkfTrajectoryBuilder::theMinNrOfHitsForRebuild
private

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

Definition at line 185 of file GroupedCkfTrajectoryBuilder.h.

Referenced by backwardFit(), and GroupedCkfTrajectoryBuilder().

double GroupedCkfTrajectoryBuilder::theptCut
private

ptCut

Definition at line 166 of file GroupedCkfTrajectoryBuilder.h.

bool GroupedCkfTrajectoryBuilder::theRequireSeedHitsInRebuild
private

Only accept rebuilt trajectories if they contain the seed hits.

Definition at line 183 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().