CMS 3D CMS Logo

Classes | Enumerations | Functions | Variables
PixelRegions Namespace Reference

Classes

class  PixelRegionContainers
 

Enumerations

enum  PixelId {
  L1 = 1100, L2 = 1200, L3 = 1300, L4 = 1400,
  Rm1l = 2111, Rm1u = 2112, Rm2l = 2121, Rm2u = 2122,
  Rm3l = 2131, Rm3u = 2132, Rp1l = 2211, Rp1u = 2212,
  Rp2l = 2221, Rp2u = 2222, Rp3l = 2231, Rp3u = 2232,
  End = 99999
}
 

Functions

const std::vector< uint32_t > attachedDets (const PixelRegions::PixelId theId, const TrackerTopology *trackTopo, const bool phase1)
 
static const PixelId calculateBPixID (const unsigned int layer)
 
static const PixelId calculateFPixID (const unsigned int side, const unsigned int disk, const unsigned int ring)
 
static const PixelId detIdToPixelId (const unsigned int detid, const TrackerTopology *trackTopo, const bool phase1)
 
std::string itoa (int i)
 

Variables

const std::vector< std::string > IDlabels
 
const std::vector< PixelIdPixelIDs
 

Enumeration Type Documentation

◆ PixelId

Enumerator
L1 
L2 
L3 
L4 
Rm1l 
Rm1u 
Rm2l 
Rm2u 
Rm3l 
Rm3u 
Rp1l 
Rp1u 
Rp2l 
Rp2u 
Rp3l 
Rp3u 
End 

Definition at line 26 of file PixelRegionContainers.h.

26  {
27  L1 = 1100, // BPix
28  L2 = 1200,
29  L3 = 1300,
30  L4 = 1400,
31  Rm1l = 2111, // FPix minus
32  Rm1u = 2112,
33  Rm2l = 2121,
34  Rm2u = 2122,
35  Rm3l = 2131,
36  Rm3u = 2132,
37  Rp1l = 2211, // FPix plus
38  Rp1u = 2212,
39  Rp2l = 2221,
40  Rp2u = 2222,
41  Rp3l = 2231,
42  Rp3u = 2232,
43  End = 99999
44  };

Function Documentation

◆ attachedDets()

const std::vector<uint32_t> PixelRegions::attachedDets ( const PixelRegions::PixelId  theId,
const TrackerTopology trackTopo,
const bool  phase1 
)

Definition at line 119 of file PixelRegionContainers.h.

121  {
122  std::vector<uint32_t> out = {};
123  edm::FileInPath m_fp;
124  if (phase1) {
125  // phase-1 skimmed geometry from release
126  m_fp = edm::FileInPath("SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt");
127  } else {
128  // phase-0 skimmed geometry from release
129  m_fp = edm::FileInPath("CalibTracker/SiPixelESProducers/data/PixelSkimmedGeometry.txt");
130  }
131 
132  SiPixelDetInfoFileReader pxlreader(m_fp.fullPath());
133  const std::vector<uint32_t>& pxldetids = pxlreader.getAllDetIds();
134  for (const auto& d : pxldetids) {
135  auto ID = detIdToPixelId(d, trackTopo, phase1);
136  if (ID == theId) {
137  out.push_back(d);
138  }
139  }
140 
141  // in case no DetIds are assigned, fill with UINT32_MAX
142  // in order to be able to tell a part the default case
143  // in SiPixelGainCalibHelper::fillTheHitsto
144  if (out.empty()) {
145  out.push_back(0xFFFFFFFF);
146  }
147 
148  COUT << "ID:" << theId << " ";
149  for (const auto& entry : out) {
150  COUT << entry << ",";
151  }
152  COUT << std::endl;
153 
154  return out;
155  }

References COUT, ztail::d, detIdToPixelId(), mps_splice::entry, edm::FileInPath::fullPath(), SiPixelDetInfoFileReader::getAllDetIds(), and MillePedeFileConverter_cfg::out.

Referenced by gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >::fill().

◆ calculateBPixID()

static const PixelId PixelRegions::calculateBPixID ( const unsigned int  layer)
static

Definition at line 83 of file PixelRegionContainers.h.

83  {
84  // BPix: 1000*(subdetId=1) + 100*(layer=1,2,3,4)
85  PixelId bpixLayer = static_cast<PixelId>(1000 + 100 * layer);
86  return bpixLayer;
87  }

Referenced by detIdToPixelId().

◆ calculateFPixID()

static const PixelId PixelRegions::calculateFPixID ( const unsigned int  side,
const unsigned int  disk,
const unsigned int  ring 
)
static

Definition at line 90 of file PixelRegionContainers.h.

90  {
91  // FPix: 1000*(subdetId=2) + 100*(side=1,2) + 10*(disk=1,2,3) + 1*(ring=1,2)
92  PixelId fpixRing = static_cast<PixelId>(2000 + 100 * side + 10 * disk + ring);
93  return fpixRing;
94  }

References relativeConstraints::ring.

Referenced by detIdToPixelId().

◆ detIdToPixelId()

static const PixelId PixelRegions::detIdToPixelId ( const unsigned int  detid,
const TrackerTopology trackTopo,
const bool  phase1 
)
static

Definition at line 97 of file PixelRegionContainers.h.

97  {
98  DetId detId = DetId(detid);
99  unsigned int subid = detId.subdetId();
100  unsigned int pixid = 0;
101  if (subid == PixelSubdetector::PixelBarrel) {
102  PixelBarrelName bpix(detId, trackTopo, phase1);
103  int layer = bpix.layerName();
104  pixid = calculateBPixID(layer);
105  } else if (subid == PixelSubdetector::PixelEndcap) {
106  PixelEndcapName fpix(detId, trackTopo, phase1);
107  int side = trackTopo->pxfSide(detId); // 1 (-z), 2 for (+z)
108  int disk = fpix.diskName(); //trackTopo->pxfDisk(detId); // 1, 2, 3
109  // This works only in case of the Phase-1 detector
110  //int ring = fpix.ringName(); // 1 (lower), 2 (upper)
111  int ring = SiPixelPI::ring(detid, *trackTopo, phase1); // 1 (lower), 2 (upper)
112  pixid = calculateFPixID(side, disk, ring);
113  }
114  PixelId pixID = static_cast<PixelId>(pixid);
115  return pixID;
116  }

References calculateBPixID(), calculateFPixID(), PixelEndcapName::diskName(), PixelBarrelName::layerName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxfSide(), relativeConstraints::ring, SiPixelPI::ring(), and DetId::subdetId().

Referenced by attachedDets(), and PixelRegions::PixelRegionContainers::fill().

◆ itoa()

std::string PixelRegions::itoa ( int  i)

Definition at line 16 of file PixelRegionContainers.h.

16  {
17  char temp[20];
18  sprintf(temp, "%d", i);
19  return ((std::string)temp);
20  }

References mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, and groupFilesInBlocks::temp.

Referenced by PixelRegions::PixelRegionContainers::bookAll().

Variable Documentation

◆ IDlabels

const std::vector<std::string> PixelRegions::IDlabels
Initial value:
= {"Barrel Pixel L1",
"Barrel Pixel L2",
"Barrel Pixel L3",
"Barrel Pixel L4",
"FPIX(-) Disk 1 inner ring",
"FPIX(-) Disk 1 outer ring",
"FPIX(-) Disk 2 inner ring",
"FPIX(-) Disk 2 outer ring",
"FPIX(-) Disk 3 inner ring",
"FPIX(-) Disk 3 outer ring",
"FPIX(+) Disk 1 inner ring",
"FPIX(+) Disk 1 outer ring",
"FPIX(+) Disk 2 inner ring",
"FPIX(+) Disk 2 outer ring",
"FPIX(+) Disk 3 inner ring",
"FPIX(+) Disk 3 outer ring",
"END"}

Definition at line 64 of file PixelRegionContainers.h.

Referenced by PixelRegions::PixelRegionContainers::bookAll(), and gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >::fill().

◆ PixelIDs

const std::vector<PixelId> PixelRegions::PixelIDs
PixelRegions::L3
Definition: PixelRegionContainers.h:29
SiPixelDetInfoFileReader::getAllDetIds
const std::vector< uint32_t > & getAllDetIds() const
Definition: SiPixelDetInfoFileReader.cc:85
PixelRegions::L1
Definition: PixelRegionContainers.h:27
mps_fire.i
i
Definition: mps_fire.py:355
PixelRegions::L2
Definition: PixelRegionContainers.h:28
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
SiPixelPI::ring
int ring(const DetId &detid, const TrackerTopology &tTopo_, bool phase_)
Definition: SiPixelPayloadInspectorHelper.h:93
mps_splice.entry
entry
Definition: mps_splice.py:68
PixelRegions::Rm1l
Definition: PixelRegionContainers.h:31
PixelRegions::Rp1l
Definition: PixelRegionContainers.h:37
PixelRegions::Rp3u
Definition: PixelRegionContainers.h:42
PixelBarrelName
Definition: PixelBarrelName.h:16
PixelRegions::PixelId
PixelId
Definition: PixelRegionContainers.h:26
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
DetId
Definition: DetId.h:17
SiPixelDetInfoFileReader
Definition: SiPixelDetInfoFileReader.h:28
edm::FileInPath
Definition: FileInPath.h:64
PixelRegions::Rp1u
Definition: PixelRegionContainers.h:38
PixelEndcapName
Definition: PixelEndcapName.h:16
PixelRegions::calculateFPixID
static const PixelId calculateFPixID(const unsigned int side, const unsigned int disk, const unsigned int ring)
Definition: PixelRegionContainers.h:90
PixelRegions::Rp2u
Definition: PixelRegionContainers.h:40
PixelRegions::Rm2l
Definition: PixelRegionContainers.h:33
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PixelRegions::Rp3l
Definition: PixelRegionContainers.h:41
PixelRegions::Rm2u
Definition: PixelRegionContainers.h:34
align::ID
uint32_t ID
Definition: Definitions.h:24
PixelRegions::Rm3u
Definition: PixelRegionContainers.h:36
PixelRegions::L4
Definition: PixelRegionContainers.h:30
PixelRegions::Rm1u
Definition: PixelRegionContainers.h:32
PixelRegions::calculateBPixID
static const PixelId calculateBPixID(const unsigned int layer)
Definition: PixelRegionContainers.h:83
PixelRegions::Rm3l
Definition: PixelRegionContainers.h:35
COUT
#define COUT
Definition: PVValidationHelpers.h:13
PixelRegions::detIdToPixelId
static const PixelId detIdToPixelId(const unsigned int detid, const TrackerTopology *trackTopo, const bool phase1)
Definition: PixelRegionContainers.h:97
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
PixelRegions::End
Definition: PixelRegionContainers.h:43
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
ztail.d
d
Definition: ztail.py:151
PixelRegions::Rp2l
Definition: PixelRegionContainers.h:39
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163