CMS 3D CMS Logo

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

#include <TempTrajectory.h>

Classes

struct  Payload
 

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)
 
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 (int8_t value)
 
void setStopReason (StopReason s)
 
StopReason stopReason () const
 
void swap (TempTrajectory &rh) noexcept
 
 TempTrajectory ()
 
 TempTrajectory (PropagationDirection dir, unsigned char nhseed)
 
 TempTrajectory (TempTrajectory const &rh)
 
 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 ()=default
 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

DataContainer theData
 
std::unique_ptr< PayloadthePayload
 

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 70 of file TempTrajectory.h.

70 {}

◆ 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 76 of file TempTrajectory.h.

References DeadROC_duringRun::dir, and thePayload.

76  : thePayload(std::make_unique<Payload>()) {
77  thePayload->theDirection = dir;
78  thePayload->theNHseed = nhseed;
79  }
std::unique_ptr< Payload > thePayload

◆ TempTrajectory() [3/5]

TempTrajectory::TempTrajectory ( TempTrajectory const &  rh)
inline

Definition at line 81 of file TempTrajectory.h.

82  : theData(rh.theData), thePayload(rh.thePayload ? std::make_unique<Payload>(*rh.thePayload) : nullptr) {}
DataContainer theData
std::unique_ptr< Payload > thePayload

◆ TempTrajectory() [4/5]

TempTrajectory::TempTrajectory ( TempTrajectory &&  rh)
inlinenoexcept

Definition at line 90 of file TempTrajectory.h.

DataContainer theData
std::unique_ptr< Payload > thePayload
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 cms::cuda::assert(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, push(), and thePayload.

26  : thePayload(std::make_unique<Payload>()) {
27  assert(traj.isValid());
28  thePayload->theDirection = traj.direction();
29  thePayload->theNHseed = traj.seedNHits();
30  thePayload->theNLoops = traj.nLoops();
31  thePayload->theDPhiCache = traj.dPhiCacheForLoopersReconstruction();
32  thePayload->theCCCThreshold_ = traj.cccThreshold();
33  thePayload->stopReason_ = traj.stopReason();
34  for (auto& it : traj.measurements()) {
35  push(it);
36  }
37  traj.measurements().clear();
38 }
bool isValid() const
Definition: Trajectory.h:257
int8_t nLoops() const
Definition: Trajectory.h:329
assert(be >=bs)
float cccThreshold() const
Definition: Trajectory.h:322
DataContainer const & measurements() const
Definition: Trajectory.h:178
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
void clear()
Definition: bqueue.h:236
unsigned int seedNHits() const
Definition: Trajectory.h:230
float dPhiCacheForLoopersReconstruction() const
Definition: Trajectory.h:320
std::unique_ptr< Payload > thePayload
StopReason stopReason() const
Definition: Trajectory.h:335
void push(const TrajectoryMeasurement &tm)

◆ ~TempTrajectory()

TempTrajectory::~TempTrajectory ( )
default

destruct a TempTrajectory

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 137 of file TempTrajectory.cc.

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

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

137  {
138  if (!trackerHitRTTI::isFromDet(*tm.recHit()))
139  return false;
140  auto const* thit = static_cast<const BaseTrackerRecHit*>(tm.recHit()->hit());
141  if (!thit)
142  return false;
143  if (thit->isPixel() || thit->isPhase2())
144  return false;
145  if (!tm.updatedState().isValid())
146  return false;
147  return siStripClusterTools::chargePerCM(thit->rawId(),
148  thit->firstClusterRef().stripCluster(),
149  tm.updatedState().localParameters()) < thePayload->theCCCThreshold_;
150 }
bool isFromDet(TrackingRecHit const &hit)
float chargePerCM(DetId detid, Iter a, Iter b)
const LocalTrajectoryParameters & localParameters() const
TrajectoryStateOnSurface const & updatedState() const
std::unique_ptr< Payload > thePayload
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 211 of file TempTrajectory.h.

References thePayload.

211 { return thePayload->theNumberOfCCCBadHits_; }
std::unique_ptr< Payload > thePayload

◆ check()

void TempTrajectory::check ( void  ) const
private

Definition at line 116 of file TempTrajectory.cc.

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

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

116  {
117  if (theData.empty())
118  throw cms::Exception("TrackingTools/PatternTools",
119  "Trajectory::check() - information requested from empty Trajectory");
120 }
DataContainer theData
bool empty() const
Definition: bqueue.h:203

◆ chiSquared()

float TempTrajectory::chiSquared ( ) const
inline

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

Definition at line 220 of file TempTrajectory.h.

References thePayload.

220 { return thePayload->theChiSquared; }
std::unique_ptr< Payload > thePayload

◆ direction()

PropagationDirection TempTrajectory::direction ( ) const

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

Definition at line 114 of file TempTrajectory.cc.

References thePayload.

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

114 { return PropagationDirection(thePayload->theDirection); }
PropagationDirection
std::unique_ptr< Payload > thePayload

◆ 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 257 of file TempTrajectory.h.

References thePayload.

257 { return thePayload->theDPhiCache; }
std::unique_ptr< Payload > thePayload

◆ 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 152 of file TempTrajectory.h.

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

152  { // works only because the first Arg is never a double!
153  theData.emplace_back(std::forward<Args>(args)...);
154  pushAux(chi2Increment);
155  }
void emplace_back(Args &&...args)
Definition: bqueue.h:178
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 177 of file TempTrajectory.h.

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

177  {
178  check();
179  return theData.front();
180  }
const T & front() const
Definition: bqueue.h:194
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 191 of file TempTrajectory.h.

References thePayload.

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

191 { return thePayload->theNumberOfFoundHits; }
std::unique_ptr< Payload > thePayload

◆ foundPixelHits()

int TempTrajectory::foundPixelHits ( ) const
inline

Number of valid pixel RecHits used to determine the trajectory.

Definition at line 195 of file TempTrajectory.h.

References thePayload.

195 { return thePayload->theNumberOfFoundPixelHits; }
std::unique_ptr< Payload > thePayload

◆ inactive()

static bool TempTrajectory::inactive ( )
inlinestatic

Definition of inactive Det from the Trajectory point of view.

Definition at line 238 of file TempTrajectory.h.

239  {
240  return false;
241  } //FIXME

◆ incrementLoops()

void TempTrajectory::incrementLoops ( )
inline

Definition at line 267 of file TempTrajectory.h.

References thePayload.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

267 { thePayload->theNLoops++; }
std::unique_ptr< Payload > thePayload

◆ invalidate()

void TempTrajectory::invalidate ( )
inline

Method to invalidate a trajectory. Useful during ambiguity resolution.

Definition at line 234 of file TempTrajectory.h.

References thePayload.

234 { thePayload.reset(); }
std::unique_ptr< Payload > thePayload

◆ isLooper()

bool TempTrajectory::isLooper ( ) const
inline

Definition at line 263 of file TempTrajectory.h.

References thePayload.

263 { return (thePayload->theNLoops > 0); }
std::unique_ptr< Payload > thePayload

◆ 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 95 of file TempTrajectory.cc.

References cms::cuda::assert(), cmsutils::bqueue< T >::clear(), cmsutils::bqueue< T >::join(), push(), cmsutils::bqueue< T >::shared(), theData, thePayload, and updateBadForCCC().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

95  {
96  assert(segment.thePayload->theDirection == thePayload->theDirection);
97 
98  if (thePayload->theCCCThreshold_ != segment.thePayload->theCCCThreshold_)
99  segment.updateBadForCCC(thePayload->theCCCThreshold_);
100  if (segment.theData.shared()) {
101  push(segment);
102  segment.theData.clear(); // obey the contract, and increase the chances it will be not shared one day
103  } else {
104  theData.join(segment.theData);
105  thePayload->theNumberOfFoundHits += segment.thePayload->theNumberOfFoundHits;
106  thePayload->theNumberOfFoundPixelHits += segment.thePayload->theNumberOfFoundPixelHits;
107  thePayload->theNumberOfLostHits += segment.thePayload->theNumberOfLostHits;
108  thePayload->theNumberOfCCCBadHits_ += segment.thePayload->theNumberOfCCCBadHits_;
109  thePayload->theNumberOfTrailingFoundHits = countTrailingValidHits(theData);
110  thePayload->theChiSquared += segment.thePayload->theChiSquared;
111  }
112 }
assert(be >=bs)
DataContainer theData
bool shared()
Definition: bqueue.h:212
void updateBadForCCC(float ccc_threshold)
void clear()
Definition: bqueue.h:236
std::unique_ptr< Payload > thePayload
void join(bqueue< T > &other)
Definition: bqueue.h:221
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 122 of file TempTrajectory.cc.

References LIKELY, and TrackingRecHit::missing.

Referenced by pop(), and pushAux().

122  {
123  if LIKELY (hit.isValid())
124  return false;
125 
126  // // A DetLayer is always inactive in this logic.
127  // // The DetLayer is the Det of an invalid RecHit only if no DetUnit
128  // // is compatible with the predicted state, so we don't really expect
129  // // a hit in this case.
130 
131  if (hit.geographicalId().rawId() == 0) {
132  return false;
133  }
134  return hit.getType() == TrackingRecHit::missing;
135 }
#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 201 of file TempTrajectory.h.

References thePayload.

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

201 { return thePayload->theNumberOfLostHits; }
std::unique_ptr< Payload > thePayload

◆ measurements()

const DataContainer& TempTrajectory::measurements ( ) const
inline

◆ nLoops()

signed char TempTrajectory::nLoops ( ) const
inline

Definition at line 264 of file TempTrajectory.h.

References thePayload.

Referenced by GroupedCkfTrajectoryBuilder::backwardFit().

264 { return thePayload->theNLoops; }
std::unique_ptr< Payload > thePayload

◆ numberOfCCCBadHits()

int TempTrajectory::numberOfCCCBadHits ( float  ccc_threshold)

Definition at line 167 of file TempTrajectory.cc.

References thePayload, and updateBadForCCC().

167  {
168  updateBadForCCC(ccc_threshold);
169  return thePayload->theNumberOfCCCBadHits_;
170 }
void updateBadForCCC(float ccc_threshold)
std::unique_ptr< Payload > thePayload

◆ operator=() [1/2]

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

Definition at line 84 of file TempTrajectory.h.

References theData, and thePayload.

84  {
85  theData = rh.theData;
86  thePayload = rh.thePayload ? std::make_unique<Payload>(*rh.thePayload) : nullptr;
87  return *this;
88  }
DataContainer theData
std::unique_ptr< Payload > thePayload

◆ operator=() [2/2]

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

Definition at line 92 of file TempTrajectory.h.

References swap(), edm::swap(), theData, and thePayload.

92  {
93  using std::swap;
94  swap(theData, rh.theData);
96  return *this;
97  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
DataContainer theData
void swap(TempTrajectory &rh) noexcept
std::unique_ptr< Payload > thePayload

◆ pop()

void TempTrajectory::pop ( )

Remove the last measurement from the trajectory.

Definition at line 40 of file TempTrajectory.cc.

References cmsutils::bqueue< T >::back(), badForCCC(), empty(), lost(), Trajectory::pixel(), cmsutils::bqueue< T >::pop_back(), TrajectoryMeasurement::recHit(), theData, and thePayload.

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

40  {
41  if (!empty()) {
42  if (theData.back().recHit()->isValid()) {
43  thePayload->theNumberOfFoundHits--;
44  if (badForCCC(theData.back()))
45  thePayload->theNumberOfCCCBadHits_--;
47  thePayload->theNumberOfFoundPixelHits--;
48  } else if (lost(*(theData.back().recHit()))) {
49  thePayload->theNumberOfLostHits--;
50  }
51  theData.pop_back();
52  thePayload->theNumberOfTrailingFoundHits = countTrailingValidHits(theData);
53  }
54 }
const T & back() const
Definition: bqueue.h:196
static bool lost(const TrackingRecHit &hit)
DataContainer theData
static bool pixel(const TrackingRecHit &hit)
Definition: Trajectory.cc:175
bool badForCCC(const TrajectoryMeasurement &tm)
void pop_back()
Definition: bqueue.h:185
std::unique_ptr< Payload > thePayload
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 115 of file TempTrajectory.h.

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

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

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

◆ push() [2/5]

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

Definition at line 117 of file TempTrajectory.h.

References push().

Referenced by push().

117 { 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 75 of file TempTrajectory.cc.

References cms::cuda::assert(), mps_fire::i, measurements(), N, cmsutils::bqueue< T >::push_back(), cmsutils::bqueue< T >::size(), theData, thePayload, and createJobs::tmp.

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

◆ 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 141 of file TempTrajectory.h.

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

141  {
142  theData.push_back(tm);
143  pushAux(chi2Increment);
144  }
DataContainer theData
void push_back(const T &val)
Definition: bqueue.h:161
void pushAux(double chi2Increment)

◆ push() [5/5]

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

Definition at line 146 of file TempTrajectory.h.

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

146  {
148  pushAux(chi2Increment);
149  }
DataContainer theData
def move(src, dest)
Definition: eostools.py:511
void push_back(const T &val)
Definition: bqueue.h:161
void pushAux(double chi2Increment)

◆ pushAux()

void TempTrajectory::pushAux ( double  chi2Increment)
private

Definition at line 56 of file TempTrajectory.cc.

References cmsutils::bqueue< T >::back(), badForCCC(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), lost(), Trajectory::pixel(), TrajectoryMeasurement::recHit(), theData, and thePayload.

Referenced by emplace(), and push().

56  {
57  const TrajectoryMeasurement& tm = theData.back();
58  if (tm.recHit()->isValid()) {
59  thePayload->theNumberOfFoundHits++;
60  thePayload->theNumberOfTrailingFoundHits++;
61  if (badForCCC(tm))
62  thePayload->theNumberOfCCCBadHits_++;
63  if (Trajectory::pixel(*(tm.recHit())))
64  thePayload->theNumberOfFoundPixelHits++;
65  }
66  //else if (lost( tm.recHit()) && !inactive(tm.recHit().det())) theNumberOfLostHits++;
67  else if (lost(*(tm.recHit()))) {
68  thePayload->theNumberOfLostHits++;
69  thePayload->theNumberOfTrailingFoundHits = 0;
70  }
71 
72  thePayload->theChiSquared += chi2Increment;
73 }
const T & back() const
Definition: bqueue.h:196
static bool lost(const TrackingRecHit &hit)
DataContainer theData
static bool pixel(const TrackingRecHit &hit)
Definition: Trajectory.cc:175
bool badForCCC(const TrajectoryMeasurement &tm)
std::unique_ptr< Payload > thePayload
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
ConstRecHitPointer const & recHit() const

◆ seedNHits()

unsigned int TempTrajectory::seedNHits ( ) const
inline

Definition at line 214 of file TempTrajectory.h.

References thePayload.

214 { return thePayload->theNHseed; }
std::unique_ptr< Payload > thePayload

◆ 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 261 of file TempTrajectory.h.

References thePayload.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

261 { thePayload->theDPhiCache = dphi; }
std::unique_ptr< Payload > thePayload

◆ setNLoops()

void TempTrajectory::setNLoops ( int8_t  value)
inline

◆ setStopReason()

void TempTrajectory::setStopReason ( StopReason  s)
inline

Definition at line 270 of file TempTrajectory.h.

References alignCSCRings::s, and thePayload.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), and MinPtTrajectoryFilter::toBeContinued().

270 { thePayload->stopReason_ = s; }
std::unique_ptr< Payload > thePayload

◆ stopReason()

StopReason TempTrajectory::stopReason ( ) const
inline

Definition at line 269 of file TempTrajectory.h.

References thePayload.

269 { return thePayload->stopReason_; }
std::unique_ptr< Payload > thePayload

◆ swap()

void TempTrajectory::swap ( TempTrajectory rh)
inlinenoexcept

Definition at line 99 of file TempTrajectory.h.

References edm::swap(), theData, and thePayload.

Referenced by operator=().

99  {
100  using std::swap;
101  swap(theData, rh.theData);
103  }
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
DataContainer theData
void swap(TempTrajectory &rh) noexcept
std::unique_ptr< Payload > thePayload

◆ toTrajectory()

Trajectory TempTrajectory::toTrajectory ( ) const

Convert to a standard Trajectory.

Definition at line 172 of file TempTrajectory.cc.

References cms::cuda::assert(), mps_fire::i, isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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(), theData, thePayload, and createJobs::tmp.

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

172  {
173  assert(isValid());
175  Trajectory traj(p);
176  traj.setNLoops(thePayload->theNLoops);
177  traj.setStopReason(thePayload->stopReason_);
178  traj.numberOfCCCBadHits(thePayload->theCCCThreshold_);
179 
180  traj.reserve(theData.size());
182  int i = 0;
183  for (DataContainer::const_iterator it = theData.rbegin(), ed = theData.rend(); it != ed; --it)
184  tmp[i++] = &(*it);
185  while (i != 0)
186  traj.push(*tmp[--i]);
187  return traj;
188 }
const_iterator rbegin() const
Definition: bqueue.h:198
_bqueue_itr< value_type > const_iterator
Definition: bqueue.h:130
PropagationDirection
assert(be >=bs)
DataContainer theData
bool isValid() const
size_type size() const
Definition: bqueue.h:202
std::unique_ptr< Payload > thePayload
const_iterator rend() const
Definition: bqueue.h:199
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 205 of file TempTrajectory.h.

References thePayload.

205 { return thePayload->theNumberOfTrailingFoundHits; }
std::unique_ptr< Payload > thePayload

◆ updateBadForCCC()

void TempTrajectory::updateBadForCCC ( float  ccc_threshold)
private

Definition at line 152 of file TempTrajectory.cc.

References badForCCC(), h, theData, and thePayload.

Referenced by join(), and numberOfCCCBadHits().

152  {
153  // If the supplied threshold is the same as the currently cached
154  // one, then return the current number of bad hits for CCC,
155  // otherwise do a new full rescan.
156  if (ccc_threshold == thePayload->theCCCThreshold_)
157  return;
158 
159  thePayload->theCCCThreshold_ = ccc_threshold;
160  thePayload->theNumberOfCCCBadHits_ = 0;
161  for (auto const& h : theData) {
162  if (badForCCC(h))
163  thePayload->theNumberOfCCCBadHits_++;
164  }
165 }
DataContainer theData
bool badForCCC(const TrajectoryMeasurement &tm)
std::unique_ptr< Payload > thePayload
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

◆ theData

DataContainer TempTrajectory::theData
private

◆ thePayload

std::unique_ptr<Payload> TempTrajectory::thePayload
private