File indexing completed on 2021-02-14 12:54:41
0001 #ifndef SiPixelDetId_PixelEndcapNameUpgrade_H
0002 #define SiPixelDetId_PixelEndcapNameUpgrade_H
0003
0004
0005
0006
0007
0008 #include "DataFormats/SiPixelDetId/interface/PixelModuleName.h"
0009
0010 #include <string>
0011 #include <iostream>
0012 #include "DataFormats/SiPixelDetId/interface/PXFDetId.h"
0013
0014 class DetId;
0015
0016 class PixelEndcapNameUpgrade : public PixelModuleName {
0017 public:
0018 enum HalfCylinder { mO = 1, mI = 2, pO = 3, pI = 4 };
0019
0020
0021 PixelEndcapNameUpgrade(const DetId &);
0022
0023
0024 PixelEndcapNameUpgrade(HalfCylinder part = mO, int disk = 0, int blade = 0, int pannel = 0, int plaq = 0)
0025 : PixelModuleName(false), thePart(part), theDisk(disk), theBlade(blade), thePannel(pannel), thePlaquette(plaq) {}
0026
0027
0028 PixelEndcapNameUpgrade(std::string name);
0029
0030 ~PixelEndcapNameUpgrade() override {}
0031
0032
0033 std::string name() const override;
0034
0035 HalfCylinder halfCylinder() const { return thePart; }
0036
0037
0038 int diskName() const { return theDisk; }
0039
0040
0041 int bladeName() const { return theBlade; }
0042
0043
0044 int pannelName() const { return thePannel; }
0045
0046
0047 int plaquetteName() const { return thePlaquette; }
0048
0049
0050 PixelModuleName::ModuleType moduleType() const override;
0051
0052
0053 PXFDetId getDetId();
0054
0055
0056 bool operator==(const PixelModuleName &) const override;
0057
0058 private:
0059 HalfCylinder thePart;
0060 int theDisk, theBlade, thePannel, thePlaquette;
0061 };
0062
0063 std::ostream &operator<<(std::ostream &out, const PixelEndcapNameUpgrade::HalfCylinder &t);
0064 #endif