ATLAS Offline Software
LArCellMonTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // NAME: LArCellMonTool.cxx
6 
7 // W.Lampl - Spring 2017: Major re-design
8 // ********************************************************************
9 #include "LArCellMonTool.h"
10 
13 
14 #include "CaloDetDescr/CaloDetDescrElement.h"
16 #include "Identifier/Identifier.h"
19 
22 
25 #include "GaudiKernel/ThreadLocalContext.h"
26 #include "AthenaKernel/Units.h"
27 
28 #include "TProfile2D.h"
29 #include "TProfile.h"
30 #include "TH2F.h"
31 #include "TH1F.h"
32 
33 #include <cassert>
34 #include <algorithm>
35 
36 using namespace CaloMonitoring;
37 using Athena::Units::GeV;
38 
40 LArCellMonTool::LArCellMonTool(const std::string& type, const std::string& name,const IInterface* parent)
42  m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
43  m_LArOnlineIDHelper(nullptr),
44  m_calo_id(nullptr),
45  m_counter_sporadic_protc(0),
46  m_h_sporadicHists()
47 {
48  declareInterface<IMonitorToolBase>(this);
49 
50  declareProperty("DoSaveTempHists",m_doSaveTempHists=false,"Store temporary, intermediate histograms in a /Temp/ directory (for debugging");
51 
52  // Trigger Awareness:
53  declareProperty("useTrigger",m_useTriggerCaloMon=true);
54  declareProperty("rndmTriggerNames", m_triggerNames[RNDM]);
55  declareProperty("caloTriggerNames",m_triggerNames[CALO]);
56  declareProperty("minBiasTriggerNames",m_triggerNames[MINBIAS]);
57  declareProperty("metTriggerNames",m_triggerNames[MET]);
58  declareProperty("miscTriggerNames",m_triggerNames[MISC]);
59 
60  // Bad channel masking options
61  declareProperty("MaskBadChannels",m_maskKnownBadChannels=false,"Do not fill histograms with values from known bad channels");
62  declareProperty("MaskNoCondChannels", m_maskNoCondChannels=false,"Do not fill histograms with values from cells reco'ed w/o conditions database");
63 
64  // Switch on/off additional (non thresholded) histograms:
65  declareProperty("doDatabaseNoiseVsEtaPhi",m_doDatabaseNoiseVsEtaPhi=true);
66  declareProperty("doKnownBadChannelsVsEtaPhi",m_doKnownBadChannelsVsEtaPhi=true);
67  declareProperty("doEnergyVsTime", m_doEnergyVsTime=true);
68  declareProperty("doUnnormalized1DEnergy", m_doUnnormalized1DEnergy=false);
69  declareProperty("useLogarithmicEnergyBinning", m_useLogarithmicEnergyBinning=false);
70 
71  // Switch to use WeightedEff rather than WeightedAvg merging where appropriate:
72  declareProperty("useWeightedEffMerging",m_useWeightedEffMerging=true,"set the merging strategy for occupancy plots");
73 
74  // sporadic threshold
75  declareProperty("Sporadic_switch",m_sporadic_switch=false);
76  declareProperty("minSporadicEvents",m_minSporadicNoiseEventsPerCell=10); //Attention: 0 means never!
77  declareProperty("Threshold_EM_S0S1",m_threshold_em_S0S1 = 5000);
78  declareProperty("Threshold_HECFCALEMS2S3",m_threshold_HECFCALEMS2S3=15000);
79  declareProperty("NsporadicPlotLimit",m_sporadicPlotLimit=300);
80  declareProperty("Sporadic_protection",m_sporadic_protc = 4000);
81 
82  // Switch on/off thresholded histograms for each threshold:
83  declareProperty("ThresholdType", m_thresholdNameProp,"Vector of threshold names");
84  declareProperty("ThresholdDirection", m_thresholdDirectionProp,"Vector of threshold directions");
85  declareProperty("TriggersToInclude", m_triggersToIncludeProp);
86  declareProperty("TriggersToExclude", m_triggersToExcludeProp);
87 
88  declareProperty("DoPercentageOccupancy",m_doPercentageOccupancyProp,"Turns both the 1D and 2D occupancy from absolute counts to percentage of events tha passed the threshold");
89  declareProperty("DoEtaPhiOccupancy",m_doEtaPhiOccupancyProp,"Activate 2D occupancy plots (per threshold-type)");
90  declareProperty("DoEtaOccupancy",m_doEtaOccupancyProp,"Activate occupancy-vs eta plots (per threshold-type)");
91  declareProperty("DoPhiOccupancy",m_doPhiOccupancyProp,"Activate occupancy-vs phi plots (per threshold-type)");
92 
93  declareProperty("DoEtaPhiAverageEnergy",m_doEtaPhiAverageEnergyProp);
94  declareProperty("DoEtaPhiTotalEnergy",m_doEtaPhiTotalEnergyProp);
95 
96  declareProperty("DoEtaPhiAverageQuality",m_doEtaPhiAverageQualityProp);
97  declareProperty("DoEtaPhiFractionOverQth", m_doEtaPhiFractionOverQthProp);
98  declareProperty("QualityFactorThreshold",m_qualityFactorThresholdProp);
99 
100  declareProperty("DoEtaPhiAverageTime",m_doEtaPhiAverageTimeProp);
101  declareProperty("DoEtaPhiFractionPastTth", m_doEtaPhiFractionPastTthProp);
102  declareProperty("TimeThreshold",m_timeThresholdProp);
103 
104  declareProperty("DoBeamBackgroundRemoval",m_doBeamBackgroundRemovalProp);
105 
106  declareProperty("ThresholdTitleTemplates", m_thresholdTitleTemplates);
107  declareProperty("DefaultThresholds", m_defaultThresholds);
108  declareProperty("ThresholdinSigNoise", m_inSigNoise);
109 
110  declareProperty("ThresholdColumnType", m_thresholdColumnType);
111 
112  // Lar Thresholds
113  // Em Barrel
114  declareProperty("EMBP_Thresh",m_thresholdsProp[EMBPNS]);
115  declareProperty("EMB1_Thresh",m_thresholdsProp[EMB1NS]);
116  declareProperty("EMB2_Thresh",m_thresholdsProp[EMB2NS]);
117  declareProperty("EMB3_Thresh",m_thresholdsProp[EMB3NS]);
118  // EM Endcap
119  declareProperty("EMECP_Thresh",m_thresholdsProp[EMECPNS]);
120  declareProperty("EMEC1_Thresh",m_thresholdsProp[EMEC1NS]);
121  declareProperty("EMEC2_Thresh",m_thresholdsProp[EMEC2NS]);
122  declareProperty("EMEC3_Thresh",m_thresholdsProp[EMEC3NS]);
123  // Hadronic Endcap
124  declareProperty("HEC0_Thresh",m_thresholdsProp[HEC0NS]);
125  declareProperty("HEC1_Thresh",m_thresholdsProp[HEC1NS]);
126  declareProperty("HEC2_Thresh",m_thresholdsProp[HEC2NS]);
127  declareProperty("HEC3_Thresh",m_thresholdsProp[HEC3NS]);
128  // Forward Calorimeters
129  declareProperty("FCAL1_Thresh",m_thresholdsProp[FCAL1NS]);
130  declareProperty("FCAL2_Thresh",m_thresholdsProp[FCAL2NS]);
131  declareProperty("FCAL3_Thresh",m_thresholdsProp[FCAL3NS]);
132 }
133 
134 
135 
137 
140 
141  ATH_MSG_DEBUG("LArCellMonTool::initialize() start");
142 
143  //Identfier-helpers
144  ATH_CHECK( detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID") );
146 
147  // Bad channel masker tool
150 
154 
155  //JobO consistency check:
156  if (m_useTriggerCaloMon && std::all_of(m_triggerNames.begin(),m_triggerNames.end(),[](const std::string& trigName){return trigName.empty();})) {
157  ATH_MSG_WARNING("UseTrigger set to true but no trigger names given! Forcing useTrigger to false");
158  m_useTriggerCaloMon=false;
159  }
160 
161  //retrieve trigger decision tool and chain groups
162  if( m_useTriggerCaloMon) {
163  ATH_CHECK(m_trigDec.retrieve());
164  ATH_MSG_INFO("TrigDecisionTool retrieved");
165  for (size_t i=0;i<NOTA;++i) {
166  const std::string& trigName=m_triggerNames[i];
167  if (!trigName.empty()) m_chainGroups[i]=m_trigDec->getChainGroup(trigName.c_str());
168  }//end loop over TriggerType enum
169  }//end if m_useTriggerCaloMon
170  else {
171  m_trigDec.disable();
172  }
173 
174  // Sets the threshold value arrays
176 
177  //Fill the LArCellBinning for each layer
179 
180  //Initialize read handle key
182 
183  //Call base-call initialize methods
186 
187  ATH_MSG_DEBUG("LArCellMonTool::initialize() is done!");
188  return StatusCode::SUCCESS;
189 }
190 
191 
192 
194 
195  //Interpret the jobO defining the per-threshold histograms
196  //and initialize vector<thresholdHist_t> m_thresholdHists;
197 
198  const size_t nThr=m_thresholdNameProp.value().size();
199 
200  //Check uniqueness of threshold-type by filling a set
201  std::set<std::string> uniqunesCheck;
202  for (const std::string& s : m_thresholdNameProp.value()) {
203  auto r=uniqunesCheck.insert(s);
204  if (!r.second) {
205  ATH_MSG_ERROR( "Configuration error: Threshold type " << s << " appears more than once" );
206  return StatusCode::FAILURE;
207  }
208  }
209  uniqunesCheck.clear();
210 
211 
212  StatusCode sc=StatusCode::SUCCESS;
213  //Check consistency:
214 #define CONSISTENCY(ARRAYPROP) if (ARRAYPROP.value().size()!= nThr) {\
215  ATH_MSG_ERROR( "Configuration problem: Property 'ThresholdType' has size " << nThr \
216  << " but '" << ARRAYPROP.name() << "' has size " << ARRAYPROP.value().size() );\
217  sc=StatusCode::FAILURE; \
218  }
219 
239 #undef CONSISTENCY
240 
241  if (sc.isFailure()) return sc;
242 
243  const std::map<const std::string, const Direction> stringToDirection {{"over",OVER},{"under",UNDER},{"both",BOTH},{"none",NONE}};
244  const std::map<const std::string, const TriggerType> stringToTrigType {{"nota",NOTA},{"rndm",RNDM},{"calo",CALO},{"minbias",MINBIAS},
245  {"met",MET},{"misc",MISC},{"none",NOTA},{"all",NOTA}};
246 
247  m_thresholdHists.resize(nThr);
248  for (size_t iThr=0;iThr<nThr;++iThr) {
250  threshold.m_threshName=m_thresholdNameProp.value()[iThr];
251  threshold.m_threshTitleTemplate= m_thresholdTitleTemplates.value()[iThr];
252  std::fill(threshold.m_threshValue.begin(),threshold.m_threshValue.end(),m_defaultThresholds.value()[iThr]);
253  threshold.m_inSigNoise=m_inSigNoise.value()[iThr];
254 
255  auto itD=stringToDirection.find(strToLower(m_thresholdDirectionProp.value()[iThr]));
256  if (itD!=stringToDirection.end()) {
257  threshold.m_threshDirection=itD->second;
258  }
259  else {
260  ATH_MSG_ERROR( "Configuration problem. Unknown threshold direction '"
261  << m_thresholdDirectionProp.value()[iThr]
262  << "'given" );
263  return StatusCode::FAILURE;
264  }
265 
266  auto itT=stringToTrigType.find(strToLower(m_triggersToExcludeProp.value()[iThr]));
267  if (itT!=stringToTrigType.end()) {
268  threshold.m_triggersToExclude.set(itT->second);
269  if (itT->first=="all") {ATH_MSG_WARNING( "Setting TriggersToExclude to 'all' has no effect!" );}
270  }
271  else {
272  ATH_MSG_ERROR( "Configuration problem. Unknown trigger type '"
273  << m_triggersToExcludeProp.value()[iThr]
274  << "' given in propety 'TriggersToExlude'" );
275  return StatusCode::FAILURE;
276  }
277 
278  itT=stringToTrigType.find(strToLower(m_triggersToIncludeProp.value()[iThr]));
279  if (itT!=stringToTrigType.end()) {
280  threshold.m_triggersToInclude.set(itT->second);
281  if (itT->first=="none") {ATH_MSG_WARNING( "Setting TriggersToInclude to 'none' has no effect!" );}
282  }
283  else {
284  ATH_MSG_ERROR( "Configuration problem. Unknown trigger type '"
285  << m_triggersToIncludeProp.value()[iThr]
286  << "' given in propety 'TriggersToInclude'" );
287  return StatusCode::FAILURE;
288  }
289 
290  threshold.m_doPercentageOccupancy=m_doPercentageOccupancyProp.value()[iThr];
291  threshold.m_doEtaPhiOccupancy=m_doEtaPhiOccupancyProp.value()[iThr];
292  threshold.m_doEtaOccupancy=m_doEtaOccupancyProp.value()[iThr];
293  threshold.m_doPhiOccupancy=m_doPhiOccupancyProp.value()[iThr];
294  threshold.m_doEtaPhiTotalEnergy=m_doEtaPhiTotalEnergyProp.value()[iThr];
295  threshold.m_doEtaPhiAverageEnergy=m_doEtaPhiAverageEnergyProp.value()[iThr];
296  threshold.m_doEtaPhiAverageQuality=m_doEtaPhiAverageQualityProp.value()[iThr];
297  threshold.m_doEtaPhiFractionOverQth=m_doEtaPhiFractionOverQthProp.value()[iThr];
298  threshold.m_qualityFactorThreshold=m_qualityFactorThresholdProp.value()[iThr];
299  threshold.m_doEtaPhiAverageTime=m_doEtaPhiAverageTimeProp.value()[iThr];
300  threshold.m_doEtaPhiFractionPastTth=m_doEtaPhiFractionPastTthProp.value()[iThr];
301  threshold.m_timeThreshold=m_timeThresholdProp.value()[iThr];
302  threshold.m_doBeamBackgroundRemoval=m_doBeamBackgroundRemovalProp.value()[iThr];
303  }//end loop over threshold names
304 
305 
306  //Overwrite per-layer thresholds:
307  for (size_t iThrOvr=0;iThrOvr!= m_thresholdColumnType.value().size();++iThrOvr) {
308  const std::string& nameToOverwrite=m_thresholdColumnType.value()[iThrOvr];
309  auto it=std::find_if(m_thresholdHists.begin(),m_thresholdHists.end(),
310  [&](const thresholdHist_t& x) {return (x.m_threshName==nameToOverwrite);}
311  );
312 
313  if (it==m_thresholdHists.end()) {
314  ATH_MSG_ERROR( "Configuration error reading 'ThresholdColumnType': Threshold type '" << nameToOverwrite << "' is not defined in 'ThresholdType'" );
315  return StatusCode::FAILURE;
316  }
317 
318  for (unsigned iLyr=0;iLyr<MAXLYRNS;++iLyr) {
319  if (m_thresholdsProp[iLyr].value().size()<iThrOvr) {
320  ATH_MSG_ERROR( "Configuration error: Not enough values in threshold vector for layer " << iLyr );
321  return StatusCode::FAILURE;
322  }
323 
324  it->m_threshValue[iLyr]=m_thresholdsProp[iLyr].value()[iThrOvr];
325  }
326  }//end loop over threshold types with per-layer thresholds
327 
328 
329  //Clean out thresholds with no histogram requested:
330  auto thrIt=m_thresholdHists.begin();
331  while (thrIt!=m_thresholdHists.end()) {
332  const thresholdHist_t& thr=*thrIt;
336  ATH_MSG_INFO( "Config issue: Threshold type '" << thr.m_threshName << "' defined but no histograms requested. Deleting." );
337  thrIt=m_thresholdHists.erase(thrIt);
338  }
339  else {
340  ATH_MSG_INFO("Threshold histograms requested for threshold '" << thrIt->m_threshName << "'");
341  thrIt++;
342  }
343  }
344 
345 
346  //Fix up histogram titles
347  for (thresholdHist_t& thr : m_thresholdHists) {
348  if (thr.m_threshDirection!=NONE &&
349  std::count(thr.m_threshTitleTemplate.begin(),thr.m_threshTitleTemplate.end(),'%')==1) {
350  const size_t maxTitleLenght=thr.m_threshTitleTemplate.size()+32;
351  std::unique_ptr<char[]> toBeFilled(new char[maxTitleLenght]);
352 
353  for (unsigned iLyrns=0;iLyrns<MAXLYRNS;++iLyrns) {
354  //Attempt to fill in theshold value
355  snprintf(toBeFilled.get(),maxTitleLenght,thr.m_threshTitleTemplate.c_str(),thr.m_threshValue[iLyrns]);
356  toBeFilled[maxTitleLenght-1]='\0'; //To be absolutely sure...
357  thr.m_threshTitles[iLyrns]=toBeFilled.get();
358  //std::cout << "Fixup result:" << thr.m_threshTitles[iLyrns] << std::endl;
359  } //end loop over thresholds
360  } //and if somthing to fix up
361  else {
362  //No threshold value to be set, keep as is
363  for (unsigned iLyrns=0;iLyrns<MAXLYRNS;++iLyrns) {
364  thr.m_threshTitles[iLyrns]=thr.m_threshTitleTemplate;
365  }
366  }
367  }
368 
369  return StatusCode::SUCCESS;
370 }
371 
372 
375 
376  ATH_MSG_INFO("BookHistogram called");
377 
378  resetInternals();
379 
380 
382 
383  if(m_sporadic_switch)
385 
387 
388  return StatusCode::SUCCESS;
389 }
390 
391 
393 
394  std::stringstream dir;
395  dir.precision(0);
396  dir.setf(std::ios_base::fixed, std::ios_base::floatfield);
397  dir << "/CaloMonitoring/LArCellMon_NoTrigSel_OldTool/Sporadic_" << m_threshold_em_S0S1*1e-3 << "_" << m_threshold_HECFCALEMS2S3*1e-3 << "GeV";
398  m_sporadicDir=dir.str();
399 
400  for (unsigned i=0;i<MAXPARTITIONS;++i) {
401  const std::string& partitionName=m_partitionNames[i];
402  MonGroup mg(this,dir.str()+"/"+partitionName,run);
403  std::string hName="NSporadic_"+partitionName;
404  std::string hTitle="Number of sporadic-cell plots in "+partitionName+ " with CSC veto";
405  m_h_sporadicHists[i]=new TH1F(hName.c_str(),hTitle.c_str(),10,0,10);
406  ATH_CHECK(mg.regHist(m_h_sporadicHists[i]));
407  }
408 
409  return StatusCode::SUCCESS;
410 }
411 
412 
413 
415 
416  //Summary histograms, mostly from the base-class
417  MonGroup summaryGroup(this,m_lArPath+"Summary",run);
418  m_h_n_trigEvent = new TH1F("nEvtsByTrigger","Total Events: bin 0, RNDM Trigger: 1, Calo Trigger: 2, MinBias Trigger: 3, MET Trigger: 4, Misc Trigger: 5, Events Selected for Noise Plots: 6 ",7,1.,8.);
419  summaryGroup.regHist( m_h_n_trigEvent ).ignore();
420  ATH_CHECK(bookBaseHists(&summaryGroup)); //from base class
421 
422 
423  //Book non-threshold energy histograms:
424  std::array<double,55> logEnergyBins{};
426  const static double step = std::pow(10,0.1);
427  logEnergyBins[0]=10;
428  for(size_t i = 1; i<logEnergyBins.size(); i++){ //Cover full range of energy specification, 10 MeV to 3 TeV
430  }
431  }//end if logarithimcEnergyBinning
432 
433  //Energy bining in case for cosmics:
434  std::array<std::pair<float,float>,MAXPARTITIONS > cosmicEneBinning;
435  cosmicEneBinning[EMBA]=cosmicEneBinning[EMBC]={-318.5,1088.5}; //bin size 7 MeV
436  cosmicEneBinning[EMECA]=cosmicEneBinning[EMECC]={-591.5,2021.5}; //bin size 13 MeV
437  cosmicEneBinning[HECA]=cosmicEneBinning[HECC]={-2047.5,6997.5}; //bin size 45 MeV
438  cosmicEneBinning[FCALA]=cosmicEneBinning[FCALC]={-1865.5,6375.5}; //bin size 41 MeV
439 
440 
442  MonGroup mg(this,m_lArPath+"/Energy", run);
443 
444  for(int ilyr=EMBPA; ilyr<MAXLAYER; ilyr++) {
445  const std::string histName=std::string("CellEnergy_")+m_layerNames[ilyr];
446  const std::string histTitle=std::string("Cell Energy in ") +m_layerNames[ilyr]+" with CSC veto";
448  m_h_energy[ilyr] = new TH1F(histName.c_str(),histTitle.c_str(),54,logEnergyBins.data());
449  m_h_energy[ilyr]->GetYaxis()->SetTitle("Cell Events");
450  m_h_energy[ilyr]->GetYaxis()->SetTitleOffset(2);
451  }
452  else {//no logarithmic energy binning
454  m_h_energy[ilyr] = new TH1F(histName.c_str(),histTitle.c_str(),201,cosmicEneBinning[ilyr].first,cosmicEneBinning[ilyr].second);
455  }
456  else { //collisions, no cosmics
457  m_h_energy[ilyr] = new TH1F(histName.c_str(),histTitle.c_str(),401,-1912.5,28162.5); // bin size 75 MeV
458  }
459 
460  std::stringstream ytitle;
461  ytitle.precision(0);
462  ytitle << "Cell Events/" << m_h_energy[ilyr]->GetYaxis()->GetBinWidth(1) << "MeV";
463  m_h_energy[ilyr]->GetYaxis()->SetTitle(ytitle.str().c_str());
464  m_h_energy[ilyr]->GetYaxis()->SetTitleOffset(2);
465 
466  }
467  m_h_energy[ilyr]->GetXaxis()->SetTitle("Cell Energy (MeV)");
468  m_h_energy[ilyr]->GetXaxis()->SetLabelSize(0.02);
469  m_h_energy[ilyr]->GetXaxis()->SetLabelOffset(0.01);
470  m_h_energy[ilyr]->GetXaxis()->SetTitleSize(0.03);
471  m_h_energy[ilyr]->GetXaxis()->SetTitleOffset(1.5);
472  mg.regHist(m_h_energy[ilyr]).ignore();
473  } //end loop over layers
474  } // end if m_doUnnormalized1DEnergy
475 
476  if (m_doEnergyVsTime){
477  MonGroup mg(this,m_lArPath+"/EnergyVsTime", run);
478  const int nbintime = 92;
479  const double timescale[93] = {-200,-195,-190,-185,-180,-175,-170,-165,-160,-155,-150,-145,-140,-135,-130,-125,-120,-115,-110,-105,-100,-95,-90,-85,-80,-75,-70,-65,-60,-55,-50,-45,-40,-35,-30,-25,-20,-15,-10,-8,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,8,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200};
480  const int nbinenergy = 11;
481  const double energyscale[12] = {250,500,1000,2500,5000,10000,25000,50000,100000,250000,500000,1000000};
482  for(int ilyr=EMBPA; ilyr<MAXLAYER; ilyr++) {
483  const std::string histName=std::string("CellEnergyVsTime_")+m_layerNames[ilyr];
484  const std::string histTitle=std::string("Cell Energy vs Cell Time in ") +m_layerNames[ilyr]+" with CSC veto";
485  m_h_energyVsTime[ilyr] = new TH2F(histName.c_str(),histTitle.c_str(),nbintime,timescale,nbinenergy,energyscale);
486  m_h_energyVsTime[ilyr]->GetXaxis()->SetTitle("Cell Time (ns)");
487  m_h_energyVsTime[ilyr]->GetYaxis()->SetTitle("Energy (MeV)");
488  mg.regHist(m_h_energyVsTime[ilyr]).ignore();
489 
490  const int eThr=m_eCutForTiming[ilyr/2];
491  std::stringstream shistName;
492  shistName << "CellEnergyVsTime_" << m_layerNames[ilyr] << "_" << eThr;
493  std::stringstream shistTitle;
494  shistTitle << m_layerNames[ilyr] << " - Cell Time (E>" << eThr << " MeV) with CSC veto";
495  m_h_energyVsTime_DifferThresholds[ilyr] = new TH1F(shistName.str().c_str(),shistTitle.str().c_str(),nbintime,timescale);
496  m_h_energyVsTime_DifferThresholds[ilyr]->GetXaxis()->SetTitle("Cell Time (ns)");
497  m_h_energyVsTime_DifferThresholds[ilyr]->GetYaxis()->SetTitle("Energy (MeV)");
498  mg.regHist(m_h_energyVsTime_DifferThresholds[ilyr]).ignore();
499  } //end loop over layers
500  }//end if (m_doEnergyVsTime
501 
502  return StatusCode::SUCCESS;
503 }
504 
505 
507 
508  m_h_n_trigEvent->Fill(0.5);
509 
510  if (m_useTriggerCaloMon) {
511  std::bitset<MAXTRIGTYPE> triggersPassed(0x1<<NOTA); //Last bit: NOTA, always passes
512  constexpr std::bitset<MAXTRIGTYPE> NOTAmask=~(0x1<<NOTA);
513  for (unsigned i=0;i<m_chainGroups.size();++i) {
514  if (m_chainGroups[i] && m_chainGroups[i]->isPassed()) triggersPassed.set(i);
515  }
516 
517  for (unsigned i=0;i<NOTA;++i) {
518  if (triggersPassed.test(i)) m_h_n_trigEvent->Fill(0.5+i);
519  }
520 
521  for (thresholdHist_t& thr : m_thresholdHists) { //Loop over thresholds
522  thr.m_threshTriggerDecision=(thr.m_triggersToInclude & triggersPassed).any() && (thr.m_triggersToExclude & triggersPassed & NOTAmask).none();
523  }// end loop over thresholds
524  } //end if trigger used
525  else {
526  m_h_n_trigEvent->Fill(6.5);
527  }
528  //Note that thr.m_threshTriggerDecision remains in it's default state 'true' if trigger wasn't used
529 
530  //Check beam-background removal
531  for (thresholdHist_t& thr : m_thresholdHists) { //Loop over thresholds
532  if (thr.m_threshTriggerDecision && (m_passBeamBackgroundRemoval || !thr.m_doBeamBackgroundRemoval)) {
533  //The counter of events passing. Will be incremented even if neither trigger nor background removal is requested for this threshold
534  thr.m_eventsPassed++;
535  }
536  }//end loop over thresholds
537  }
538 
539 
540 void LArCellMonTool::sporadicNoiseCandidate(const CaloCell* cell, const LArCellMonTool::LayerEnum iLyr, const float threshold, const LArOnOffIdMapping* cabling) {
541 
542  const Identifier id=cell->ID();
544  ATH_MSG_INFO( "Found sporadic noise candidate cell with id 0x" << std::hex << id.get_identifier32().get_compact() << std::dec << " in " << m_partitionNames[part] );
545 
547  snc.m_counter++;
548  //Note wrt AthenaMP: Counting noisy event is obviously flawed, even for
549  //serial processing as events are scattered over many files
550  //The sporadic-noise histograms here are only an indication, not reproducible
551 
555  m_h_sporadicHists[part]->Fill(1.0); //FIXME Sounds like nonsense but used in webdisplay config
556  bookNoisyCellHistos(snc,cell->caloDDE(),part,threshold, cabling);
557  }// end if reached m_minSporadicNoiseEventsPerCell and < m_sporadic_protection
558 
559  if (snc.m_h_energy) {
560  const float energy=cell->energy();
561  const float quality=cell->quality();
562  snc.m_h_energy->Fill(energy);
563  snc.m_h_quality->Fill(quality);
564  snc.m_h_energyVsLB->Fill(m_lb,energy);
565  }
566 
567  }
568 
570  const PartitionEnum part, const float threshold,
571  const LArOnOffIdMapping* cabling) {
572 
573  const HWIdentifier onlID=cabling->createSignalChannelID(dde->identify());
574  const int ft = m_LArOnlineIDHelper->feedthrough(onlID);
575  const int slot = m_LArOnlineIDHelper->slot(onlID);
576  const int channel = m_LArOnlineIDHelper->channel(onlID);
577 
578 
579  std::stringstream hName;
580  hName.precision(2);
581  hName << m_partitionNames[part] << "_FT"<<ft<<"Sl"<<slot<<"Ch"<<channel<<"_(Phi"<<dde->phi()<<"_Eta"<<dde->eta()<<"_sampling" << dde->getLayer() << ")";
582 
583  std::stringstream titleSuffix;
584  titleSuffix.precision(0);
585  titleSuffix << "::" << threshold*1e-3 <<"GeV with CSC veto";
586 
587  const std::string dir=m_sporadicDir+"/"+m_partitionNames[part];
588 
589  //Energy Histogram
590  result.m_h_energy=new TH1F((hName.str()+"_EN").c_str(),
591  (hName.str()+"_EN"+titleSuffix.str()).c_str(),
592  75,-10000,140000); //bins of 2GeV
593  result.m_h_energy->GetXaxis()->SetTitle("MeV");
594  result.m_h_energy->GetYaxis()->SetTitle("Number of Events");
595 
596  regHist(result.m_h_energy,dir,run).ignore();
597 
598 
599  //Quality Histogram (Q: is this actually needed?
600  result.m_h_quality=new TH1F((hName.str()+"_Quality").c_str(),
601  (hName.str()+"_Quality"+titleSuffix.str()).c_str(),
602  75,-10000,140000); //bins of 2GeV
603  result.m_h_quality->GetXaxis()->SetTitle("Quality Factor");
604  result.m_h_quality->GetYaxis()->SetTitle("Number of Events");
605 
606  regHist(result.m_h_quality,dir,run).ignore();
607 
608  //E vs LB
609  result.m_h_energyVsLB=new TProfile((hName.str()+"_ENLB").c_str(),
610  (hName.str()+"_LB"+titleSuffix.str()).c_str(),
611  1400,0.5,1400.5);
612  result.m_h_energyVsLB->GetXaxis()->SetTitle("LumiBlocks");
613  result.m_h_energyVsLB->GetYaxis()->SetTitle("MeV");
614 
615  regHist(result.m_h_energyVsLB,dir,run,ATTRIB_X_VS_LB,"","merge").ignore();
616 }
617 
618 
619 
622 
623  ATH_MSG_DEBUG("LArCellMonTool::fillHistograms() starts");
624 
625  const EventContext& ctx = Gaudi::Hive::currentContext();
626 
628  const LArOnOffIdMapping* cabling{*cablingHdl};
629  if(!cabling) {
630  ATH_MSG_ERROR( "Do not have cabling");
631  return StatusCode::FAILURE;
632  }
633 
635 
636 
638  const LArBadChannelCont *bcCont {*readHandle};
639  if(m_maskKnownBadChannels && !bcCont) {
640  ATH_MSG_WARNING( "Do not have Bad chan container !!!" );
641  return StatusCode::FAILURE;
642  }
643 
644 
646  if (! cellContHandle.isValid()) { return StatusCode::FAILURE; }
647  const CaloCellContainer* cellCont = cellContHandle.get();
648 
649  if (!m_oncePerJobHistosDone) {
650  ATH_CHECK(createPerJobHistograms(ctx, cellCont));
652  }
653 
654  bool ifPass = true;
655  ATH_CHECK(checkFilters(ifPass)); //Check ATLAS-Ready, beam-background, etc from base class
656  if(!ifPass) return StatusCode::SUCCESS;
657 
659 
661  CaloCellContainer::const_iterator it_e = cellCont->end();
662  // loop over cells -------------
663  for ( ; it!=it_e;++it) {
664  // cell info
665  const CaloCell* cell = *it;
666  Identifier id = cell->ID();
667  bool is_lar=m_calo_id->is_lar(id);
668 
669  if(!is_lar) continue;
670 
671  const CaloDetDescrElement* caloDDEl=cell->caloDDE();
672  const IdentifierHash cellHash=caloDDEl->calo_hash();
673 
674  const CaloGain::CaloGain gain= cell->gain();
675  const float cellen = cell->energy();
676  const float celltime = cell->time();
677  const uint16_t cellquality = cell->quality();
678  const uint16_t cellprovenance = cell->provenance();
679  const bool celltqavailable = ( cellprovenance & 0x2000 );
680 
681  // No more filling if we encounter a bad channel ....
682  if (m_maskKnownBadChannels && m_bcMask.cellShouldBeMasked(bcCont,id)) continue;
683 
684  // ...or a channel w/o conditions
685  if (m_maskNoCondChannels && (cellprovenance & 0x00FF) != 0x00A5) continue; //FIXME, I think that cut is wrong
686 
687  float celleta, cellphi;
688  unsigned iLyr, iLyrNS;
689  getHistoCoordinates(caloDDEl, celleta, cellphi, iLyr, iLyrNS);
690 
691  //Start filling per-threshold histograms:
692  for (auto& thr : m_thresholdHists) {
693  //std::cout << "Threshold name " << thr.m_threshName << std::endl;
694  //Any of the conditions below means we do not fill the histogram:
695 
696  //Trigger passed?
697  if (m_useTriggerCaloMon && !thr.m_threshTriggerDecision) continue;
698  //std::cout << " Trigger passed" << std::endl;
699 
700  //Beam background event?
701  if (thr.m_doBeamBackgroundRemoval && !m_passBeamBackgroundRemoval) continue;
702 
703  //std::cout << " Beam background passed" << std::endl;
704 
705  float thresholdVal=thr.m_threshValue[iLyrNS];
706  if (thresholdVal==0) {
707  ATH_MSG_WARNING("Got threshold 0 for type '" << thr.m_threshName << "'for cell in layer " << m_layerNames[iLyr]);
708  }
709 
710  if (thr.m_inSigNoise) thresholdVal*=noise->getNoise(id, gain);
711 
712  if (thr.m_threshDirection==OVER && cellen <= thresholdVal) continue;
713  if (thr.m_threshDirection==UNDER && cellen > thresholdVal) continue;
714  if (thr.m_threshDirection==BOTH && (cellen > -thresholdVal && cellen <= thresholdVal)) continue;
715  //std::cout << "Threshold '"<< thr.m_threshName << "' passed" << std::endl;
716 
717  (thr.m_occupancyCounter[cellHash])++;
718 
719  if (thr.m_h_totalEnergy_etaphi[iLyr]) thr.m_h_totalEnergy_etaphi[iLyr]->Fill(celleta,cellphi,cellen);
720 
721  if(thr.m_h_poorQualityOccupancy_etaphi[iLyr] && (cellquality > thr.m_qualityFactorThreshold)) {
722  thr.m_h_poorQualityOccupancy_etaphi[iLyr]->Fill(celleta,cellphi);
723  }
724  if (thr.m_h_totalQuality_etaphi[iLyr]) thr.m_h_totalQuality_etaphi[iLyr]->Fill(celleta,cellphi,cellquality);
725 
726 
727  if(thr.m_h_totalTime_etaphi[iLyr]) {
728  thr.m_h_totalTime_etaphi[iLyr]->Fill(celleta,cellphi,celltime);
729  }
730 
731  if (thr.m_h_poorTimeOccupancy_etaphi[iLyr] && (fabs(celltime) > thr.m_timeThreshold)) {
732  thr.m_h_poorTimeOccupancy_etaphi[iLyr]->Fill(celleta,cellphi);
733  }
734 
735  }//end loop over thresholds
736 
738  // 1D Energy distribution:
739  if (m_h_energy[iLyr]) m_h_energy[iLyr]->Fill(cellen);
740 
741  // Time vs Energy:
742  if (m_doEnergyVsTime && celltqavailable && cellquality<4000) {
743  m_h_energyVsTime[iLyr]->Fill(celltime,cellen);
744  if (cellen>m_eCutForTiming[iLyrNS]) {
745  m_h_energyVsTime_DifferThresholds[iLyr]->Fill(celltime,cellen);
746  }
747  }
748 
749  //Checking for signs of sporadic noise
750  if(m_sporadic_switch) {
751  float energyThreshold;
752  //We have two energy thresholds for sporadic noise, one for EM samling 1 and 2 and one for the rest
753  if(iLyrNS==EMB1NS || iLyrNS==EMB2NS || iLyrNS==EMEC1NS || iLyrNS==EMEC2NS) {
754  energyThreshold=m_threshold_em_S0S1;
755  }
756  else {
757  energyThreshold = m_threshold_HECFCALEMS2S3;
758  }
759  if (cell->energy()> energyThreshold) {
760  sporadicNoiseCandidate(cell,(LayerEnum)iLyr,energyThreshold, cabling);
761  }
762  }//end if m_sporadic_switch
763  } // end if m_passBeamBackgroundRemoval
764  }//end loop over cells
765 
766  // ATH_MSG_INFO("LArCellMonTool::fillLarHists() is done");
767  return StatusCode::SUCCESS;
768 }
769 
771 
772  ATH_MSG_DEBUG("procHistogram called newEB/newLB/newRun=" << newEventsBlockFlag() << "/" << newLumiBlockFlag() << "/" << newRunFlag());
773 
775  ATH_CHECK(caloMgrHandle.isValid());
776 
777  //Loop over thresholds
778  for (thresholdHist_t& thr : m_thresholdHists) {
779  ATH_MSG_INFO("processHist for threshold '" << thr.m_threshName << "', nb of events passed Trigger and Background removal: " << thr.m_eventsPassed);
780  if (thr.m_eventsPassed>0 && m_oncePerJobHistosDone) {
781  //fill the 1D and 2D occupancy histograms based on the counter of cells above threshold
782  ATH_CHECK(fillOccupancyHist(thr,*caloMgrHandle));
783 
784  for (size_t iLyr=0;iLyr<MAXLAYER;++iLyr) {
785 
786  //Re-scale 1D occupancy histogram for the number of cells in each bin.
787  //For 1D histograms, we are working on the same histogram, no temporary histogram used
788  if (thr.m_h_occupancy_eta[iLyr]) {
789  assert(m_h_nActiveCellsFirstEvent_eta[iLyr]);
790  thr.m_h_occupancy_eta[iLyr]->Divide(m_h_nActiveCellsFirstEvent_eta[iLyr]);
791  ATH_MSG_DEBUG("Adjusting number of entries in eta occupancy histogram from " << thr.m_h_occupancy_eta[iLyr]->GetEntries() << " to " << thr.m_eventsPassed);
792  thr.m_h_occupancy_eta[iLyr]->SetEntries(thr.m_eventsPassed);
793  if (thr.m_doPercentageOccupancy) thr.m_h_occupancy_eta[iLyr]->Scale(100.0/thr.m_eventsPassed); //Convert to percentage if required
794  }
795 
796  if (thr.m_h_occupancy_phi[iLyr]) {
797  assert(m_h_nActiveCellsFirstEvent_phi[iLyr]);
798  thr.m_h_occupancy_phi[iLyr]->Divide(m_h_nActiveCellsFirstEvent_phi[iLyr]);
799  ATH_MSG_DEBUG("Adjusting number of entries from in phi occupancy histogram" << thr.m_h_occupancy_phi[iLyr]->GetEntries() << " to " << thr.m_eventsPassed);
800  if (thr.m_doPercentageOccupancy) thr.m_h_occupancy_phi[iLyr]->Scale(100.0/thr.m_eventsPassed); //Convert to percentage if required
801  thr.m_h_occupancy_phi[iLyr]->SetEntries(thr.m_eventsPassed);
802  }
803 
804 
805  if (thr.m_h_averageEnergy_etaphi[iLyr]) {
806  assert(thr.m_h_totalEnergy_etaphi[iLyr]);
807  assert(thr.m_h_occupancy_etaphi[iLyr]);
808  divideByOccupancy(thr.m_h_averageEnergy_etaphi[iLyr],thr.m_h_totalEnergy_etaphi[iLyr],thr.m_h_occupancy_etaphi[iLyr]);
809  thr.m_h_averageEnergy_etaphi[iLyr]->SetEntries(thr.m_h_totalEnergy_etaphi[iLyr]->GetEntries());
810  }//end if m_doAverageEnergy
811 
812  if (thr.m_h_averageTime_etaphi[iLyr]) {
813  assert(thr.m_h_totalTime_etaphi[iLyr]);
814  assert(thr.m_h_occupancy_etaphi[iLyr]);
815  divideByOccupancy(thr.m_h_averageTime_etaphi[iLyr],thr.m_h_totalTime_etaphi[iLyr],thr.m_h_occupancy_etaphi[iLyr]);
816  thr.m_h_averageTime_etaphi[iLyr]->SetEntries(thr.m_h_totalTime_etaphi[iLyr]->GetEntries());
817  }//end if m_doEtaPhiAverageTime
818 
819  if (thr.m_doEtaPhiFractionPastTth) {
820  assert(thr.m_h_poorTimeOccupancy_etaphi[iLyr]);
821  assert(thr.m_h_fractionPastTth_etaphi[iLyr]);
822  divideByOccupancy(thr.m_h_fractionPastTth_etaphi[iLyr],thr.m_h_poorTimeOccupancy_etaphi[iLyr],thr.m_h_occupancy_etaphi[iLyr]);
823  thr.m_h_fractionPastTth_etaphi[iLyr]->SetEntries(thr.m_h_poorTimeOccupancy_etaphi[iLyr]->GetEntries());
824  }//end if m_h_fractionPastTth_etaphi
825 
826  if (thr.m_h_averageQuality_etaphi[iLyr]) {
827  assert(thr.m_h_totalQuality_etaphi[iLyr]);
828  assert(thr.m_h_occupancy_etaphi[iLyr]);
829  divideByOccupancy(thr.m_h_averageQuality_etaphi[iLyr],thr.m_h_totalQuality_etaphi[iLyr],thr.m_h_occupancy_etaphi[iLyr]);
830  thr.m_h_averageQuality_etaphi[iLyr]->SetEntries(thr.m_h_totalQuality_etaphi[iLyr]->GetEntries());
831  }//end if m_doEtaPhiAverageQuality
832 
833  if (thr.m_doEtaPhiFractionOverQth) {
834  assert(thr.m_h_poorQualityOccupancy_etaphi[iLyr]);
835  assert(thr.m_h_fractionOverQth_etaphi[iLyr]);
836  divideByOccupancy(thr.m_h_fractionOverQth_etaphi[iLyr],thr.m_h_poorQualityOccupancy_etaphi[iLyr],thr.m_h_occupancy_etaphi[iLyr]);
837  thr.m_h_fractionOverQth_etaphi[iLyr]->SetEntries(thr.m_h_poorQualityOccupancy_etaphi[iLyr]->GetEntries());
838  }//end if m_h_fractionPastQth_etaphi
839 
840 
841  //Convert 2D occupancy histogram to percentage if required.
842  if (thr.m_h_occupancy_etaphi[iLyr] && thr.m_doPercentageOccupancy) {
843  thr.m_h_occupancy_phi[iLyr]->Scale(100.0/thr.m_eventsPassed); //Convert to percentage if required
844  }
845 
846  }//end loop over layers
847  }//end if at least one event seen
848  }//end loop over thresholds
849 
850 
851  if (newLumiBlockFlag()) {
852  ATH_MSG_INFO("New Lumi-Block. Resetting internal counters");
853  resetInternals();
854  }
855 
856  return StatusCode::SUCCESS;
857  }
858 
859 
860 
862  if (m_doSaveTempHists) {
863  mg.regHist(h).ignore();
864  }
865  else {
866  h->SetDirectory(nullptr); //That means we manage the memory ourselves
867  }
868 }
869 
870 
873 
874  if (m_sporadic_switch && msgLvl(MSG::INFO)) {
875  ATH_MSG_INFO( "Total number of single-cell sporadic-noise histograms produced: "
876  << m_counter_sporadic_protc << " (max " << m_sporadic_protc << ")" );
877  for (size_t part=0;part<MAXPARTITIONS;++part) {
878  ATH_MSG_INFO( "Number of single-cell sporadic-noise histograms produced for " << m_layerNames[part]
879  << ": " << m_sporadicPerPartCounter[part] << " (max " << m_sporadicPlotLimit << ")" );
880  }
881  }
882 
883  //Delete temporary histograms (if needed)
884  if (!m_doSaveTempHists) { //We mange the temporary histograms ourselves
885  for (size_t iLyr=0;iLyr<MAXLAYER;++iLyr) {
888  }
889 
890  for (auto& thr : m_thresholdHists) {
891  for (size_t iLyr=0;iLyr<MAXLAYER;++iLyr) {
892  for (TH1* h : {thr.m_h_totalTime_etaphi[iLyr], thr.m_h_poorTimeOccupancy_etaphi[iLyr],
893  thr.m_h_poorQualityOccupancy_etaphi[iLyr],thr.m_h_totalQuality_etaphi[iLyr]}) {
894  delete h;h=nullptr;
895  }//end loop over histograms
896  if (!thr.m_doEtaPhiOccupancy && thr.m_h_occupancy_etaphi[iLyr]) { //this one may be managed by underlying root
897  delete thr.m_h_occupancy_etaphi[iLyr]; thr.m_h_occupancy_etaphi[iLyr]=nullptr;
898  }
899  }//end loop over layers
900  }//end loop over thresholds
901  }//end if not saving temp hists
902 
903  return StatusCode::SUCCESS;
904 }
905 
906 
907 
908 TH2F* LArCellMonTool::newEtaPhiHist(const std::string& hName, const std::string& hTitle, const CaloMonitoring::LArCellBinning& binning) {
909 
910  TH2F* result=new TH2F(hName.c_str(),hTitle.c_str(),
911  binning.getNTotEtaBins(),binning.getEtaBinArray(),
912  binning.getNTotPhiBins(),binning.getPhiBinArray());
913 
914  result->GetXaxis()->SetTitle("#eta");
915  result->GetYaxis()->SetTitle("#phi");
916  return result;
917 }
918 
919 
920 
922  const CaloCellContainer* cellCont) {
923 
924  ATH_MSG_INFO("Creating the once-per-job histograms");
925  //The following histograms can be considered constants for one job
926  //(in fact, they are constant for an entire run or even run-periode)
927  //ActiveCells in eta/phi (to normalize 1D occupancy plots)
928  //BadChannel word
929  //Database noise
930 
931 
932  //1. Bad Channel word
934  MonGroup knownBadChannelGroup(this,m_lArPath+"KnownBadChannels", run, ATTRIB_MANAGED,"","weightedAverage"); //Merging this info makes no sense at all!
935  for (unsigned iLyr=0;iLyr<MAXLAYER;++iLyr) {
937  std::string histName=std::string("KnownBadChannelsVsEtaPhi_") + m_layerNames[iLyr];
938  std::string histTitle=std::string("Map of known bad channels in (#eta,#phi) for ") + m_layerNames[iLyr];
939  m_h_badChannels_etaphi[iLyr]=new TH2F(histName.c_str(),histTitle.c_str(),
940  binning.getNTotEtaBins(),binning.getEtaBinArray(),
941  binning.getNTotPhiBins(),binning.getPhiBinArray());
942 
943  m_h_badChannels_etaphi[iLyr]->GetXaxis()->SetTitle("#eta");
944  m_h_badChannels_etaphi[iLyr]->GetYaxis()->SetTitle("#phi");
945  ATH_CHECK(knownBadChannelGroup.regHist(m_h_badChannels_etaphi[iLyr]));
946  }//end loop over layers
947  }// end if m_doKnownBadChannelsVsEtaPhi
948 
949  //2. Database noise
951  MonGroup mongroup(this,m_lArPath+"DatabaseNoise",run, ATTRIB_MANAGED,"","weightedAverage");
952  for (unsigned iLyr=0;iLyr<MAXLAYER;++iLyr) {
954  std::string histName=std::string("DatabaseNoiseVsEtaPhi_") + m_layerNames[iLyr];
955  std::string histTitle=std::string("Map of Noise Values from the Database vs (#eta,#phi) for ") + m_layerNames[iLyr];
956  m_h_dbnoise_etaphi[iLyr]=new TH2F(histName.c_str(),histTitle.c_str(),
957  binning.getNTotEtaBins(),binning.getEtaBinArray(),
958  binning.getNTotPhiBins(),binning.getPhiBinArray());
959 
960  m_h_dbnoise_etaphi[iLyr]->GetXaxis()->SetTitle("#eta");
961  m_h_dbnoise_etaphi[iLyr]->GetYaxis()->SetTitle("#phi");
962  ATH_CHECK(mongroup.regHist(m_h_dbnoise_etaphi[iLyr]));
963  }//end loop over layers
964  }//end if m_doDatabaseNoiseVsEtaPhi
965 
966 
967  //3.1 Number of active cells in eta to normalize 1D eta occupancy plot
968  MonGroup mongroup(this,m_lArPath+"ActiveCells",run, ATTRIB_MANAGED);
969  for (const auto& thr : m_thresholdHists) {
970  if (thr.m_doEtaOccupancy) {
971  ATH_MSG_DEBUG("Booking NCellsActiveVsEta temp histogram");
972  for (unsigned iLyr=0;iLyr<MAXLAYER;++iLyr) {
974  const std::string histName=std::string("NCellsActiveVsEta_") + m_layerNames[iLyr];
975  const std::string histTitle=std::string("No. of Active Cells in #eta for ") + m_layerNames[iLyr];
976  m_h_nActiveCellsFirstEvent_eta[iLyr]=new TH1F(histName.c_str(),histTitle.c_str(),binning.getNTotEtaBins(),binning.getEtaBinArray());
978  }//end loop over layers
979  break; //break loop over thresholds, one such histo is enough
980  } //end if thr.m_doEtaOccupancy
981  }//end loop over thresholds
982 
983  //3.2 Number of active cells in phi to normalize 1D phi occupancy plot
984  for (const auto& thr : m_thresholdHists) {
985  if (thr.m_doPhiOccupancy) {
986  ATH_MSG_DEBUG("Booking NCellsActiveVsPhi temp histogram");
987  for (unsigned iLyr=0;iLyr<MAXLAYER;++iLyr) {
989  const std::string histName=std::string("NCellsActiveVsPhi_") + m_layerNames[iLyr];
990  const std::string histTitle=std::string("No. of Active Cells in #phi for ") + m_layerNames[iLyr];
991  m_h_nActiveCellsFirstEvent_phi[iLyr]=new TH1F(histName.c_str(),histTitle.c_str(),binning.getNTotPhiBins(),binning.getPhiBinArray());
993  }//end loop over layers
994  break; //break loop over thresholds, one such histo is enough
995  } //end if thr.m_doPhiOccupancy
996  }//end loop over thresholds
997 
998 
1000  const LArBadChannelCont *bcCont {*readHandle};
1001  if(m_doKnownBadChannelsVsEtaPhi && !bcCont) {
1002  ATH_MSG_WARNING( "Do not have Bad chan container !!!" );
1003  return StatusCode::FAILURE;
1004  }
1005 
1007 
1008  //filling:
1010  CaloCellContainer::const_iterator it_e = cellCont->end();
1011  for ( ; it!=it_e;++it) {
1012  const CaloCell* cell = *it;
1013  Identifier id = cell->ID();
1014  bool is_lar=m_calo_id->is_lar(id);
1015  if(!is_lar) continue;
1016  const CaloDetDescrElement* caloDDEl=cell->caloDDE();
1017  float celleta, cellphi;
1018  unsigned iLyr, iLyrNS;
1019  getHistoCoordinates(caloDDEl, celleta, cellphi, iLyr, iLyrNS);
1020 
1022  const LArBadChannel larBadChannel = bcCont->offlineStatus(id);
1023  if (!larBadChannel.good()) {
1024  const uint32_t badCellWord = larBadChannel.packedData();
1025  m_h_badChannels_etaphi[iLyr]->Fill(celleta,cellphi,badCellWord);
1026  }
1027  }
1028 
1029  if ( m_doDatabaseNoiseVsEtaPhi ) {
1030  const float cellnoisedb = noise->getNoise(id, cell->gain());
1031  m_h_dbnoise_etaphi[iLyr]->Fill(celleta,cellphi,cellnoisedb);
1032  }
1033 
1034  // 1D reference plots of active cells versus eta and phi: (needed for nomalization)
1035  if ( m_h_nActiveCellsFirstEvent_eta[iLyr] ) {
1036  m_h_nActiveCellsFirstEvent_eta[iLyr]->Fill(celleta);
1037  }
1038  if (m_h_nActiveCellsFirstEvent_phi[iLyr] ) {
1039  m_h_nActiveCellsFirstEvent_phi[iLyr]->Fill(cellphi);
1040  }
1041 
1042  }//end loop over cells
1043 
1044  return StatusCode::SUCCESS;
1045 }
1046 
1048 
1049  const std::string percentMerging(m_useWeightedEffMerging ? "weightedEff" : "weightedAverage");
1050 
1051  MonGroup monGroup2DOcc(this,m_lArPath+"2d_Occupancy", run, ATTRIB_MANAGED);
1052  MonGroup monGroup1DOcc(this,m_lArPath+"1d_Occupancy", run, ATTRIB_MANAGED,"",percentMerging);
1053  MonGroup monGroupTotalE(this,m_lArPath+"2d_TotalEnergy", run, ATTRIB_MANAGED);
1054  MonGroup monGroupAvgE(this,m_lArPath+"2d_AvgEnergy", run, ATTRIB_MANAGED,"","weightedAverage");
1055  MonGroup monGroupAvgT(this,m_lArPath+"2d_AvgTime", run, ATTRIB_MANAGED,"","weightedAverage");
1056  MonGroup monGroupOutOfTime(this,m_lArPath+"2d_FractionOutOfTime", run, ATTRIB_MANAGED,"","weightedAverage");
1057  MonGroup monGroupAvgQ(this,m_lArPath+"2d_AvgQuality", run, ATTRIB_MANAGED,"","weightedAverage");
1058  MonGroup monGroupPoorQ(this,m_lArPath+"2d_PoorQualityFraction", run, ATTRIB_MANAGED,"","weightedAverage");
1059 
1060  MonGroup monGroup2DPercentOcc(this,m_lArPath+"2d_Occupancy",run,ATTRIB_MANAGED,"",percentMerging);
1061 
1062  MonGroup monGroupTemp(this,m_lArPath+"Temp",run);
1063 
1064  for (auto& thr : m_thresholdHists) {
1065 
1066  const std::string cscVetoTitle(thr.m_doBeamBackgroundRemoval ? " with CSC veto" : " w/o CSC veto");
1067  const std::string cscVetoName(thr.m_doBeamBackgroundRemoval ? "_CSCveto" : "");
1068 
1069  for (unsigned iLyr=0;iLyr<MAXLAYER;++iLyr) {
1070  const unsigned iLyrNS=iLyr/2;
1072 
1073  //The 2D occupancy plot may be only necessary to normalize the average plots, in this case it will be temp hist
1074  if (thr.m_doEtaPhiOccupancy || thr.m_doEtaPhiAverageEnergy || thr.m_doEtaPhiAverageTime || thr.m_doEtaPhiFractionPastTth) {
1075  ATH_MSG_DEBUG("Booking 2D occupancy histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1076  if (thr.m_doPercentageOccupancy) {
1077  //Name it 'percentage' if required (will be converted at the end of procHist)
1078  thr.m_h_occupancy_etaphi[iLyr]=newEtaPhiHist(std::string("PercentCellOccupancyVsEtaPhi_")+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1079  "Percentage of events in (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1080  binning);
1081  }
1082  else {//no percentage requested
1083  thr.m_h_occupancy_etaphi[iLyr]=newEtaPhiHist(std::string("CellOccupancyVsEtaPhi_")+m_layerNames[iLyr]+"_"+thr.m_threshName,
1084  "No. of events in (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1085  binning);
1086  }
1087  if (thr.m_doEtaPhiOccupancy) //Asked to store this histogram?
1088  ATH_CHECK(monGroup2DOcc.regHist(thr.m_h_occupancy_etaphi[iLyr])); //->register histogram
1089  else
1090  regTempHist(thr.m_h_occupancy_etaphi[iLyr],monGroupTemp);
1091 
1092  }//end if need 2D occupancy histogram
1093 
1094 
1095  //1D eta or phi occupacies
1096  if (thr.m_doEtaOccupancy) {
1097  ATH_MSG_DEBUG("Booking eta occupancy histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1098  std::string histName=std::string("CellOccupancyVsEta_") + m_layerNames[iLyr] + "_" + thr.m_threshName;//+cscVetoName;
1099  std::string histTitle;
1100  if (thr.m_doPercentageOccupancy)
1101  histTitle="Percentage of events in (#eta) for ";
1102  else {
1103  histTitle="No. of events in (#eta) for "; //+ m_layerNames[iLyr] + " - " + thr.m_threshTitles[iLyrNS] + cscVetoTitle;
1104  }
1105  histTitle+=(m_layerNames[iLyr] + " - " + thr.m_threshTitles[iLyrNS] + cscVetoTitle);
1106 
1107  thr.m_h_occupancy_eta[iLyr]=new TH1F(histName.c_str(),histTitle.c_str(),binning.getNTotEtaBins(),binning.getEtaBinArray());
1108  thr.m_h_occupancy_eta[iLyr]->GetXaxis()->SetTitle("#eta");
1109  ATH_CHECK(monGroup1DOcc.regHist(thr.m_h_occupancy_eta[iLyr]));
1110 
1111  }//end doEtaOccupancy
1112 
1113  if (thr.m_doPhiOccupancy) {
1114  ATH_MSG_DEBUG("Booking phi occupancy histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1115  std::string histName=std::string("CellOccupancyVsPhi_") + m_layerNames[iLyr] + "_" + thr.m_threshName;//; + cscVetoName;
1116  std::string histTitle;
1117  if (thr.m_doPercentageOccupancy)
1118  histTitle="Percentage of events in (#phi) for ";
1119  else {
1120  histTitle="No. of events in (#phi) for "; //+ m_layerNames[iLyr] + " - " + thr.m_threshTitles[iLyrNS] + cscVetoTitle;
1121  }
1122  histTitle+=(m_layerNames[iLyr] + " - " + thr.m_threshTitles[iLyrNS] + cscVetoTitle);
1123 
1124  thr.m_h_occupancy_phi[iLyr]=new TH1F(histName.c_str(),histTitle.c_str(),binning.getNTotPhiBins(),binning.getPhiBinArray());
1125  thr.m_h_occupancy_phi[iLyr]->GetXaxis()->SetTitle("#phi");
1126  ATH_CHECK(monGroup1DOcc.regHist(thr.m_h_occupancy_phi[iLyr]));
1127 
1128  }//end doPhiOccupancy
1129 
1130 
1131  if (thr.m_doEtaPhiTotalEnergy || thr.m_doEtaPhiAverageEnergy) {
1132  ATH_MSG_DEBUG("Booking 2D total energy histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1133  thr.m_h_totalEnergy_etaphi[iLyr]=newEtaPhiHist("TotalEnergyVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1134  "Total Cell Energy vs (#eta,#phi) in "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1135  binning);
1136  ATH_CHECK(monGroupTotalE.regHist(thr.m_h_totalEnergy_etaphi[iLyr]));
1137  }
1138 
1139  if (thr.m_doEtaPhiAverageEnergy) {
1140  ATH_MSG_DEBUG("Booking 2D average energy histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1141  thr.m_h_averageEnergy_etaphi[iLyr]=newEtaPhiHist("CellAvgEnergyVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName,
1142  "Average Cell Energy vs (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1143  binning);
1144  ATH_CHECK(monGroupAvgE.regHist(thr.m_h_averageEnergy_etaphi[iLyr]));
1145  }
1146 
1147 
1148  if (thr.m_doEtaPhiAverageTime) {
1149  ATH_MSG_DEBUG("Booking 2D average time histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1150 
1151  thr.m_h_totalTime_etaphi[iLyr]=newEtaPhiHist("TempTotalTimeVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1152  "Total Cell Time vs (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1153  binning);
1154  //thr.m_h_totalTime_etaphi[iLyr]->Sumw2();
1155  regTempHist(thr.m_h_totalTime_etaphi[iLyr],monGroupTemp);
1156 
1157 
1158  thr.m_h_averageTime_etaphi[iLyr]=newEtaPhiHist("AverageTimeVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName,
1159  "Average Cell Time vs (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1160  binning);
1161  ATH_CHECK(monGroupAvgT.regHist(thr.m_h_averageTime_etaphi[iLyr]));
1162  }// end if doEtaPhiAverageTime
1163 
1164 
1165  if (thr.m_doEtaPhiFractionPastTth) {
1166  ATH_MSG_DEBUG("Booking 2D poor time histograms for threshold " << thr.m_threshName << ", layer " << m_layerNames[iLyr]);
1167  thr.m_h_poorTimeOccupancy_etaphi[iLyr]=newEtaPhiHist("TempPoorTimeOccupancy_"+m_layerNames[iLyr]+"_"+thr.m_threshName,
1168  "Occupancy of Cells beyond quality threshold vs (#eta,#phi) for "+m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1169  binning);
1170  //thr.m_h_poorTimeOccupancy_etaphi[iLyr]->Sumw2();
1171  regTempHist(thr.m_h_poorTimeOccupancy_etaphi[iLyr],monGroupTemp);
1172 
1173  std::stringstream sHistTitle;
1174  sHistTitle.precision(0);
1175  sHistTitle << "Fraction of Events in " << m_layerNames[iLyr] << " with " << thr.m_threshName
1176  << " for which the Time is further than " << thr.m_timeThreshold << " from Zero";
1177  thr.m_h_fractionPastTth_etaphi[iLyr]=newEtaPhiHist("fractionPastTthVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName,
1178  sHistTitle.str(),binning);
1179 
1180  ATH_CHECK(monGroupOutOfTime.regHist(thr.m_h_fractionPastTth_etaphi[iLyr]));
1181  }//end if doEtaPhiFractionPastTth
1182 
1183  if (thr.m_doEtaPhiFractionOverQth) {
1184  thr.m_h_poorQualityOccupancy_etaphi[iLyr]=newEtaPhiHist("TempPoorQualityOccupancy"+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1185  "Occupancy of Cells beyond quality threshold vs (#eta,#phi) in" +m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1186  binning);
1187  regTempHist(thr.m_h_poorQualityOccupancy_etaphi[iLyr],monGroupTemp);
1188 
1189 
1190 
1191  std::stringstream sHistTitle;
1192  sHistTitle.precision(0);
1193  sHistTitle << "Fraction of Events in " << m_layerNames[iLyr] << " with " << thr.m_threshName
1194  << " for which the Quality Factor Exceeds " << thr.m_qualityFactorThreshold;
1195 
1196  thr.m_h_fractionOverQth_etaphi[iLyr]=newEtaPhiHist("fractionOverQthVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName,
1197  sHistTitle.str(),binning);
1198 
1199  ATH_CHECK(monGroupPoorQ.regHist(thr.m_h_fractionOverQth_etaphi[iLyr]));
1200  }
1201 
1202  if (thr.m_doEtaPhiAverageQuality) {
1203  thr.m_h_totalQuality_etaphi[iLyr]=newEtaPhiHist("TempTotalQuality_"+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1204  "Total quality factor of Cells vs (#eta,#phi) in " + m_layerNames[iLyr]+" - "+thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1205  binning);
1206  regTempHist(thr.m_h_totalQuality_etaphi[iLyr],monGroupTemp);
1207 
1208 
1209  thr.m_h_averageQuality_etaphi[iLyr]=newEtaPhiHist("AverageQualityVsEtaPhi_"+m_layerNames[iLyr]+"_"+thr.m_threshName+cscVetoName,
1210  "Average Cell Quality in " + m_layerNames[iLyr] + " with " + thr.m_threshTitles[iLyrNS]+cscVetoTitle,
1211  binning);
1212 
1213  ATH_CHECK(monGroupAvgQ.regHist(thr.m_h_averageQuality_etaphi[iLyr]));
1214 
1215  }
1216  }//end loop over layers
1217  }//end loop over thresholds
1218  return StatusCode::SUCCESS;
1219 }
1220 
1221 
1222 std::string LArCellMonTool::strToLower(const std::string& input) {
1223  std::string output;
1224  for (const auto& c : input) {
1225  output.push_back(std::tolower(c));
1226  }
1227  return output;
1228 }
1229 
1231 
1232  ATH_MSG_DEBUG("Resetting internal counters and temporary histograms");
1233 
1234  for (unsigned& i : m_sporadicPerPartCounter) {
1235  i=0;
1236  }
1238 
1239 
1240  for (auto& thr : m_thresholdHists) {
1241  //Reset event counters used for normalization
1242  thr.m_eventsPassed=0;
1243  for (auto& ctr : thr.m_occupancyCounter) { ctr=0;}
1244  //The following histograms (may) be temporary, so are not reset by THistSvc
1245  //Note that they are deleted by the underlying root infrastructure (gDirectory)
1246  //as long as TH1::AddDirectoryStatus is true.
1247 
1248  if (!m_doSaveTempHists) { //We the mange temporary histograms ourselves
1249  for (size_t iLyr=0;iLyr<MAXLAYER;++iLyr) {
1250  for (TH1* h : {thr.m_h_totalTime_etaphi[iLyr], thr.m_h_poorTimeOccupancy_etaphi[iLyr],
1251  thr.m_h_poorQualityOccupancy_etaphi[iLyr],thr.m_h_totalQuality_etaphi[iLyr]}) {
1252  if(h) h->Reset();
1253  }//end loop over histograms
1254 
1255  if (!thr.m_doEtaPhiOccupancy && thr.m_h_occupancy_etaphi[iLyr]) { //this one may be managed by underlying root
1256  thr.m_h_occupancy_etaphi[iLyr]->Reset();
1257  }
1258 
1259  }//end loop over layers
1260  }//end if not saving temp hists
1261 
1262  }//end loop over thresholds
1263 
1264  }
1265 
1266 
1268  , const CaloDetDescrManager* detDescMgr) {
1269 
1270  for (size_t iLyr=0;iLyr<MAXLAYER;++iLyr) {
1271  if (thr.m_h_occupancy_etaphi[iLyr]) thr.m_h_occupancy_etaphi[iLyr]->Reset();
1272  if (thr.m_h_occupancy_eta[iLyr]) thr.m_h_occupancy_eta[iLyr]->Reset();
1273  if (thr.m_h_occupancy_phi[iLyr]) thr.m_h_occupancy_phi[iLyr]->Reset();
1274  }
1275 
1276  auto it=detDescMgr->element_begin();
1277  auto it_e=detDescMgr->element_end();
1278 
1279  for (;it!=it_e;++it) {
1280  const CaloDetDescrElement* dde=(*it);
1281  if (dde->is_tile()) continue;
1282 
1283  const IdentifierHash hash=dde->calo_hash();
1284  assert(hash<thr.m_occupancyCounter.size());
1285 
1286  const unsigned aboveThrCntr=thr.m_occupancyCounter[hash];
1287 
1288  if (aboveThrCntr) { //any hit?
1289  float celleta, cellphi;
1290  unsigned iLyr, iLyrNS;
1291  getHistoCoordinates(dde, celleta, cellphi, iLyr, iLyrNS);
1292 
1293  if (thr.m_h_occupancy_etaphi[iLyr]) thr.m_h_occupancy_etaphi[iLyr]->Fill(celleta,cellphi,aboveThrCntr);
1294  if (thr.m_h_occupancy_eta[iLyr]) thr.m_h_occupancy_eta[iLyr]->Fill(celleta,aboveThrCntr);
1295  if (thr.m_h_occupancy_phi[iLyr]) thr.m_h_occupancy_phi[iLyr]->Fill(cellphi,aboveThrCntr);
1296 
1297 
1298  }//end if have at least one hit
1299 
1300  }//end loop over calo DDEs
1301  return StatusCode::SUCCESS;
1302 }
1303 
1304 
1305 void LArCellMonTool::getHistoCoordinates(const CaloDetDescrElement* dde, float& celleta, float& cellphi, unsigned& iLyr, unsigned& iLyrNS) const {
1306 
1307  celleta=dde->eta_raw();
1308  cellphi=dde->phi_raw();
1309 
1310  int calosample=dde->getSampling();
1311  if (dde->is_lar_em_endcap_inner()) calosample-=1; //Here, we consider the two layers of the EMEC IW as EME1 and EME2 instad of layer 2 and 3
1312  iLyrNS=m_caloSamplingToLyrNS.at(calosample); //will throw if out of bounds
1313  if ((iLyrNS==EMB1NS || iLyrNS==EMB2NS) && m_calo_id->region(dde->identify())==1) {
1314  //We are in the awkward region 1 of the EM Barrel
1315  //Looking at the image at http://atlas.web.cern.ch/Atlas/GROUPS/LIQARGEXT/TDR/figures6/figure6-17.eps
1316  //may be useful to understand what's going on here.
1317 
1318  //In brief: Region 1, layer 1 is closer related ot the middle compartment (aka layer 2)
1319  // and region 1, layer 2 closer related to the back compartment (aka layer 3)
1320  iLyrNS+=1;
1321 
1322  //Layer 2: 0<eta<1.4 + 1.4<eta<1.475, deta = 0.025. 3 rows of cells from region 1
1323  //Layer 3: 0<eta<1.35 (deta=0.050) + 1.4<eta<1.475 (deta = 0.075). 1 row of cell from region 1 with different dEta
1324  //The following couts were used to get the binning right:
1325  //if (iLyrNS==EMB2NS) std::cout << "Eta of EM layer 1->2 region 1 cell=" << celleta << std::endl;
1326  //if (iLyrNS==EMB3NS) std::cout << "Eta of EM layer 2->3 region 1 cell=" << celleta << std::endl;
1327  }
1328 
1329  const unsigned side=(celleta>0) ? 0 : 1; //Value >0 means A-side
1330  iLyr=iLyrNS*2+side; }
1331 
1332 
1333 void LArCellMonTool::divideByOccupancy(TH2F* fraction, const TH2F* total, const TH2* occupancy) {
1334  //This method divides total/occupancy and sets the error to sqrt(1/occupancy)
1335  //this way the weightedAverage merging method does the right thing (modulo rounding errors)
1336 
1337  //Assumes that the histograms have identical binning
1338 
1339  fraction->Reset();
1340  const size_t nCells=total->GetNcells();
1341  assert(static_cast<int>(nCells)==fraction->GetNcells());
1342  assert(static_cast<int>(nCells)==occupancy->GetNcells());
1343 
1344  for (size_t i=0;i<nCells;++i) {
1345  const double t = total->GetBinContent(i);
1346  const double o = occupancy->GetBinContent(i);
1347 
1348  if (o>0) {
1349  fraction->SetBinContent(i,t/o);
1350  fraction->SetBinError(i,std::sqrt(1./o));
1351  }
1352  }
1353 
1354 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArCellMonTool::m_layerEnumtoPartitionEnum
const std::array< PartitionEnum, MAXLAYER > m_layerEnumtoPartitionEnum
Definition: LArCellMonTool.h:106
LArCellMonTool::m_thresholdDirectionProp
StringArrayProperty m_thresholdDirectionProp
Definition: LArCellMonTool.h:202
LArCellMonTool::EMBPNS
@ EMBPNS
Definition: LArCellMonTool.h:78
LArCellMonTool::m_oncePerJobHistosDone
bool m_oncePerJobHistosDone
Definition: LArCellMonTool.h:159
LArCellMonTool::FCALC
@ FCALC
Definition: LArCellMonTool.h:82
beamspotman.r
def r
Definition: beamspotman.py:676
LArCellMonTool::fillOccupancyHist
StatusCode fillOccupancyHist(LArCellMonTool::thresholdHist_t &thr, const CaloDetDescrManager *detDescMgr)
Definition: LArCellMonTool.cxx:1267
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CaloDetDescrElement::is_lar_em_endcap_inner
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
Definition: CaloDetDescrElement.cxx:114
LArCellMonTool::EMB1NS
@ EMB1NS
Definition: LArCellMonTool.h:78
LArCellMonTool::m_h_nActiveCellsFirstEvent_eta
std::array< TH1F *, MAXLAYER > m_h_nActiveCellsFirstEvent_eta
Definition: LArCellMonTool.h:341
LArCellMonTool::m_doEtaPhiAverageQualityProp
BooleanArrayProperty m_doEtaPhiAverageQualityProp
Definition: LArCellMonTool.h:214
LArCellMonTool::MISC
@ MISC
Definition: LArCellMonTool.h:119
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LArCellMonTool::m_doBeamBackgroundRemovalProp
BooleanArrayProperty m_doBeamBackgroundRemovalProp
Definition: LArCellMonTool.h:220
AddEmptyComponent.binning
binning
Definition: AddEmptyComponent.py:34
get_generator_info.result
result
Definition: get_generator_info.py:21
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
LArCellMonTool::m_doEtaOccupancyProp
BooleanArrayProperty m_doEtaOccupancyProp
Definition: LArCellMonTool.h:210
LArCellMonTool::thresholdHist_t::m_doEtaPhiOccupancy
bool m_doEtaPhiOccupancy
Definition: LArCellMonTool.h:246
LArCellMonTool::CALO
@ CALO
Definition: LArCellMonTool.h:119
LArCellMonTool::m_threshold_em_S0S1
float m_threshold_em_S0S1
Definition: LArCellMonTool.h:193
LArCellMonTool::MINBIAS
@ MINBIAS
Definition: LArCellMonTool.h:119
LArCellMonTool::m_triggerNames
std::array< std::string, NOTA > m_triggerNames
Definition: LArCellMonTool.h:173
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
LArCellMonTool::m_thresholdTitleTemplates
StringArrayProperty m_thresholdTitleTemplates
Definition: LArCellMonTool.h:205
CaloDetDescrManager_Base::element_end
calo_element_const_iterator element_end() const
end of element vector
Definition: CaloDetDescrManager.cxx:117
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArCellMonTool::m_trigDec
ToolHandle< Trig::TrigDecisionTool > m_trigDec
TDT handle.
Definition: LArCellMonTool.h:172
LArCellMonTool::OVER
@ OVER
Definition: LArCellMonTool.h:118
LArCellMonTool::m_maskNoCondChannels
bool m_maskNoCondChannels
Definition: LArCellMonTool.h:181
ManagedMonitorToolBase::newEventsBlockFlag
bool newEventsBlockFlag() const
Definition: ManagedMonitorToolBase.h:855
LArCellMonTool::HEC0NS
@ HEC0NS
Definition: LArCellMonTool.h:78
LArCellMonTool::MAXLYRNS
@ MAXLYRNS
Definition: LArCellMonTool.h:79
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
python.SystemOfUnits.mg
int mg
Definition: SystemOfUnits.py:171
LArCellMonTool::m_qualityFactorThresholdProp
FloatArrayProperty m_qualityFactorThresholdProp
Definition: LArCellMonTool.h:216
LArCellMonTool::thresholdHist_t::m_doEtaPhiFractionPastTth
bool m_doEtaPhiFractionPastTth
Definition: LArCellMonTool.h:257
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LArCellBinning.logEnergyBins
logEnergyBins
Definition: LArCellBinning.py:156
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloMonToolBase::m_lb
int m_lb
Definition: CaloMonToolBase.h:31
LArCellMonTool::m_minSporadicNoiseEventsPerCell
unsigned m_minSporadicNoiseEventsPerCell
Definition: LArCellMonTool.h:197
LArCellMonTool::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArCellMonTool.h:294
LArCellMonTool::EMECA
@ EMECA
Definition: LArCellMonTool.h:82
LArBadChannel.h
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArCellMonTool::EMECPNS
@ EMECPNS
Definition: LArCellMonTool.h:79
LArCellMonTool::MAXPARTITIONS
@ MAXPARTITIONS
Definition: LArCellMonTool.h:82
LArCellMonTool::m_h_badChannels_etaphi
std::array< TH2F *, MAXLAYER > m_h_badChannels_etaphi
Definition: LArCellMonTool.h:337
AthenaMonManager::cosmics
@ cosmics
Definition: AthenaMonManager.h:58
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
LArCellMonTool::m_sporadicNoiseCells
std::unordered_map< Identifier, SporadicNoiseCell_t, idHasher > m_sporadicNoiseCells
Definition: LArCellMonTool.h:318
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArCellMonTool::thresholdHist_t::m_doEtaPhiAverageTime
bool m_doEtaPhiAverageTime
Definition: LArCellMonTool.h:256
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LArOnlineID_Base::slot
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
Definition: LArOnlineID_Base.cxx:1961
LArBadChannelMask::buildBitMask
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
Definition: LArBadChannelMask.cxx:10
LArCellMonTool::m_doEtaPhiTotalEnergyProp
BooleanArrayProperty m_doEtaPhiTotalEnergyProp
Definition: LArCellMonTool.h:212
LArCellMonTool::regTempHist
void regTempHist(TH1 *h, MonGroup &mg) const
Definition: LArCellMonTool.cxx:861
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LArCellMonTool::newEtaPhiHist
static TH2F * newEtaPhiHist(const std::string &hName, const std::string &hTitle, const CaloMonitoring::LArCellBinning &binning)
Definition: LArCellMonTool.cxx:908
LArCellMonTool::thresholdHist_t::m_doEtaOccupancy
bool m_doEtaOccupancy
Definition: LArCellMonTool.h:247
LArCellMonTool::FCAL1NS
@ FCAL1NS
Definition: LArCellMonTool.h:79
ManagedMonitorToolBase::m_dataType
AthenaMonManager::DataType_t m_dataType
Definition: ManagedMonitorToolBase.h:901
athena.value
value
Definition: athena.py:122
LArCellMonTool::m_counter_sporadic_protc
unsigned m_counter_sporadic_protc
Definition: LArCellMonTool.h:301
LArCellMonTool::checkTriggerAndBeamBackground
void checkTriggerAndBeamBackground()
Definition: LArCellMonTool.cxx:506
LArCellMonTool::UNDER
@ UNDER
Definition: LArCellMonTool.h:118
LArCellMonTool::LayerEnum
LayerEnum
Definition: LArCellMonTool.h:72
LArCellMonTool::thresholdHist_t::m_h_occupancy_etaphi
std::array< TH2F *, MAXLAYER > m_h_occupancy_etaphi
Definition: LArCellMonTool.h:260
plotting.yearwise_luminosity.ytitle
string ytitle
Definition: yearwise_luminosity.py:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArCellMonTool::m_caloSamplingToLyrNS
const std::map< unsigned, LayerEnumNoSides > m_caloSamplingToLyrNS
Definition: LArCellMonTool.h:98
LArCellMonTool::SporadicNoiseCell_t::m_h_energy
TH1F * m_h_energy
Definition: LArCellMonTool.h:304
LArCellMonTool::m_h_energy
std::array< TH1F *, MAXLAYER > m_h_energy
Definition: LArCellMonTool.h:330
LArCellMonTool::m_partitionNames
const std::array< std::string, MAXPARTITIONS > m_partitionNames
Definition: LArCellMonTool.h:95
LArCellMonTool::m_doPercentageOccupancyProp
BooleanArrayProperty m_doPercentageOccupancyProp
Definition: LArCellMonTool.h:208
LArCellMonTool::NOTA
@ NOTA
Definition: LArCellMonTool.h:119
LArCellMonTool::SporadicNoiseCell_t
Definition: LArCellMonTool.h:303
LArCellMonTool::m_sporadicPerPartCounter
std::array< unsigned, MAXPARTITIONS > m_sporadicPerPartCounter
Definition: LArCellMonTool.h:323
LArBadChannelMask::cellShouldBeMasked
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
Definition: LArBadChannelMask.h:42
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
LArCellMonTool::m_h_nActiveCellsFirstEvent_phi
std::array< TH1F *, MAXLAYER > m_h_nActiveCellsFirstEvent_phi
Definition: LArCellMonTool.h:342
x
#define x
LArCellMonTool::m_doEtaPhiAverageTimeProp
BooleanArrayProperty m_doEtaPhiAverageTimeProp
Definition: LArCellMonTool.h:217
LArCellMonTool::m_LArOnlineIDHelper
const LArOnlineID * m_LArOnlineIDHelper
Definition: LArCellMonTool.h:291
LArCellMonTool::thresholdHist_t::m_doPercentageOccupancy
bool m_doPercentageOccupancy
Definition: LArCellMonTool.h:245
LArCellMonTool::RNDM
@ RNDM
Definition: LArCellMonTool.h:119
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
ReadCondHandle.h
LArCellMonTool::m_cellContainerName
SG::ReadHandleKey< CaloCellContainer > m_cellContainerName
Definition: LArCellMonTool.h:160
LArCellMonTool::FCAL3NS
@ FCAL3NS
Definition: LArCellMonTool.h:79
LArCellMonTool::FCAL2NS
@ FCAL2NS
Definition: LArCellMonTool.h:79
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
LArCellMonTool::EMBA
@ EMBA
Definition: LArCellMonTool.h:82
CaloCell_ID.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
LArCellMonTool::PartitionEnum
PartitionEnum
Definition: LArCellMonTool.h:82
LArCellMonTool::EMBC
@ EMBC
Definition: LArCellMonTool.h:82
LArCellMonTool::m_doPhiOccupancyProp
BooleanArrayProperty m_doPhiOccupancyProp
Definition: LArCellMonTool.h:211
LArCellMonTool::strToLower
static std::string strToLower(const std::string &input)
Definition: LArCellMonTool.cxx:1222
LArCellMonTool::m_maskKnownBadChannels
bool m_maskKnownBadChannels
Definition: LArCellMonTool.h:180
TRT::Hit::side
@ side
Definition: HitInfo.h:83
LArCellMonTool::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArCellMonTool.h:295
LArCellMonTool::m_h_n_trigEvent
TH1F * m_h_n_trigEvent
Definition: LArCellMonTool.h:327
LArCellMonTool::thresholdHist_t::m_threshName
std::string m_threshName
Definition: LArCellMonTool.h:229
LArCellMonTool::bookSporHists
StatusCode bookSporHists()
Definition: LArCellMonTool.cxx:392
LArCellMonTool::thresholdHist_t::m_doEtaPhiTotalEnergy
bool m_doEtaPhiTotalEnergy
Definition: LArCellMonTool.h:250
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArCellMonTool::m_doEtaPhiOccupancyProp
BooleanArrayProperty m_doEtaPhiOccupancyProp
Definition: LArCellMonTool.h:209
LArCellMonTool::HEC1NS
@ HEC1NS
Definition: LArCellMonTool.h:78
CaloMonToolBase::checkFilters
StatusCode checkFilters(bool &ifPass)
Definition: CaloMonToolBase.cxx:95
LArCellMonTool::m_sporadicPlotLimit
unsigned m_sporadicPlotLimit
Definition: LArCellMonTool.h:195
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
LArCellBinning.energyscale
energyscale
Definition: LArCellBinning.py:154
LArCellMonTool::m_doEtaPhiAverageEnergyProp
BooleanArrayProperty m_doEtaPhiAverageEnergyProp
Definition: LArCellMonTool.h:213
LArCellMonTool::EMECC
@ EMECC
Definition: LArCellMonTool.h:82
LArCellMonTool::m_h_energyVsTime
std::array< TH2F *, MAXLAYER > m_h_energyVsTime
Definition: LArCellMonTool.h:331
LArOnlineID_Base::channel
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Definition: LArOnlineID_Base.cxx:1967
LArCellMonTool::m_noiseKey
SG::ReadCondHandleKey< CaloNoise > m_noiseKey
Definition: LArCellMonTool.h:163
LArCellMonTool::EMBPA
@ EMBPA
Definition: LArCellMonTool.h:72
LArCellMonTool::thresholdHist_t::m_h_occupancy_phi
std::array< TH1F *, MAXLAYER > m_h_occupancy_phi
Definition: LArCellMonTool.h:262
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
LArCellMonTool::thresholdHist_t::m_doEtaPhiAverageQuality
bool m_doEtaPhiAverageQuality
Definition: LArCellMonTool.h:253
LArCellMonTool::thresholdHist_t::m_doEtaPhiAverageEnergy
bool m_doEtaPhiAverageEnergy
Definition: LArCellMonTool.h:251
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArCellMonTool::m_threshold_HECFCALEMS2S3
float m_threshold_HECFCALEMS2S3
Definition: LArCellMonTool.h:194
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
LArCellMonTool::finalize
virtual StatusCode finalize() override
Definition: LArCellMonTool.cxx:872
LArCellMonTool::m_triggersToIncludeProp
StringArrayProperty m_triggersToIncludeProp
Definition: LArCellMonTool.h:203
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArCellMonTool::m_doUnnormalized1DEnergy
bool m_doUnnormalized1DEnergy
Definition: LArCellMonTool.h:187
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
h
LArCellMonTool::EMEC2NS
@ EMEC2NS
Definition: LArCellMonTool.h:79
LArCellMonTool::sporadicNoiseCandidate
void sporadicNoiseCandidate(const CaloCell *cell, const LArCellMonTool::LayerEnum iLyr, const float threshold, const LArOnOffIdMapping *cabling)
Definition: LArCellMonTool.cxx:540
LArCellMonTool::bookLarNonThreHists
StatusCode bookLarNonThreHists()
Definition: LArCellMonTool.cxx:414
LArCellMonTool::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArCellMonTool.h:177
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LArCellMonTool::bookNoisyCellHistos
void bookNoisyCellHistos(SporadicNoiseCell_t &result, const CaloDetDescrElement *dde, const PartitionEnum part, const float threshold, const LArOnOffIdMapping *cabling)
Definition: LArCellMonTool.cxx:569
LArCellMonTool::m_useTriggerCaloMon
bool m_useTriggerCaloMon
Definition: LArCellMonTool.h:171
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:113
LArCellMonTool::m_defaultThresholds
FloatArrayProperty m_defaultThresholds
Definition: LArCellMonTool.h:206
LArCellMonTool::MET
@ MET
Definition: LArCellMonTool.h:119
DQAtlasReadyFilterTool.h
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
LArCellMonTool::m_timeThresholdProp
FloatArrayProperty m_timeThresholdProp
Definition: LArCellMonTool.h:219
LArCellMonTool::HEC2NS
@ HEC2NS
Definition: LArCellMonTool.h:78
LArCellMonTool::m_eCutForTiming
const std::array< float,MAXLYRNS > m_eCutForTiming
Definition: LArCellMonTool.h:128
CaloMonitoring::LArCellBinning
Definition: LArCellBinning.h:21
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArBadChanBitPacking.h
LArCellMonTool::m_thresholdColumnType
StringArrayProperty m_thresholdColumnType
Definition: LArCellMonTool.h:222
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArCellMonTool::m_binning
std::array< CaloMonitoring::LArCellBinning, MAXLAYER > m_binning
Definition: LArCellMonTool.h:297
LArCellMonTool::m_inSigNoise
BooleanArrayProperty m_inSigNoise
Definition: LArCellMonTool.h:207
InDetDD::none
@ none
Definition: InDetDD_Defs.h:19
run
Definition: run.py:1
ManagedMonitorToolBase::ATTRIB_MANAGED
@ ATTRIB_MANAGED
Definition: ManagedMonitorToolBase.h:131
LArCellMonTool::EMEC3NS
@ EMEC3NS
Definition: LArCellMonTool.h:79
LArCellMonTool::getHistoCoordinates
void getHistoCoordinates(const CaloDetDescrElement *dde, float &celleta, float &cellphi, unsigned &iLyr, unsigned &iLyrNS) const
Definition: LArCellMonTool.cxx:1305
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
LArCellMonTool::setLArCellBinning
void setLArCellBinning()
Definition: LArCellMonSetBinning.cxx:8
LArCellMonTool::MAXLAYER
@ MAXLAYER
Definition: LArCellMonTool.h:75
WriteCellNoiseToCool.cellHash
cellHash
Definition: WriteCellNoiseToCool.py:433
LArCellMonTool::m_useWeightedEffMerging
bool m_useWeightedEffMerging
Definition: LArCellMonTool.h:189
LArCellMonTool::m_useLogarithmicEnergyBinning
bool m_useLogarithmicEnergyBinning
Definition: LArCellMonTool.h:188
LArCellMonTool::NONE
@ NONE
Definition: LArCellMonTool.h:118
LArCellMonTool::m_sporadicDir
std::string m_sporadicDir
Definition: LArCellMonTool.h:300
LArCellMonTool::fillHistograms
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
Definition: LArCellMonTool.cxx:621
LArCellMonTool::m_doEnergyVsTime
bool m_doEnergyVsTime
Definition: LArCellMonTool.h:186
CaloMonToolBase::m_passBeamBackgroundRemoval
bool m_passBeamBackgroundRemoval
Definition: CaloMonToolBase.h:32
LArCellMonTool::m_doEtaPhiFractionPastTthProp
BooleanArrayProperty m_doEtaPhiFractionPastTthProp
Definition: LArCellMonTool.h:218
LArCellMonTool::m_calo_id
const CaloCell_ID * m_calo_id
Definition: LArCellMonTool.h:292
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
LArCellMonTool::resetInternals
void resetInternals()
Definition: LArCellMonTool.cxx:1230
ManagedMonitorToolBase::MonGroup::regHist
StatusCode regHist(TH1 *h)
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:195
LArCellMonTool::HECC
@ HECC
Definition: LArCellMonTool.h:82
beamspotman.dir
string dir
Definition: beamspotman.py:623
CaloDetDescrElement::is_tile
bool is_tile() const
cell belongs to Tile
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:442
LArCellMonTool::initThreshHists
StatusCode initThreshHists()
Definition: LArCellMonTool.cxx:193
merge.output
output
Definition: merge.py:17
CaloMonToolBase
Definition: CaloMonToolBase.h:17
LArCellMonTool::m_doEtaPhiFractionOverQthProp
BooleanArrayProperty m_doEtaPhiFractionOverQthProp
Definition: LArCellMonTool.h:215
LArCellMonTool::procHistograms
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
Definition: LArCellMonTool.cxx:770
LArCellBinning.timescale
timescale
Definition: LArCellBinning.py:153
LArCellMonTool::SporadicNoiseCell_t::m_h_energyVsLB
TProfile * m_h_energyVsLB
Definition: LArCellMonTool.h:306
HWIdentifier.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
LArCellMonTool::SporadicNoiseCell_t::m_h_quality
TH1F * m_h_quality
Definition: LArCellMonTool.h:305
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LArCellMonTool::~LArCellMonTool
virtual ~LArCellMonTool()
LArCellMonTool::thresholdHist_t::m_doEtaPhiFractionOverQth
bool m_doEtaPhiFractionOverQth
Definition: LArCellMonTool.h:254
threshold
Definition: chainparser.cxx:74
LArCellMonTool::bookHistograms
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
Definition: LArCellMonTool.cxx:374
CaloMonToolBase::initialize
StatusCode initialize()
Definition: CaloMonToolBase.cxx:28
LArCellMonTool.h
LArCellMonTool::LArCellMonTool
LArCellMonTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: LArCellMonTool.cxx:40
LArCellMonTool::m_layerNames
const std::array< std::string, MAXLAYER > m_layerNames
Definition: LArCellMonTool.h:86
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CONSISTENCY
#define CONSISTENCY(ARRAYPROP)
LArCellMonTool::m_h_dbnoise_etaphi
std::array< TH2F *, MAXLAYER > m_h_dbnoise_etaphi
Definition: LArCellMonTool.h:338
CaloMonitoring
Definition: LArCellBinning.h:19
Units.h
Wrapper to avoid constant divisions when using units.
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloDetDescrManager_Base::element_begin
calo_element_const_iterator element_begin() const
first element
Definition: CaloDetDescrManager.cxx:111
LArCellBinning.cosmicEneBinning
cosmicEneBinning
Definition: LArCellBinning.py:164
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LArCellMonTool::m_doSaveTempHists
bool m_doSaveTempHists
Definition: LArCellMonTool.h:183
LArCellMonTool::EMB3NS
@ EMB3NS
Definition: LArCellMonTool.h:78
LArOnlineID_Base::feedthrough
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
Definition: LArOnlineID_Base.cxx:1948
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
LArCellMonTool::m_h_sporadicHists
std::array< TH1F *, MAXPARTITIONS > m_h_sporadicHists
Definition: LArCellMonTool.h:322
CaloDetDescrElement::getLayer
virtual int getLayer() const
cell layer
Definition: CaloDetDescrElement.cxx:85
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
LArCellMonTool::HEC3NS
@ HEC3NS
Definition: LArCellMonTool.h:78
LArCellMonTool::m_sporadic_protc
unsigned m_sporadic_protc
Definition: LArCellMonTool.h:196
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LArCellMonTool::EMEC1NS
@ EMEC1NS
Definition: LArCellMonTool.h:79
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
LArCellMonTool::thresholdHist_t::m_doPhiOccupancy
bool m_doPhiOccupancy
Definition: LArCellMonTool.h:248
lumiFormat.fill
fill
Definition: lumiFormat.py:111
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArCellMonTool::SporadicNoiseCell_t::m_counter
unsigned m_counter
Definition: LArCellMonTool.h:307
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArCellMonTool::m_thresholdNameProp
StringArrayProperty m_thresholdNameProp
Definition: LArCellMonTool.h:201
LArCellMonTool::thresholdHist_t::m_h_occupancy_eta
std::array< TH1F *, MAXLAYER > m_h_occupancy_eta
Definition: LArCellMonTool.h:261
LArCellMonTool::thresholdHist_t
Definition: LArCellMonTool.h:227
LArCellBinning.step
step
Definition: LArCellBinning.py:158
LArCellMonTool::m_thresholdHists
std::vector< thresholdHist_t > m_thresholdHists
Definition: LArCellMonTool.h:284
LArCellMonTool::initialize
virtual StatusCode initialize() override
Definition: LArCellMonTool.cxx:139
LArCellMonTool::m_doDatabaseNoiseVsEtaPhi
bool m_doDatabaseNoiseVsEtaPhi
Definition: LArCellMonTool.h:185
LArCellMonTool::m_chainGroups
std::array< const Trig::ChainGroup *, NOTA > m_chainGroups
Definition: LArCellMonTool.h:174
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
LArCellMonTool::createPerJobHistograms
StatusCode createPerJobHistograms(const EventContext &ctx, const CaloCellContainer *cellcont)
Definition: LArCellMonTool.cxx:921
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
LArCellMonTool::m_sporadic_switch
bool m_sporadic_switch
Definition: LArCellMonTool.h:192
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
LArCellMonTool::HECA
@ HECA
Definition: LArCellMonTool.h:82
LArCellMonTool::bookLarMultThreHists
StatusCode bookLarMultThreHists()
Definition: LArCellMonTool.cxx:1047
LArCellMonTool::m_lArPath
const std::string m_lArPath
Definition: LArCellMonTool.h:123
LArCellMonTool::divideByOccupancy
static void divideByOccupancy(TH2F *fraction, const TH2F *total, const TH2 *occupancy)
Definition: LArCellMonTool.cxx:1333
ManagedMonitorToolBase::newLumiBlockFlag
bool newLumiBlockFlag() const
Definition: ManagedMonitorToolBase.h:853
LArCellMonTool::m_triggersToExcludeProp
StringArrayProperty m_triggersToExcludeProp
Definition: LArCellMonTool.h:204
ManagedMonitorToolBase::ATTRIB_X_VS_LB
@ ATTRIB_X_VS_LB
Definition: ManagedMonitorToolBase.h:131
LArCellMonTool::m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Definition: LArCellMonTool.h:178
DQBadLBFilterTool.h
CaloGain.h
dqt_zlumi_alleff_HIST.ctr
ctr
Definition: dqt_zlumi_alleff_HIST.py:193
LArCellMonTool::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArCellMonTool.h:165
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
CaloMonToolBase::bookBaseHists
virtual StatusCode bookBaseHists(MonGroup *group)
Definition: CaloMonToolBase.cxx:66
python.compressB64.c
def c
Definition: compressB64.py:93
LArCellMonTool::FCALA
@ FCALA
Definition: LArCellMonTool.h:82
GlobalMonitoring_CA.partitionName
partitionName
Definition: GlobalMonitoring_CA.py:22
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1454
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
LArCellMonTool::m_thresholdsProp
FloatArrayProperty m_thresholdsProp[MAXLYRNS]
Definition: LArCellMonTool.h:223
LArCellMonTool::thresholdHist_t::m_occupancyCounter
std::array< unsigned, 185000 > m_occupancyCounter
Definition: LArCellMonTool.h:278
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
LArCellMonTool::m_h_energyVsTime_DifferThresholds
std::array< TH1F *, MAXLAYER > m_h_energyVsTime_DifferThresholds
Definition: LArCellMonTool.h:333
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
LArCellMonTool::BOTH
@ BOTH
Definition: LArCellMonTool.h:118
LArCellMonTool::m_doKnownBadChannelsVsEtaPhi
bool m_doKnownBadChannelsVsEtaPhi
Definition: LArCellMonTool.h:184
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:854
LArCellMonTool::EMB2NS
@ EMB2NS
Definition: LArCellMonTool.h:78