CMS 3D CMS Logo

PixelEndcapName.h
Go to the documentation of this file.
1 #ifndef SiPixelDetId_PixelEndcapName_H
2 #define SiPixelDetId_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 
64  DetId getDetId(const TrackerTopology* tt);
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
int plaquetteName() const
plaquetteId (in pannel)
bool operator==(const PixelModuleName &) const override
check equality of modules from datamemebers
std::ostream & operator<<(std::ostream &out, const PixelEndcapName::HalfCylinder &t)
HalfCylinder thePart
std::string name() const override
from base class
~PixelEndcapName() override
int bladeName() const
blade id
PixelEndcapName(HalfCylinder part=mO, int disk=0, int blade=0, int pannel=0, int plaq=0, bool phase=false)
ctor for defined name
PXFDetId getDetId()
return DetId
Definition: DetId.h:18
PixelEndcapName(const DetId &, bool phase=false)
ctor from DetId
PixelModuleName::ModuleType moduleType() const override
module Type
part
Definition: HCALResponse.h:20
int pannelName() const
pannel id
int diskName() const
disk id
int ringName() const
ring Id
HalfCylinder halfCylinder() const