CMS 3D CMS Logo

TrackCandidate.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
2 #define DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
3 
9 
10 #include <utility>
11 
24 public:
26  typedef RecHitContainer::const_iterator const_iterator;
27  typedef std::pair<const_iterator, const_iterator> range;
28 
30  : rh_(), seed_(), state_(), seedRef_(), nLoops_(0), stopReason_((uint8_t)StopReason::UNINITIALIZED) {}
31 
32  explicit TrackCandidate(RecHitContainer& rh)
33  : rh_(), seed_(), state_(), seedRef_(), nLoops_(0), stopReason_((uint8_t)StopReason::UNINITIALIZED) {
34  rh_.swap(rh);
35  }
36 
37  TrackCandidate(RecHitContainer& rh,
38  TrajectorySeed const& s,
39  PTrajectoryStateOnDet const& st,
40  signed char nLoops = 0,
41  uint8_t stopReason = (uint8_t)StopReason::UNINITIALIZED)
43  rh_.swap(rh);
44  }
45 
46  TrackCandidate(RecHitContainer& rh,
47  TrajectorySeed const& s,
48  PTrajectoryStateOnDet const& st,
50  signed char nLoops = 0,
51  uint8_t stopReason = (uint8_t)StopReason::UNINITIALIZED)
52  : rh_(), seed_(s), state_(st), seedRef_(seedRef), nLoops_(nLoops), stopReason_(stopReason) {
53  rh_.swap(rh);
54  }
55 
57 
58  range recHits() const { return std::make_pair(rh_.begin(), rh_.end()); }
59 
60  TrajectorySeed const& seed() const { return seed_; }
61 
62  bool isLooper() const { return (nLoops_ > 0); }
63  signed char nLoops() const { return nLoops_; }
64  uint8_t stopReason() const { return stopReason_; }
65 
66  void setNLoops(signed char value) { nLoops_ = value; }
67  void setStopReason(uint8_t value) { stopReason_ = value; }
68 
75 
77 
78 private:
79  RecHitContainer rh_;
83  signed char nLoops_;
84  uint8_t stopReason_;
85 };
86 #endif
bool isLooper() const
range recHits() const
signed char nLoops_
TrackCandidate(RecHitContainer &rh)
TrajectorySeed const & seed() const
TrackCandidate(RecHitContainer &rh, TrajectorySeed const &s, PTrajectoryStateOnDet const &st, const edm::RefToBase< TrajectorySeed > &seedRef, signed char nLoops=0, uint8_t stopReason=(uint8_t) StopReason::UNINITIALIZED)
iterator begin()
Definition: OwnVector.h:280
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
TrajectorySeed seed_
uint8_t stopReason_
Definition: value.py:1
void setStopReason(uint8_t value)
TrackCandidate(RecHitContainer &rh, TrajectorySeed const &s, PTrajectoryStateOnDet const &st, signed char nLoops=0, uint8_t stopReason=(uint8_t) StopReason::UNINITIALIZED)
iterator end()
Definition: OwnVector.h:285
RecHitContainer rh_
signed char nLoops() const
void setNLoops(signed char value)
void setSeedRef(edm::RefToBase< TrajectorySeed > &seedRef)
edm::OwnVector< TrackingRecHit > RecHitContainer
std::pair< const_iterator, const_iterator > range
RecHitContainer::const_iterator const_iterator
void swap(OwnVector< T, P > &other)
Definition: OwnVector.h:512
PTrajectoryStateOnDet state_
edm::RefToBase< TrajectorySeed > seedRef() const
uint8_t stopReason() const
edm::RefToBase< TrajectorySeed > seedRef_