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 
19  enum HalfCylinder { mO = 1, mI = 2 , pO =3 , pI =4 };
20 
22  PixelEndcapName(const DetId &, bool phase=false);
23  PixelEndcapName(const DetId &, const TrackerTopology* tt, bool phase=false);
24 
26  PixelEndcapName( HalfCylinder part = mO, int disk =0, int blade =0, int pannel=0,
27  int plaq=0, bool phase=false)
29  thePart(part), theDisk(disk), theBlade(blade), thePannel(pannel),
30  thePlaquette(plaq), phase1(phase)
31  { }
32 
35 
36  virtual ~PixelEndcapName() { }
37 
39  virtual std::string name() const;
40 
41  HalfCylinder halfCylinder() const { return thePart; }
42 
44  int diskName() const { return theDisk; }
45 
47  int bladeName() const { return theBlade; }
48 
50  int pannelName() const { return thePannel; }
51 
53  int plaquetteName() const { return thePlaquette; }
54 
56  int ringName() const { return thePlaquette; }
57 
60 
62  PXFDetId getDetId();
63  DetId getDetId(const TrackerTopology* tt);
64 
66  virtual bool operator== (const PixelModuleName &) const;
67 
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)
virtual ~PixelEndcapName()
std::ostream & operator<<(std::ostream &out, const PixelEndcapName::HalfCylinder &t)
HalfCylinder thePart
int bladeName() const
blade id
virtual bool operator==(const PixelModuleName &) const
check equality of modules from datamemebers
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
part
Definition: HCALResponse.h:20
virtual PixelModuleName::ModuleType moduleType() const
module Type
virtual std::string name() const
from base class
int pannelName() const
pannel id
int diskName() const
disk id
int ringName() const
ring Id
HalfCylinder halfCylinder() const