CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TempTrajectory Class Reference

#include <TempTrajectory.h>

Public Types

typedef TrackingRecHit::ConstRecHitContainer ConstRecHitContainer
 
typedef cmsutils::bqueue< TrajectoryMeasurementDataContainer
 
typedef ConstRecHitContainer RecHitContainer
 

Public Member Functions

int cccBadHits () const
 
float chiSquared () const
 Value of the raw Chi2 of the trajectory, not normalised to the N.D.F. More...
 
PropagationDirection direction () const
 
float dPhiCacheForLoopersReconstruction () const
 
template<typename... Args>
void emplace (Args &&... args)
 
template<typename... Args>
void emplace (double chi2Increment, Args &&... args)
 
bool empty () const
 True if trajectory has no measurements. More...
 
const TrajectoryMeasurementfirstMeasurement () const
 
int foundHits () const
 
int foundPixelHits () const
 
void incrementLoops ()
 
void invalidate ()
 Method to invalidate a trajectory. Useful during ambiguity resolution. More...
 
bool isLooper () const
 
bool isValid () const
 
void join (TempTrajectory &segment)
 
const DetLayerlastLayer () const
 Redundant method, returns the layer of lastMeasurement() . More...
 
const TrajectoryMeasurementlastMeasurement () const
 
int lostHits () const
 
const DataContainermeasurements () const
 
signed char nLoops () const
 
int numberOfCCCBadHits (float ccc_threshold)
 
TempTrajectoryoperator= (TempTrajectory const &rh)=default
 
TempTrajectoryoperator= (TempTrajectory &&rh) noexcept
 
void pop ()
 
void popInvalidTail ()
 Pops out all the invalid hits on the tail. More...
 
void push (const TrajectoryMeasurement &tm)
 
void push (TrajectoryMeasurement &&tm)
 
void push (TempTrajectory const &segment)
 
void push (const TrajectoryMeasurement &tm, double chi2Increment)
 
void push (TrajectoryMeasurement &&tm, double chi2Increment)
 
unsigned int seedNHits () const
 
void setDPhiCacheForLoopersReconstruction (float dphi)
 
void setNLoops (signed char value)
 
void setStopReason (StopReason s)
 
StopReason stopReason () const
 
 TempTrajectory ()
 
 TempTrajectory (PropagationDirection dir, unsigned char nhseed)
 
 TempTrajectory (TempTrajectory const &rh)=default
 
 TempTrajectory (TempTrajectory &&rh) noexcept
 
 TempTrajectory (Trajectory &&traj)
 construct TempTrajectory from standard Trajectory More...
 
Trajectory toTrajectory () const
 Convert to a standard Trajectory. More...
 
int trailingFoundHits () const
 
 ~TempTrajectory ()
 destruct a TempTrajectory More...
 

Static Public Member Functions

static bool inactive ()
 
static bool lost (const TrackingRecHit &hit)
 

Private Member Functions

bool badForCCC (const TrajectoryMeasurement &tm)
 
void check () const
 
void pushAux (double chi2Increment)
 
void updateBadForCCC (float ccc_threshold)
 

Private Attributes

StopReason stopReason_ = StopReason::UNINITIALIZED
 
float theCCCThreshold_ = std::numeric_limits<float>::max()
 
float theChiSquared = 0
 
DataContainer theData
 
signed char theDirection = anyDirection
 
float theDPhiCache = 0
 
unsigned char theNHseed = 0
 
signed char theNLoops = 0
 
signed short theNumberOfCCCBadHits_ = 0
 
signed short theNumberOfFoundHits = 0
 
signed short theNumberOfFoundPixelHits = 0
 
signed short theNumberOfLostHits = 0
 
signed short theNumberOfTrailingFoundHits = 0
 
bool theValid = false
 

Detailed Description

A class for detailed particle trajectory representation. It is used during trajectory building to "grow" a trajectory. The trajectory is represented as an ordered sequence of TrajectoryMeasurement objects with a stack-like interface. The measurements are added to the Trajectory in the order of increasing precision: each new TrajectoryMeasurement is assumed to improve the precision of the last one, normally by adding a constraint from a new RecHit. However the Trajectory class does not have the means to verify that measurements are added in the correct order, and thus cannot guarantee the order, which is the responsibility of the TrajectoryBuilder. The Trajectory provides some security by allowing to add or remove measurements only on one of it's ends, with push(TM) and pop() methods. The last measurement in a Trajectory can thus be either the innermost (closest to the interaction point) or the outermost, depending on the way the Trajectory was built. The direction of building is represented as a PropagationDirection, which has two possible values: alongMomentum (outwards) and oppositeToMomentum (inwards), and is accessed with the direction() method.

Definition at line 40 of file TempTrajectory.h.

Member Typedef Documentation

◆ ConstRecHitContainer

Definition at line 43 of file TempTrajectory.h.

◆ DataContainer

Definition at line 42 of file TempTrajectory.h.

◆ RecHitContainer

Definition at line 44 of file TempTrajectory.h.

Constructor & Destructor Documentation

◆ TempTrajectory() [1/5]

TempTrajectory::TempTrajectory ( )
inline

Default constructor of an empty trajectory with undefined seed and undefined direction. This constructor is necessary in order to transiently copy vector<Trajectory> in the edm::Event

Definition at line 51 of file TempTrajectory.h.

51 {}

◆ TempTrajectory() [2/5]

TempTrajectory::TempTrajectory ( PropagationDirection  dir,
unsigned char  nhseed 
)
inline

Constructor of an empty trajectory with defined direction. No check is made in the push method that measurements are added in the correct direction.

Definition at line 57 of file TempTrajectory.h.

58  : theDirection(dir), theValid(true), theNHseed(nhseed) {}
unsigned char theNHseed
signed char theDirection

◆ TempTrajectory() [3/5]

TempTrajectory::TempTrajectory ( TempTrajectory const &  rh)
default

◆ TempTrajectory() [4/5]

TempTrajectory::TempTrajectory ( TempTrajectory &&  rh)
inlinenoexcept

Definition at line 63 of file TempTrajectory.h.

64  : theData(std::move(rh.theData)),
72  theValid(rh.theValid),
73  theNHseed(rh.theNHseed),
74  theNLoops(rh.theNLoops),
signed short theNumberOfFoundHits
signed short theNumberOfCCCBadHits_
DataContainer theData
StopReason stopReason_
signed short theNumberOfLostHits
signed char theNLoops
signed short theNumberOfFoundPixelHits
signed short theNumberOfTrailingFoundHits
unsigned char theNHseed
signed char theDirection
def move(src, dest)
Definition: eostools.py:511

◆ TempTrajectory() [5/5]

TempTrajectory::TempTrajectory ( Trajectory &&  traj)
explicit

construct TempTrajectory from standard Trajectory

Definition at line 26 of file TempTrajectory.cc.

References eostools::move(), and push().

27  : theChiSquared(0),
32  theDirection(traj.direction()),
33  theValid(traj.isValid()),
34  theNHseed(traj.seedNHits()),
35  theNLoops(traj.nLoops()),
38  stopReason_(traj.stopReason()) {
39  for (auto& it : traj.measurements()) {
40  push(std::move(it));
41  }
42 }
signed short theNumberOfFoundHits
bool isValid() const
Definition: Trajectory.h:257
signed short theNumberOfCCCBadHits_
float cccThreshold() const
Definition: Trajectory.h:322
DataContainer const & measurements() const
Definition: Trajectory.h:178
StopReason stopReason_
signed short theNumberOfLostHits
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
unsigned int seedNHits() const
Definition: Trajectory.h:230
signed char theNLoops
signed short theNumberOfFoundPixelHits
float dPhiCacheForLoopersReconstruction() const
Definition: Trajectory.h:320
signed char nLoops() const
Definition: Trajectory.h:329
unsigned char theNHseed
signed char theDirection
StopReason stopReason() const
Definition: Trajectory.h:335
def move(src, dest)
Definition: eostools.py:511
void push(const TrajectoryMeasurement &tm)

◆ ~TempTrajectory()

TempTrajectory::~TempTrajectory ( )
inline

destruct a TempTrajectory

Definition at line 102 of file TempTrajectory.h.

102 {}

Member Function Documentation

◆ badForCCC()

bool TempTrajectory::badForCCC ( const TrajectoryMeasurement tm)
private

Definition of what it means for a hit to be "lost". This definition is also used by the TrajectoryBuilder.

Definition at line 141 of file TempTrajectory.cc.

References siStripClusterTools::chargePerCM(), trackerHitRTTI::isFromDet(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localParameters(), TrajectoryMeasurement::recHit(), theCCCThreshold_, and TrajectoryMeasurement::updatedState().

Referenced by pop(), pushAux(), and updateBadForCCC().

141  {
142  if (!trackerHitRTTI::isFromDet(*tm.recHit()))
143  return false;
144  auto const* thit = static_cast<const BaseTrackerRecHit*>(tm.recHit()->hit());
145  if (!thit)
146  return false;
147  if (thit->isPixel() || thit->isPhase2())
148  return false;
149  if (!tm.updatedState().isValid())
150  return false;
151  return siStripClusterTools::chargePerCM(thit->rawId(),
152  thit->firstClusterRef().stripCluster(),
154 }
bool isFromDet(TrackingRecHit const &hit)
float chargePerCM(DetId detid, Iter a, Iter b)
const LocalTrajectoryParameters & localParameters() const
TrajectoryStateOnSurface const & updatedState() const
ConstRecHitPointer const & recHit() const

◆ cccBadHits()

int TempTrajectory::cccBadHits ( ) const
inline

Number of hits that are not compatible with the CCC used during patter recognition. Used mainly as a criteria for abandoning a trajectory candidate during trajectory building.

Definition at line 204 of file TempTrajectory.h.

References theNumberOfCCCBadHits_.

204 { return theNumberOfCCCBadHits_; }
signed short theNumberOfCCCBadHits_

◆ check()

void TempTrajectory::check ( void  ) const
private

Definition at line 120 of file TempTrajectory.cc.

References cmsutils::bqueue< T >::size(), and theData.

Referenced by firstMeasurement(), lastLayer(), and lastMeasurement().

120  {
121  if (theData.size() == 0)
122  throw cms::Exception("TrackingTools/PatternTools",
123  "Trajectory::check() - information requested from empty Trajectory");
124 }
DataContainer theData
size_type size() const
Definition: bqueue.h:201

◆ chiSquared()

float TempTrajectory::chiSquared ( ) const
inline

Value of the raw Chi2 of the trajectory, not normalised to the N.D.F.

Definition at line 213 of file TempTrajectory.h.

References theChiSquared.

213 { return theChiSquared; }

◆ direction()

PropagationDirection TempTrajectory::direction ( ) const

Direction of "growing" of the trajectory. Possible values are alongMomentum (outwards) and oppositeToMomentum (inwards).

Definition at line 118 of file TempTrajectory.cc.

References theDirection.

Referenced by GroupedCkfTrajectoryBuilder::backwardFit(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), and GroupedCkfTrajectoryBuilder::rebuildSeedingRegion().

PropagationDirection
signed char theDirection

◆ dPhiCacheForLoopersReconstruction()

float TempTrajectory::dPhiCacheForLoopersReconstruction ( ) const
inline

accessor to the delta phi angle betweem the directions of the two measurements on the last two layers crossed by the trajectory

Definition at line 250 of file TempTrajectory.h.

References theDPhiCache.

250 { return theDPhiCache; }

◆ emplace() [1/2]

template<typename... Args>
void TempTrajectory::emplace ( Args &&...  args)
inline

◆ emplace() [2/2]

template<typename... Args>
void TempTrajectory::emplace ( double  chi2Increment,
Args &&...  args 
)
inline

Definition at line 145 of file TempTrajectory.h.

References writedatasetfile::args, cmsutils::bqueue< T >::emplace_back(), pushAux(), and theData.

145  { // works only because the first Arg is never a double!
146  theData.emplace_back(std::forward<Args>(args)...);
147  pushAux(chi2Increment);
148  }
void emplace_back(Args &&...args)
Definition: bqueue.h:177
DataContainer theData
void pushAux(double chi2Increment)

◆ empty()

bool TempTrajectory::empty ( void  ) const
inline

◆ firstMeasurement()

const TrajectoryMeasurement& TempTrajectory::firstMeasurement ( ) const
inline

Access to the first measurement. It is the least precise one in a trajectory before smoothing. It is precise in a smoothed trajectory. It's the innermost measurement if direction() == alongMomentum, the outermost one if direction() == oppositeToMomentum.

Definition at line 170 of file TempTrajectory.h.

References check(), cmsutils::bqueue< T >::front(), and theData.

170  {
171  check();
172  return theData.front();
173  }
const T & front() const
Definition: bqueue.h:193
DataContainer theData
void check() const

◆ foundHits()

int TempTrajectory::foundHits ( ) const
inline

Number of valid RecHits used to determine the trajectory. Can be less than the number of measurements in data() since detector layers crossed without using RecHits from them are also stored as measurements.

Definition at line 184 of file TempTrajectory.h.

References theNumberOfFoundHits.

Referenced by BaseCkfTrajectoryBuilder::addToResult(), GroupedCkfTrajectoryBuilder::advanceOneLayer(), GroupedCkfTrajectoryBuilder::backwardFit(), ThresholdPtTrajectoryFilter::qualityFilter(), MinPtTrajectoryFilter::qualityFilter(), ThresholdPtTrajectoryFilter::toBeContinued(), MinPtTrajectoryFilter::toBeContinued(), and BaseCkfTrajectoryBuilder::toBeContinued().

184 { return theNumberOfFoundHits; }
signed short theNumberOfFoundHits

◆ foundPixelHits()

int TempTrajectory::foundPixelHits ( ) const
inline

Number of valid pixel RecHits used to determine the trajectory.

Definition at line 188 of file TempTrajectory.h.

References theNumberOfFoundPixelHits.

188 { return theNumberOfFoundPixelHits; }
signed short theNumberOfFoundPixelHits

◆ inactive()

static bool TempTrajectory::inactive ( )
inlinestatic

Definition of inactive Det from the Trajectory point of view.

Definition at line 231 of file TempTrajectory.h.

232  {
233  return false;
234  } //FIXME

◆ incrementLoops()

void TempTrajectory::incrementLoops ( )
inline

Definition at line 260 of file TempTrajectory.h.

References theNLoops.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

260 { theNLoops++; }
signed char theNLoops

◆ invalidate()

void TempTrajectory::invalidate ( )
inline

Method to invalidate a trajectory. Useful during ambiguity resolution.

Definition at line 227 of file TempTrajectory.h.

References theValid.

227 { theValid = false; }

◆ isLooper()

bool TempTrajectory::isLooper ( ) const
inline

Definition at line 256 of file TempTrajectory.h.

References theNLoops.

256 { return (theNLoops > 0); }
signed char theNLoops

◆ isValid()

bool TempTrajectory::isValid ( void  ) const
inline

◆ join()

void TempTrajectory::join ( TempTrajectory segment)

Add a new sets of measurements to a Trajectory Exactly like push(TempTrajectory), but it doesn't copy the data (the input segment will be reset to an empty one)

Definition at line 99 of file TempTrajectory.cc.

References cms::cuda::assert(), cmsutils::bqueue< T >::clear(), cmsutils::bqueue< T >::join(), push(), cmsutils::bqueue< T >::shared(), theCCCThreshold_, theChiSquared, theData, theDirection, theNumberOfCCCBadHits_, theNumberOfFoundHits, theNumberOfFoundPixelHits, theNumberOfLostHits, theNumberOfTrailingFoundHits, and updateBadForCCC().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

99  {
100  assert(segment.theDirection == theDirection);
101 
102  if (theCCCThreshold_ != segment.theCCCThreshold_)
104  if (segment.theData.shared()) {
105  push(segment);
106  segment.theData.clear(); // obey the contract, and increase the chances it will be not shared one day
107  } else {
108  theData.join(segment.theData);
113  theNumberOfTrailingFoundHits = countTrailingValidHits(theData);
114  theChiSquared += segment.theChiSquared;
115  }
116 }
signed short theNumberOfFoundHits
signed short theNumberOfCCCBadHits_
assert(be >=bs)
DataContainer theData
bool shared()
Definition: bqueue.h:211
signed short theNumberOfLostHits
void updateBadForCCC(float ccc_threshold)
void clear()
Definition: bqueue.h:235
signed short theNumberOfFoundPixelHits
signed short theNumberOfTrailingFoundHits
signed char theDirection
void join(bqueue< T > &other)
Definition: bqueue.h:220
void push(const TrajectoryMeasurement &tm)

◆ lastLayer()

const DetLayer* TempTrajectory::lastLayer ( ) const
inline

◆ lastMeasurement()

const TrajectoryMeasurement& TempTrajectory::lastMeasurement ( ) const
inline

◆ lost()

bool TempTrajectory::lost ( const TrackingRecHit hit)
static

Definition at line 126 of file TempTrajectory.cc.

References LIKELY, and TrackingRecHit::missing.

Referenced by pop(), and pushAux().

126  {
127  if LIKELY (hit.isValid())
128  return false;
129 
130  // // A DetLayer is always inactive in this logic.
131  // // The DetLayer is the Det of an invalid RecHit only if no DetUnit
132  // // is compatible with the predicted state, so we don't really expect
133  // // a hit in this case.
134 
135  if (hit.geographicalId().rawId() == 0) {
136  return false;
137  }
138  return hit.getType() == TrackingRecHit::missing;
139 }
#define LIKELY(x)
Definition: Likely.h:20

◆ lostHits()

int TempTrajectory::lostHits ( ) const
inline

Number of detector layers crossed without valid RecHits. Used mainly as a criteria for abandoning a trajectory candidate during trajectory building.

Definition at line 194 of file TempTrajectory.h.

References theNumberOfLostHits.

Referenced by BaseCkfTrajectoryBuilder::addToResult(), GroupedCkfTrajectoryBuilder::advanceOneLayer(), and BaseCkfTrajectoryBuilder::toBeContinued().

194 { return theNumberOfLostHits; }
signed short theNumberOfLostHits

◆ measurements()

const DataContainer& TempTrajectory::measurements ( ) const
inline

◆ nLoops()

signed char TempTrajectory::nLoops ( ) const
inline

Definition at line 257 of file TempTrajectory.h.

References theNLoops.

Referenced by GroupedCkfTrajectoryBuilder::backwardFit().

257 { return theNLoops; }
signed char theNLoops

◆ numberOfCCCBadHits()

int TempTrajectory::numberOfCCCBadHits ( float  ccc_threshold)

Definition at line 171 of file TempTrajectory.cc.

References theNumberOfCCCBadHits_, and updateBadForCCC().

171  {
172  updateBadForCCC(ccc_threshold);
173  return theNumberOfCCCBadHits_;
174 }
signed short theNumberOfCCCBadHits_
void updateBadForCCC(float ccc_threshold)

◆ operator=() [1/2]

TempTrajectory& TempTrajectory::operator= ( TempTrajectory const &  rh)
default

◆ operator=() [2/2]

TempTrajectory& TempTrajectory::operator= ( TempTrajectory &&  rh)
inlinenoexcept

Definition at line 79 of file TempTrajectory.h.

References stopReason_, edm::swap(), std::swap(), theCCCThreshold_, theChiSquared, theData, theDirection, theDPhiCache, theNHseed, theNLoops, theNumberOfCCCBadHits_, theNumberOfFoundHits, theNumberOfFoundPixelHits, theNumberOfLostHits, theNumberOfTrailingFoundHits, and theValid.

79  {
80  using std::swap;
81  swap(theData, rh.theData);
89  theValid = rh.theValid;
90  theNHseed = rh.theNHseed;
91  theNLoops = rh.theNLoops;
95  return *this;
96  }
signed short theNumberOfFoundHits
signed short theNumberOfCCCBadHits_
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:117
DataContainer theData
StopReason stopReason_
signed short theNumberOfLostHits
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
signed char theNLoops
signed short theNumberOfFoundPixelHits
signed short theNumberOfTrailingFoundHits
unsigned char theNHseed
signed char theDirection

◆ pop()

void TempTrajectory::pop ( )

Remove the last measurement from the trajectory.

Definition at line 44 of file TempTrajectory.cc.

References cmsutils::bqueue< T >::back(), badForCCC(), empty(), lost(), Trajectory::pixel(), cmsutils::bqueue< T >::pop_back(), TrajectoryMeasurement::recHit(), theData, theNumberOfCCCBadHits_, theNumberOfFoundHits, theNumberOfFoundPixelHits, theNumberOfLostHits, and theNumberOfTrailingFoundHits.

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly(), and BaseCkfTrajectoryBuilder::addToResult().

44  {
45  if (!empty()) {
46  if (theData.back().recHit()->isValid()) {
48  if (badForCCC(theData.back()))
52  } else if (lost(*(theData.back().recHit()))) {
54  }
55  theData.pop_back();
56  theNumberOfTrailingFoundHits = countTrailingValidHits(theData);
57  }
58 }
signed short theNumberOfFoundHits
const T & back() const
Definition: bqueue.h:195
signed short theNumberOfCCCBadHits_
static bool lost(const TrackingRecHit &hit)
DataContainer theData
signed short theNumberOfLostHits
static bool pixel(const TrackingRecHit &hit)
Definition: Trajectory.cc:175
signed short theNumberOfFoundPixelHits
bool badForCCC(const TrajectoryMeasurement &tm)
void pop_back()
Definition: bqueue.h:184
signed short theNumberOfTrailingFoundHits
ConstRecHitPointer const & recHit() const
bool empty() const
True if trajectory has no measurements.

◆ popInvalidTail()

void TempTrajectory::popInvalidTail ( )

Pops out all the invalid hits on the tail.

◆ push() [1/5]

void TempTrajectory::push ( const TrajectoryMeasurement tm)
inline

Add a new measurement to a Trajectory. The Chi2 of the trajectory is incremented by the value of tm.estimate() .

Definition at line 108 of file TempTrajectory.h.

References TrajectoryMeasurement::estimate(), and push().

Referenced by join(), push(), GroupedCkfTrajectoryBuilder::rebuildSeedingRegion(), and TempTrajectory().

108 { push(tm, tm.estimate()); }
void push(const TrajectoryMeasurement &tm)

◆ push() [2/5]

void TempTrajectory::push ( TrajectoryMeasurement &&  tm)
inline

Definition at line 110 of file TempTrajectory.h.

References push().

Referenced by push().

110 { push(std::forward<TrajectoryMeasurement>(tm), tm.estimate()); }
void push(const TrajectoryMeasurement &tm)

◆ push() [3/5]

void TempTrajectory::push ( TempTrajectory const &  segment)

Add a new sets of measurements to a Trajectory The sorting of hits in the other trajectory must match the one inside this trajectory (that is, both along or both opposite to momentum) (the input segment will be reset to an empty one)

Definition at line 79 of file TempTrajectory.cc.

References cms::cuda::assert(), mps_fire::i, measurements(), N, cmsutils::bqueue< T >::push_back(), cmsutils::bqueue< T >::size(), theCCCThreshold_, theChiSquared, theData, theDirection, theNumberOfCCCBadHits_, theNumberOfFoundHits, theNumberOfFoundPixelHits, theNumberOfLostHits, theNumberOfTrailingFoundHits, and createJobs::tmp.

79  {
80  assert(segment.theDirection == theDirection);
81  assert(segment.theCCCThreshold_ == theCCCThreshold_);
82 
83  const int N = segment.measurements().size();
84  TrajectoryMeasurement const* tmp[N];
85  int i = 0;
86  //for (DataContainer::const_iterator it = segment.measurements().rbegin(), ed = segment.measurements().rend(); it != ed; --it)
87  for (auto const& tm : segment.measurements())
88  tmp[i++] = &tm;
89  while (i != 0)
90  theData.push_back(*tmp[--i]);
91  theNumberOfFoundHits += segment.theNumberOfFoundHits;
92  theNumberOfFoundPixelHits += segment.theNumberOfFoundPixelHits;
93  theNumberOfLostHits += segment.theNumberOfLostHits;
94  theNumberOfCCCBadHits_ += segment.theNumberOfCCCBadHits_;
95  theNumberOfTrailingFoundHits = countTrailingValidHits(theData);
96  theChiSquared += segment.theChiSquared;
97 }
signed short theNumberOfFoundHits
signed short theNumberOfCCCBadHits_
assert(be >=bs)
DataContainer theData
signed short theNumberOfLostHits
#define N
Definition: blowfish.cc:9
signed short theNumberOfFoundPixelHits
signed short theNumberOfTrailingFoundHits
signed char theDirection
tmp
align.sh
Definition: createJobs.py:716
void push_back(const T &val)
Definition: bqueue.h:160

◆ push() [4/5]

void TempTrajectory::push ( const TrajectoryMeasurement tm,
double  chi2Increment 
)
inline

same as the one-argument push, but the trajectory Chi2 is incremented by chi2Increment. Useful e.g. in trajectory smoothing.

Definition at line 134 of file TempTrajectory.h.

References cmsutils::bqueue< T >::push_back(), pushAux(), and theData.

134  {
135  theData.push_back(tm);
136  pushAux(chi2Increment);
137  }
DataContainer theData
void push_back(const T &val)
Definition: bqueue.h:160
void pushAux(double chi2Increment)

◆ push() [5/5]

void TempTrajectory::push ( TrajectoryMeasurement &&  tm,
double  chi2Increment 
)
inline

Definition at line 139 of file TempTrajectory.h.

References eostools::move(), cmsutils::bqueue< T >::push_back(), pushAux(), and theData.

139  {
141  pushAux(chi2Increment);
142  }
DataContainer theData
def move(src, dest)
Definition: eostools.py:511
void push_back(const T &val)
Definition: bqueue.h:160
void pushAux(double chi2Increment)

◆ pushAux()

void TempTrajectory::pushAux ( double  chi2Increment)
private

Definition at line 60 of file TempTrajectory.cc.

References cmsutils::bqueue< T >::back(), badForCCC(), lost(), Trajectory::pixel(), TrajectoryMeasurement::recHit(), theChiSquared, theData, theNumberOfCCCBadHits_, theNumberOfFoundHits, theNumberOfFoundPixelHits, theNumberOfLostHits, and theNumberOfTrailingFoundHits.

Referenced by emplace(), and push().

60  {
61  const TrajectoryMeasurement& tm = theData.back();
62  if (tm.recHit()->isValid()) {
65  if (badForCCC(tm))
67  if (Trajectory::pixel(*(tm.recHit())))
69  }
70  //else if (lost( tm.recHit()) && !inactive(tm.recHit().det())) theNumberOfLostHits++;
71  else if (lost(*(tm.recHit()))) {
74  }
75 
76  theChiSquared += chi2Increment;
77 }
signed short theNumberOfFoundHits
const T & back() const
Definition: bqueue.h:195
signed short theNumberOfCCCBadHits_
static bool lost(const TrackingRecHit &hit)
DataContainer theData
signed short theNumberOfLostHits
static bool pixel(const TrackingRecHit &hit)
Definition: Trajectory.cc:175
signed short theNumberOfFoundPixelHits
bool badForCCC(const TrajectoryMeasurement &tm)
signed short theNumberOfTrailingFoundHits
ConstRecHitPointer const & recHit() const

◆ seedNHits()

unsigned int TempTrajectory::seedNHits ( ) const
inline

Definition at line 207 of file TempTrajectory.h.

References theNHseed.

207 { return theNHseed; }
unsigned char theNHseed

◆ setDPhiCacheForLoopersReconstruction()

void TempTrajectory::setDPhiCacheForLoopersReconstruction ( float  dphi)
inline

method to set the delta phi angle betweem the directions of the two measurements on the last two layers crossed by the trajectory

Definition at line 254 of file TempTrajectory.h.

References theDPhiCache.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

254 { theDPhiCache = dphi; }

◆ setNLoops()

void TempTrajectory::setNLoops ( signed char  value)
inline

◆ setStopReason()

void TempTrajectory::setStopReason ( StopReason  s)
inline

◆ stopReason()

StopReason TempTrajectory::stopReason ( ) const
inline

Definition at line 262 of file TempTrajectory.h.

References stopReason_.

262 { return stopReason_; }
StopReason stopReason_

◆ toTrajectory()

Trajectory TempTrajectory::toTrajectory ( ) const

Convert to a standard Trajectory.

Definition at line 176 of file TempTrajectory.cc.

References mps_fire::i, Trajectory::numberOfCCCBadHits(), AlCaHLTBitMon_ParallelJobs::p, Trajectory::push(), cmsutils::bqueue< T >::rbegin(), cmsutils::bqueue< T >::rend(), Trajectory::reserve(), Trajectory::setNLoops(), Trajectory::setStopReason(), cmsutils::bqueue< T >::size(), stopReason_, theCCCThreshold_, theData, theDirection, theNLoops, and createJobs::tmp.

Referenced by BaseCkfTrajectoryBuilder::addToResult(), and CkfDebugTrajectoryBuilder::analyzeMeasurementsDebugger().

176  {
178  Trajectory traj(p);
179  traj.setNLoops(theNLoops);
180  traj.setStopReason(stopReason_);
181  traj.numberOfCCCBadHits(theCCCThreshold_);
182 
183  traj.reserve(theData.size());
185  int i = 0;
186  for (DataContainer::const_iterator it = theData.rbegin(), ed = theData.rend(); it != ed; --it)
187  tmp[i++] = &(*it);
188  while (i != 0)
189  traj.push(*tmp[--i]);
190  return traj;
191 }
const_iterator rbegin() const
Definition: bqueue.h:197
_bqueue_itr< value_type > const_iterator
Definition: bqueue.h:129
PropagationDirection
DataContainer theData
StopReason stopReason_
size_type size() const
Definition: bqueue.h:201
signed char theNLoops
signed char theDirection
const_iterator rend() const
Definition: bqueue.h:198
tmp
align.sh
Definition: createJobs.py:716

◆ trailingFoundHits()

int TempTrajectory::trailingFoundHits ( ) const
inline

Number of valid RecHits at the end of the trajectory after last lost hit.

Definition at line 198 of file TempTrajectory.h.

References theNumberOfTrailingFoundHits.

signed short theNumberOfTrailingFoundHits

◆ updateBadForCCC()

void TempTrajectory::updateBadForCCC ( float  ccc_threshold)
private

Definition at line 156 of file TempTrajectory.cc.

References badForCCC(), h, theCCCThreshold_, theData, and theNumberOfCCCBadHits_.

Referenced by join(), and numberOfCCCBadHits().

156  {
157  // If the supplied threshold is the same as the currently cached
158  // one, then return the current number of bad hits for CCC,
159  // otherwise do a new full rescan.
160  if (ccc_threshold == theCCCThreshold_)
161  return;
162 
163  theCCCThreshold_ = ccc_threshold;
165  for (auto const& h : theData) {
166  if (badForCCC(h))
168  }
169 }
signed short theNumberOfCCCBadHits_
DataContainer theData
bool badForCCC(const TrajectoryMeasurement &tm)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

Member Data Documentation

◆ stopReason_

StopReason TempTrajectory::stopReason_ = StopReason::UNINITIALIZED
private

Definition at line 298 of file TempTrajectory.h.

Referenced by operator=(), setStopReason(), stopReason(), and toTrajectory().

◆ theCCCThreshold_

float TempTrajectory::theCCCThreshold_ = std::numeric_limits<float>::max()
private

Definition at line 297 of file TempTrajectory.h.

Referenced by badForCCC(), join(), operator=(), push(), toTrajectory(), and updateBadForCCC().

◆ theChiSquared

float TempTrajectory::theChiSquared = 0
private

Definition at line 281 of file TempTrajectory.h.

Referenced by chiSquared(), join(), operator=(), push(), and pushAux().

◆ theData

DataContainer TempTrajectory::theData
private

◆ theDirection

signed char TempTrajectory::theDirection = anyDirection
private

Definition at line 290 of file TempTrajectory.h.

Referenced by direction(), join(), operator=(), push(), and toTrajectory().

◆ theDPhiCache

float TempTrajectory::theDPhiCache = 0
private

◆ theNHseed

unsigned char TempTrajectory::theNHseed = 0
private

Definition at line 293 of file TempTrajectory.h.

Referenced by operator=(), and seedNHits().

◆ theNLoops

signed char TempTrajectory::theNLoops = 0
private

Definition at line 295 of file TempTrajectory.h.

Referenced by incrementLoops(), isLooper(), nLoops(), operator=(), setNLoops(), and toTrajectory().

◆ theNumberOfCCCBadHits_

signed short TempTrajectory::theNumberOfCCCBadHits_ = 0
private

◆ theNumberOfFoundHits

signed short TempTrajectory::theNumberOfFoundHits = 0
private

Definition at line 283 of file TempTrajectory.h.

Referenced by foundHits(), join(), operator=(), pop(), push(), and pushAux().

◆ theNumberOfFoundPixelHits

signed short TempTrajectory::theNumberOfFoundPixelHits = 0
private

Definition at line 284 of file TempTrajectory.h.

Referenced by foundPixelHits(), join(), operator=(), pop(), push(), and pushAux().

◆ theNumberOfLostHits

signed short TempTrajectory::theNumberOfLostHits = 0
private

Definition at line 285 of file TempTrajectory.h.

Referenced by join(), lostHits(), operator=(), pop(), push(), and pushAux().

◆ theNumberOfTrailingFoundHits

signed short TempTrajectory::theNumberOfTrailingFoundHits = 0
private

Definition at line 286 of file TempTrajectory.h.

Referenced by join(), operator=(), pop(), push(), pushAux(), and trailingFoundHits().

◆ theValid

bool TempTrajectory::theValid = false
private

Definition at line 291 of file TempTrajectory.h.

Referenced by invalidate(), isValid(), and operator=().