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
swap
void swap(TrajectorySeed &rh, TrajectorySeed &lh) noexcept
Definition: TrajectorySeed.h:65
TrajectorySeed::TrajectorySeed
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, RecHitContainer &&rh, PropagationDirection dir) noexcept
Definition: TrajectorySeed.h:29
TrajectorySeed::~TrajectorySeed
virtual ~TrajectorySeed()
Definition: TrajectorySeed.h:24
TrajectorySeed::RecHitRange
edm::Range< RecHitContainer::const_iterator > RecHitRange
Definition: TrajectorySeed.h:21
edm::OwnVector::end
iterator end()
Definition: OwnVector.h:285
Range.h
TrajectorySeed::nHits
unsigned int nHits() const
Definition: TrajectorySeed.h:53
TrajectorySeed::clone
virtual TrajectorySeed * clone() const
Definition: TrajectorySeed.h:57
TrajectorySeed::operator=
TrajectorySeed & operator=(TrajectorySeed const &o)=default
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
TrajectorySeed::RecHitContainer
edm::OwnVector< TrackingRecHit > RecHitContainer
Definition: TrajectorySeed.h:20
TrajectorySeed::swap
void swap(PTrajectoryStateOnDet &ptsos, RecHitContainer &rh, PropagationDirection &dir) noexcept
Definition: TrajectorySeed.h:32
TrajectorySeed::tsos_
PTrajectoryStateOnDet tsos_
Definition: TrajectorySeed.h:61
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
edm::Range
Definition: Range.h:11
TrackingRecHit.h
PTrajectoryStateOnDet.h
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
TrajectorySeed::dir_
PropagationDirection dir_
Definition: TrajectorySeed.h:62
BasicTrajectorySeed
TrajectorySeed BasicTrajectorySeed
Definition: TrajectorySeed.h:67
TrajectorySeed::direction
PropagationDirection direction() const
Definition: TrajectorySeed.h:54
TrajectorySeed::TrajectorySeed
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, RecHitContainer const &rh, PropagationDirection dir)
Definition: TrajectorySeed.h:26
TrajectorySeed::TrajectorySeed
TrajectorySeed()
Definition: TrajectorySeed.h:23
TrajectorySeed::swap
void swap(TrajectorySeed &rh) noexcept
Definition: TrajectorySeed.h:38
TrajectorySeed::recHits
RecHitRange recHits() const
Definition: TrajectorySeed.h:52
PropagationDirection.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
TrajectorySeed::hits_
RecHitContainer hits_
Definition: TrajectorySeed.h:60
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
TrajectorySeed
Definition: TrajectorySeed.h:18
edm::OwnVector::swap
void swap(OwnVector< T, P > &other) noexcept
Definition: OwnVector.h:512
TrajectorySeed::startingState
PTrajectoryStateOnDet const & startingState() const
Definition: TrajectorySeed.h:55
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
edm::OwnVector::begin
iterator begin()
Definition: OwnVector.h:280
OwnVector.h
edm::OwnVector::size
size_type size() const
Definition: OwnVector.h:300
edm::OwnVector< TrackingRecHit >
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23