CMS 3D CMS Logo

PixelBarrelName.h
Go to the documentation of this file.
1 #ifndef SiPixelDetId_PixelBarrelName_H
2 #define SiPixelDetId_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 
62  DetId getDetId(const TrackerTopology* tt);
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 moduleName() const
module id (index in z)
int convertLadderNumber(int oldLadder)
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
std::ostream & operator<<(std::ostream &out, const PixelBarrelName::Shell &t)
bool isHalfModule() const
full or half module
int sectorName() const
sector id
std::string name() const override
from base class
Definition: DetId.h:18
int ladderName() const
ladder id (index in phi)
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
Shell shell() const
~PixelBarrelName() override
PixelBarrelName(const DetId &, const TrackerTopology *tt, bool phase=false)
ctor from DetId
Definition: shell.py:1
Definition: vlib.h:208
PXBDetId getDetId()
return the DetId
PixelModuleName::ModuleType moduleType() const override
module Type