CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelBarrelName.h
Go to the documentation of this file.
1 #ifndef SiPixelDetId_PixelBarrelName_H
2 #define SiPixelDetId_PixelBarrelName_H
3 
11 
12 #include <string>
13 
14 class DetId;
15 
17 public:
18 
19  enum Shell { mO = 1, mI = 2 , pO =3 , pI =4 };
20 
22  PixelBarrelName(const DetId &, const TrackerTopology* tt, bool phase=false);
23 
24  // do not use, works only for phase0 and old pixel classes
25  PixelBarrelName(const DetId &, bool phase=false);
26 
28  PixelBarrelName(Shell shell=mO, int layer=0, int module=0, int ladder=0, bool phase=false)
30  thePart(shell), theLayer(layer), theModule(module), theLadder(ladder), phase1(phase)
31  { }
32 
34  PixelBarrelName(std::string name, bool phase=false);
35 
36  virtual ~PixelBarrelName() { }
37 
38  inline int convertLadderNumber(int oldLadder);
39 
41  virtual std::string name() const;
42 
43  Shell shell() const { return thePart; }
44 
46  int layerName() const { return theLayer; }
47 
49  int moduleName() const { return theModule; }
50 
52  int ladderName() const { return theLadder; }
53 
55  int sectorName() const;
56 
58  bool isHalfModule() const;
59 
62 
66 
68  virtual bool operator== (const PixelModuleName &) const;
69 
70 private:
73  bool phase1;
74 };
75 
76 std::ostream & operator<<( std::ostream& out, const PixelBarrelName::Shell& t);
77 #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:187
bool isHalfModule() const
full or half module
int sectorName() const
sector id
virtual bool operator==(const PixelModuleName &) const
check equality of modules from datamemebers
Definition: DetId.h:18
int ladderName() const
ladder id (index in phi)
virtual std::string name() const
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(const DetId &, const TrackerTopology *tt, bool phase=false)
ctor from DetId
virtual ~PixelBarrelName()
Definition: vlib.h:208
PXBDetId getDetId()
return the DetId
virtual PixelModuleName::ModuleType moduleType() const
module Type