CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Chi2MeasurementEstimatorBase
estimator () 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
TransientTrackingRecHitBuilder
hitBuilder () 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
< TempTrajectory
TempTrajectoryContainer
 
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
< TrajectoryFilter
createTrajectoryFilter (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
- Protected Attributes inherited from BaseCkfTrajectoryBuilder
const
Chi2MeasurementEstimatorBase
theEstimator = nullptr
 
const MeasurementTrackerEventtheMeasurementTracker = nullptr
 
const NavigationSchooltheNavigationSchool = nullptr
 
const PropagatorthePropagatorAlong = nullptr
 
const PropagatorthePropagatorOpposite = nullptr
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder = 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 21 of file GroupedCkfTrajectoryBuilder.h.

Member Enumeration Documentation

Enumerator
work_MaxSize_ 

Definition at line 199 of file GroupedCkfTrajectoryBuilder.h.

199  {
200  work_MaxSize_ = 50
201  }; // 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.

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

destructor

Definition at line 27 of file GroupedCkfTrajectoryBuilder.h.

27 {}

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 453 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(), validate-o2o-wbm::f, BaseCkfTrajectoryBuilder::findStateAndLayers(), BaseCkfTrajectoryBuilder::forwardPropagator(), TempTrajectory::foundHits(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), TempTrajectory::incrementLoops(), TrajectoryStateOnSurface::isValid(), TempTrajectory::join(), TempTrajectory::lastLayer(), TempTrajectory::lastMeasurement(), Bounds::length(), 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(), Propagator::propagationDirection(), cmsutils::bqueue< T >::rbegin(), cmsutils::bqueue< T >::rend(), 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().

459  {
460  std::pair<TSOS, std::vector<const DetLayer*> >&& stateAndLayers = findStateAndLayers(seed, traj);
461 
463  if (
464  //stateAndLayers.second.size()==0 &&
465  traj.lastLayer()->location() == 0) {
466  float pt2 = stateAndLayers.first.globalMomentum().perp2();
467  if (pt2 < maxPt2ForLooperReconstruction && pt2 > (0.3f * 0.3f))
468  stateAndLayers.second.push_back(traj.lastLayer());
469  }
470  }
471 
472  auto layerBegin = stateAndLayers.second.begin();
473  auto layerEnd = stateAndLayers.second.end();
474 
475  // if (nl.empty()) {
476  // addToResult(traj,result,inOut);
477  // return false;
478  // }
479 
480 #ifdef EDM_ML_DEBUG
481  LogDebug("CkfPattern") << whatIsTheNextStep(traj, stateAndLayers);
482 #endif
483 
484  bool foundSegments(false);
485  bool foundNewCandidates(false);
486  for (auto il = layerBegin; il != layerEnd; il++) {
487  TSOS stateToUse = stateAndLayers.first;
488 
489  double dPhiCacheForLoopersReconstruction(0);
490  if 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 }
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.
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
const DataContainer & measurements() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const TrajectoryStateUpdator * theUpdator
GlobalPoint globalPosition() const
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
void addToResult(std::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
int foundHits() const
tuple result
Definition: mps_fire.py:311
const TrajectoryMeasurement & lastMeasurement() const
void setDPhiCacheForLoopersReconstruction(float dphi)
T z() const
Definition: PV3DBase.h:61
def move
Definition: eostools.py:511
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const_iterator rbegin() const
Definition: bqueue.h:197
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
const MeasurementTrackerEvent * theMeasurementTracker
Definition: DetId.h:17
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
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)
tuple cout
Definition: gather_cfg.py:144
TrajectoryStateOnSurface const & updatedState() const
Definition: Bounds.h:18
#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
const Chi2MeasurementEstimatorBase * theEstimator
int lostHits() const
#define LogDebug(id)
virtual void GroupedCkfTrajectoryBuilder::analyseMeasurements ( const std::vector< TM > &  meas,
const Trajectory traj 
) const
inlineprotectedvirtual

Definition at line 93 of file GroupedCkfTrajectoryBuilder.h.

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

Definition at line 94 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

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

Definition at line 91 of file GroupedCkfTrajectoryBuilder.h.

Referenced by buildTrajectories().

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

Definition at line 990 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(), 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().

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

References analyseResult(), analyseSeed(), c, FastTrajectoryCleaner::clean(), runTheMatrix::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().

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

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

Definition at line 71 of file GroupedCkfTrajectoryBuilder.h.

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

Definition at line 66 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theEstimator.

Referenced by rebuildSeedingRegion().

66 { 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 PVValHelper::fill(), align_cfg::firstValid, TempTrajectory::isValid(), TempTrajectory::lastMeasurement(), LayerTriplets::layers(), cmsutils::bqueue< T >::rbegin(), TrajectoryMeasurement::recHitR(), cmsutils::bqueue< T >::rend(), TrackingRecHit::some, 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
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
const_iterator rbegin() const
Definition: bqueue.h:197
bool isValid() const
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
bool tkxor(bool a, bool b) const
tuple firstValid
Definition: align_cfg.py:68
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 323 of file GroupedCkfTrajectoryBuilder.cc.

References advanceOneLayer(), HLT_FULL_cff::candidates, IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), groupedIntermediaryClean(), LogDebug, theFoundHitBonus, theIntermediateCleaning, theLostHitPenalty, and theMaxCand.

Referenced by buildTrajectories(), and rebuildSeedingRegion().

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

Chi**2 Penalty for each lost hit.

Definition at line 77 of file GroupedCkfTrajectoryBuilder.h.

double GroupedCkfTrajectoryBuilder::mass ( )
inline

Mass hypothesis used for propagation.

Definition at line 86 of file GroupedCkfTrajectoryBuilder.h.

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

static PropagationDirection GroupedCkfTrajectoryBuilder::oppositeDirection ( PropagationDirection  dir)
inlinestaticprivate

change of propagation direction

Definition at line 149 of file GroupedCkfTrajectoryBuilder.h.

References alongMomentum, DeadROC_duringRun::dir, and oppositeToMomentum.

Referenced by backwardFit().

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

Pt cut.

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

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

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

Referenced by rebuildSeedingRegion(), and rebuildTrajectories().

197  {
198  TempTrajectory const& startingTraj = createStartingTrajectory(seed);
199  rebuildTrajectories(startingTraj, seed, result);
200 }
tuple result
Definition: mps_fire.py:311
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(), runTheMatrix::const, estimator(), BaseCkfTrajectoryBuilder::hitBuilder(), mps_fire::i, TempTrajectory::isValid(), LogDebug, eostools::move(), TrajectorySeed::nHits(), rebuildSeedingRegion(), 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  std::vector<const TrackingRecHit*> seedHits;
840 
841  unsigned int nSeed = seed.nHits();
842  //seedHits.reserve(nSeed);
843  TempTrajectoryContainer rebuiltTrajectories;
844 
845  for (TempTrajectoryContainer::iterator it = result.begin(); it != result.end(); it++) {
846  // Refit - keep existing trajectory in case fit is not possible
847  // or fails
848  //
849 
850  auto&& reFitted = backwardFit(*it, nSeed, fitter, seedHits);
851  if UNLIKELY (!reFitted.isValid()) {
852  rebuiltTrajectories.push_back(std::move(*it));
853  LogDebug("CkfPattern") << "RebuildSeedingRegion skipped as backward fit failed";
854  // << "after reFitted.size() " << reFitted.size();
855  continue;
856  }
857  //LogDebug("CkfPattern")<<"after reFitted.size() " << reFitted.size();
858  //
859  // Rebuild seeding part. In case it fails: keep initial trajectory
860  // (better to drop it??)
861  //
862  int nRebuilt = rebuildSeedingRegion(seed, seedHits, reFitted, rebuiltTrajectories);
863  // Loop over the last nRebuilt trajectories and propagate back the
864  // real cause that stopped the original in-out trajectory, since
865  // that's the one we want to monitor
866  for (size_t i = rebuiltTrajectories.size() - 1; i < rebuiltTrajectories.size() - nRebuilt - 1; --i) {
867  rebuiltTrajectories[i].setStopReason(it->stopReason());
868  }
869 
870  if (nRebuilt == 0 && !theKeepOriginalIfRebuildFails)
871  it->invalidate(); // won't use original in-out track
872 
873  if (nRebuilt < 0)
874  rebuiltTrajectories.push_back(std::move(*it));
875  }
876  //
877  // Replace input trajectories with new ones
878  //
879  result.swap(rebuiltTrajectories);
880  result.erase(std::remove_if(result.begin(), result.end(), std::not_fn(&TempTrajectory::isValid)), result.end());
881 }
tuple result
Definition: mps_fire.py:311
const TransientTrackingRecHitBuilder * hitBuilder() const
def move
Definition: eostools.py:511
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
const TrajectoryStateUpdator & updator() const
unsigned int nHits() const
const Propagator * backwardPropagator(const TrajectorySeed &seed) const
#define UNLIKELY(x)
Definition: Likely.h:21
void rebuildSeedingRegion(const TrajectorySeed &, TrajectoryContainer &result) const override
#define LogDebug(id)
int GroupedCkfTrajectoryBuilder::rebuildSeedingRegion ( const TrajectorySeed seed,
const std::vector< const TrackingRecHit * > &  seedHits,
TempTrajectory candidate,
TempTrajectoryContainer result 
) const
private

Definition at line 883 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().

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 202 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

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

Implements BaseCkfTrajectoryBuilder.

Definition at line 162 of file GroupedCkfTrajectoryBuilder.cc.

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

Definition at line 103 of file GroupedCkfTrajectoryBuilder.h.

References a, and b.

Referenced by groupedIntermediaryClean().

103 { 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 164 of file GroupedCkfTrajectoryBuilder.cc.

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

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

References buildTrajectories(), and createJobs::tmp.

184  {
185  unsigned int tmp;
186  buildTrajectories(seed, ret, tmp, nullptr);
187 }
tuple 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 173 of file GroupedCkfTrajectoryBuilder.cc.

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

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

References buildTrajectories(), and createJobs::tmp.

191  {
192  RegionalTrajectoryFilter regionalCondition(region);
193  unsigned int tmp;
194  buildTrajectories(seed, ret, tmp, &regionalCondition);
195 }
tuple 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 65 of file GroupedCkfTrajectoryBuilder.h.

References BaseCkfTrajectoryBuilder::theUpdator.

Referenced by rebuildSeedingRegion().

65 { 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 1111 of file GroupedCkfTrajectoryBuilder.cc.

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

Referenced by rebuildSeedingRegion().

1113  {
1114  //
1115  // verify presence of the seeding hits
1116  //
1117  LogDebug("CkfPattern") << "Checking for " << hits.size() << " hits in " << maxDepth << " measurements" << endl;
1118 
1119  auto rend = rbegin;
1120  while (maxDepth > 0) {
1121  --maxDepth;
1122  --rend;
1123  }
1124  for (auto ir = hits.begin(); ir != hits.end(); ir++) {
1125  // assume that all seeding hits are valid!
1126  bool foundHit(false);
1127  for (auto im = rbegin; im != rend; --im) {
1128  if (im->recHit()->isValid() && (*ir)->sharesInput(im->recHit()->hit(), TrackingRecHit::some)) {
1129  foundHit = true;
1130  break;
1131  }
1132  }
1133  if (!foundHit)
1134  return false;
1135  }
1136  return true;
1137 }
#define LogDebug(id)

Member Data Documentation

float GroupedCkfTrajectoryBuilder::maxDPhiForLooperReconstruction
private

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

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theAlwaysUseInvalid
private

Definition at line 177 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

bool GroupedCkfTrajectoryBuilder::theBestHitOnly
private

Use only best hit / group when building segments

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

TrajectoryFilter* GroupedCkfTrajectoryBuilder::theConfigurableCondition
private

Definition at line 158 of file GroupedCkfTrajectoryBuilder.h.

float GroupedCkfTrajectoryBuilder::theFoundHitBonus
private
            Chi**2 bonus for each found hit (favours candidates with

more measurements)

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

Referenced by GroupedCkfTrajectoryBuilder(), and groupedLimitedCandidates().

bool GroupedCkfTrajectoryBuilder::theKeepOriginalIfRebuildFails
private

Keep original trajectory if rebuilding fails.

Definition at line 189 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().

bool GroupedCkfTrajectoryBuilder::theLockHits
private

Lock hits when building segments in a layer

Definition at line 179 of file GroupedCkfTrajectoryBuilder.h.

Referenced by advanceOneLayer(), and GroupedCkfTrajectoryBuilder().

float GroupedCkfTrajectoryBuilder::theLostHitPenalty
private

Chi**2 Penalty for each lost hit.

Definition at line 171 of file GroupedCkfTrajectoryBuilder.h.

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

double GroupedCkfTrajectoryBuilder::theMass
private

Mass hypothesis used for propagation

Definition at line 167 of file GroupedCkfTrajectoryBuilder.h.

int GroupedCkfTrajectoryBuilder::theMaxCand
private
    Maximum number of trajectory candidates 

to propagate to the next layer.

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

Referenced by backwardFit(), and GroupedCkfTrajectoryBuilder().

double GroupedCkfTrajectoryBuilder::theptCut
private

ptCut

Definition at line 165 of file GroupedCkfTrajectoryBuilder.h.

bool GroupedCkfTrajectoryBuilder::theRequireSeedHitsInRebuild
private

Only accept rebuilt trajectories if they contain the seed hits.

Definition at line 182 of file GroupedCkfTrajectoryBuilder.h.

Referenced by GroupedCkfTrajectoryBuilder(), and rebuildSeedingRegion().