CMS 3D CMS Logo

SiStripDetKey.h
Go to the documentation of this file.
1 
2 #ifndef DataFormats_SiStripCommon_SiStripDetKey_h
3 #define DataFormats_SiStripCommon_SiStripDetKey_h
4 
8 
28 class SiStripDetKey : public SiStripKey {
29 
30  public:
31 
32  // ---------- Constructors ----------
33 
35  SiStripDetKey( const uint16_t& partition );
36 
38  SiStripDetKey( const DetId& det_id,
39  const uint16_t& apv_pair_number = 0,
40  const uint16_t& apv_within_pair = 0 );
41 
43  SiStripDetKey( const SiStripDetId& det_id );
44 
46  SiStripDetKey( const uint32_t& det_key );
47 
49  SiStripDetKey( const std::string& directory_path );
50 
52  SiStripDetKey( const SiStripDetKey& );
53 
55  SiStripDetKey( const SiStripKey& );
56 
58  SiStripDetKey( const SiStripKey&,
59  const sistrip::Granularity& );
60 
62  SiStripDetKey();
63 
64  // ---------- Public interface to member data ----------
65 
67  inline const uint16_t& partition() const;
68 
70  inline const uint16_t& apvPairNumber() const;
71 
73  inline const uint16_t& apvWithinPair() const;
74 
75  // ---------- Numbering schemes ----------
76 
77  //@@ nothing yet
78  //@@ switch b/w det_id and det_key
79  //@@ switch b/w strip, pair, apv, etc...
80 
81  // ---------- Utility methods ----------
82 
84  bool isEqual( const SiStripKey& ) const override;
85 
87  bool isConsistent( const SiStripKey& ) const override;
88 
90  bool isValid() const override;
91 
94  bool isValid( const sistrip::Granularity& ) const override;
95 
97  bool isInvalid() const override;
98 
101  bool isInvalid( const sistrip::Granularity& ) const override;
102 
103  // ---------- Print methods ----------
104 
106  void print( std::stringstream& ss ) const override;
107 
109  void terse( std::stringstream& ss ) const override;
110 
111  private:
112 
113  // ---------- Private methods ----------
114 
115  void initFromValue() override;
116  void initFromKey() override;
117  void initFromPath() override;
118  void initGranularity() override;
119 
120  // ---------- Private member data ----------
121 
123  uint16_t partition_;
124 
126  uint16_t apvPairNumber_;
127 
129  uint16_t apvWithinPair_;
130 
131  // Definition of bit field positions for 32-bit key
132  static const uint16_t partitionOffset_ = 29;
133 
134  // Definition of bit field masks for 32-bit key
135  static const uint16_t partitionMask_ = 0x07; // (3 bits)
136 
137 };
138 
139 // ---------- inline methods ----------
140 
141 const uint16_t& SiStripDetKey::partition() const { return partition_; }
142 const uint16_t& SiStripDetKey::apvPairNumber() const { return apvPairNumber_; }
143 const uint16_t& SiStripDetKey::apvWithinPair() const { return apvWithinPair_; }
144 
146 std::ostream& operator<< ( std::ostream&, const SiStripDetKey& );
147 
148 inline bool operator< ( const SiStripDetKey& a, const SiStripDetKey& b ) { return ( a.key() < b.key() ); }
149 
150 
151 #endif // DataFormats_SiStripCommon_SiStripDetKey_h
uint16_t apvPairNumber_
bool isEqual(const SiStripKey &) const override
void initFromPath() override
bool isValid() const override
void initGranularity() override
static const uint16_t partitionOffset_
void print(std::stringstream &ss) const override
const uint32_t & key() const
Definition: SiStripKey.h:125
Constants and enumerated type for sistrip::Granularity.
const uint16_t & partition() const
void initFromKey() override
const uint16_t & apvWithinPair() const
Base utility class that identifies a position within a logical structure of the strip tracker...
Definition: SiStripKey.h:23
const uint16_t & apvPairNumber() const
std::ostream & operator<<(std::ostream &, const SiStripDetKey &)
bool isInvalid() const override
Utility class that identifies a position within the strip tracker geometrical structure, down to the level of an APV25 chip.
Definition: SiStripDetKey.h:28
static const uint16_t partitionMask_
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
Definition: DetId.h:18
void initFromValue() override
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
uint16_t apvWithinPair_
bool isConsistent(const SiStripKey &) const override
bool operator<(const SiStripDetKey &a, const SiStripDetKey &b)
uint16_t partition_
void terse(std::stringstream &ss) const override