CMS 3D CMS Logo

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