CMS 3D CMS Logo

PixelBaryCentreAnalyzer.cc
Go to the documentation of this file.
1 
17 // Framework
25 
26 // Phase-1 Pixel
33 
34 // pixel quality
37 // global postion
40 // tracker alignment
43 // beamspot
46 
47 // Point and Vector
50 
51 // TFileService
54 
55 // ROOT
56 #include "TTree.h"
57 #include "TString.h"
58 
59 //
60 // class declaration
61 //
62 
63 class PixelBaryCentreAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
64 public:
66  ~PixelBaryCentreAnalyzer() override = default;
67 
68  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
69 
70  struct SimplePoint {
71  float x, y, z;
72  SimplePoint(const GlobalPoint& p) : x(p.x()), y(p.y()), z(p.z()) {}
73  SimplePoint() : x(0), y(0), z(0) {}
74  };
75  static const unsigned int nPixelLayers = 4;
76  static const unsigned int nPixelDiscs = 3;
77 
78 private:
79  void beginJob() override;
80  void analyze(const edm::Event&, const edm::EventSetup&) override;
81  void endJob() override;
82 
83  void initBC();
84  void initBS();
85 
86  const bool usePixelQuality_;
87  int phase_;
88 
89  // ----------member data ---------------------------
92 
93  // labels of TkAlign tags
94  std::vector<std::string> bcLabels_;
95  // labels of beamspot tags
96  std::vector<std::string> bsLabels_;
97 
101 
103  std::map<std::string, edm::ESGetToken<Alignments, TrackerAlignmentRcd>> tkAlignTokens_;
104  std::map<std::string, edm::ESGetToken<BeamSpotObjects, BeamSpotObjectsRcd>> bsTokens_;
105 
106  // tree content
107  int run_;
108  int ls_;
109 
111 
114 
119 
123 
125 
128 
133 
137 
139  std::map<std::string, TTree*> bcTrees_;
140  std::map<std::string, TTree*> bsTrees_;
141 };
142 
143 //
144 // constructors and destructor
145 //
147  : usePixelQuality_(iConfig.getUntrackedParameter<bool>("usePixelQuality")),
148  bcLabels_(iConfig.getUntrackedParameter<std::vector<std::string>>("tkAlignLabels")),
149  bsLabels_(iConfig.getUntrackedParameter<std::vector<std::string>>("beamSpotLabels")),
150  trackerGeometryToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()),
151  trackerTopologyToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
152  siPixelQualityToken_(esConsumes<SiPixelQuality, SiPixelQualityFromDbRcd>()),
153  gprToken_(esConsumes<Alignments, GlobalPositionRcd>()) {
154  for (const auto& label : bcLabels_) {
155  bcTrees_[label] = nullptr;
156  tkAlignTokens_[label] = esConsumes<Alignments, TrackerAlignmentRcd>(edm::ESInputTag{"", label});
157  }
158 
159  for (const auto& label : bsLabels_) {
160  bsTrees_[label] = nullptr;
161  bsTokens_[label] = esConsumes<BeamSpotObjects, BeamSpotObjectsRcd>(edm::ESInputTag{"", label});
162  }
163 
164  usesResource("TFileService");
165 }
166 
167 //
168 // member functions
169 //
170 
172  double dummy_float = 999999.0;
173 
174  BS_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
175  vBS_ = SimplePoint(BS_);
176 }
177 
179  // init to large number (unreasonable number) not zero
180  double dummy_float = 999999.0;
181 
182  PIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
183  BPIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
184  FPIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
185 
186  BPIX_Flipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
187  BPIX_NonFlipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
188  BPIX_DiffFlippedNonFlipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
189 
190  FPIX_plus_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
191  FPIX_minus_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
192 
193  for (unsigned int i = 0; i < nPixelLayers; i++) {
194  BPIXLayer_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
195  BPIXLayer_Flipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
196  BPIXLayer_NonFlipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
197  BPIXLayer_DiffFlippedNonFlipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
198  }
199 
200  for (unsigned int i = 0; i < nPixelDiscs; i++) {
201  FPIXDisks_plus_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
202  FPIXDisks_minus_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
203  }
204 
208 
212 
215 
216  for (unsigned int i = 0; i < nPixelLayers; i++) {
221  }
222 
223  for (unsigned int i = 0; i < nPixelDiscs; i++) {
226  }
227 }
228 
229 // ------------ method called for each event ------------
231  bool prepareTkAlign = false;
232  bool prepareBS = false;
233 
234  // ES watcher can noly run once in the same event,
235  // otherwise it will turn false whatsoever because the condition doesn't change in the second time call.
236  if (watcherTkAlign_.check(iSetup))
237  prepareTkAlign = true;
238  if (watcherBS_.check(iSetup))
239  prepareBS = true;
240 
241  if (!prepareTkAlign && !prepareBS)
242  return;
243 
244  run_ = iEvent.id().run();
245  ls_ = iEvent.id().luminosityBlock();
246 
247  if (prepareTkAlign) { // check for new IOV for TKAlign
248 
249  phase_ = -1;
250 
251  const TrackerGeometry& tkGeom = iSetup.getData(trackerGeometryToken_);
252  const TrackerTopology& tkTopo = iSetup.getData(trackerTopologyToken_);
253 
255  phase_ = 0;
257  phase_ = 1;
258  }
259 
260  // pixel quality
261  const SiPixelQuality& badPixelInfo = iSetup.getData(siPixelQualityToken_);
262 
263  // Tracker global position
264  const Alignments& globalAlignments = iSetup.getData(gprToken_);
265  const AlignTransform globalCoordinates = align::DetectorGlobalPosition(globalAlignments, DetId(DetId::Tracker));
266  GlobalVector globalTkPosition(
267  globalCoordinates.translation().x(), globalCoordinates.translation().y(), globalCoordinates.translation().z());
268 
269  // loop over bclabels
270  for (const auto& label : bcLabels_) {
271  // init tree content
273 
274  // Get TkAlign from EventSetup:
276  std::vector<AlignTransform> tkAlignments = alignments.m_align;
277 
278  // PIX
279  GlobalVector barycentre_PIX(0.0, 0.0, 0.0);
280  // BPIX
281  GlobalVector barycentre_BPIX(0.0, 0.0, 0.0);
282  float nmodules_BPIX(0.);
283  // FPIX
284  GlobalVector barycentre_FPIX(0.0, 0.0, 0.0);
285  float nmodules_FPIX(0.);
286 
287  // Per-layer/ladder barycentre for BPIX
288  std::map<int, std::map<int, float>> nmodules_bpix; // layer-ladder
289  std::map<int, std::map<int, GlobalVector>> barycentre_bpix; // layer-ladder
290 
291  // Per-disk/ring barycentre for FPIX
292  std::map<int, std::map<int, float>> nmodules_fpix; // disk-ring
293  std::map<int, std::map<int, GlobalVector>> barycentre_fpix; // disk-ring
294 
295  // Loop over tracker module
296  for (const auto& ali : tkAlignments) {
297  //DetId
298  const DetId& detId = DetId(ali.rawId());
299  // remove bad module
300  if (usePixelQuality_ && badPixelInfo.IsModuleBad(detId))
301  continue;
302 
303  // alignment for a given module
304  GlobalVector ali_translation(ali.translation().x(), ali.translation().y(), ali.translation().z());
305 
306  int subid = DetId(detId).subdetId();
307  // BPIX
308  if (subid == PixelSubdetector::PixelBarrel) {
309  nmodules_BPIX += 1;
310  barycentre_BPIX += ali_translation;
311  barycentre_PIX += ali_translation;
312 
313  int layer = tkTopo.pxbLayer(detId);
314  int ladder = tkTopo.pxbLadder(detId);
315  nmodules_bpix[layer][ladder] += 1;
316  barycentre_bpix[layer][ladder] += ali_translation;
317 
318  } // BPIX
319 
320  // FPIX
321  if (subid == PixelSubdetector::PixelEndcap) {
322  nmodules_FPIX += 1;
323  barycentre_FPIX += ali_translation;
324  barycentre_PIX += ali_translation;
325 
326  int disk = tkTopo.pxfDisk(detId);
327  int quadrant = PixelEndcapName(detId, &tkTopo, phase_).halfCylinder();
328  if (quadrant < 3)
329  disk *= -1;
330 
331  int ring = -9999;
332  if (phase_ == 0) {
333  ring = 1 + (tkTopo.pxfPanel(detId) + tkTopo.pxfModule(detId.rawId()) > 3);
334  } else if (phase_ == 1) {
335  ring = PixelEndcapName(detId, &tkTopo, phase_).ringName();
336  }
337 
338  nmodules_fpix[disk][ring] += 1;
339  barycentre_fpix[disk][ring] += ali_translation;
340 
341  } // FPIX
342 
343  } // loop over tracker module
344 
345  //PIX
346  float nmodules_PIX = nmodules_BPIX + nmodules_FPIX;
347  barycentre_PIX *= (1.0 / nmodules_PIX);
348  barycentre_PIX += globalTkPosition;
349  PIX_ = GlobalPoint(barycentre_PIX.x(), barycentre_PIX.y(), barycentre_PIX.z());
351 
352  //BPIX
353  barycentre_BPIX *= (1.0 / nmodules_BPIX);
354  barycentre_BPIX += globalTkPosition;
355  BPIX_ = GlobalPoint(barycentre_BPIX.x(), barycentre_BPIX.y(), barycentre_BPIX.z());
357  //FPIX
358  barycentre_FPIX *= (1.0 / nmodules_FPIX);
359  barycentre_FPIX += globalTkPosition;
360  FPIX_ = GlobalPoint(barycentre_FPIX.x(), barycentre_FPIX.y(), barycentre_FPIX.z());
362  // Pixel substructures
363 
364  // BPix barycentre per-layer/per-ladder
365  // assuming each ladder has the same number of modules in the same layer
366  // inner = flipped; outer = non-flipped
367  //
368  // Phase 0: Outer ladders are odd for layer 1,3 and even for layer 2
369  // Phase 1: Outer ladders are odd for layer 4 and even for layer 1,2,3
370  //
371 
372  int nmodules_BPIX_Flipped = 0;
373  int nmodules_BPIX_NonFlipped = 0;
374  GlobalVector BPIX_Flipped(0.0, 0.0, 0.0);
375  GlobalVector BPIX_NonFlipped(0.0, 0.0, 0.0);
376 
377  // loop over layers
378  for (const auto& il : barycentre_bpix) {
379  int layer = il.first;
380 
381  int nmodulesLayer = 0;
382  int nmodulesLayer_Flipped = 0;
383  int nmodulesLayer_NonFlipped = 0;
384  GlobalVector BPIXLayer(0.0, 0.0, 0.0);
385  GlobalVector BPIXLayer_Flipped(0.0, 0.0, 0.0);
386  GlobalVector BPIXLayer_NonFlipped(0.0, 0.0, 0.0);
387 
388  // loop over ladder
389  std::map<int, GlobalVector> barycentreLayer = barycentre_bpix[layer];
390  for (const auto& it : barycentreLayer) {
391  int ladder = it.first;
392  //BPIXLayerLadder_[layer][ladder] = (1.0/nmodules[layer][ladder])*barycentreLayer[ladder] + globalTkPosition;
393 
394  nmodulesLayer += nmodules_bpix[layer][ladder];
395  BPIXLayer += barycentreLayer[ladder];
396 
397  // Phase-1
398  //
399  // Phase 1: Outer ladders are odd for layer 4 and even for layer 1,2,3
400  if (phase_ == 1) {
401  if (layer != 4) { // layer 1-3
402 
403  if (ladder % 2 != 0) { // odd ladder = outer ladder = unflipped
404  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
405  BPIXLayer_NonFlipped += barycentreLayer[ladder];
406  } else { // even ladder = inner ladder = flipped
407  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
408  BPIXLayer_Flipped += barycentreLayer[ladder];
409  }
410  } else { // layer-4
411 
412  if (ladder % 2 != 0) { // odd ladder = inner = flipped
413  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
414  BPIXLayer_Flipped += barycentreLayer[ladder];
415  } else { //even ladder = outer ladder = unflipped
416  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
417  BPIXLayer_NonFlipped += barycentreLayer[ladder];
418  }
419  }
420 
421  } // phase-1
422 
423  // Phase-0
424  //
425  // Phase 0: Outer ladders are odd for layer 1,3 and even for layer 2
426  if (phase_ == 0) {
427  if (layer == 2) { // layer-2
428 
429  if (ladder % 2 != 0) { // odd ladder = inner = flipped
430  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
431  BPIXLayer_Flipped += barycentreLayer[ladder];
432  } else {
433  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
434  BPIXLayer_NonFlipped += barycentreLayer[ladder];
435  }
436  } else { // layer-1,3
437 
438  if (ladder % 2 == 0) { // even ladder = inner = flipped
439  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
440  BPIXLayer_Flipped += barycentreLayer[ladder];
441  } else { // odd ladder = outer = non-flipped
442  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
443  BPIXLayer_NonFlipped += barycentreLayer[ladder];
444  }
445  }
446 
447  } // phase-0
448 
449  } //loop over ladders
450 
451  // total BPIX flipped/non-flipped
452  BPIX_Flipped += BPIXLayer_Flipped;
453  BPIX_NonFlipped += BPIXLayer_NonFlipped;
454  nmodules_BPIX_Flipped += nmodulesLayer_Flipped;
455  nmodules_BPIX_NonFlipped += nmodulesLayer_NonFlipped;
456 
457  //BPIX per-layer
458  BPIXLayer *= (1.0 / nmodulesLayer);
459  BPIXLayer += globalTkPosition;
460  BPIXLayer_Flipped *= (1.0 / nmodulesLayer_Flipped);
461  BPIXLayer_Flipped += globalTkPosition;
462  BPIXLayer_NonFlipped *= (1.0 / nmodulesLayer_NonFlipped);
463  BPIXLayer_NonFlipped += globalTkPosition;
464 
465  BPIXLayer_[layer - 1] = GlobalPoint(BPIXLayer.x(), BPIXLayer.y(), BPIXLayer.z());
468  GlobalPoint(BPIXLayer_Flipped.x(), BPIXLayer_Flipped.y(), BPIXLayer_Flipped.z());
471  GlobalPoint(BPIXLayer_NonFlipped.x(), BPIXLayer_NonFlipped.y(), BPIXLayer_NonFlipped.z());
473  BPIXLayer_DiffFlippedNonFlipped_[layer - 1] = GlobalPoint(BPIXLayer_Flipped.x() - BPIXLayer_NonFlipped.x(),
474  BPIXLayer_Flipped.y() - BPIXLayer_NonFlipped.y(),
475  BPIXLayer_Flipped.z() - BPIXLayer_NonFlipped.z());
477 
478  } // loop over layers
479 
480  BPIX_Flipped *= (1.0 / nmodules_BPIX_Flipped);
481  BPIX_Flipped += globalTkPosition;
482  BPIX_Flipped_ = GlobalPoint(BPIX_Flipped.x(), BPIX_Flipped.y(), BPIX_Flipped.z());
484  BPIX_NonFlipped *= (1.0 / nmodules_BPIX_NonFlipped);
485  BPIX_NonFlipped += globalTkPosition;
486  BPIX_NonFlipped_ = GlobalPoint(BPIX_NonFlipped.x(), BPIX_NonFlipped.y(), BPIX_NonFlipped.z());
488  BPIX_DiffFlippedNonFlipped_ = GlobalPoint(BPIX_Flipped.x() - BPIX_NonFlipped.x(),
489  BPIX_Flipped.y() - BPIX_NonFlipped.y(),
490  BPIX_Flipped.z() - BPIX_NonFlipped.z());
492 
493  // FPIX substructures per-(signed)disk/per-ring
494  int nmodules_FPIX_plus = 0;
495  int nmodules_FPIX_minus = 0;
496  GlobalVector FPIX_plus(0.0, 0.0, 0.0);
497  GlobalVector FPIX_minus(0.0, 0.0, 0.0);
498  // loop over disks
499 
500  for (const auto& id : barycentre_fpix) {
501  int disk = id.first;
502 
503  int nmodulesDisk = 0;
504  GlobalVector FPIXDisk(0.0, 0.0, 0.0);
505 
506  std::map<int, GlobalVector> baryCentreDisk = id.second;
507  for (const auto& ir : baryCentreDisk) {
508  int ring = ir.first;
509  nmodulesDisk += nmodules_fpix[disk][ring];
510  FPIXDisk += ir.second;
511  if (disk > 0) {
512  nmodules_FPIX_plus += nmodules_fpix[disk][ring];
513  FPIX_plus += ir.second;
514  }
515  if (disk < 0) {
516  nmodules_FPIX_minus += nmodules_fpix[disk][ring];
517  FPIX_minus += ir.second;
518  }
519 
520  } // loop over rings
521 
522  FPIXDisk *= (1.0 / nmodulesDisk);
523  FPIXDisk += globalTkPosition;
524 
525  if (disk > 0) {
526  FPIXDisks_plus_[disk - 1] = GlobalPoint(FPIXDisk.x(), FPIXDisk.y(), FPIXDisk.z());
527  vFPIXDisks_plus_[disk - 1] = SimplePoint(FPIXDisks_plus_[disk - 1]);
528  }
529  if (disk < 0) {
530  FPIXDisks_minus_[-disk - 1] = GlobalPoint(FPIXDisk.x(), FPIXDisk.y(), FPIXDisk.z());
531  vFPIXDisks_minus_[-disk - 1] = SimplePoint(FPIXDisks_minus_[-disk - 1]);
532  }
533  } // loop over disks
534 
535  FPIX_plus *= (1.0 / nmodules_FPIX_plus);
536  FPIX_plus += globalTkPosition;
537  FPIX_plus_ = GlobalPoint(FPIX_plus.x(), FPIX_plus.y(), FPIX_plus.z());
539  FPIX_minus *= (1.0 / nmodules_FPIX_minus);
540  FPIX_minus += globalTkPosition;
541  FPIX_minus_ = GlobalPoint(FPIX_minus.x(), FPIX_minus.y(), FPIX_minus.z());
543 
544  bcTrees_[label]->Fill();
545 
546  } // bcLabels_
547 
548  } // check for new IOV for TKAlign
549 
550  // beamspot
551  if (prepareBS) {
552  // loop over bsLabels_
553  for (const auto& label : bsLabels_) {
554  // init bstree content
556 
557  // Get BeamSpot from EventSetup
558  const BeamSpotObjects* mybeamspot = &iSetup.getData(bsTokens_[label]);
559 
560  BS_ = GlobalPoint(mybeamspot->x(), mybeamspot->y(), mybeamspot->z());
561  vBS_ = SimplePoint(BS_);
562 
563  bsTrees_[label]->Fill();
564  } // bsLabels_
565 
566  } // check for new IOV for BS
567 }
568 
569 // ------------ method called once each job just before starting event loop ------------
571  // init bc bs trees
572  for (const auto& label : bsLabels_) {
573  std::string treeName = "BeamSpot";
574  if (!label.empty())
575  treeName = "BeamSpot_";
576  treeName += label;
577 
578  bsTrees_[label] = tFileService->make<TTree>(TString(treeName), "PixelBarycentre analyzer ntuple");
579 
580  bsTrees_[label]->Branch("run", &run_, "run/I");
581  bsTrees_[label]->Branch("ls", &ls_, "ls/I");
582 
583  bsTrees_[label]->Branch("BS", &vBS_, "x/F:y/F:z/F");
584 
585  } // bsLabels_
586 
587  for (const auto& label : bcLabels_) {
588  std::string treeName = "PixelBarycentre";
589  if (!label.empty())
590  treeName = "PixelBarycentre_";
591  treeName += label;
592  bcTrees_[label] = tFileService->make<TTree>(TString(treeName), "PixelBarycentre analyzer ntuple");
593 
594  bcTrees_[label]->Branch("run", &run_, "run/I");
595  bcTrees_[label]->Branch("ls", &ls_, "ls/I");
596 
597  bcTrees_[label]->Branch("PIX", &vPIX_, "x/F:y/F:z/F");
598 
599  bcTrees_[label]->Branch("BPIX", &vBPIX_, "x/F:y/F:z/F");
600  bcTrees_[label]->Branch("BPIX_Flipped", &vBPIX_Flipped_, "x/F:y/F:z/F");
601  bcTrees_[label]->Branch("BPIX_NonFlipped", &vBPIX_NonFlipped_, "x/F:y/F:z/F");
602  bcTrees_[label]->Branch("BPIX_DiffFlippedNonFlipped", &vBPIX_DiffFlippedNonFlipped_, "x/F:y/F:z/F");
603 
604  bcTrees_[label]->Branch("FPIX", &vFPIX_, "x/F:y/F:z/F");
605  bcTrees_[label]->Branch("FPIX_plus", &vFPIX_plus_, "x/F:y/F:z/F");
606  bcTrees_[label]->Branch("FPIX_minus", &vFPIX_minus_, "x/F:y/F:z/F");
607 
608  //per-layer
609  for (unsigned int i = 0; i < nPixelLayers; i++) {
610  TString structure = "BPIXLYR";
611  int layer = i + 1;
612  structure += layer;
613 
614  bcTrees_[label]->Branch(structure, &vBPIXLayer_[i], "x/F:y/F:z/F");
615  bcTrees_[label]->Branch(structure + "_Flipped", &vBPIXLayer_Flipped_[i], "x/F:y/F:z/F");
616  bcTrees_[label]->Branch(structure + "_NonFlipped", &vBPIXLayer_NonFlipped_[i], "x/F:y/F:z/F");
617  bcTrees_[label]->Branch(
618  structure + "_DiffFlippedNonFlipped", &vBPIXLayer_DiffFlippedNonFlipped_[i], "x/F:y/F:z/F");
619  }
620 
621  //per-disk/ring
622  for (unsigned int i = 0; i < nPixelDiscs; i++) {
623  TString structure = "FPIXDisk_plus";
624  int disk = i + 1;
625  structure += disk;
626  bcTrees_[label]->Branch(structure, &vFPIXDisks_plus_[i], "x/F:y/F:z/F");
627 
628  structure = "FPIXDisk_minus";
629  structure += disk;
630  bcTrees_[label]->Branch(structure, &vFPIXDisks_minus_[i], "x/F:y/F:z/F");
631  }
632 
633  } // bcLabels_
634 }
635 
636 // ------------ method called once each job just after ending the event loop ------------
638  bcLabels_.clear();
639  bsLabels_.clear();
640 
641  bcTrees_.clear();
642  bsTrees_.clear();
643 }
644 
645 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
648  desc.setComment("Validates alignment payloads by providing the position of the pixel barycenter positions");
649  desc.addUntracked<bool>("usePixelQuality", false);
650  desc.addUntracked<std::vector<std::string>>("tkAlignLabels", {});
651  desc.addUntracked<std::vector<std::string>>("beamSpotLabels", {});
652  descriptions.addWithDefaultLabel(desc);
653 }
654 
655 //define this as a plug-in
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
GlobalPoint BPIXLayer_Flipped_[nPixelLayers]
SimplePoint vFPIXDisks_minus_[nPixelDiscs]
unsigned int pxbLayer(const DetId &id) const
void analyze(const edm::Event &, const edm::EventSetup &) override
double z() const
get Z beam position
static const unsigned int nPixelDiscs
bcLabels_
Load and configure analyzer.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
int ringName() const
ring Id
edm::ESWatcher< BeamSpotObjectsRcd > watcherBS_
SimplePoint vBPIXLayer_NonFlipped_[nPixelLayers]
PixelBaryCentreAnalyzer(const edm::ParameterSet &)
SimplePoint vBPIXLayer_DiffFlippedNonFlipped_[nPixelLayers]
T z() const
Definition: PV3DBase.h:61
GlobalPoint BPIXLayer_DiffFlippedNonFlipped_[nPixelLayers]
unsigned int pxfModule(const DetId &id) const
GlobalPoint FPIXDisks_plus_[nPixelDiscs]
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
int quadrant(const DetId &detid, const TrackerTopology *tTopo_, bool phase_)
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const Translation & translation() const
bool IsModuleBad(const uint32_t &detid) const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
unsigned int pxbLadder(const DetId &id) const
SimplePoint vBPIXLayer_Flipped_[nPixelLayers]
edm::Service< TFileService > tFileService
char const * label
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
GlobalPoint BPIXLayer_[nPixelLayers]
int iEvent
Definition: GenABIO.cc:224
GlobalPoint FPIXDisks_minus_[nPixelDiscs]
edm::ESWatcher< TrackerAlignmentRcd > watcherTkAlign_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
HalfCylinder halfCylinder() const
unsigned int pxfDisk(const DetId &id) const
double x() const
get X beam position
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
SimplePoint vFPIXDisks_plus_[nPixelDiscs]
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
~PixelBaryCentreAnalyzer() override=default
std::vector< std::string > bsLabels_
unsigned int pxfPanel(const DetId &id) const
double y() const
get Y beam position
Definition: DetId.h:17
std::vector< std::string > bcLabels_
SimplePoint vBPIXLayer_[nPixelLayers]
std::map< std::string, TTree * > bsTrees_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static const unsigned int nPixelLayers
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
std::map< std::string, edm::ESGetToken< Alignments, TrackerAlignmentRcd > > tkAlignTokens_
std::map< std::string, TTree * > bcTrees_
GlobalPoint BPIXLayer_NonFlipped_[nPixelLayers]
std::map< std::string, edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd > > bsTokens_