CMS 3D CMS Logo

PixelEndcapName.h
Go to the documentation of this file.
1 #ifndef DataFormats_TrackerCommon_PixelEndcapName_H
2 #define DataFormats_TrackerCommon_PixelEndcapName_H
3 
9 
10 #include <string>
11 #include <iostream>
12 
13 class DetId;
14 class TrackerTopology;
15 
17 public:
18  enum HalfCylinder { mO = 1, mI = 2, pO = 3, pI = 4 };
19 
21  PixelEndcapName(const DetId&, bool phase = false);
22  PixelEndcapName(const DetId&, const TrackerTopology* tt, bool phase = false);
23 
25  PixelEndcapName(HalfCylinder part = mO, int disk = 0, int blade = 0, int pannel = 0, int plaq = 0, bool phase = false)
27  thePart(part),
28  theDisk(disk),
29  theBlade(blade),
30  thePannel(pannel),
31  thePlaquette(plaq),
32  phase1(phase) {}
33 
35  PixelEndcapName(std::string name, bool phase = false);
36 
37  ~PixelEndcapName() override {}
38 
40  std::string name() const override;
41 
42  HalfCylinder halfCylinder() const { return thePart; }
43 
45  int diskName() const { return theDisk; }
46 
48  int bladeName() const { return theBlade; }
49 
51  int pannelName() const { return thePannel; }
52 
54  int plaquetteName() const { return thePlaquette; }
55 
57  int ringName() const { return thePlaquette; }
58 
60  PixelModuleName::ModuleType moduleType() const override;
61 
65 
67  bool operator==(const PixelModuleName&) const override;
68 
69 private:
72  bool phase1;
73 };
74 
75 std::ostream& operator<<(std::ostream& out, const PixelEndcapName::HalfCylinder& t);
76 #endif
PixelModuleName::ModuleType moduleType() const override
module Type
int ringName() const
ring Id
int bladeName() const
blade id
std::ostream & operator<<(std::ostream &out, const PixelEndcapName::HalfCylinder &t)
HalfCylinder thePart
~PixelEndcapName() override
PixelEndcapName(HalfCylinder part=mO, int disk=0, int blade=0, int pannel=0, int plaq=0, bool phase=false)
ctor for defined name
int diskName() const
disk id
std::string name() const override
from base class
HalfCylinder halfCylinder() const
PXFDetId getDetId()
return DetId
Definition: DetId.h:17
PixelEndcapName(const DetId &, bool phase=false)
ctor from DetId
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
part
Definition: HCALResponse.h:20
int pannelName() const
pannel id
int plaquetteName() const
plaquetteId (in pannel)