CMS 3D CMS Logo

TrajectorySeed.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_TRAJECTORYSEED_TRAJECTORYSEED_h
2 #define DATAFORMATS_TRAJECTORYSEED_TRAJECTORYSEED_h
3 
9 #include <utility>
10 #include <algorithm>
11 
19 public:
22 
24  virtual ~TrajectorySeed() {}
25 
27  : hits_(rh), tsos_(ptsos), dir_(dir) {}
28 
30  : hits_(std::move(rh)), tsos_(ptsos), dir_(dir) {}
31 
33  hits_.swap(rh);
34  std::swap(tsos_, ptsos);
35  std::swap(dir_, dir);
36  }
37 
38  void swap(TrajectorySeed& rh) noexcept {
39  hits_.swap(rh.hits_);
40  std::swap(tsos_, rh.tsos_);
41  std::swap(dir_, rh.dir_);
42  }
43 
44  TrajectorySeed(TrajectorySeed const& o) = default;
45 
46  TrajectorySeed& operator=(TrajectorySeed const& o) = default;
47 
48  TrajectorySeed(TrajectorySeed&& o) noexcept = default;
49 
50  TrajectorySeed& operator=(TrajectorySeed&& o) noexcept = default;
51 
52  RecHitRange recHits() const { return {hits_.begin(), hits_.end()}; }
53  unsigned int nHits() const { return hits_.size(); }
54  PropagationDirection direction() const { return dir_; }
55  PTrajectoryStateOnDet const& startingState() const { return tsos_; }
56 
57  virtual TrajectorySeed* clone() const { return new TrajectorySeed(*this); }
58 
59 private:
63 };
64 
65 inline void swap(TrajectorySeed& rh, TrajectorySeed& lh) noexcept { rh.swap(lh); }
66 
68 
69 #endif
edm::OwnVector< TrackingRecHit > RecHitContainer
RecHitRange recHits() const
void swap(TrajectorySeed &rh) noexcept
RecHitContainer hits_
TrajectorySeed & operator=(TrajectorySeed const &o)=default
PropagationDirection dir_
PropagationDirection
bool int lh
Definition: SIMDVec.h:20
void swap(OwnVector< T, P > &other) noexcept
Definition: OwnVector.h:512
iterator begin()
Definition: OwnVector.h:280
PropagationDirection direction() const
void swap(TrajectorySeed &rh, TrajectorySeed &lh) noexcept
unsigned int nHits() const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
size_type size() const
Definition: OwnVector.h:300
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, RecHitContainer &&rh, PropagationDirection dir) noexcept
virtual ~TrajectorySeed()
PTrajectoryStateOnDet const & startingState() const
iterator end()
Definition: OwnVector.h:285
TrajectorySeed BasicTrajectorySeed
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, RecHitContainer const &rh, PropagationDirection dir)
void swap(PTrajectoryStateOnDet &ptsos, RecHitContainer &rh, PropagationDirection &dir) noexcept
PTrajectoryStateOnDet tsos_
def move(src, dest)
Definition: eostools.py:511
virtual TrajectorySeed * clone() const
edm::Range< RecHitContainer::const_iterator > RecHitRange