CMS 3D CMS Logo

PixelBaryCentreAnalyzer.cc
Go to the documentation of this file.
1 
15 // Framework
23 
24 // Phase-1 Pixel
31 
32 // pixel quality
35 // global postion
38 // tracker alignment
41 // beamspot
44 
45 // Point and Vector
48 
49 // TFileService
52 
53 // ROOT
54 #include <TTree.h>
55 #include <TString.h>
56 //#include <TVector3.h>
57 
58 //
59 // class declaration
60 //
61 
62 class PixelBaryCentreAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
63 public:
65  ~PixelBaryCentreAnalyzer() override;
66 
67  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
68 
69 private:
70  void beginJob() override;
71  void analyze(const edm::Event&, const edm::EventSetup&) override;
72  void endJob() override;
73 
74  void initBC();
75  void initBS();
76 
78  int phase_;
79 
80  // ----------member data ---------------------------
83 
84  // labels of TkAlign tags
85  std::vector<std::string> bcLabels_;
86  // labels of beamspot tags
87  std::vector<std::string> bsLabels_;
88 
92 
94  std::map<std::string, edm::ESGetToken<Alignments, TrackerAlignmentRcd>> tkAlignTokens_;
95  std::map<std::string, edm::ESGetToken<BeamSpotObjects, BeamSpotObjectsRcd>> bsTokens_;
96 
97  // tree content
98  int run_;
99  int ls_;
100 
102 
105 
110 
114 
116  std::map<std::string, TTree*> bcTrees_;
117  std::map<std::string, TTree*> bsTrees_;
118 };
119 
120 //
121 // constructors and destructor
122 //
124  : usePixelQuality_(iConfig.getUntrackedParameter<bool>("usePixelQuality")),
125  bcLabels_(iConfig.getUntrackedParameter<std::vector<std::string>>("tkAlignLabels")),
126  bsLabels_(iConfig.getUntrackedParameter<std::vector<std::string>>("beamSpotLabels")),
127  trackerGeometryToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()),
128  trackerTopologyToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
129  siPixelQualityToken_(esConsumes<SiPixelQuality, SiPixelQualityFromDbRcd>()),
130  gprToken_(esConsumes<Alignments, GlobalPositionRcd>()) {
131  for (const auto& label : bcLabels_) {
132  bcTrees_[label] = nullptr;
133  tkAlignTokens_[label] = esConsumes<Alignments, TrackerAlignmentRcd>(edm::ESInputTag{"", label});
134  }
135 
136  for (const auto& label : bsLabels_) {
137  bsTrees_[label] = nullptr;
138  bsTokens_[label] = esConsumes<BeamSpotObjects, BeamSpotObjectsRcd>(edm::ESInputTag{"", label});
139  }
140 
141  usesResource("TFileService");
142 }
143 
145  // do anything here that needs to be done at desctruction time
146  // (e.g. close files, deallocate resources etc.)
147 }
148 
149 //
150 // member functions
151 //
152 
154  double dummy_float = 999999.0;
155 
156  BS_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
157 }
158 
160  // init to large number (unreasonable number) not zero
161  double dummy_float = 999999.0;
162 
163  PIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
164  BPIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
165  FPIX_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
166 
167  BPIX_Flipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
168  BPIX_NonFlipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
169  BPIX_DiffFlippedNonFlipped_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
170 
171  FPIX_plus_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
172  FPIX_minus_ = GlobalPoint(dummy_float, dummy_float, dummy_float);
173 
174  for (unsigned int i = 0; i < 4; i++) {
175  BPIXLayer_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
176  BPIXLayer_Flipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
177  BPIXLayer_NonFlipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
178  BPIXLayer_DiffFlippedNonFlipped_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
179  }
180 
181  for (unsigned int i = 0; i < 3; i++) {
182  FPIXDisks_plus_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
183  FPIXDisks_minus_[i] = GlobalPoint(dummy_float, dummy_float, dummy_float);
184  }
185 }
186 
187 // ------------ method called for each event ------------
189  bool prepareTkAlign = false;
190  bool prepareBS = false;
191 
192  // ES watcher can noly run once in the same event,
193  // otherwise it will turn false whatsoever because the condition doesn't change in the second time call.
194  if (watcherTkAlign_.check(iSetup))
195  prepareTkAlign = true;
196  if (watcherBS_.check(iSetup))
197  prepareBS = true;
198 
199  if (!prepareTkAlign && !prepareBS)
200  return;
201 
202  run_ = iEvent.id().run();
203  ls_ = iEvent.id().luminosityBlock();
204 
205  if (prepareTkAlign) { // check for new IOV for TKAlign
206 
207  phase_ = -1;
208 
209  const TrackerGeometry* tkGeo = &iSetup.getData(trackerGeometryToken_);
210  const TrackerTopology* tkTopo = &iSetup.getData(trackerTopologyToken_);
211 
213  phase_ = 0;
215  phase_ = 1;
216 
217  // pixel quality
218  const SiPixelQuality* badPixelInfo = &iSetup.getData(siPixelQualityToken_);
219 
220  // Tracker global position
221  const Alignments* globalAlignments = &iSetup.getData(gprToken_);
222  std::unique_ptr<const Alignments> globalPositions = std::make_unique<Alignments>(*globalAlignments);
223  const AlignTransform& globalCoordinates = align::DetectorGlobalPosition(*globalPositions, DetId(DetId::Tracker));
224  GlobalVector globalTkPosition(
225  globalCoordinates.translation().x(), globalCoordinates.translation().y(), globalCoordinates.translation().z());
226 
227  // loop over bclabels
228  for (const auto& label : bcLabels_) {
229  // init tree content
231 
232  // Get TkAlign from EventSetup:
233  const Alignments* alignments = &iSetup.getData(tkAlignTokens_[label]);
234  std::vector<AlignTransform> tkAlignments = alignments->m_align;
235 
236  // PIX
237  GlobalVector barycentre_PIX(0.0, 0.0, 0.0);
238  // BPIX
239  GlobalVector barycentre_BPIX(0.0, 0.0, 0.0);
240  float nmodules_BPIX(0.);
241  // FPIX
242  GlobalVector barycentre_FPIX(0.0, 0.0, 0.0);
243  float nmodules_FPIX(0.);
244 
245  // Per-layer/ladder barycentre for BPIX
246  std::map<int, std::map<int, float>> nmodules_bpix; // layer-ladder
247  std::map<int, std::map<int, GlobalVector>> barycentre_bpix; // layer-ladder
248 
249  // Per-disk/ring barycentre for FPIX
250  std::map<int, std::map<int, float>> nmodules_fpix; // disk-ring
251  std::map<int, std::map<int, GlobalVector>> barycentre_fpix; // disk-ring
252 
253  // Loop over tracker module
254  for (const auto& ali : tkAlignments) {
255  //DetId
256  const DetId& detId = DetId(ali.rawId());
257  // remove bad module
258  if (usePixelQuality_ && badPixelInfo->IsModuleBad(detId))
259  continue;
260 
261  // alignment for a given module
262  GlobalVector ali_translation(ali.translation().x(), ali.translation().y(), ali.translation().z());
263 
264  int subid = DetId(detId).subdetId();
265  // BPIX
266  if (subid == PixelSubdetector::PixelBarrel) {
267  nmodules_BPIX += 1;
268  barycentre_BPIX += ali_translation;
269  barycentre_PIX += ali_translation;
270 
271  int layer = tkTopo->pxbLayer(detId);
272  int ladder = tkTopo->pxbLadder(detId);
273  nmodules_bpix[layer][ladder] += 1;
274  barycentre_bpix[layer][ladder] += ali_translation;
275 
276  } // BPIX
277 
278  // FPIX
279  if (subid == PixelSubdetector::PixelEndcap) {
280  nmodules_FPIX += 1;
281  barycentre_FPIX += ali_translation;
282  barycentre_PIX += ali_translation;
283 
284  int disk = tkTopo->pxfDisk(detId);
285  int quadrant = PixelEndcapName(detId, tkTopo, phase_).halfCylinder();
286  if (quadrant < 3)
287  disk *= -1;
288 
289  int ring = -9999;
290  if (phase_ == 0) {
291  ring = 1 + (tkTopo->pxfPanel(detId) + tkTopo->pxfModule(detId.rawId()) > 3);
292  } else if (phase_ == 1) {
293  ring = PixelEndcapName(detId, tkTopo, phase_).ringName();
294  }
295 
296  nmodules_fpix[disk][ring] += 1;
297  barycentre_fpix[disk][ring] += ali_translation;
298 
299  } // FPIX
300 
301  } // loop over tracker module
302 
303  //PIX
304  float nmodules_PIX = nmodules_BPIX + nmodules_FPIX;
305  barycentre_PIX *= (1.0 / nmodules_PIX);
306  barycentre_PIX += globalTkPosition;
307  PIX_ = GlobalPoint(barycentre_PIX.x(), barycentre_PIX.y(), barycentre_PIX.z());
308 
309  //BPIX
310  barycentre_BPIX *= (1.0 / nmodules_BPIX);
311  barycentre_BPIX += globalTkPosition;
312  BPIX_ = GlobalPoint(barycentre_BPIX.x(), barycentre_BPIX.y(), barycentre_BPIX.z());
313  //FPIX
314  barycentre_FPIX *= (1.0 / nmodules_FPIX);
315  barycentre_FPIX += globalTkPosition;
316  FPIX_ = GlobalPoint(barycentre_FPIX.x(), barycentre_FPIX.y(), barycentre_FPIX.z());
317 
318  // Pixel substructures
319 
320  // BPix barycentre per-layer/per-ladder
321  // assuming each ladder has the same number of modules in the same layer
322  // inner = flipped; outer = non-flipped
323  //
324  // Phase 0: Outer ladders are odd for layer 1,3 and even for layer 2
325  // Phase 1: Outer ladders are odd for layer 4 and even for layer 1,2,3
326  //
327 
328  int nmodules_BPIX_Flipped = 0;
329  int nmodules_BPIX_NonFlipped = 0;
330  GlobalVector BPIX_Flipped(0.0, 0.0, 0.0);
331  GlobalVector BPIX_NonFlipped(0.0, 0.0, 0.0);
332 
333  // loop over layers
334  for (std::map<int, std::map<int, GlobalVector>>::iterator il = barycentre_bpix.begin();
335  il != barycentre_bpix.end();
336  ++il) {
337  int layer = il->first;
338 
339  int nmodulesLayer = 0;
340  int nmodulesLayer_Flipped = 0;
341  int nmodulesLayer_NonFlipped = 0;
342  GlobalVector BPIXLayer(0.0, 0.0, 0.0);
343  GlobalVector BPIXLayer_Flipped(0.0, 0.0, 0.0);
344  GlobalVector BPIXLayer_NonFlipped(0.0, 0.0, 0.0);
345 
346  // loop over ladder
347  std::map<int, GlobalVector> barycentreLayer = barycentre_bpix[layer];
348  for (std::map<int, GlobalVector>::iterator it = barycentreLayer.begin(); it != barycentreLayer.end(); ++it) {
349  int ladder = it->first;
350  //BPIXLayerLadder_[layer][ladder] = (1.0/nmodules[layer][ladder])*barycentreLayer[ladder] + globalTkPosition;
351 
352  nmodulesLayer += nmodules_bpix[layer][ladder];
353  BPIXLayer += barycentreLayer[ladder];
354 
355  // Phase-1
356  //
357  // Phase 1: Outer ladders are odd for layer 4 and even for layer 1,2,3
358  if (phase_ == 1) {
359  if (layer != 4) { // layer 1-3
360 
361  if (ladder % 2 != 0) { // odd ladder = inner = flipped
362  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
363  BPIXLayer_Flipped += barycentreLayer[ladder];
364  } else {
365  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
366  BPIXLayer_NonFlipped += barycentreLayer[ladder];
367  }
368  } else { // layer-4
369 
370  if (ladder % 2 == 0) { // even ladder = inner = flipped
371  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
372  BPIXLayer_Flipped += barycentreLayer[ladder];
373  } else { // odd ladder = outer = non-flipped
374  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
375  BPIXLayer_NonFlipped += barycentreLayer[ladder];
376  }
377  }
378 
379  } // phase-1
380 
381  // Phase-0
382  //
383  // Phase 0: Outer ladders are odd for layer 1,3 and even for layer 2
384  if (phase_ == 0) {
385  if (layer == 2) { // layer-2
386 
387  if (ladder % 2 != 0) { // odd ladder = inner = flipped
388  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
389  BPIXLayer_Flipped += barycentreLayer[ladder];
390  } else {
391  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
392  BPIXLayer_NonFlipped += barycentreLayer[ladder];
393  }
394  } else { // layer-1,3
395 
396  if (ladder % 2 == 0) { // even ladder = inner = flipped
397  nmodulesLayer_Flipped += nmodules_bpix[layer][ladder];
398  BPIXLayer_Flipped += barycentreLayer[ladder];
399  } else { // odd ladder = outer = non-flipped
400  nmodulesLayer_NonFlipped += nmodules_bpix[layer][ladder];
401  BPIXLayer_NonFlipped += barycentreLayer[ladder];
402  }
403  }
404 
405  } // phase-0
406 
407  } //loop over ladders
408 
409  // total BPIX flipped/non-flipped
410  BPIX_Flipped += BPIXLayer_Flipped;
411  BPIX_NonFlipped += BPIXLayer_NonFlipped;
412  nmodules_BPIX_Flipped += nmodulesLayer_Flipped;
413  nmodules_BPIX_NonFlipped += nmodulesLayer_NonFlipped;
414 
415  //BPIX per-layer
416  BPIXLayer *= (1.0 / nmodulesLayer);
417  BPIXLayer += globalTkPosition;
418  BPIXLayer_Flipped *= (1.0 / nmodulesLayer_Flipped);
419  BPIXLayer_Flipped += globalTkPosition;
420  BPIXLayer_NonFlipped *= (1.0 / nmodulesLayer_NonFlipped);
421  BPIXLayer_NonFlipped += globalTkPosition;
422 
423  BPIXLayer_[layer - 1] = GlobalPoint(BPIXLayer.x(), BPIXLayer.y(), BPIXLayer.z());
425  GlobalPoint(BPIXLayer_Flipped.x(), BPIXLayer_Flipped.y(), BPIXLayer_Flipped.z());
427  GlobalPoint(BPIXLayer_NonFlipped.x(), BPIXLayer_NonFlipped.y(), BPIXLayer_NonFlipped.z());
428 
429  BPIXLayer_DiffFlippedNonFlipped_[layer - 1] = GlobalPoint(BPIXLayer_Flipped.x() - BPIXLayer_NonFlipped.x(),
430  BPIXLayer_Flipped.y() - BPIXLayer_NonFlipped.y(),
431  BPIXLayer_Flipped.z() - BPIXLayer_NonFlipped.z());
432 
433  } // loop over layers
434 
435  BPIX_Flipped *= (1.0 / nmodules_BPIX_Flipped);
436  BPIX_Flipped += globalTkPosition;
437  BPIX_Flipped_ = GlobalPoint(BPIX_Flipped.x(), BPIX_Flipped.y(), BPIX_Flipped.z());
438  BPIX_NonFlipped *= (1.0 / nmodules_BPIX_NonFlipped);
439  BPIX_NonFlipped += globalTkPosition;
440  BPIX_NonFlipped_ = GlobalPoint(BPIX_NonFlipped.x(), BPIX_NonFlipped.y(), BPIX_NonFlipped.z());
441  BPIX_DiffFlippedNonFlipped_ = GlobalPoint(BPIX_Flipped.x() - BPIX_NonFlipped.x(),
442  BPIX_Flipped.y() - BPIX_NonFlipped.y(),
443  BPIX_Flipped.z() - BPIX_NonFlipped.z());
444 
445  // FPIX substructures per-(signed)disk/per-ring
446  int nmodules_FPIX_plus = 0;
447  int nmodules_FPIX_minus = 0;
448  GlobalVector FPIX_plus(0.0, 0.0, 0.0);
449  GlobalVector FPIX_minus(0.0, 0.0, 0.0);
450  // loop over disks
451  for (std::map<int, std::map<int, GlobalVector>>::iterator id = barycentre_fpix.begin();
452  id != barycentre_fpix.end();
453  ++id) {
454  int disk = id->first;
455 
456  int nmodulesDisk = 0;
457  GlobalVector FPIXDisk(0.0, 0.0, 0.0);
458 
459  std::map<int, GlobalVector> baryCentreDisk = id->second;
460  for (std::map<int, GlobalVector>::iterator ir = baryCentreDisk.begin(); ir != baryCentreDisk.end();
461  ++ir) { // loop over rings
462  int ring = ir->first;
463  nmodulesDisk += nmodules_fpix[disk][ring];
464  FPIXDisk += ir->second;
465  if (disk > 0) {
466  nmodules_FPIX_plus += nmodules_fpix[disk][ring];
467  FPIX_plus += ir->second;
468  }
469  if (disk < 0) {
470  nmodules_FPIX_minus += nmodules_fpix[disk][ring];
471  FPIX_minus += ir->second;
472  }
473 
474  } // loop over rings
475 
476  FPIXDisk *= (1.0 / nmodulesDisk);
477  FPIXDisk += globalTkPosition;
478 
479  if (disk > 0)
480  FPIXDisks_plus_[disk - 1] = GlobalPoint(FPIXDisk.x(), FPIXDisk.y(), FPIXDisk.z());
481  if (disk < 0)
482  FPIXDisks_minus_[-disk - 1] = GlobalPoint(FPIXDisk.x(), FPIXDisk.y(), FPIXDisk.z());
483  } // loop over disks
484 
485  FPIX_plus *= (1.0 / nmodules_FPIX_plus);
486  FPIX_plus += globalTkPosition;
487  FPIX_plus_ = GlobalPoint(FPIX_plus.x(), FPIX_plus.y(), FPIX_plus.z());
488  FPIX_minus *= (1.0 / nmodules_FPIX_minus);
489  FPIX_minus += globalTkPosition;
490  FPIX_minus_ = GlobalPoint(FPIX_minus.x(), FPIX_minus.y(), FPIX_minus.z());
491 
492  bcTrees_[label]->Fill();
493 
494  } // bcLabels_
495 
496  } // check for new IOV for TKAlign
497 
498  // beamspot
499  if (prepareBS) {
500  // loop over bsLabels_
501  for (const auto& label : bsLabels_) {
502  // init bstree content
504 
505  // Get BeamSpot from EventSetup
506  const BeamSpotObjects* mybeamspot = &iSetup.getData(bsTokens_[label]);
507 
508  BS_ = GlobalPoint(mybeamspot->GetX(), mybeamspot->GetY(), mybeamspot->GetZ());
509 
510  bsTrees_[label]->Fill();
511  } // bsLabels_
512 
513  } // check for new IOV for BS
514 }
515 
516 // ------------ method called once each job just before starting event loop ------------
518  // init bc bs trees
519  for (const auto& label : bsLabels_) {
520  std::string treeName = "BeamSpot";
521  if (!label.empty())
522  treeName = "BeamSpot_";
523  treeName += label;
524 
525  bsTrees_[label] = tFileService->make<TTree>(TString(treeName), "PixelBarycentre analyzer ntuple");
526 
527  bsTrees_[label]->Branch("run", &run_, "run/I");
528  bsTrees_[label]->Branch("ls", &ls_, "ls/I");
529 
530  bsTrees_[label]->Branch("BS", &BS_);
531 
532  } // bsLabels_
533 
534  for (const auto& label : bcLabels_) {
535  std::string treeName = "PixelBarycentre";
536  if (!label.empty())
537  treeName = "PixelBarycentre_";
538  treeName += label;
539  bcTrees_[label] = tFileService->make<TTree>(TString(treeName), "PixelBarycentre analyzer ntuple");
540 
541  bcTrees_[label]->Branch("run", &run_, "run/I");
542  bcTrees_[label]->Branch("ls", &ls_, "ls/I");
543 
544  bcTrees_[label]->Branch("PIX", &PIX_);
545 
546  bcTrees_[label]->Branch("BPIX", &BPIX_);
547  bcTrees_[label]->Branch("BPIX_Flipped", &BPIX_Flipped_);
548  bcTrees_[label]->Branch("BPIX_NonFlipped", &BPIX_NonFlipped_);
549  bcTrees_[label]->Branch("BPIX_DiffFlippedNonFlipped", &BPIX_DiffFlippedNonFlipped_);
550 
551  bcTrees_[label]->Branch("FPIX", &FPIX_);
552  bcTrees_[label]->Branch("FPIX_plus", &FPIX_plus_);
553  bcTrees_[label]->Branch("FPIX_minus", &FPIX_minus_);
554 
555  //per-layer
556  for (unsigned int i = 0; i < 4; i++) {
557  TString structure = "BPIXLYR";
558  int layer = i + 1;
559  structure += layer;
560 
561  bcTrees_[label]->Branch(structure, &BPIXLayer_[i]);
562  bcTrees_[label]->Branch(structure + "_Flipped", &BPIXLayer_Flipped_[i]);
563  bcTrees_[label]->Branch(structure + "_NonFlipped", &BPIXLayer_NonFlipped_[i]);
564  bcTrees_[label]->Branch(structure + "_DiffFlippedNonFlipped", &BPIXLayer_DiffFlippedNonFlipped_[i]);
565  }
566 
567  //per-disk/ring
568  for (unsigned int i = 0; i < 3; i++) {
569  TString structure = "FPIXDisk+";
570  int disk = i + 1;
571  structure += disk;
572  bcTrees_[label]->Branch(structure, &FPIXDisks_plus_[i]);
573 
574  structure = "FPIXDisk-";
575  structure += disk;
576  bcTrees_[label]->Branch(structure, &FPIXDisks_minus_[i]);
577  }
578 
579  } // bcLabels_
580 }
581 
582 // ------------ method called once each job just after ending the event loop ------------
584  bcLabels_.clear();
585  bsLabels_.clear();
586 
587  bcTrees_.clear();
588  bsTrees_.clear();
589 }
590 
591 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
593  //The following says we do not know what parameters are allowed so do no validation
594  // Please change this to state exactly what you do use, even if it is no parameters
596  desc.setUnknown();
597  descriptions.addDefault(desc);
598 }
599 
600 //define this as a plug-in
PixelBaryCentreAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: PixelBaryCentreAnalyzer.cc:188
Vector3DBase
Definition: Vector3DBase.h:8
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
SiPixelQuality::IsModuleBad
bool IsModuleBad(const uint32_t &detid) const
Definition: SiPixelQuality.cc:97
GlobalPositionRcd.h
electrons_cff.bool
bool
Definition: electrons_cff.py:366
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
PixelBaryCentreAnalyzer::endJob
void endJob() override
Definition: PixelBaryCentreAnalyzer.cc:583
edm::ESInputTag
Definition: ESInputTag.h:87
PixelBarrelName.h
PixelBaryCentreAnalyzer::phase_
int phase_
Definition: PixelBaryCentreAnalyzer.cc:78
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
TrackerGeometry.h
PixelBaryCentreAnalyzer::BPIX_
GlobalPoint BPIX_
Definition: PixelBaryCentreAnalyzer.cc:103
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
edm::ESWatcher< BeamSpotObjectsRcd >
PixelBaryCentreAnalyzer::beginJob
void beginJob() override
Definition: PixelBaryCentreAnalyzer.cc:517
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
PixelBaryCentreAnalyzer::FPIX_minus_
GlobalPoint FPIX_minus_
Definition: PixelBaryCentreAnalyzer.cc:111
PixelBaryCentreAnalyzer::initBS
void initBS()
Definition: PixelBaryCentreAnalyzer.cc:153
TrackerTopology
Definition: TrackerTopology.h:16
PixelBaryCentreAnalyzer::BPIX_DiffFlippedNonFlipped_
GlobalPoint BPIX_DiffFlippedNonFlipped_
Definition: PixelBaryCentreAnalyzer.cc:104
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
BeamSpotObjects::GetZ
double GetZ() const
get Z beam position
Definition: BeamSpotObjects.h:71
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
Alignments.h
PixelBaryCentreAnalyzer::trackerTopologyToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
Definition: PixelBaryCentreAnalyzer.cc:90
PixelBaryCentreAnalyzer::FPIX_
GlobalPoint FPIX_
Definition: PixelBaryCentreAnalyzer.cc:103
DetectorGlobalPosition.h
PixelEndcapName::halfCylinder
HalfCylinder halfCylinder() const
Definition: PixelEndcapName.h:42
SiPixelQualityFromDbRcd.h
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
PixelBaryCentreAnalyzer::usePixelQuality_
bool usePixelQuality_
Definition: PixelBaryCentreAnalyzer.cc:77
PixelBaryCentreAnalyzer::watcherBS_
edm::ESWatcher< BeamSpotObjectsRcd > watcherBS_
Definition: PixelBaryCentreAnalyzer.cc:81
PixelBaryCentreAnalyzer::PixelBaryCentreAnalyzer
PixelBaryCentreAnalyzer(const edm::ParameterSet &)
Definition: PixelBaryCentreAnalyzer.cc:123
ESGetToken.h
GlobalPositionRcd
Definition: GlobalPositionRcd.h:6
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
PixelBaryCentreAnalyzer::BPIXLayer_Flipped_
GlobalPoint BPIXLayer_Flipped_[4]
Definition: PixelBaryCentreAnalyzer.cc:107
DetId
Definition: DetId.h:17
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
MakerMacros.h
TrackerTopology.h
BeamSpotObjects.h
PixelBaryCentreAnalyzer::tFileService
edm::Service< TFileService > tFileService
Definition: PixelBaryCentreAnalyzer.cc:115
BeamSpotObjectsRcd.h
TrackerTopologyRcd.h
PixelEndcapName
Definition: PixelEndcapName.h:16
SiPixelPI::quadrant
int quadrant(const DetId &detid, const TrackerTopology *tTopo_, bool phase_)
Definition: SiPixelPayloadInspectorHelper.h:124
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PixelBaryCentreAnalyzer::BPIX_NonFlipped_
GlobalPoint BPIX_NonFlipped_
Definition: PixelBaryCentreAnalyzer.cc:104
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
Service.h
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
PixelBaryCentreAnalyzer::PIX_
GlobalPoint PIX_
Definition: PixelBaryCentreAnalyzer.cc:103
PixelBaryCentreAnalyzer::siPixelQualityToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityFromDbRcd > siPixelQualityToken_
Definition: PixelBaryCentreAnalyzer.cc:91
PixelBaryCentreAnalyzer::FPIXDisks_minus_
GlobalPoint FPIXDisks_minus_[3]
Definition: PixelBaryCentreAnalyzer.cc:113
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
SiPixelQualityFromDbRcd
Definition: SiPixelQualityFromDbRcd.h:24
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
AlignTransform
Definition: AlignTransform.h:15
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TFileService.h
PixelBaryCentreAnalyzer
Definition: PixelBaryCentreAnalyzer.cc:62
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
TrackerDigiGeometryRecord.h
PixelBaryCentreAnalyzer::FPIXDisks_plus_
GlobalPoint FPIXDisks_plus_[3]
Definition: PixelBaryCentreAnalyzer.cc:112
edm::ParameterSet
Definition: ParameterSet.h:47
SiPixelQuality
Definition: SiPixelQuality.h:27
DetId::Tracker
Definition: DetId.h:25
BeamSpotObjects::GetY
double GetY() const
get Y beam position
Definition: BeamSpotObjects.h:69
align::DetectorGlobalPosition
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
Definition: DetectorGlobalPosition.cc:10
Event.h
PixelBaryCentreAnalyzer::~PixelBaryCentreAnalyzer
~PixelBaryCentreAnalyzer() override
Definition: PixelBaryCentreAnalyzer.cc:144
PixelBaryCentreAnalyzer::bsLabels_
std::vector< std::string > bsLabels_
Definition: PixelBaryCentreAnalyzer.cc:87
PixelBaryCentreAnalyzer::watcherTkAlign_
edm::ESWatcher< TrackerAlignmentRcd > watcherTkAlign_
Definition: PixelBaryCentreAnalyzer.cc:82
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
TrackerTopology::pxfModule
unsigned int pxfModule(const DetId &id) const
Definition: TrackerTopology.h:163
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
AlignTransform::translation
const Translation & translation() const
Definition: AlignTransform.h:33
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
PixelBaryCentreAnalyzer::ls_
int ls_
Definition: PixelBaryCentreAnalyzer.cc:99
BeamSpotObjects
Definition: BeamSpotObjects.h:20
TrackerAlignmentRcd.h
edm::EventSetup
Definition: EventSetup.h:58
PixelBaryCentreAnalyzer::bsTrees_
std::map< std::string, TTree * > bsTrees_
Definition: PixelBaryCentreAnalyzer.cc:117
PixelBaryCentreAnalyzer::BS_
GlobalPoint BS_
Definition: PixelBaryCentreAnalyzer.cc:101
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
PixelBaryCentreAnalyzer::FPIX_plus_
GlobalPoint FPIX_plus_
Definition: PixelBaryCentreAnalyzer.cc:111
PixelBaryCentreAnalyzer::bcLabels_
std::vector< std::string > bcLabels_
Definition: PixelBaryCentreAnalyzer.cc:85
PixelBaryCentreAnalyzer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PixelBaryCentreAnalyzer.cc:592
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
PixelBaryCentreAnalyzer::gprToken_
edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
Definition: PixelBaryCentreAnalyzer.cc:93
PixelBaryCentreAnalyzer::initBC
void initBC()
Definition: PixelBaryCentreAnalyzer.cc:159
Frameworkfwd.h
ESWatcher.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
PixelBaryCentreAnalyzer::tkAlignTokens_
std::map< std::string, edm::ESGetToken< Alignments, TrackerAlignmentRcd > > tkAlignTokens_
Definition: PixelBaryCentreAnalyzer.cc:94
PixelBaryCentreAnalyzer::bcTrees_
std::map< std::string, TTree * > bcTrees_
Definition: PixelBaryCentreAnalyzer.cc:116
PVValHelper::ladder
Definition: PVValidationHelpers.h:73
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
GlobalVector.h
PixelBaryCentreAnalyzer::bsTokens_
std::map< std::string, edm::ESGetToken< BeamSpotObjects, BeamSpotObjectsRcd > > bsTokens_
Definition: PixelBaryCentreAnalyzer.cc:95
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
SiPixelQuality.h
PixelBaryCentreAnalyzer::BPIX_Flipped_
GlobalPoint BPIX_Flipped_
Definition: PixelBaryCentreAnalyzer.cc:104
Alignments::m_align
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
PixelBaryCentreAnalyzer::BPIXLayer_
GlobalPoint BPIXLayer_[4]
Definition: PixelBaryCentreAnalyzer.cc:106
genParticles_cff.map
map
Definition: genParticles_cff.py:11
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
ParameterSet.h
PixelBaryCentreAnalyzer::run_
int run_
Definition: PixelBaryCentreAnalyzer.cc:98
PixelBaryCentreAnalyzer::trackerGeometryToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
Definition: PixelBaryCentreAnalyzer.cc:89
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
PixelBaryCentreAnalyzer::BPIXLayer_DiffFlippedNonFlipped_
GlobalPoint BPIXLayer_DiffFlippedNonFlipped_[4]
Definition: PixelBaryCentreAnalyzer.cc:109
Alignments
Definition: Alignments.h:10
GlobalPoint.h
BeamSpotObjects::GetX
double GetX() const
get X beam position
Definition: BeamSpotObjects.h:67
label
const char * label
Definition: PFTauDecayModeTools.cc:11
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
PixelBaryCentreAnalyzer::BPIXLayer_NonFlipped_
GlobalPoint BPIXLayer_NonFlipped_[4]
Definition: PixelBaryCentreAnalyzer.cc:108
PixelEndcapName::ringName
int ringName() const
ring Id
Definition: PixelEndcapName.h:57
PixelEndcapName.h
TrackerGeometry
Definition: TrackerGeometry.h:14