CMS 3D CMS Logo

EcalTPCondAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Class: EcalTPDBAnalyzer
4 //
10 //
11 //
12 // Original Author: Ursula Berthon
13 // Created: Wed Oct 15 11:38:38 CEST 2008
14 //
15 //
16 //
17 
18 // system include files
19 #include <fstream>
20 #include <iostream>
21 #include <memory>
22 #include <utility>
23 
24 // user include files
29 
46 
51 
53 
55 
56 {}
57 
59  edm::EventSetup const &evtSetup) {
60  // get geometry
61 
62  edm::ESHandle<CaloSubdetectorGeometry> theEndcapGeometry_handle,
63  theBarrelGeometry_handle;
64  evtSetup.get<EcalEndcapGeometryRecord>().get("EcalEndcap",
65  theEndcapGeometry_handle);
66  evtSetup.get<EcalBarrelGeometryRecord>().get("EcalBarrel",
67  theBarrelGeometry_handle);
68  theEndcapGeometry_ = &(*theEndcapGeometry_handle);
69  theBarrelGeometry_ = &(*theBarrelGeometry_handle);
70 
71  cacheID_ = this->getRecords(evtSetup);
72 }
73 
75 
77 
78 unsigned long long
80  //
81  // get Eventsetup records and print them
82  //
83  printComment();
84 
85  edm::ESHandle<EcalTPGPhysicsConst> theEcalTPGPhysConst_handle;
86  setup.get<EcalTPGPhysicsConstRcd>().get(theEcalTPGPhysConst_handle);
87  const EcalTPGPhysicsConst *ecaltpPhysConst =
88  theEcalTPGPhysConst_handle.product();
89  printEcalTPGPhysicsConst(ecaltpPhysConst);
90  // for EcalFenixStrip...
91 
92  // get parameter records for xtals
93  edm::ESHandle<EcalTPGLinearizationConst> theEcalTPGLinearization_handle;
94  setup.get<EcalTPGLinearizationConstRcd>().get(theEcalTPGLinearization_handle);
95  const EcalTPGLinearizationConst *ecaltpLin =
96  theEcalTPGLinearization_handle.product();
97 
98  edm::ESHandle<EcalTPGPedestals> theEcalTPGPedestals_handle;
99  setup.get<EcalTPGPedestalsRcd>().get(theEcalTPGPedestals_handle);
100  const EcalTPGPedestals *ecaltpPed = theEcalTPGPedestals_handle.product();
101  printCRYSTAL(ecaltpPed, ecaltpLin);
102 
103  // weight
104  edm::ESHandle<EcalTPGWeightIdMap> theEcalTPGWEightIdMap_handle;
105  setup.get<EcalTPGWeightIdMapRcd>().get(theEcalTPGWEightIdMap_handle);
106  const EcalTPGWeightIdMap *ecaltpgWeightMap =
107  theEcalTPGWEightIdMap_handle.product();
108  printWEIGHT(ecaltpgWeightMap);
109 
110  // .. and for EcalFenixTcp
111 
112  edm::ESHandle<EcalTPGFineGrainEBIdMap> theEcalTPGFineGrainEBIdMap_handle;
113  setup.get<EcalTPGFineGrainEBIdMapRcd>().get(
114  theEcalTPGFineGrainEBIdMap_handle);
115  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB =
116  theEcalTPGFineGrainEBIdMap_handle.product();
117  printEcalTPGFineGrainEBIdMap(ecaltpgFineGrainEB);
118 
119  edm::ESHandle<EcalTPGLutIdMap> theEcalTPGLutIdMap_handle;
120  setup.get<EcalTPGLutIdMapRcd>().get(theEcalTPGLutIdMap_handle);
121  const EcalTPGLutIdMap *ecaltpgLut = theEcalTPGLutIdMap_handle.product();
122  printEcalTPGLutIdMap(ecaltpgLut);
123 
124  // for strips
125  edm::ESHandle<EcalTPGSlidingWindow> theEcalTPGSlidingWindow_handle;
126  setup.get<EcalTPGSlidingWindowRcd>().get(theEcalTPGSlidingWindow_handle);
127  const EcalTPGSlidingWindow *ecaltpgSlidW =
128  theEcalTPGSlidingWindow_handle.product();
129  edm::ESHandle<EcalTPGFineGrainStripEE> theEcalTPGFineGrainStripEE_handle;
130  setup.get<EcalTPGFineGrainStripEERcd>().get(
131  theEcalTPGFineGrainStripEE_handle);
132  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE =
133  theEcalTPGFineGrainStripEE_handle.product();
134  edm::ESHandle<EcalTPGWeightGroup> theEcalTPGWEightGroup_handle;
135  setup.get<EcalTPGWeightGroupRcd>().get(theEcalTPGWEightGroup_handle);
136  const EcalTPGWeightGroup *ecaltpgWeightGroup =
137  theEcalTPGWEightGroup_handle.product();
138  printSTRIP(ecaltpgSlidW, ecaltpgWeightGroup, ecaltpgFgStripEE);
139 
140  // get parameter records for towers
141  edm::ESHandle<EcalTPGLutGroup> theEcalTPGLutGroup_handle;
142  setup.get<EcalTPGLutGroupRcd>().get(theEcalTPGLutGroup_handle);
143  const EcalTPGLutGroup *ecaltpgLutGroup = theEcalTPGLutGroup_handle.product();
144 
145  edm::ESHandle<EcalTPGFineGrainEBGroup> theEcalTPGFineGrainEBGroup_handle;
146  setup.get<EcalTPGFineGrainEBGroupRcd>().get(
147  theEcalTPGFineGrainEBGroup_handle);
148  const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup =
149  theEcalTPGFineGrainEBGroup_handle.product();
150  edm::ESHandle<EcalTPGSpike> theEcalTPGSpike_handle;
151  setup.get<EcalTPGSpikeRcd>().get(theEcalTPGSpike_handle);
152  const EcalTPGSpike *ecaltpgSpikeTh = theEcalTPGSpike_handle.product();
153 
154  printTOWEREB(ecaltpgSpikeTh, ecaltpgFgEBGroup, ecaltpgLutGroup);
155  edm::ESHandle<EcalTPGFineGrainTowerEE> theEcalTPGFineGrainTowerEE_handle;
156  setup.get<EcalTPGFineGrainTowerEERcd>().get(
157  theEcalTPGFineGrainTowerEE_handle);
158  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE =
159  theEcalTPGFineGrainTowerEE_handle.product();
160 
161  printTOWEREE(ecaltpgFineGrainTowerEE, ecaltpgLutGroup);
162 
163  // get parameters for BadX
164  /* edm::ESHandle<EcalTPGCrystalStatus> theEcalTPGCrystalStatus_handle;
165  setup.get<EcalTPGCrystalStatusRcd>().get(theEcalTPGCrystalStatus_handle);
166  const EcalTPGCrystalStatus * ecaltpgBadX =
167  theEcalTPGCrystalStatus_handle.product(); printBadX(ecaltpgBadX);
168 
169  // get parameters for BadTT
170  edm::ESHandle<EcalTPGTowerStatus> theEcalTPGTowerStatus_handle;
171  setup.get<EcalTPGTowerStatusRcd>().get(theEcalTPGTowerStatus_handle);
172  const EcalTPGTowerStatus * ecaltpgBadTT =
173  theEcalTPGTowerStatus_handle.product(); printBadTT(ecaltpgBadTT);
174  */
175 
176  // get parameters for BadStrip
177  /* edm::ESHandle<EcalTPGStripStatus> theEcalTPGStripStatus_handle;
178  setup.get<EcalTPGStripStatusRcd>().get(theEcalTPGStripStatus_handle);
179  const EcalTPGStripStatus * ecaltpgBadStrip =
180  theEcalTPGStripStatus_handle.product(); printBadStrip(ecaltpgBadStrip);
181  */
182 
183  std::cout << "EOF" << std::endl;
184 
185  return setup.get<EcalTPGFineGrainTowerEERcd>().cacheIdentifier();
186 }
187 
188 // ------------ method called to analyze the data ------------
190  const edm::EventSetup &iSetup) {}
191 
193 
195  const EcalTPGPhysicsConst *ecaltpgPhysConst) const {
197  const EcalTPGPhysicsConstMap &mymap = ecaltpgPhysConst->getMap();
198  for (it = mymap.begin(); it != mymap.end(); ++it) {
199  if (it == mymap.begin()) {
200  std::cout << "\nPHYSICS_EB " << (*it).first << std::endl;
201  } else {
202  std::cout << "\nPHYSICS_EE " << (*it).first << std::endl;
203  }
204  std::cout << (*it).second.EtSat << " " << (*it).second.ttf_threshold_Low
205  << " " << (*it).second.ttf_threshold_High << std::endl;
206  std::cout << (*it).second.FG_lowThreshold << " "
207  << (*it).second.FG_highThreshold << " "
208  << (*it).second.FG_lowRatio << " " << (*it).second.FG_highRatio
209  << std::endl;
210  }
211 }
212 
214  const EcalTPGSlidingWindow *slWin,
215  const EcalTPGWeightGroup *ecaltpgWeightGroup,
216  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE) const {
217  // print STRIP information
218  const EcalTPGSlidingWindowMap &slwinmap = slWin->getMap();
219  const EcalTPGFineGrainStripEEMap &fgstripEEmap = ecaltpgFgStripEE->getMap();
221  const EcalTPGGroups::EcalTPGGroupsMap &gMap = ecaltpgWeightGroup->getMap();
223 
224  std::cout << std::endl;
225  for (int mysub = 1; mysub <= 2; ++mysub) {
226  std::cout << std::endl;
227  for (it = slwinmap.begin(); it != slwinmap.end(); ++it) {
228  EcalTriggerElectronicsId elid((*it).first);
229  groupId = gMap.find((*it).first);
230  int subdet = elid.subdet();
231  if (subdet == mysub) {
232  if (subdet == 1) {
233  std::cout << "STRIP_EB " << std::dec << (*it).first << std::endl;
234  std::cout << std::hex << "0x" << (*it).second << std::endl;
235  std::cout << "" << (*groupId).second << std::endl; // weightgroupid
237  fgstripEEmap.find((*it).first);
238  if (it2 == fgstripEEmap.end()) {
239  edm::LogWarning("EcalTPGCondAnalyzer")
240  << " could not find strip Id " << (*it).first
241  << ", given in sliding window, inside the "
242  "EcalTPGFineGranStripEEMap!!!";
243  } else {
244  EcalTPGFineGrainStripEE::Item item = (*it2).second;
245  std::cout << std::hex << "0x" << item.threshold << " 0x" << item.lut
246  << std::endl;
247  }
248  } else if (subdet == 2) {
249  std::cout << "STRIP_EE " << std::dec << (*it).first << std::endl;
250  std::cout << std::hex << "0x" << (*it).second << std::endl;
251  std::cout << " " << (*groupId).second << std::endl; // weightgroupid
253  fgstripEEmap.find((*it).first);
254  if (it2 == fgstripEEmap.end()) {
255  edm::LogWarning("EcalTPGCondAnalyzer")
256  << " could not find strip Id " << (*it).first
257  << ", given in sliding window, inside the "
258  "EcalTPGFineGranStripEEMap!!!";
259  } else {
260  EcalTPGFineGrainStripEE::Item item = (*it2).second;
261  std::cout << std::hex << "0x" << item.threshold << " 0x" << item.lut
262  << std::endl;
263  }
264  }
265  }
266  }
267  }
268 }
269 
271  const EcalTPGWeightIdMap *ecaltpgWeightIdMap) const {
272 
273  std::cout << std::endl;
275  uint32_t w0, w1, w2, w3, w4;
277  ecaltpgWeightIdMap->getMap();
278  for (it = map.begin(); it != map.end(); ++it) {
279  std::cout << "WEIGHT " << (*it).first << std::endl;
280  (*it).second.getValues(w0, w1, w2, w3, w4);
281  std::cout << std::hex << "0x" << w0 << " 0x" << w1 << " 0x" << w2 << " 0x"
282  << w3 << " 0x" << w4 << " " << std::endl;
283  std::cout << std::endl;
284  std::cout << std::endl;
285  }
286 }
287 
289  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB) const {
292  ecaltpgFineGrainEB->getMap();
293  uint32_t ThresholdETLow, ThresholdETHigh, RatioLow, RatioHigh, LUT;
294 
295  // std::cout<<std::endl;
296  for (it = map.begin(); it != map.end(); ++it) {
297  std::cout << "FG " << (*it).first << std::endl;
298  (*it).second.getValues(ThresholdETLow, ThresholdETHigh, RatioLow, RatioHigh,
299  LUT);
300  std::cout << std::hex << "0x" << ThresholdETLow << " 0x" << ThresholdETHigh
301  << " 0x" << RatioLow << " 0x" << RatioHigh << " 0x" << LUT
302  << std::endl;
303  }
304 }
305 
307  const EcalTPGLutIdMap *ecaltpgLut) const {
309  const EcalTPGLutIdMap::EcalTPGLutMap &map = ecaltpgLut->getMap();
310 
311  std::cout << std::endl;
312  for (it = map.begin(); it != map.end(); ++it) {
313  std::cout << "LUT " << (*it).first << std::endl;
314  const unsigned int *lut = (*it).second.getLut();
315  for (unsigned int i = 0; i < 1024; ++i)
316  std::cout << std::hex << "0x" << *lut++ << std::endl;
317  }
318 }
319 
321  const EcalTPGPedestals *ecaltpPed,
322  const EcalTPGLinearizationConst *ecaltpLin) {
323 
324  std::cout << std::endl;
325  const EcalTPGPedestalsMap &pedMap = ecaltpPed->getMap();
326  const EcalTPGLinearizationConstMap &linMap = ecaltpLin->getMap();
327 
328  const std::vector<DetId> &ebCells =
330 
331  std::cout << "COMMENT ====== barrel crystals ====== " << std::endl;
332  for (std::vector<DetId>::const_iterator it = ebCells.begin();
333  it != ebCells.end(); ++it) {
334  EBDetId id(*it);
335  std::cout << "CRYSTAL " << std::dec << id.rawId() << std::endl;
336  const EcalTPGPedestal &ped = pedMap[id.rawId()];
337  const EcalTPGLinearizationConstant &lin = linMap[id.rawId()];
338  std::cout << std::hex << " 0x" << ped.mean_x12 << " 0x" << lin.mult_x12
339  << " 0x" << lin.shift_x12 << std::endl;
340  std::cout << std::hex << " 0x" << ped.mean_x6 << " 0x" << lin.mult_x6
341  << " 0x" << lin.shift_x6 << std::endl;
342  std::cout << std::hex << " 0x" << ped.mean_x1 << " 0x" << lin.mult_x1
343  << " 0x" << lin.shift_x1 << std::endl;
344  }
345 
346  const std::vector<DetId> &eeCells =
348  std::cout << "COMMENT ====== endcap crystals ====== " << std::endl;
349  for (std::vector<DetId>::const_iterator it = eeCells.begin();
350  it != eeCells.end(); ++it) {
351  EEDetId id(*it);
352  std::cout << "CRYSTAL " << std::dec << id.rawId() << std::endl;
353  const EcalTPGPedestal &ped = pedMap[id.rawId()];
354  const EcalTPGLinearizationConstant &lin = linMap[id.rawId()];
355  std::cout << std::hex << " 0x" << ped.mean_x12 << " 0x" << lin.mult_x12
356  << " 0x" << lin.shift_x12 << std::endl;
357  std::cout << std::hex << " 0x" << ped.mean_x6 << " 0x" << lin.mult_x6
358  << " 0x" << lin.shift_x6 << std::endl;
359  std::cout << std::hex << " 0x" << ped.mean_x1 << " 0x" << lin.mult_x1
360  << " 0x" << lin.shift_x1 << std::endl;
361  }
362 }
364  std::cout << "COMMENT put your comments here\n"
365  << "COMMENT =================================\n"
366  << "COMMENT physics EB structure\n"
367  << "COMMENT\n"
368  << "COMMENT EtSaturation (GeV), ttf_threshold_Low (GeV), "
369  "ttf_threshold_High (GeV)\n"
370  << "COMMENT FG_lowThreshold (GeV), FG_highThreshold (GeV), "
371  "FG_lowRatio, FG_highRatio\n"
372  << "COMMENT =================================\n"
373  << "COMMENT\n"
374  << "COMMENT =================================\n"
375  << "COMMENT physics EE structure\n"
376  << "COMMENT\n"
377  << "COMMENT EtSaturation (GeV), ttf_threshold_Low (GeV), "
378  "ttf_threshold_High (GeV)\n"
379  << "COMMENT FG_Threshold (GeV), dummy, dummy, dummy\n"
380  << "COMMENT =================================\n"
381  << "COMMENT\n"
382  << "COMMENT =================================\n"
383  << "COMMENT crystal structure (same for EB and EE)\n"
384  << "COMMENT\n"
385  << "COMMENT ped, mult, shift [gain12]\n"
386  << "COMMENT ped, mult, shift [gain6]\n"
387  << "COMMENT ped, mult, shift [gain1]\n"
388  << "COMMENT =================================\n"
389  << "COMMENT\n"
390  << "COMMENT =================================\n"
391  << "COMMENT strip EB structure\n"
392  << "COMMENT\n"
393  << "COMMENT sliding_window\n"
394  << "COMMENT weightGroupId\n"
395  << "COMMENT threshold_sfg lut_sfg\n"
396  << "COMMENT =================================\n"
397  << "COMMENT\n"
398  << "COMMENT =================================\n"
399  << "COMMENT strip EE structure\n"
400  << "COMMENT\n"
401  << "COMMENT sliding_window\n"
402  << "COMMENT weightGroupId\n"
403  << "COMMENT threshold_fg lut_fg\n"
404  << "COMMENT =================================\n"
405  << "COMMENT\n"
406  << "COMMENT =================================\n"
407  << "COMMENT tower EB structure\n"
408  << "COMMENT\n"
409  << "COMMENT LUTGroupId\n"
410  << "COMMENT FgGroupId\n"
411  << "COMMENT spike_killing_threshold\n"
412  << "COMMENT =================================\n"
413  << "COMMENT\n"
414  << "COMMENT =================================\n"
415  << "COMMENT tower EE structure\n"
416  << "COMMENT\n"
417  << "COMMENT LUTGroupId\n"
418  << "COMMENT tower_lut_fg\n"
419  << "COMMENT =================================\n"
420  << "COMMENT\n"
421  << "COMMENT =================================\n"
422  << "COMMENT Weight structure\n"
423  << "COMMENT\n"
424  << "COMMENT weightGroupId\n"
425  << "COMMENT w0, w1, w2, w3, w4\n"
426  << "COMMENT =================================\n"
427  << "COMMENT\n"
428  << "COMMENT =================================\n"
429  << "COMMENT lut structure\n"
430  << "COMMENT\n"
431  << "COMMENT LUTGroupId\n"
432  << "COMMENT LUT[1-1024]\n"
433  << "COMMENT =================================\n"
434  << "COMMENT\n"
435  << "COMMENT =================================\n"
436  << "COMMENT fg EB structure\n"
437  << "COMMENT\n"
438  << "COMMENT FgGroupId\n"
439  << "COMMENT el, eh, tl, th, lut_fg\n"
440  << "COMMENT =================================\n"
441  << "COMMENT" << std::endl;
442 }
443 
444 /*void EcalTPCondAnalyzer::printTOWEREB(const EcalTPGFineGrainEBGroup
445 *ecaltpgFgEBGroup,const EcalTPGLutGroup *ecaltpgLutGroup) const {
446 
447  const EcalTPGGroups::EcalTPGGroupsMap &lutMap=ecaltpgLutGroup->getMap();
448  EcalTPGGroups::EcalTPGGroupsMapItr lutGroupId;
449  const EcalTPGGroups::EcalTPGGroupsMap &fgMap=ecaltpgFgEBGroup->getMap();
450  EcalTPGGroups::EcalTPGGroupsMapItr it;
451 
452  std::cout<<std::endl;
453  for (it=fgMap.begin();it!=fgMap.end();++it) {
454  std::cout <<"TOWER_EB "<<std::dec<<(*it).first<<std::endl;
455  lutGroupId=lutMap.find((*it).first);
456  std::cout <<" "<<(*it).second<<std::endl;
457  std::cout <<" "<<(*lutGroupId).second<<std::endl;
458  }
459 }
460 */
461 
463  const EcalTPGSpike *ecaltpgSpikeTh,
464  const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,
465  const EcalTPGLutGroup *ecaltpgLutGroup) const {
466 
467  const EcalTPGGroups::EcalTPGGroupsMap &lutMap = ecaltpgLutGroup->getMap();
469  const EcalTPGGroups::EcalTPGGroupsMap &fgMap = ecaltpgFgEBGroup->getMap();
471 
472  const EcalTPGSpike::EcalTPGSpikeMap &spikeThMap = ecaltpgSpikeTh->getMap();
474 
475  std::cout << std::endl;
476  for (it = fgMap.begin(); it != fgMap.end(); ++it) {
477  std::cout << "TOWER_EB " << std::dec << (*it).first << std::endl;
478  lutGroupId = lutMap.find((*it).first);
479  itSpikeTh = spikeThMap.find((*it).first);
480  std::cout << " " << (*it).second << std::endl;
481  std::cout << " " << (*lutGroupId).second << std::endl;
482  std::cout << " " << (*itSpikeTh).second << std::endl;
483  }
484 }
485 
487  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,
488  const EcalTPGLutGroup *ecaltpgLutGroup) const {
489 
491  const EcalTPGFineGrainTowerEEMap &map = ecaltpgFineGrainTowerEE->getMap();
492  const EcalTPGGroups::EcalTPGGroupsMap &lutMap = ecaltpgLutGroup->getMap();
494 
495  std::cout << std::endl;
496  for (it = map.begin(); it != map.end(); ++it) {
497  std::cout << "TOWER_EE " << std::dec << (*it).first << std::endl;
498  lutGroupId = lutMap.find((*it).first);
499  std::cout << " " << (*lutGroupId).second << std::endl;
500  std::cout << std::hex << "0x" << (*it).second << std::endl;
501  }
502 }
503 
504 /*void EcalTPCondAnalyzer::printBadX(const EcalTPGCrystalStatus *ecaltpgBadX)
505 const {
506 
507  std::ofstream myfile;
508  myfile.open("badXvalues.txt");
509 
510  const EcalTPGCrystalStatusMap & badXMap = ecaltpgBadX->getMap();
511 
512  const std::vector<DetId> & ebCells =
513 theBarrelGeometry_->getValidDetIds(DetId::Ecal, EcalBarrel);
514 
515  myfile <<"COMMENT ====== barrel masked crystals ====== "<<std::endl;
516  myfile << "RawId eta phi " << std::endl;
517 
518  for (std::vector<DetId>::const_iterator it = ebCells.begin(); it !=
519 ebCells.end(); ++it) {
520 
521  EBDetId id(*it) ;
522  const EcalTPGCrystalStatusCode &badXeb=badXMap[id.rawId()];
523  // Print in the text file obly the masked crystals
524  if (badXeb.getStatusCode() != 0){
525  myfile << "" << id.rawId() << " " << id.ieta() << " " <<
526 id.iphi() << std::endl;
527  }
528 
529  }
530 
531  myfile << " " << std::endl;
532 
533  const std::vector<DetId> & eeCells =
534 theEndcapGeometry_->getValidDetIds(DetId::Ecal, EcalEndcap);
535 
536  myfile <<"COMMENT ====== endcap masked crystals ====== "<<std::endl;
537  myfile << "RawId x y z " << std::endl;
538 
539  for (std::vector<DetId>::const_iterator it = eeCells.begin(); it !=
540 eeCells.end(); ++it) {
541 
542  EEDetId id(*it) ;
543  const EcalTPGCrystalStatusCode &badXee=badXMap[id.rawId()];
544  // Print in the text file only the masked clystals
545  if (badXee.getStatusCode() != 0){
546  myfile << "" << id.rawId() << " " << id.ix() << " " << id.iy() << "
547 "<< id.zside() << std::endl;
548  }
549  }
550 
551  myfile.close();
552 }
553 */
554 
555 /*void EcalTPCondAnalyzer::printBadTT(const EcalTPGTowerStatus *ecaltpgBadTT)
556 const { std::ofstream myfilebadTT; myfilebadTT.open("badTTvalues.txt"); int ieta
557 = 0; int iphi = 0;
558 
559  const EcalTPGTowerStatusMap & badTTMap = ecaltpgBadTT -> getMap();
560  EcalTPGTowerStatusMapIterator it;
561 
562  myfilebadTT <<"Barrel and endcap masked Trigger Towers"<<std::endl;
563  myfilebadTT <<"RawId " << " iphi " << " ieta " << std::endl;
564  myfilebadTT <<""<< std::endl;
565 
566  for (it=badTTMap.begin();it!=badTTMap.end();++it) {
567 
568  // Print in the text file only the masked barrel and endcap TTs
569  if ((*it).second != 0){
570 
571  EcalTrigTowerDetId ttId((*it).first);
572  ieta = ttId.ieta();
573  iphi = ttId.iphi();
574 
575  myfilebadTT <<""<< std::dec<<(*it).first << " " << iphi << " " <<
576 ieta << std::endl;
577 
578  }
579  }
580 
581 
582  myfilebadTT.close();
583 
584 }
585 */
const std::map< uint32_t, uint32_t > & getMap() const
std::map< uint32_t, EcalTPGWeights >::const_iterator EcalTPGWeightMapItr
const EcalTPGGroupsMap & getMap() const
Definition: EcalTPGGroups.h:28
std::map< uint32_t, EcalTPGFineGrainStripEE::Item > EcalTPGFineGrainStripEEMap
void printEcalTPGLutIdMap(const EcalTPGLutIdMap *ecaltpgLut) const
std::map< uint32_t, uint32_t >::const_iterator EcalTPGFineGrainTowerEEMapIterator
const CaloSubdetectorGeometry * theBarrelGeometry_
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
const CaloSubdetectorGeometry * theEndcapGeometry_
const self & getMap() const
std::map< uint32_t, uint32_t >::const_iterator EcalTPGGroupsMapItr
Definition: EcalTPGGroups.h:23
unsigned long long cacheID_
void beginJob() override
void endJob() override
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
std::map< uint32_t, uint32_t > EcalTPGSlidingWindowMap
~EcalTPCondAnalyzer() override
unsigned long long getRecords(edm::EventSetup const &setup)
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
std::map< uint32_t, uint16_t >::const_iterator EcalTPGSpikeMapIterator
Definition: EcalTPGSpike.h:13
void printSTRIP(const EcalTPGSlidingWindow *ecaltpgSlidW, const EcalTPGWeightGroup *ecaltpgWeightGroup, const EcalTPGFineGrainStripEE *ecaltpgFgStripEE) const
EcalTPCondAnalyzer(const edm::ParameterSet &)
common ppss p3p6s2 common epss epspn46 common const1 w4
Definition: inclppp.h:1
int iEvent
Definition: GenABIO.cc:224
const EcalTPGLutMap & getMap() const
std::map< uint32_t, EcalTPGFineGrainStripEE::Item >::const_iterator EcalTPGFineGrainStripEEMapIterator
void printWEIGHT(const EcalTPGWeightIdMap *ecaltpgWeightMap) const
const std::map< uint32_t, Item > & getMap() const
const EcalTPGFineGrainEBMap & getMap() const
const EcalTPGWeightMap & getMap() const
std::map< uint32_t, EcalTPGWeights > EcalTPGWeightMap
const std::map< uint32_t, uint32_t > & getMap() const
void printEcalTPGFineGrainEBIdMap(const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB) const
void printTOWEREB(const EcalTPGSpike *ecaltpgSpike, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup, const EcalTPGLutGroup *ecaltpgLutGroup) const
void printComment() const
std::map< uint32_t, uint32_t > EcalTPGFineGrainTowerEEMap
const std::map< uint32_t, Item > & getMap() const
void printTOWEREE(const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE, const EcalTPGLutGroup *ecaltpgLutGroup) const
std::map< uint32_t, EcalTPGFineGrainConstEB >::const_iterator EcalTPGFineGrainEBMapItr
void printCRYSTAL(const EcalTPGPedestals *ecaltpPed, const EcalTPGLinearizationConst *ecaltpLin)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< uint32_t, EcalTPGLut > EcalTPGLutMap
common ppss p3p6s2 common epss epspn46 common const1 w3
Definition: inclppp.h:1
void beginRun(const edm::Run &run, const edm::EventSetup &es)
std::map< uint32_t, EcalTPGFineGrainConstEB > EcalTPGFineGrainEBMap
T get() const
Definition: EventSetup.h:71
void printEcalTPGPhysicsConst(const EcalTPGPhysicsConst *) const
std::map< uint32_t, uint16_t > EcalTPGSpikeMap
Definition: EcalTPGSpike.h:12
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap
std::vector< unsigned short int > LUT
Definition: DTTracoLUTs.h:31
std::map< uint32_t, EcalTPGPhysicsConst::Item >::const_iterator EcalTPGPhysicsConstMapIterator
T const * product() const
Definition: ESHandle.h:86
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
std::map< uint32_t, uint32_t >::const_iterator EcalTPGSlidingWindowMapIterator
std::map< uint32_t, uint32_t > EcalTPGGroupsMap
Definition: EcalTPGGroups.h:22
std::map< uint32_t, EcalTPGLut >::const_iterator EcalTPGLutMapItr
Definition: Run.h:45
const std::map< uint32_t, uint16_t > & getMap() const
Definition: EcalTPGSpike.h:19
EcalSubdetector subdet() const
get the subdet