CMS 3D CMS Logo

PixelBarrelName.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackerCommon_PixelBarrelName_H
2 #define DataFormats_TrackerCommon_PixelBarrelName_H
3 
10 
11 #include <string>
12 
13 class DetId;
14 class TrackerTopology;
15 
17 public:
18  enum Shell { mO = 1, mI = 2, pO = 3, pI = 4 };
19 
21  PixelBarrelName(const DetId&, const TrackerTopology* tt, bool phase = false);
22 
23  // do not use, works only for phase0 and old pixel classes
24  PixelBarrelName(const DetId&, bool phase = false);
25 
27  PixelBarrelName(Shell shell = mO, int layer = 0, int module = 0, int ladder = 0, bool phase = false)
29 
31  PixelBarrelName(std::string name, bool phase = false);
32 
33  ~PixelBarrelName() override {}
34 
35  inline int convertLadderNumber(int oldLadder);
36 
38  std::string name() const override;
39 
40  Shell shell() const { return thePart; }
41 
43  int layerName() const { return theLayer; }
44 
46  int moduleName() const { return theModule; }
47 
49  int ladderName() const { return theLadder; }
50 
52  int sectorName() const;
53 
55  bool isHalfModule() const;
56 
58  PixelModuleName::ModuleType moduleType() const override;
59 
63 
65  bool operator==(const PixelModuleName&) const override;
66 
67 private:
70  bool phase1;
71 };
72 
73 std::ostream& operator<<(std::ostream& out, const PixelBarrelName::Shell& t);
74 #endif
int convertLadderNumber(int oldLadder)
int moduleName() const
module id (index in z)
constexpr std::array< uint8_t, layerIndexSize > layer
std::ostream & operator<<(std::ostream &out, const PixelBarrelName::Shell &t)
Definition: TTTypes.h:54
PixelModuleName::ModuleType moduleType() const override
module Type
bool isHalfModule() const
full or half module
Shell shell() const
Definition: DetId.h:17
std::string name() const override
from base class
int layerName() const
layer id
PixelBarrelName(Shell shell=mO, int layer=0, int module=0, int ladder=0, bool phase=false)
ctor for defined name with dummy parameters
~PixelBarrelName() override
PixelBarrelName(const DetId &, const TrackerTopology *tt, bool phase=false)
ctor from DetId
int ladderName() const
ladder id (index in phi)
Definition: shell.py:1
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
PXBDetId getDetId()
return the DetId
int sectorName() const
sector id