CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Phase1PixelROCMaps Class Reference

#include <Phase1PixelROCMaps.h>

Public Member Functions

void drawBarrelMaps (TCanvas &canvas)
 
void drawForwardMaps (TCanvas &canvas)
 
void drawMaps (TCanvas &canvas)
 
void fillSelectedRocs (const uint32_t &detid, const std::bitset< 16 > &theROCs, double value)
 
void fillWholeModule (const uint32_t &detid, double value)
 
std::array< std::shared_ptr< TH2D >, 4 > getLayerMaps ()
 
std::array< std::shared_ptr< TH2D >, 2 > getRingMaps ()
 
 Phase1PixelROCMaps (const char *option)
 
 ~Phase1PixelROCMaps ()
 

Protected Member Functions

bool isBPixOuterLadder (const DetId &detid, bool isPhase0)
 
int quadrant (const DetId &detid, bool phase_)
 
int ring (const DetId &detid, bool phase_)
 
int signed_blade (const DetId &detid, bool phase_)
 
int signed_blade_panel (const DetId &detid, bool phase_)
 
int signed_disk (const DetId &detid, bool phase_)
 
int signed_ladder (const DetId &detid, bool phase_)
 
int signed_module (const DetId &detid, bool phase_)
 

Private Member Functions

DetCoordinates findDetCoordinates (const uint32_t &t_detid)
 
std::vector< std::pair< int, int > > maskedBarrelRocsToBins (DetCoordinates coord)
 
std::vector< std::tuple< int, int, int > > maskedBarrelRocsToBins (DetCoordinates coord, std::bitset< 16 > myRocs)
 
std::vector< std::pair< int, int > > maskedForwardRocsToBins (DetCoordinates coord)
 
std::vector< std::tuple< int, int, int > > maskedForwardRocsToBins (DetCoordinates coord, std::bitset< 16 > myRocs)
 

Private Attributes

std::array< std::shared_ptr< TH2D >, n_layersh_bpix_maps
 
std::array< std::shared_ptr< TH2D >, n_ringsh_fpix_maps
 
Option_t * m_option
 
TrackerTopology m_trackerTopo
 
const int nlad_list [n_layers] = {6, 14, 22, 32}
 
const int nxbins_list [n_rings] = {11, 17}
 
const int nybins_list [n_rings] = {92, 140}
 

Static Private Attributes

static constexpr const char * kVerbose = "verbose"
 
static constexpr int n_layers = 4
 
static constexpr int n_rings = 2
 
static constexpr int numColumns = 416
 
static constexpr int numRows = 160
 

Detailed Description

Definition at line 80 of file Phase1PixelROCMaps.h.

Constructor & Destructor Documentation

◆ Phase1PixelROCMaps()

Phase1PixelROCMaps::Phase1PixelROCMaps ( const char *  option)
inline

Definition at line 82 of file Phase1PixelROCMaps.h.

83  : m_option{option},
85  edm::FileInPath("Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml").fullPath())} {
86  // --------------------- BOOK HISTOGRAMS
87  // barrel
88  for (unsigned int lay = 1; lay <= n_layers; lay++) {
89  int nlad = nlad_list[lay - 1];
90  std::string name = "occ_Layer_" + std::to_string(lay);
91  std::string title = "; Module # ; Ladder #";
92 
93  h_bpix_maps[lay - 1] = std::make_shared<TH2D>(
94  name.c_str(), title.c_str(), 72, -n_layers - 0.5, n_layers + 0.5, (nlad * 4 + 2), -nlad - 0.5, nlad + 0.5);
95  }
96 
97  // endcaps
98  for (unsigned int ring = 1; ring <= n_rings; ring++) {
99  int n = nybins_list[ring - 1];
100  float y = nxbins_list[ring - 1] + 0.5;
101  std::string name = "occ_ring_" + std::to_string(ring);
102  std::string title = "; Disk # ; Blade/Panel #";
103 
104  h_fpix_maps[ring - 1] =
105  std::make_shared<TH2D>(name.c_str(), title.c_str(), 56, -n_rings - 1.5, n_rings + 1.5, n, -y, y);
106  }
107  }

References fileinputsource_cfi::option.

◆ ~Phase1PixelROCMaps()

Phase1PixelROCMaps::~Phase1PixelROCMaps ( )
inline

Definition at line 109 of file Phase1PixelROCMaps.h.

109 {}

Member Function Documentation

◆ drawBarrelMaps()

void Phase1PixelROCMaps::drawBarrelMaps ( TCanvas &  canvas)

Definition at line 584 of file Phase1PixelROCMaps.cc.

586 {
587  canvas.Divide(2, 2);
588  canvas.SetBottomMargin(0.11);
589  canvas.SetLeftMargin(0.13);
590  canvas.SetRightMargin(0.05);
591  canvas.Modified();
592  for (unsigned int lay = 1; lay <= n_layers; lay++) {
593  PixelROCMapHelper::dress_plot(canvas, h_bpix_maps[lay - 1].get(), lay, 0, 1);
594  }
595 }

References svgfig::canvas(), PixelROCMapHelper::dress_plot(), get, h_bpix_maps, and n_layers.

◆ drawForwardMaps()

void Phase1PixelROCMaps::drawForwardMaps ( TCanvas &  canvas)

Definition at line 598 of file Phase1PixelROCMaps.cc.

600 {
601  canvas.Divide(2, 1);
602  canvas.SetBottomMargin(0.11);
603  canvas.SetLeftMargin(0.13);
604  canvas.SetRightMargin(0.05);
605  canvas.Modified();
606  for (unsigned int ring = 1; ring <= n_rings; ring++) {
608  }
609 }

References svgfig::canvas(), PixelROCMapHelper::dress_plot(), get, h_fpix_maps, n_rings, and ring().

◆ drawMaps()

void Phase1PixelROCMaps::drawMaps ( TCanvas &  canvas)

Definition at line 612 of file Phase1PixelROCMaps.cc.

614 {
615  canvas.Divide(2, 3);
616  canvas.SetBottomMargin(0.11);
617  canvas.SetLeftMargin(0.13);
618  canvas.SetRightMargin(0.05);
619  canvas.Modified();
620 
621  // dress the plots
622  for (unsigned int lay = 1; lay <= n_layers; lay++) {
623  PixelROCMapHelper::dress_plot(canvas, h_bpix_maps[lay - 1].get(), lay, 0, 1);
624  }
625 
626  canvas.Update();
627  canvas.Modified();
628  canvas.cd();
629 
630  for (unsigned int ring = 1; ring <= n_rings; ring++) {
632  }
633 }

References svgfig::canvas(), PixelROCMapHelper::dress_plot(), get, h_bpix_maps, h_fpix_maps, n_layers, n_rings, and ring().

◆ fillSelectedRocs()

void Phase1PixelROCMaps::fillSelectedRocs ( const uint32_t &  detid,
const std::bitset< 16 > &  theROCs,
double  value 
)

Definition at line 255 of file Phase1PixelROCMaps.cc.

257 {
258  auto coord = findDetCoordinates(detid);
259  auto rocsToMark =
260  coord.isBarrel() ? this->maskedBarrelRocsToBins(coord, theROCs) : this->maskedForwardRocsToBins(coord, theROCs);
261 
262  if (coord.isBarrel()) {
263  for (const auto& bin : rocsToMark) {
264  double x = h_bpix_maps[coord.m_layer - 1]->GetXaxis()->GetBinCenter(std::get<0>(bin));
265  double y = h_bpix_maps[coord.m_layer - 1]->GetYaxis()->GetBinCenter(std::get<1>(bin));
266  h_bpix_maps[coord.m_layer - 1]->Fill(x, y, value);
267  }
268  } else {
269  for (const auto& bin : rocsToMark) {
270  double x = h_fpix_maps[coord.m_ring - 1]->GetXaxis()->GetBinCenter(std::get<0>(bin));
271  double y = h_fpix_maps[coord.m_ring - 1]->GetYaxis()->GetBinCenter(std::get<1>(bin));
272  h_fpix_maps[coord.m_ring - 1]->Fill(x, y, value);
273  }
274  }
275 
276  return;
277 }

References newFWLiteAna::bin, findDetCoordinates(), h_bpix_maps, h_fpix_maps, maskedBarrelRocsToBins(), maskedForwardRocsToBins(), x, and y.

◆ fillWholeModule()

void Phase1PixelROCMaps::fillWholeModule ( const uint32_t &  detid,
double  value 
)

Definition at line 232 of file Phase1PixelROCMaps.cc.

234 {
235  auto coord = findDetCoordinates(detid);
236  auto rocsToMark = coord.isBarrel() ? this->maskedBarrelRocsToBins(coord) : this->maskedForwardRocsToBins(coord);
237 
238  if (coord.isBarrel()) {
239  for (const auto& bin : rocsToMark) {
240  double x = h_bpix_maps[coord.m_layer - 1]->GetXaxis()->GetBinCenter(bin.first);
241  double y = h_bpix_maps[coord.m_layer - 1]->GetYaxis()->GetBinCenter(bin.second);
242  h_bpix_maps[coord.m_layer - 1]->Fill(x, y, value);
243  }
244  } else {
245  for (const auto& bin : rocsToMark) {
246  double x = h_fpix_maps[coord.m_ring - 1]->GetXaxis()->GetBinCenter(bin.first);
247  double y = h_fpix_maps[coord.m_ring - 1]->GetYaxis()->GetBinCenter(bin.second);
248  h_fpix_maps[coord.m_ring - 1]->Fill(x, y, value);
249  }
250  }
251  return;
252 }

References newFWLiteAna::bin, findDetCoordinates(), h_bpix_maps, h_fpix_maps, maskedBarrelRocsToBins(), maskedForwardRocsToBins(), x, and y.

◆ findDetCoordinates()

DetCoordinates Phase1PixelROCMaps::findDetCoordinates ( const uint32_t &  t_detid)
private

Definition at line 8 of file Phase1PixelROCMaps.cc.

10 {
11  DetCoordinates coord;
12 
13  auto myDetId = DetId(t_detid);
14  int subid = DetId(t_detid).subdetId();
15 
16  if (subid == PixelSubdetector::PixelBarrel) {
17  coord.m_layer = m_trackerTopo.pxbLayer(myDetId);
18  coord.m_s_ladder = this->signed_ladder(myDetId, true);
19  coord.m_s_module = this->signed_module(myDetId, true);
20 
21  bool isFlipped = this->isBPixOuterLadder(myDetId, false);
22  if ((coord.m_layer > 1 && coord.m_s_module < 0))
23  isFlipped = !isFlipped;
24 
25  coord.m_isFlipped = isFlipped;
26 
27  } // if it's barrel
28  else if (subid == PixelSubdetector::PixelEndcap) {
29  coord.m_ring = this->ring(myDetId, true);
30  coord.m_s_blade = this->signed_blade(myDetId, true);
31  coord.m_s_disk = this->signed_disk(myDetId, true);
32  coord.m_panel = m_trackerTopo.pxfPanel(t_detid);
33  coord.m_isFlipped = (coord.m_s_disk > 0) ? (coord.m_panel == 1) : (coord.m_panel == 2);
34  } // it it's endcap
35  else {
36  throw cms::Exception("LogicError") << "Unknown Pixel SubDet ID " << std::endl;
37  }
38 
39  if (std::strcmp(m_option, kVerbose) == 0) {
40  coord.printCoordinates();
41  }
42 
43  return coord;
44 }

References Exception, isBPixOuterLadder(), kVerbose, DetCoordinates::m_isFlipped, DetCoordinates::m_layer, m_option, DetCoordinates::m_panel, DetCoordinates::m_ring, DetCoordinates::m_s_blade, DetCoordinates::m_s_disk, DetCoordinates::m_s_ladder, DetCoordinates::m_s_module, m_trackerTopo, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetCoordinates::printCoordinates(), TrackerTopology::pxbLayer(), TrackerTopology::pxfPanel(), ring(), signed_blade(), signed_disk(), signed_ladder(), signed_module(), and DetId::subdetId().

Referenced by fillSelectedRocs(), and fillWholeModule().

◆ getLayerMaps()

std::array<std::shared_ptr<TH2D>, 4> Phase1PixelROCMaps::getLayerMaps ( )
inline

Definition at line 118 of file Phase1PixelROCMaps.h.

118 { return h_bpix_maps; }

References h_bpix_maps.

◆ getRingMaps()

std::array<std::shared_ptr<TH2D>, 2> Phase1PixelROCMaps::getRingMaps ( )
inline

Definition at line 119 of file Phase1PixelROCMaps.h.

119 { return h_fpix_maps; }

References h_fpix_maps.

◆ isBPixOuterLadder()

bool Phase1PixelROCMaps::isBPixOuterLadder ( const DetId detid,
bool  isPhase0 
)
inlineprotected

Definition at line 239 of file Phase1PixelROCMaps.h.

239  {
240  bool isOuter = false;
241  int layer = m_trackerTopo.pxbLayer(detid.rawId());
242  bool odd_ladder = m_trackerTopo.pxbLadder(detid.rawId()) % 2;
243  if (isPhase0) {
244  if (layer == 2)
245  isOuter = !odd_ladder;
246  else
247  isOuter = odd_ladder;
248  } else {
249  if (layer == 4)
250  isOuter = odd_ladder;
251  else
252  isOuter = !odd_ladder;
253  }
254  return isOuter;
255  }

References phase1PixelTopology::layer, m_trackerTopo, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), and DetId::rawId().

Referenced by findDetCoordinates().

◆ maskedBarrelRocsToBins() [1/2]

modBins Phase1PixelROCMaps::maskedBarrelRocsToBins ( DetCoordinates  coord)
private

Definition at line 48 of file Phase1PixelROCMaps.cc.

50 {
51  modBins rocsToMask;
52  int nlad = nlad_list[coord.m_layer - 1];
53 
54  int start_x = coord.m_s_module > 0 ? ((coord.m_s_module + 4) * 8) + 1 : ((4 - (std::abs(coord.m_s_module))) * 8) + 1;
55  int start_y =
56  coord.m_s_ladder > 0 ? ((coord.m_s_ladder + nlad) * 2) + 1 : ((nlad - (std::abs(coord.m_s_ladder))) * 2) + 1;
57 
58  int end_x = start_x + 7;
59  int end_y = start_y + 1;
60 
61  for (int bin_x = 1; bin_x <= 72; bin_x++) {
62  for (int bin_y = 1; bin_y <= (nlad * 4 + 2); bin_y++) {
63  if (bin_x >= start_x && bin_x <= end_x && bin_y >= start_y && bin_y <= end_y) {
64  rocsToMask.push_back(std::make_pair(bin_x, bin_y));
65  }
66  }
67  }
68  return rocsToMask;
69 }

References funct::abs(), DetCoordinates::m_layer, DetCoordinates::m_s_ladder, DetCoordinates::m_s_module, and nlad_list.

Referenced by fillSelectedRocs(), and fillWholeModule().

◆ maskedBarrelRocsToBins() [2/2]

rocBins Phase1PixelROCMaps::maskedBarrelRocsToBins ( DetCoordinates  coord,
std::bitset< 16 >  myRocs 
)
private

Definition at line 73 of file Phase1PixelROCMaps.cc.

75 {
76  rocBins rocsToMask;
77  int nlad = nlad_list[coord.m_layer - 1];
78 
79  int start_x = coord.m_s_module > 0 ? ((coord.m_s_module + 4) * 8) + 1 : ((4 - (std::abs(coord.m_s_module))) * 8) + 1;
80  int start_y =
81  coord.m_s_ladder > 0 ? ((coord.m_s_ladder + nlad) * 2) + 1 : ((nlad - (std::abs(coord.m_s_ladder))) * 2) + 1;
82 
83  int roc0_x = ((coord.m_layer == 1) || (coord.m_layer > 1 && coord.m_s_module > 0)) ? start_x + 7 : start_x;
84  int roc0_y = start_y - 1;
85 
86  size_t idx = 0;
87  while (idx < myRocs.size()) {
88  if (myRocs.test(idx)) {
90  // | //
91  // In BPix Layer1 and module>0 in L2,3,4 | In BPix Layer 2,3,4 module > 0 //
92  // | //
93  // ROCs are ordered in the following | ROCs are ordered in the following //
94  // fashion for unplipped modules | fashion for unplipped modules //
95  // | //
96  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
97  // | 8 |9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | //
98  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
99  // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | //
100  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
101  // | //
102  // if the module is flipped the ordering | if the module is flipped the ordering //
103  // is reveresed | is reversed //
104  // | //
105  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
106  // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | //
107  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
108  // | 8 | 9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | //
109  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
111 
112  int roc_x(0), roc_y(0);
113 
114  if ((coord.m_layer == 1) || (coord.m_layer > 1 && coord.m_s_module > 0)) {
115  if (!coord.m_isFlipped) {
116  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
117  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
118  } else {
119  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
120  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
121  }
122  } else {
123  if (!coord.m_isFlipped) {
124  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
125  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
126  } else {
127  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
128  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
129  }
130  }
131  rocsToMask.push_back(std::make_tuple(roc_x, roc_y, idx));
132  }
133  ++idx;
134  }
135  return rocsToMask;
136 }

References funct::abs(), heavyIonCSV_trainingSettings::idx, DetCoordinates::m_isFlipped, DetCoordinates::m_layer, DetCoordinates::m_s_ladder, DetCoordinates::m_s_module, and nlad_list.

◆ maskedForwardRocsToBins() [1/2]

modBins Phase1PixelROCMaps::maskedForwardRocsToBins ( DetCoordinates  coord)
private

Definition at line 140 of file Phase1PixelROCMaps.cc.

142 {
143  modBins rocsToMask;
144  int nybins = nybins_list[coord.m_ring - 1];
145 
146  int start_x = coord.m_s_disk > 0 ? ((coord.m_s_disk + 3) * 8) + 1 : ((3 - (std::abs(coord.m_s_disk))) * 8) + 1;
147  int start_y = coord.m_s_blade > 0 ? (nybins / 2) + (coord.m_s_blade * 4) - (coord.m_panel * 2) + 3
148  : ((nybins / 2) - (std::abs(coord.m_s_blade) * 4) - coord.m_panel * 2) + 3;
149 
150  int end_x = start_x + 7;
151  int end_y = start_y + 1;
152 
153  for (int bin_x = 1; bin_x <= 56; bin_x++) {
154  for (int bin_y = 1; bin_y <= nybins; bin_y++) {
155  if (bin_x >= start_x && bin_x <= end_x && bin_y >= start_y && bin_y <= end_y) {
156  rocsToMask.push_back(std::make_pair(bin_x, bin_y));
157  }
158  }
159  }
160  return rocsToMask;
161 }

References funct::abs(), DetCoordinates::m_panel, DetCoordinates::m_ring, DetCoordinates::m_s_blade, DetCoordinates::m_s_disk, and nybins_list.

Referenced by fillSelectedRocs(), and fillWholeModule().

◆ maskedForwardRocsToBins() [2/2]

rocBins Phase1PixelROCMaps::maskedForwardRocsToBins ( DetCoordinates  coord,
std::bitset< 16 >  myRocs 
)
private

Definition at line 165 of file Phase1PixelROCMaps.cc.

167 {
168  rocBins rocsToMask;
169  int nybins = nybins_list[coord.m_ring - 1];
170 
171  int start_x = coord.m_s_disk > 0 ? ((coord.m_s_disk + 3) * 8) + 1 : ((3 - (std::abs(coord.m_s_disk))) * 8) + 1;
172  int start_y = coord.m_s_blade > 0 ? (nybins / 2) + (coord.m_s_blade * 4) - (coord.m_panel * 2) + 3
173  : ((nybins / 2) - (std::abs(coord.m_s_blade) * 4) - coord.m_panel * 2) + 3;
174 
175  int roc0_x = coord.m_s_disk > 0 ? start_x + 7 : start_x;
176  int roc0_y = start_y - 1;
177 
178  size_t idx = 0;
179  while (idx < myRocs.size()) {
180  if (myRocs.test(idx)) {
181  int roc_x(0), roc_y(0);
182 
184  // | //
185  // In FPix + (Disk 1,2,3) | In FPix - (Disk -1,-2,-3) //
186  // | //
187  // ROCs are ordered in the following | ROCs are ordered in the following //
188  // fashion for unplipped modules | fashion for unplipped modules //
189  // | //
190  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
191  // | 8 |9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | //
192  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
193  // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | //
194  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
195  // | //
196  // if the module is flipped the ordering | if the module is flipped the ordering //
197  // is reveresed | is reversed //
198  // | //
199  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
200  // | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | //
201  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
202  // | 8 | 9 |10 |11 |12 |13 |14 |15 | | |15 |14 |13 |12 |11 |10 | 9 | 8 | //
203  // +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ //
205 
206  if (coord.m_s_disk > 0) {
207  if (!coord.m_isFlipped) {
208  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
209  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
210  } else {
211  roc_x = idx < 8 ? roc0_x - idx : (start_x - 8) + idx;
212  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
213  }
214  } else {
215  if (!coord.m_isFlipped) {
216  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
217  roc_y = idx < 8 ? roc0_y + 1 : roc0_y + 2;
218  } else {
219  roc_x = idx < 8 ? roc0_x + idx : (roc0_x + 7) - (idx - 8);
220  roc_y = idx < 8 ? roc0_y + 2 : roc0_y + 1;
221  }
222  }
223 
224  rocsToMask.push_back(std::make_tuple(roc_x, roc_y, idx));
225  }
226  ++idx;
227  }
228  return rocsToMask;
229 }

References funct::abs(), heavyIonCSV_trainingSettings::idx, DetCoordinates::m_isFlipped, DetCoordinates::m_panel, DetCoordinates::m_ring, DetCoordinates::m_s_blade, DetCoordinates::m_s_disk, and nybins_list.

◆ quadrant()

int Phase1PixelROCMaps::quadrant ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 154 of file Phase1PixelROCMaps.h.

154  {
155  if (detid.subdetId() == PixelSubdetector::PixelBarrel) {
156  return PixelBarrelName(detid, &m_trackerTopo, phase_).shell();
157  } else {
158  return PixelEndcapName(detid, &m_trackerTopo, phase_).halfCylinder();
159  }
160  }

References PixelEndcapName::halfCylinder(), m_trackerTopo, PixelSubdetector::PixelBarrel, PixelBarrelName::shell(), and DetId::subdetId().

Referenced by signed_blade(), signed_disk(), signed_ladder(), and signed_module().

◆ ring()

int Phase1PixelROCMaps::ring ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 193 of file Phase1PixelROCMaps.h.

193  {
195  return -9999;
196  int ring = -9999;
197  if (phase_ == 0) {
198  ring = 1 + (m_trackerTopo.pxfPanel(detid) + m_trackerTopo.pxfModule(detid) > 3);
199  } else if (phase_ == 1) {
200  ring = PixelEndcapName(detid, &m_trackerTopo, phase_).ringName();
201  }
202  return ring;
203  }

References m_trackerTopo, PixelSubdetector::PixelEndcap, TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), PixelEndcapName::ringName(), and DetId::subdetId().

Referenced by drawForwardMaps(), drawMaps(), findDetCoordinates(), and geometryXMLparser.CSCAlignable::index().

◆ signed_blade()

int Phase1PixelROCMaps::signed_blade ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 208 of file Phase1PixelROCMaps.h.

208  {
210  return -9999;
211  int signed_blade = PixelEndcapName(detid, &m_trackerTopo, phase_).bladeName();
212  if (quadrant(detid, phase_) % 2)
213  signed_blade *= -1;
214  return signed_blade;
215  }

References PixelEndcapName::bladeName(), m_trackerTopo, PixelSubdetector::PixelEndcap, quadrant(), and DetId::subdetId().

Referenced by findDetCoordinates(), and signed_blade_panel().

◆ signed_blade_panel()

int Phase1PixelROCMaps::signed_blade_panel ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 218 of file Phase1PixelROCMaps.h.

218  {
220  return -9999;
221  int signed_blade_panel = signed_blade(detid, phase_) + (m_trackerTopo.pxfPanel(detid) - 1);
222  return signed_blade_panel;
223  }

References m_trackerTopo, PixelSubdetector::PixelEndcap, TrackerTopology::pxfPanel(), signed_blade(), and DetId::subdetId().

◆ signed_disk()

int Phase1PixelROCMaps::signed_disk ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 228 of file Phase1PixelROCMaps.h.

228  {
230  return -9999;
231  int signed_disk = m_trackerTopo.pxfDisk(DetId(detid));
232  if (quadrant(detid, phase_) < 3)
233  signed_disk *= -1;
234  return signed_disk;
235  }

References m_trackerTopo, PixelSubdetector::PixelEndcap, TrackerTopology::pxfDisk(), quadrant(), and DetId::subdetId().

Referenced by findDetCoordinates().

◆ signed_ladder()

int Phase1PixelROCMaps::signed_ladder ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 165 of file Phase1PixelROCMaps.h.

165  {
167  return -9999;
168  int signed_ladder = PixelBarrelName(detid, &m_trackerTopo, phase_).ladderName();
169  if (quadrant(detid, phase_) % 2)
170  signed_ladder *= -1;
171  return signed_ladder;
172  }

References PixelBarrelName::ladderName(), m_trackerTopo, PixelSubdetector::PixelBarrel, quadrant(), and DetId::subdetId().

Referenced by findDetCoordinates().

◆ signed_module()

int Phase1PixelROCMaps::signed_module ( const DetId detid,
bool  phase_ 
)
inlineprotected

Definition at line 177 of file Phase1PixelROCMaps.h.

177  {
179  return -9999;
180  int signed_module = PixelBarrelName(detid, &m_trackerTopo, phase_).moduleName();
181  if (quadrant(detid, phase_) < 3)
182  signed_module *= -1;
183  return signed_module;
184  }

References m_trackerTopo, PixelBarrelName::moduleName(), PixelSubdetector::PixelBarrel, quadrant(), and DetId::subdetId().

Referenced by findDetCoordinates().

Member Data Documentation

◆ h_bpix_maps

std::array<std::shared_ptr<TH2D>, n_layers> Phase1PixelROCMaps::h_bpix_maps
private

◆ h_fpix_maps

std::array<std::shared_ptr<TH2D>, n_rings> Phase1PixelROCMaps::h_fpix_maps
private

◆ kVerbose

constexpr const char* Phase1PixelROCMaps::kVerbose = "verbose"
staticconstexprprivate

Definition at line 140 of file Phase1PixelROCMaps.h.

Referenced by findDetCoordinates().

◆ m_option

Option_t* Phase1PixelROCMaps::m_option
private

Definition at line 122 of file Phase1PixelROCMaps.h.

Referenced by findDetCoordinates().

◆ m_trackerTopo

TrackerTopology Phase1PixelROCMaps::m_trackerTopo
private

◆ n_layers

constexpr int Phase1PixelROCMaps::n_layers = 4
staticconstexprprivate

Definition at line 129 of file Phase1PixelROCMaps.h.

Referenced by drawBarrelMaps(), and drawMaps().

◆ n_rings

constexpr int Phase1PixelROCMaps::n_rings = 2
staticconstexprprivate

Definition at line 128 of file Phase1PixelROCMaps.h.

Referenced by drawForwardMaps(), and drawMaps().

◆ nlad_list

const int Phase1PixelROCMaps::nlad_list[n_layers] = {6, 14, 22, 32}
private

Definition at line 131 of file Phase1PixelROCMaps.h.

Referenced by maskedBarrelRocsToBins().

◆ numColumns

constexpr int Phase1PixelROCMaps::numColumns = 416
staticconstexprprivate

Definition at line 126 of file Phase1PixelROCMaps.h.

◆ numRows

constexpr int Phase1PixelROCMaps::numRows = 160
staticconstexprprivate

Definition at line 127 of file Phase1PixelROCMaps.h.

◆ nxbins_list

const int Phase1PixelROCMaps::nxbins_list[n_rings] = {11, 17}
private

Definition at line 133 of file Phase1PixelROCMaps.h.

◆ nybins_list

const int Phase1PixelROCMaps::nybins_list[n_rings] = {92, 140}
private

Definition at line 132 of file Phase1PixelROCMaps.h.

Referenced by maskedForwardRocsToBins().

DetCoordinates::m_s_disk
int m_s_disk
Definition: Phase1PixelROCMaps.h:47
svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
DDAxes::y
PixelROCMapHelper::dress_plot
void dress_plot(TCanvas &canv, TH2 *h, int lay, int ring, int phase, bool half_shift, bool mark_zero, bool standard_palette)
Definition: Phase1PixelROCMaps.cc:293
Phase1PixelROCMaps::h_fpix_maps
std::array< std::shared_ptr< TH2D >, n_rings > h_fpix_maps
Definition: Phase1PixelROCMaps.h:137
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
Phase1PixelROCMaps::ring
int ring(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:193
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
modBins
std::vector< std::pair< int, int > > modBins
Definition: Phase1PixelROCMaps.cc:3
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
rocBins
std::vector< std::tuple< int, int, int > > rocBins
Definition: Phase1PixelROCMaps.cc:4
PixelBarrelName
Definition: PixelBarrelName.h:16
DetCoordinates::m_panel
int m_panel
Definition: Phase1PixelROCMaps.h:48
PixelEndcapName::halfCylinder
HalfCylinder halfCylinder() const
Definition: PixelEndcapName.h:42
DDAxes::x
Phase1PixelROCMaps::signed_blade
int signed_blade(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:208
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:94
PixelEndcapName::bladeName
int bladeName() const
blade id
Definition: PixelEndcapName.h:48
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
Phase1PixelROCMaps::nybins_list
const int nybins_list[n_rings]
Definition: Phase1PixelROCMaps.h:132
DetId
Definition: DetId.h:17
edm::FileInPath
Definition: FileInPath.h:64
DetCoordinates::m_isFlipped
bool m_isFlipped
Definition: Phase1PixelROCMaps.h:49
PixelEndcapName
Definition: PixelEndcapName.h:16
Phase1PixelROCMaps::m_trackerTopo
TrackerTopology m_trackerTopo
Definition: Phase1PixelROCMaps.h:123
DetCoordinates::m_s_blade
int m_s_blade
Definition: Phase1PixelROCMaps.h:46
Phase1PixelROCMaps::quadrant
int quadrant(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:154
Phase1PixelROCMaps::maskedForwardRocsToBins
std::vector< std::pair< int, int > > maskedForwardRocsToBins(DetCoordinates coord)
Definition: Phase1PixelROCMaps.cc:140
DetCoordinates::m_s_ladder
int m_s_ladder
Definition: Phase1PixelROCMaps.h:43
PixelBarrelName::ladderName
int ladderName() const
ladder id (index in phi)
Definition: PixelBarrelName.h:49
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
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Phase1PixelROCMaps::signed_ladder
int signed_ladder(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:165
Phase1PixelROCMaps::h_bpix_maps
std::array< std::shared_ptr< TH2D >, n_layers > h_bpix_maps
Definition: Phase1PixelROCMaps.h:136
PixelBarrelName::shell
Shell shell() const
Definition: PixelBarrelName.h:40
Phase1PixelROCMaps::nxbins_list
const int nxbins_list[n_rings]
Definition: Phase1PixelROCMaps.h:133
TrackerTopology::pxfModule
unsigned int pxfModule(const DetId &id) const
Definition: TrackerTopology.h:163
value
Definition: value.py:1
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
Phase1PixelROCMaps::signed_module
int signed_module(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:177
DetCoordinates::printCoordinates
void printCoordinates()
Definition: Phase1PixelROCMaps.h:63
Phase1PixelROCMaps::n_layers
static constexpr int n_layers
Definition: Phase1PixelROCMaps.h:129
PixelBarrelName::moduleName
int moduleName() const
module id (index in z)
Definition: PixelBarrelName.h:46
get
#define get
Phase1PixelROCMaps::signed_disk
int signed_disk(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:228
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
Phase1PixelROCMaps::maskedBarrelRocsToBins
std::vector< std::pair< int, int > > maskedBarrelRocsToBins(DetCoordinates coord)
Definition: Phase1PixelROCMaps.cc:48
DetCoordinates::m_s_module
int m_s_module
Definition: Phase1PixelROCMaps.h:44
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Exception
Definition: hltDiff.cc:245
Phase1PixelROCMaps::kVerbose
static constexpr const char * kVerbose
Definition: Phase1PixelROCMaps.h:140
Phase1PixelROCMaps::findDetCoordinates
DetCoordinates findDetCoordinates(const uint32_t &t_detid)
Definition: Phase1PixelROCMaps.cc:8
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DetCoordinates::m_ring
int m_ring
Definition: Phase1PixelROCMaps.h:45
Phase1PixelROCMaps::isBPixOuterLadder
bool isBPixOuterLadder(const DetId &detid, bool isPhase0)
Definition: Phase1PixelROCMaps.h:239
Phase1PixelROCMaps::m_option
Option_t * m_option
Definition: Phase1PixelROCMaps.h:122
DetCoordinates
Definition: Phase1PixelROCMaps.h:41
DetCoordinates::m_layer
int m_layer
Definition: Phase1PixelROCMaps.h:42
StandaloneTrackerTopology::fromTrackerParametersXMLFile
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
Definition: StandaloneTrackerTopology.cc:168
Phase1PixelROCMaps::nlad_list
const int nlad_list[n_layers]
Definition: Phase1PixelROCMaps.h:131
Phase1PixelROCMaps::signed_blade_panel
int signed_blade_panel(const DetId &detid, bool phase_)
Definition: Phase1PixelROCMaps.h:218
PixelEndcapName::ringName
int ringName() const
ring Id
Definition: PixelEndcapName.h:57
Phase1PixelROCMaps::n_rings
static constexpr int n_rings
Definition: Phase1PixelROCMaps.h:128