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 
8 #include <utility>
9 #include <algorithm>
10 
18 public:
20  typedef recHitContainer::const_iterator const_iterator;
21  typedef std::pair<const_iterator, const_iterator> range;
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  range recHits() const { return std::make_pair(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
TrajectorySeed::recHitContainer
edm::OwnVector< TrackingRecHit > recHitContainer
Definition: TrajectorySeed.h:19
swap
void swap(TrajectorySeed &rh, TrajectorySeed &lh) noexcept
Definition: TrajectorySeed.h:65
TrajectorySeed::~TrajectorySeed
virtual ~TrajectorySeed()
Definition: TrajectorySeed.h:24
edm::OwnVector::end
iterator end()
Definition: OwnVector.h:285
TrajectorySeed::range
std::pair< const_iterator, const_iterator > range
Definition: TrajectorySeed.h:21
TrajectorySeed::nHits
unsigned int nHits() const
Definition: TrajectorySeed.h:53
TrajectorySeed::swap
void swap(PTrajectoryStateOnDet &ptsos, recHitContainer &rh, PropagationDirection &dir) noexcept
Definition: TrajectorySeed.h:32
TrajectorySeed::clone
virtual TrajectorySeed * clone() const
Definition: TrajectorySeed.h:57
TrajectorySeed::operator=
TrajectorySeed & operator=(TrajectorySeed const &o)=default
TrajectorySeed::const_iterator
recHitContainer::const_iterator const_iterator
Definition: TrajectorySeed.h:20
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
TrajectorySeed::tsos_
PTrajectoryStateOnDet tsos_
Definition: TrajectorySeed.h:61
TrajectorySeed::hits_
edm::OwnVector< TrackingRecHit > hits_
Definition: TrajectorySeed.h:60
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
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()
Definition: TrajectorySeed.h:23
TrajectorySeed::swap
void swap(TrajectorySeed &rh) noexcept
Definition: TrajectorySeed.h:38
PropagationDirection.h
TrajectorySeed::TrajectorySeed
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, recHitContainer const &rh, PropagationDirection dir)
Definition: TrajectorySeed.h:26
eostools.move
def move(src, dest)
Definition: eostools.py:511
TrajectorySeed::TrajectorySeed
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, recHitContainer &&rh, PropagationDirection dir) noexcept
Definition: TrajectorySeed.h:29
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
TrajectorySeed::recHits
range recHits() const
Definition: TrajectorySeed.h:52
TrajectorySeed
Definition: TrajectorySeed.h:17
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