test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectorySeedHitCandidate.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Tracking_TrajectorySeedHitCandidate_H_
2 
3 #define FastSimulation_Tracking_TrajectorySeedHitCandidate_H_
4 
16 
17 
19 
20 #include <vector>
21 
22 class TrackerTopology;
23 
25 public:
26 
29  theHit(0),
30  seedingLayer(),
31  theRingNumber(0),
33  forward(false)
34 
35  {
36 
37  }
38 
42  const TrajectorySeedHitCandidate& other ) :
43  theHit(hit),
45  theRingNumber(other.ringNumber()),
47  forward(other.isForward())
48 
49  {
50 
51  }
52 
55  const TrackerTopology* tTopo);
56 
58  void init(const TrackerTopology *tTopo);
59 
61  inline const FastTrackerRecHit * hit() const { return theHit; }
62 
63  inline const TrackingLayer& getTrackingLayer() const
64  {
65  return seedingLayer;
66  }
67 
69  inline unsigned int subDetId() const { return seedingLayer.getSubDetNumber(); }
70 
72  inline unsigned int layerNumber() const { return seedingLayer.getLayerNumber(); }
73 
75  inline unsigned int ringNumber() const { return theRingNumber; }
76 
78  unsigned int cylinderNumber() const { return theCylinderNumber; }
79 
81  inline bool isForward() const { return forward; }
82 
84  inline LocalPoint localPosition() const { return hit()->localPosition(); }
86  // bool isOnRequestedDet(const std::vector<unsigned int>& whichDet) const;
87 
89  bool isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets) const;
90  bool isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond) const;
91  bool isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond, const TrajectorySeedHitCandidate& theSeedHitThird) const;
92 
93 
95  inline bool isOnTheSameLayer(const TrajectorySeedHitCandidate& other) const {
96 
97  return seedingLayer==other.seedingLayer;
98  }
99 
100  inline bool operator!=(const TrajectorySeedHitCandidate& aHit) const {
101  return
102  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
103  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
104  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
105  }
106 
107 
108 
109  private:
110 
113  unsigned int theRingNumber;
114  unsigned int theCylinderNumber;
115  bool forward;
116 
117 };
118 
119 #endif
120 
unsigned int getSubDetNumber() const
Definition: TrackingLayer.h:75
unsigned int cylinderNumber() const
The global layer number in the nested cylinder geometry.
bool operator!=(const TrajectorySeedHitCandidate &aHit) const
unsigned int getLayerNumber() const
Definition: TrackingLayer.h:85
bool isForward() const
Is it a forward hit ?
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
TrajectorySeedHitCandidate(const FastTrackerRecHit *hit, const TrajectorySeedHitCandidate &other)
const FastTrackerRecHit * theHit
TrajectorySeedHitCandidate()
Default Constructor.
bool isOnRequestedDet(const std::vector< std::vector< TrackingLayer > > &theLayersInSets) const
Check if the hit is on one of the requested detector.
unsigned int ringNumber() const
The Ring Number.
LocalPoint localPosition() const
The local position.
const FastTrackerRecHit * hit() const
The Hit itself.
void init(const TrackerTopology *tTopo)
Initialization at construction time.
unsigned int layerNumber() const
The Layer Number.
volatile std::atomic< bool > shutdown_flag false
const TrackingLayer & getTrackingLayer() const
bool isOnTheSameLayer(const TrajectorySeedHitCandidate &other) const
Check if two hits are on the same layer of the same subdetector.
unsigned int subDetId() const
The subdet Id.
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const final