CMS 3D CMS Logo

trackerHitRTTI.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackerRecHit2D_trackerHitRTTI_H
2 #define DataFormats_TrackerRecHit2D_trackerHitRTTI_H
3 
5 
6 namespace trackerHitRTTI {
7  // tracking hit can be : single (si1D, si2D, pix), projected, matched or multi
8  enum RTTI {
9  undef = 0,
10  single = 1,
12  projMono = 3,
13  match = 4,
14  multi = 5,
18  fastMatch = 9,
20  mipTiming = 11,
21  vector = 12
22  };
23  inline RTTI rtti(TrackingRecHit const& hit) { return RTTI(hit.getRTTI()); }
24  inline bool isUndef(TrackingRecHit const& hit) { return rtti(hit) == undef; }
25  inline bool isNotFromCluster(TrackingRecHit const& hit) { return rtti(hit) == notFromCluster; }
26  inline bool isSingle(TrackingRecHit const& hit) { return rtti(hit) == single || rtti(hit) == fastSingle; }
27  inline bool isProjMono(TrackingRecHit const& hit) { return rtti(hit) == projMono || rtti(hit) == fastProjMono; }
28  inline bool isProjStereo(TrackingRecHit const& hit) { return rtti(hit) == projStereo || rtti(hit) == fastProjStereo; }
29  inline bool isProjected(TrackingRecHit const& hit) {
30  return ((rtti(hit) == projMono) | (rtti(hit) == projStereo)) ||
32  }
33  inline bool isMatched(TrackingRecHit const& hit) { return rtti(hit) == match || rtti(hit) == fastMatch; }
34  inline bool isMulti(TrackingRecHit const& hit) { return rtti(hit) == multi; }
35  inline bool isSingleType(TrackingRecHit const& hit) { return (rtti(hit) > 0) & (rtti(hit) < 4); }
36  inline bool isFromDet(TrackingRecHit const& hit) { return (((rtti(hit) > 0) & (rtti(hit) < 6)) | (rtti(hit) == 12)); }
37  inline bool isFast(TrackingRecHit const& hit) { return (rtti(hit) > 5) & (rtti(hit) <= 9); }
38  inline bool isFromDetOrFast(TrackingRecHit const& hit) {
39  return (((rtti(hit) > 0) & (rtti(hit) < 10)) | (rtti(hit) == 12));
40  }
41  inline bool isTiming(TrackingRecHit const& hit) { return rtti(hit) == mipTiming; }
42  inline bool isVector(TrackingRecHit const& hit) { return rtti(hit) == vector; }
43  inline unsigned int projId(TrackingRecHit const& hit) { return hit.rawId() + int(rtti(hit)) - 1; }
44 } // namespace trackerHitRTTI
45 
46 #endif
trackerHitRTTI::undef
Definition: trackerHitRTTI.h:9
trackerHitRTTI::isFromDetOrFast
bool isFromDetOrFast(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:38
trackerHitRTTI::isProjMono
bool isProjMono(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:27
trackerHitRTTI::isSingle
bool isSingle(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:26
trackerHitRTTI::isProjected
bool isProjected(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:29
trackerHitRTTI::fastSingle
Definition: trackerHitRTTI.h:15
trackerHitRTTI::projStereo
Definition: trackerHitRTTI.h:11
trackerHitRTTI::isUndef
bool isUndef(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:24
trackerHitRTTI::isNotFromCluster
bool isNotFromCluster(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:25
trackerHitRTTI::projId
unsigned int projId(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:43
trackerHitRTTI::isMulti
bool isMulti(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:34
TrackingRecHit.h
trackerHitRTTI::projMono
Definition: trackerHitRTTI.h:12
trackerHitRTTI::isTiming
bool isTiming(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:41
trackerHitRTTI::RTTI
RTTI
Definition: trackerHitRTTI.h:8
trackerHitRTTI::rtti
RTTI rtti(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:23
trackerHitRTTI::mipTiming
Definition: trackerHitRTTI.h:20
trackerHitRTTI::fastProjMono
Definition: trackerHitRTTI.h:17
trackerHitRTTI::isMatched
bool isMatched(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:33
trackerHitRTTI::single
Definition: trackerHitRTTI.h:10
createfilelist.int
int
Definition: createfilelist.py:10
trackerHitRTTI::isFromDet
bool isFromDet(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:36
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
trackerHitRTTI::multi
Definition: trackerHitRTTI.h:14
trackerHitRTTI::match
Definition: trackerHitRTTI.h:13
TrackingRecHit
Definition: TrackingRecHit.h:21
trackerHitRTTI::fastProjStereo
Definition: trackerHitRTTI.h:16
trackerHitRTTI::isProjStereo
bool isProjStereo(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:28
trackerHitRTTI::fastMatch
Definition: trackerHitRTTI.h:18
trackerHitRTTI::isSingleType
bool isSingleType(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:35
trackerHitRTTI::notFromCluster
Definition: trackerHitRTTI.h:19
trackerHitRTTI
Definition: trackerHitRTTI.h:6
trackerHitRTTI::isVector
bool isVector(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88
trackerHitRTTI::isFast
bool isFast(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:37