CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackCandidate.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
2 #define DATAFORMATS_TRACKCANDIDATE_TRACKCANDIDATE_H
3 
10 
11 #include <utility>
12 
25 public:
27 
29  : rh_(), seed_(), state_(), seedRef_(), nLoops_(0), stopReason_((uint8_t)StopReason::UNINITIALIZED) {}
30 
32  : rh_(), seed_(), state_(), seedRef_(), nLoops_(0), stopReason_((uint8_t)StopReason::UNINITIALIZED) {
33  rh_.swap(rh);
34  }
35 
37  TrajectorySeed const& s,
38  PTrajectoryStateOnDet const& st,
39  signed char nLoops = 0,
40  uint8_t stopReason = (uint8_t)StopReason::UNINITIALIZED)
42  rh_.swap(rh);
43  }
44 
46  TrajectorySeed const& s,
47  PTrajectoryStateOnDet const& st,
49  signed char nLoops = 0,
50  uint8_t stopReason = (uint8_t)StopReason::UNINITIALIZED)
51  : rh_(), seed_(s), state_(st), seedRef_(seedRef), nLoops_(nLoops), stopReason_(stopReason) {
52  rh_.swap(rh);
53  }
54 
56 
58  auto nRecHits() const { return rh_.size(); }
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:
83  signed char nLoops_;
84  uint8_t stopReason_;
85 };
86 #endif
bool isLooper() const
signed char nLoops_
TrackCandidate(RecHitContainer &rh)
TrajectorySeed const & seed() const
size_type size() const
Definition: OwnVector.h:300
void swap(OwnVector< T, P > &other) noexcept
Definition: OwnVector.h:512
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_
edm::Range< RecHitContainer::const_iterator > recHits() const
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)
auto nRecHits() const
void setSeedRef(edm::RefToBase< TrajectorySeed > &seedRef)
edm::OwnVector< TrackingRecHit > RecHitContainer
PTrajectoryStateOnDet state_
edm::RefToBase< TrajectorySeed > seedRef() const
uint8_t stopReason() const
edm::RefToBase< TrajectorySeed > seedRef_