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