CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 moduleName() const
module id (index in z)
int convertLadderNumber(int oldLadder)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
constexpr std::array< uint8_t, layerIndexSize > layer
PixelModuleName::ModuleType moduleType() const override
module Type
bool isHalfModule() const
full or half module
int sectorName() const
sector id
Definition: DetId.h:17
int ladderName() const
ladder id (index in phi)
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
Shell shell() const
~PixelBarrelName() override
PixelBarrelName(const DetId &, const TrackerTopology *tt, bool phase=false)
ctor from DetId
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
PXBDetId getDetId()
return the DetId
tuple module
Definition: callgraph.py:69