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 
19 // system include files
20 #include <memory>
21 #include <utility>
22 #include <iostream>
23 #include <fstream>
24 
25 // user include files
30 
47 
52 
54 
56 
57 {}
58 
60  // get geometry
61 
62  edm::ESHandle<CaloSubdetectorGeometry> theEndcapGeometry_handle, theBarrelGeometry_handle;
63  evtSetup.get<EcalEndcapGeometryRecord>().get("EcalEndcap",theEndcapGeometry_handle);
64  evtSetup.get<EcalBarrelGeometryRecord>().get("EcalBarrel",theBarrelGeometry_handle);
65  theEndcapGeometry_ = &(*theEndcapGeometry_handle);
66  theBarrelGeometry_ = &(*theBarrelGeometry_handle);
67 
68  cacheID_=this->getRecords(evtSetup);
69 }
70 
72 {}
73 
74 
76 }
77 
79  //
80  // get Eventsetup records and print them
81  //
82  printComment();
83 
84  edm::ESHandle<EcalTPGPhysicsConst> theEcalTPGPhysConst_handle;
85  setup.get<EcalTPGPhysicsConstRcd>().get(theEcalTPGPhysConst_handle);
86  const EcalTPGPhysicsConst * ecaltpPhysConst = theEcalTPGPhysConst_handle.product();
87  printEcalTPGPhysicsConst(ecaltpPhysConst);
88  // for EcalFenixStrip...
89 
90  // get parameter records for xtals
91  edm::ESHandle<EcalTPGLinearizationConst> theEcalTPGLinearization_handle;
92  setup.get<EcalTPGLinearizationConstRcd>().get(theEcalTPGLinearization_handle);
93  const EcalTPGLinearizationConst * ecaltpLin = theEcalTPGLinearization_handle.product();
94 
95  edm::ESHandle<EcalTPGPedestals> theEcalTPGPedestals_handle;
96  setup.get<EcalTPGPedestalsRcd>().get(theEcalTPGPedestals_handle);
97  const EcalTPGPedestals * ecaltpPed = theEcalTPGPedestals_handle.product();
98  printCRYSTAL(ecaltpPed,ecaltpLin );
99 
100 
101  //weight
102  edm::ESHandle<EcalTPGWeightIdMap> theEcalTPGWEightIdMap_handle;
103  setup.get<EcalTPGWeightIdMapRcd>().get(theEcalTPGWEightIdMap_handle);
104  const EcalTPGWeightIdMap * ecaltpgWeightMap = theEcalTPGWEightIdMap_handle.product();
105  printWEIGHT(ecaltpgWeightMap);
106 
107  // .. and for EcalFenixTcp
108 
109  edm::ESHandle<EcalTPGFineGrainEBIdMap> theEcalTPGFineGrainEBIdMap_handle;
110  setup.get<EcalTPGFineGrainEBIdMapRcd>().get(theEcalTPGFineGrainEBIdMap_handle);
111  const EcalTPGFineGrainEBIdMap * ecaltpgFineGrainEB = theEcalTPGFineGrainEBIdMap_handle.product();
112  printEcalTPGFineGrainEBIdMap(ecaltpgFineGrainEB);
113 
114 
115  edm::ESHandle<EcalTPGLutIdMap> theEcalTPGLutIdMap_handle;
116  setup.get<EcalTPGLutIdMapRcd>().get(theEcalTPGLutIdMap_handle);
117  const EcalTPGLutIdMap * ecaltpgLut = theEcalTPGLutIdMap_handle.product();
118  printEcalTPGLutIdMap(ecaltpgLut);
119 
120  //for strips
121  edm::ESHandle<EcalTPGSlidingWindow> theEcalTPGSlidingWindow_handle;
122  setup.get<EcalTPGSlidingWindowRcd>().get(theEcalTPGSlidingWindow_handle);
123  const EcalTPGSlidingWindow * ecaltpgSlidW = theEcalTPGSlidingWindow_handle.product();
124  edm::ESHandle<EcalTPGFineGrainStripEE> theEcalTPGFineGrainStripEE_handle;
125  setup.get<EcalTPGFineGrainStripEERcd>().get(theEcalTPGFineGrainStripEE_handle);
126  const EcalTPGFineGrainStripEE * ecaltpgFgStripEE = theEcalTPGFineGrainStripEE_handle.product();
127  edm::ESHandle<EcalTPGWeightGroup> theEcalTPGWEightGroup_handle;
128  setup.get<EcalTPGWeightGroupRcd>().get(theEcalTPGWEightGroup_handle);
129  const EcalTPGWeightGroup * ecaltpgWeightGroup = theEcalTPGWEightGroup_handle.product();
130  printSTRIP(ecaltpgSlidW,ecaltpgWeightGroup,ecaltpgFgStripEE);
131 
132  // get parameter records for towers
133  edm::ESHandle<EcalTPGLutGroup> theEcalTPGLutGroup_handle;
134  setup.get<EcalTPGLutGroupRcd>().get(theEcalTPGLutGroup_handle);
135  const EcalTPGLutGroup * ecaltpgLutGroup = theEcalTPGLutGroup_handle.product();
136 
137  edm::ESHandle<EcalTPGFineGrainEBGroup> theEcalTPGFineGrainEBGroup_handle;
138  setup.get<EcalTPGFineGrainEBGroupRcd>().get(theEcalTPGFineGrainEBGroup_handle);
139  const EcalTPGFineGrainEBGroup * ecaltpgFgEBGroup = theEcalTPGFineGrainEBGroup_handle.product();
140  edm::ESHandle<EcalTPGSpike> theEcalTPGSpike_handle;
141  setup.get<EcalTPGSpikeRcd>().get(theEcalTPGSpike_handle);
142  const EcalTPGSpike * ecaltpgSpikeTh = theEcalTPGSpike_handle.product();
143 
144  printTOWEREB(ecaltpgSpikeTh, ecaltpgFgEBGroup,ecaltpgLutGroup);
145  edm::ESHandle<EcalTPGFineGrainTowerEE> theEcalTPGFineGrainTowerEE_handle;
146  setup.get<EcalTPGFineGrainTowerEERcd>().get(theEcalTPGFineGrainTowerEE_handle);
147  const EcalTPGFineGrainTowerEE * ecaltpgFineGrainTowerEE = theEcalTPGFineGrainTowerEE_handle.product();
148 
149  printTOWEREE(ecaltpgFineGrainTowerEE, ecaltpgLutGroup);
150 
151  // get parameters for BadX
152 /* edm::ESHandle<EcalTPGCrystalStatus> theEcalTPGCrystalStatus_handle;
153  setup.get<EcalTPGCrystalStatusRcd>().get(theEcalTPGCrystalStatus_handle);
154  const EcalTPGCrystalStatus * ecaltpgBadX = theEcalTPGCrystalStatus_handle.product();
155  printBadX(ecaltpgBadX);
156 
157  // get parameters for BadTT
158  edm::ESHandle<EcalTPGTowerStatus> theEcalTPGTowerStatus_handle;
159  setup.get<EcalTPGTowerStatusRcd>().get(theEcalTPGTowerStatus_handle);
160  const EcalTPGTowerStatus * ecaltpgBadTT = theEcalTPGTowerStatus_handle.product();
161  printBadTT(ecaltpgBadTT);
162 */
163 
164  // get parameters for BadStrip
165 /* edm::ESHandle<EcalTPGStripStatus> theEcalTPGStripStatus_handle;
166  setup.get<EcalTPGStripStatusRcd>().get(theEcalTPGStripStatus_handle);
167  const EcalTPGStripStatus * ecaltpgBadStrip = theEcalTPGStripStatus_handle.product();
168  printBadStrip(ecaltpgBadStrip);
169 */
170 
171 
172  std::cout<<"EOF"<<std::endl;
173 
174  return setup.get<EcalTPGFineGrainTowerEERcd>().cacheIdentifier();
175 }
176 
177 // ------------ method called to analyze the data ------------
178 void
180 }
181 
182 void
184 }
185 
188  const EcalTPGPhysicsConstMap& mymap=ecaltpgPhysConst->getMap();
189  for (it=mymap.begin();it!=mymap.end();++it) {
190  if (it==mymap.begin()) {
191  std::cout<<"\nPHYSICS_EB "<<(*it).first<<std::endl;
192  } else {
193  std::cout<<"\nPHYSICS_EE "<<(*it).first<<std::endl;
194  }
195  std::cout<<(*it).second.EtSat<<" "<<(*it).second.ttf_threshold_Low<<" "<<(*it).second.ttf_threshold_High<<std::endl;
196  std::cout<<(*it).second.FG_lowThreshold<<" "<<(*it).second.FG_highThreshold<<" "<<(*it).second.FG_lowRatio<<" "<<(*it).second.FG_highRatio<<std::endl;
197  }
198 }
199 
200 void EcalTPCondAnalyzer::printSTRIP(const EcalTPGSlidingWindow *slWin,const EcalTPGWeightGroup *ecaltpgWeightGroup,const EcalTPGFineGrainStripEE * ecaltpgFgStripEE) const {
201  // print STRIP information
202  const EcalTPGSlidingWindowMap &slwinmap = slWin -> getMap();
203  const EcalTPGFineGrainStripEEMap &fgstripEEmap= ecaltpgFgStripEE->getMap();
205  const EcalTPGGroups::EcalTPGGroupsMap &gMap=ecaltpgWeightGroup->getMap();
207 
208  std::cout<<std::endl;
209  for (int mysub=1;mysub<=2;++mysub) {
210  std::cout<<std::endl;
211  for (it=slwinmap.begin();it!=slwinmap.end();++it) {
212  EcalTriggerElectronicsId elid((*it).first);
213  groupId=gMap.find((*it).first);
214  int subdet =elid.subdet();
215  if (subdet==mysub) {
216  if (subdet==1) {
217  std::cout<<"STRIP_EB "<<std::dec<<(*it).first<<std::endl;
218  std::cout << std::hex << "0x" <<(*it).second<<std::endl ;
219  std::cout <<"" <<(*groupId).second<< std::endl ; //weightgroupid
220  EcalTPGFineGrainStripEEMapIterator it2=fgstripEEmap.find((*it).first);
221  if (it2==fgstripEEmap.end()) {
222  edm::LogWarning("EcalTPGCondAnalyzer") <<" could not find strip Id "<<(*it).first<<", given in sliding window, inside the EcalTPGFineGranStripEEMap!!!";
223  } else {
224  EcalTPGFineGrainStripEE::Item item=(*it2).second;
225  std::cout<<std::hex<<"0x"<<item.threshold<<" 0x"<<item.lut<<std::endl ;
226  }
227  }else if (subdet==2) {
228  std::cout<<"STRIP_EE "<<std::dec<<(*it).first<<std::endl;
229  std::cout << std::hex << "0x" <<(*it).second<<std::endl ;
230  std::cout <<" " <<(*groupId).second<<std::endl ;//weightgroupid
231  EcalTPGFineGrainStripEEMapIterator it2=fgstripEEmap.find((*it).first);
232  if (it2==fgstripEEmap.end()) {
233  edm::LogWarning("EcalTPGCondAnalyzer") <<" could not find strip Id "<<(*it).first<<", given in sliding window, inside the EcalTPGFineGranStripEEMap!!!";
234  } else {
235  EcalTPGFineGrainStripEE::Item item=(*it2).second;
236  std::cout<<std::hex<<"0x"<<item.threshold<<" 0x"<<item.lut<<std::endl ;
237  }
238  }
239  }
240  }
241  }
242 }
243 
244 void EcalTPCondAnalyzer::printWEIGHT(const EcalTPGWeightIdMap * ecaltpgWeightIdMap) const {
245 
246  std::cout<<std::endl;
248  uint32_t w0,w1,w2,w3,w4;
249  const EcalTPGWeightIdMap::EcalTPGWeightMap& map=ecaltpgWeightIdMap->getMap();
250  for (it=map.begin();it!=map.end();++it) {
251  std::cout <<"WEIGHT "<<(*it).first<<std::endl;
252  (*it).second.getValues(w0,w1,w2,w3,w4);
253  std::cout <<std::hex<<"0x"<<w0<<" 0x"<<w1<<" 0x"<<w2<<" 0x"<<w3<<" 0x"<<w4<<" "<<std::endl;
254  std::cout<<std::endl;
255  std::cout<<std::endl;
256  }
257 }
258 
261  const EcalTPGFineGrainEBIdMap::EcalTPGFineGrainEBMap& map=ecaltpgFineGrainEB->getMap();
262  uint32_t ThresholdETLow, ThresholdETHigh, RatioLow, RatioHigh, LUT;
263 
264  //std::cout<<std::endl;
265  for (it=map.begin();it!=map.end();++it) {
266  std::cout <<"FG "<<(*it).first<<std::endl;
267  (*it).second.getValues(ThresholdETLow, ThresholdETHigh, RatioLow, RatioHigh, LUT);
268  std::cout <<std::hex<<"0x"<<ThresholdETLow<<" 0x"<<ThresholdETHigh<<" 0x"<<RatioLow<<" 0x"<<RatioHigh<<" 0x"<<LUT<<std::endl;
269  }
270 }
271 
272 
275  const EcalTPGLutIdMap::EcalTPGLutMap& map=ecaltpgLut->getMap();
276 
277  std::cout<<std::endl;
278  for (it=map.begin();it!=map.end();++it) {
279  std::cout <<"LUT "<<(*it).first<<std::endl;
280  const unsigned int * lut=(*it).second.getLut();
281  for (unsigned int i=0;i<1024;++i) std::cout <<std::hex<<"0x"<<*lut++<<std::endl;
282  }
283 }
284 
286 
287  std::cout<<std::endl;
288  const EcalTPGPedestalsMap& pedMap=ecaltpPed->getMap();
289  const EcalTPGLinearizationConstMap& linMap=ecaltpLin->getMap();
290 
291  const std::vector<DetId> & ebCells = theBarrelGeometry_->getValidDetIds(DetId::Ecal, EcalBarrel);
292 
293  std::cout<<"COMMENT ====== barrel crystals ====== "<<std::endl;
294  for (std::vector<DetId>::const_iterator it = ebCells.begin(); it != ebCells.end(); ++it) {
295  EBDetId id(*it) ;
296  std::cout <<"CRYSTAL "<<std::dec<<id.rawId()<<std::endl;
297  const EcalTPGPedestal &ped=pedMap[id.rawId()];
298  const EcalTPGLinearizationConstant &lin=linMap[id.rawId()];
299  std::cout<<std::hex<<" 0x"<<ped.mean_x12<<" 0x"<<lin.mult_x12<<" 0x"<<lin.shift_x12<<std::endl;
300  std::cout<<std::hex<<" 0x"<<ped.mean_x6 <<" 0x"<<lin.mult_x6 <<" 0x"<<lin.shift_x6<<std::endl;
301  std::cout<<std::hex<<" 0x"<<ped.mean_x1 <<" 0x"<<lin.mult_x1 <<" 0x"<<lin.shift_x1<<std::endl;
302  }
303 
304  const std::vector<DetId> & eeCells = theEndcapGeometry_->getValidDetIds(DetId::Ecal, EcalEndcap);
305  std::cout<<"COMMENT ====== endcap crystals ====== "<<std::endl;
306  for (std::vector<DetId>::const_iterator it = eeCells.begin(); it != eeCells.end(); ++it) {
307  EEDetId id(*it) ;
308  std::cout <<"CRYSTAL "<<std::dec<<id.rawId()<<std::endl;
309  const EcalTPGPedestal &ped=pedMap[id.rawId()];
310  const EcalTPGLinearizationConstant &lin=linMap[id.rawId()];
311  std::cout<<std::hex<<" 0x"<<ped.mean_x12<<" 0x"<<lin.mult_x12<<" 0x"<<lin.shift_x12<<std::endl;
312  std::cout<<std::hex<<" 0x"<<ped.mean_x6 <<" 0x"<<lin.mult_x6 <<" 0x"<<lin.shift_x6<<std::endl;
313  std::cout<<std::hex<<" 0x"<<ped.mean_x1 <<" 0x"<<lin.mult_x1 <<" 0x"<<lin.shift_x1<<std::endl;
314  }
315 }
317  std::cout<<"COMMENT put your comments here\n"<<
318  "COMMENT =================================\n"<<
319  "COMMENT physics EB structure\n"<<
320  "COMMENT\n"<<
321  "COMMENT EtSaturation (GeV), ttf_threshold_Low (GeV), ttf_threshold_High (GeV)\n"<<
322  "COMMENT FG_lowThreshold (GeV), FG_highThreshold (GeV), FG_lowRatio, FG_highRatio\n"<<
323  "COMMENT =================================\n"<<
324  "COMMENT\n"<<
325  "COMMENT =================================\n"<<
326  "COMMENT physics EE structure\n"<<
327  "COMMENT\n"<<
328  "COMMENT EtSaturation (GeV), ttf_threshold_Low (GeV), ttf_threshold_High (GeV)\n"<<
329  "COMMENT FG_Threshold (GeV), dummy, dummy, dummy\n"<<
330  "COMMENT =================================\n"<<
331  "COMMENT\n"<<
332  "COMMENT =================================\n"<<
333  "COMMENT crystal structure (same for EB and EE)\n"<<
334  "COMMENT\n"<<
335  "COMMENT ped, mult, shift [gain12]\n"<<
336  "COMMENT ped, mult, shift [gain6]\n"<<
337  "COMMENT ped, mult, shift [gain1]\n"<<
338  "COMMENT =================================\n"<<
339  "COMMENT\n"<<
340  "COMMENT =================================\n"<<
341  "COMMENT strip EB structure\n"<<
342  "COMMENT\n"<<
343  "COMMENT sliding_window\n"<<
344  "COMMENT weightGroupId\n"<<
345  "COMMENT threshold_sfg lut_sfg\n"<<
346  "COMMENT =================================\n"<<
347  "COMMENT\n"<<
348  "COMMENT =================================\n"<<
349  "COMMENT strip EE structure\n"<<
350  "COMMENT\n"<<
351  "COMMENT sliding_window\n"<<
352  "COMMENT weightGroupId\n"<<
353  "COMMENT threshold_fg lut_fg\n"<<
354  "COMMENT =================================\n"<<
355  "COMMENT\n"<<
356  "COMMENT =================================\n"<<
357  "COMMENT tower EB structure\n"<<
358  "COMMENT\n"<<
359  "COMMENT LUTGroupId\n"<<
360  "COMMENT FgGroupId\n"<<
361  "COMMENT spike_killing_threshold\n"<<
362  "COMMENT =================================\n"<<
363  "COMMENT\n"<<
364  "COMMENT =================================\n"<<
365  "COMMENT tower EE structure\n"<<
366  "COMMENT\n"<<
367  "COMMENT LUTGroupId\n"<<
368  "COMMENT tower_lut_fg\n"<<
369  "COMMENT =================================\n"<<
370  "COMMENT\n"<<
371  "COMMENT =================================\n"<<
372  "COMMENT Weight structure\n"<<
373  "COMMENT\n"<<
374  "COMMENT weightGroupId\n"<<
375  "COMMENT w0, w1, w2, w3, w4\n"<<
376  "COMMENT =================================\n"<<
377  "COMMENT\n"<<
378  "COMMENT =================================\n"<<
379  "COMMENT lut structure\n"<<
380  "COMMENT\n"<<
381  "COMMENT LUTGroupId\n"<<
382  "COMMENT LUT[1-1024]\n"<<
383  "COMMENT =================================\n"<<
384  "COMMENT\n"<<
385  "COMMENT =================================\n"<<
386  "COMMENT fg EB structure\n"<<
387  "COMMENT\n"<<
388  "COMMENT FgGroupId\n"<<
389  "COMMENT el, eh, tl, th, lut_fg\n"<<
390  "COMMENT =================================\n"<<
391  "COMMENT"<<std::endl;
392 }
393 
394 /*void EcalTPCondAnalyzer::printTOWEREB(const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,const EcalTPGLutGroup *ecaltpgLutGroup) const {
395 
396  const EcalTPGGroups::EcalTPGGroupsMap &lutMap=ecaltpgLutGroup->getMap();
397  EcalTPGGroups::EcalTPGGroupsMapItr lutGroupId;
398  const EcalTPGGroups::EcalTPGGroupsMap &fgMap=ecaltpgFgEBGroup->getMap();
399  EcalTPGGroups::EcalTPGGroupsMapItr it;
400 
401  std::cout<<std::endl;
402  for (it=fgMap.begin();it!=fgMap.end();++it) {
403  std::cout <<"TOWER_EB "<<std::dec<<(*it).first<<std::endl;
404  lutGroupId=lutMap.find((*it).first);
405  std::cout <<" "<<(*it).second<<std::endl;
406  std::cout <<" "<<(*lutGroupId).second<<std::endl;
407  }
408 }
409 */
410 
411 void EcalTPCondAnalyzer::printTOWEREB(const EcalTPGSpike *ecaltpgSpikeTh, const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup,const EcalTPGLutGroup *ecaltpgLutGroup) const {
412 
413  const EcalTPGGroups::EcalTPGGroupsMap &lutMap=ecaltpgLutGroup->getMap();
415  const EcalTPGGroups::EcalTPGGroupsMap &fgMap=ecaltpgFgEBGroup->getMap();
417 
418  const EcalTPGSpike::EcalTPGSpikeMap& spikeThMap = ecaltpgSpikeTh->getMap();
420 
421  std::cout<<std::endl;
422  for (it=fgMap.begin();it!=fgMap.end();++it) {
423  std::cout <<"TOWER_EB "<<std::dec<<(*it).first<<std::endl;
424  lutGroupId=lutMap.find((*it).first);
425  itSpikeTh=spikeThMap.find((*it).first);
426  std::cout <<" "<<(*it).second<<std::endl;
427  std::cout <<" "<<(*lutGroupId).second<<std::endl;
428  std::cout <<" "<<(*itSpikeTh).second<<std::endl;
429  }
430 }
431 
432 void EcalTPCondAnalyzer::printTOWEREE(const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE,const EcalTPGLutGroup *ecaltpgLutGroup) const {
433 
435  const EcalTPGFineGrainTowerEEMap& map=ecaltpgFineGrainTowerEE->getMap();
436  const EcalTPGGroups::EcalTPGGroupsMap &lutMap=ecaltpgLutGroup->getMap();
438 
439  std::cout<<std::endl;
440  for (it=map.begin();it!=map.end();++it) {
441  std::cout <<"TOWER_EE "<<std::dec<<(*it).first<<std::endl;
442  lutGroupId=lutMap.find((*it).first);
443  std::cout <<" "<<(*lutGroupId).second<<std::endl;
444  std::cout <<std::hex<<"0x"<<(*it).second<<std::endl;
445  }
446 }
447 
448 /*void EcalTPCondAnalyzer::printBadX(const EcalTPGCrystalStatus *ecaltpgBadX) const {
449 
450  std::ofstream myfile;
451  myfile.open("badXvalues.txt");
452 
453  const EcalTPGCrystalStatusMap & badXMap = ecaltpgBadX->getMap();
454 
455  const std::vector<DetId> & ebCells = theBarrelGeometry_->getValidDetIds(DetId::Ecal, EcalBarrel);
456 
457  myfile <<"COMMENT ====== barrel masked crystals ====== "<<std::endl;
458  myfile << "RawId eta phi " << std::endl;
459 
460  for (std::vector<DetId>::const_iterator it = ebCells.begin(); it != ebCells.end(); ++it) {
461 
462  EBDetId id(*it) ;
463  const EcalTPGCrystalStatusCode &badXeb=badXMap[id.rawId()];
464  // Print in the text file obly the masked crystals
465  if (badXeb.getStatusCode() != 0){
466  myfile << "" << id.rawId() << " " << id.ieta() << " " << id.iphi() << std::endl;
467  }
468 
469  }
470 
471  myfile << " " << std::endl;
472 
473  const std::vector<DetId> & eeCells = theEndcapGeometry_->getValidDetIds(DetId::Ecal, EcalEndcap);
474 
475  myfile <<"COMMENT ====== endcap masked crystals ====== "<<std::endl;
476  myfile << "RawId x y z " << std::endl;
477 
478  for (std::vector<DetId>::const_iterator it = eeCells.begin(); it != eeCells.end(); ++it) {
479 
480  EEDetId id(*it) ;
481  const EcalTPGCrystalStatusCode &badXee=badXMap[id.rawId()];
482  // Print in the text file only the masked clystals
483  if (badXee.getStatusCode() != 0){
484  myfile << "" << id.rawId() << " " << id.ix() << " " << id.iy() << " "<< id.zside() << std::endl;
485  }
486  }
487 
488  myfile.close();
489 }
490 */
491 
492 
493 /*void EcalTPCondAnalyzer::printBadTT(const EcalTPGTowerStatus *ecaltpgBadTT) const {
494  std::ofstream myfilebadTT;
495  myfilebadTT.open("badTTvalues.txt");
496  int ieta = 0;
497  int iphi = 0;
498 
499  const EcalTPGTowerStatusMap & badTTMap = ecaltpgBadTT -> getMap();
500  EcalTPGTowerStatusMapIterator it;
501 
502  myfilebadTT <<"Barrel and endcap masked Trigger Towers"<<std::endl;
503  myfilebadTT <<"RawId " << " iphi " << " ieta " << std::endl;
504  myfilebadTT <<""<< std::endl;
505 
506  for (it=badTTMap.begin();it!=badTTMap.end();++it) {
507 
508  // Print in the text file only the masked barrel and endcap TTs
509  if ((*it).second != 0){
510 
511  EcalTrigTowerDetId ttId((*it).first);
512  ieta = ttId.ieta();
513  iphi = ttId.iphi();
514 
515  myfilebadTT <<""<< std::dec<<(*it).first << " " << iphi << " " << ieta << std::endl;
516 
517  }
518  }
519 
520 
521  myfilebadTT.close();
522 
523 }
524 */
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:1
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:230
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
const T & get() const
Definition: EventSetup.h:58
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
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:32
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:43
const std::map< uint32_t, uint16_t > & getMap() const
Definition: EcalTPGSpike.h:19
EcalSubdetector subdet() const
get the subdet