diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py b/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py index a0ff42f9200ddc597047be471959a7cbcb72c59a..dafe32b758ad72449d62f405b39a7cfd4490094b 100644 --- a/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py +++ b/LArCalorimeter/LArCellRec/python/LArNoisyROFlags.py @@ -25,6 +25,20 @@ class BadFEBCut(JobProperty): StoredValue=5 pass +class MNBLooseCut(JobProperty): + #Number of channels to declare MNB-Loose + statusOn=True + allowedTypes=['int'] + StoredValue=5 + pass + +class MNBTightCut(JobProperty): + #Number of channels to declare MNB-Loose + statusOn=True + allowedTypes=['int'] + StoredValue=17 + pass + class KnownMNBFEBs(JobProperty): #Number of bad febs per partition statusOn=True @@ -51,6 +65,8 @@ jobproperties.add_Container(LArNoisyROFlags) jobproperties.LArNoisyROFlags.add_JobProperty(CellQualityCut) jobproperties.LArNoisyROFlags.add_JobProperty(BadChanPerFEB) jobproperties.LArNoisyROFlags.add_JobProperty(BadFEBCut) +jobproperties.LArNoisyROFlags.add_JobProperty(MNBLooseCut) +jobproperties.LArNoisyROFlags.add_JobProperty(MNBTightCut) jobproperties.LArNoisyROFlags.add_JobProperty(KnownMNBFEBs) larNoisyROFlags = jobproperties.LArNoisyROFlags diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py index 5d64e3bb0ac770fee0b427281ac1a9d6b684d4fd..63e973b421db7ee50dc59118ffbd2d4361c6534b 100755 --- a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py +++ b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py @@ -42,7 +42,9 @@ class LArNoisyROSummaryGetter ( Configured ) : CellQualityCut=larNoisyROFlags.CellQualityCut(), BadChanPerFEB=larNoisyROFlags.BadChanPerFEB(), BadFEBCut=larNoisyROFlags.BadFEBCut(), - KnownMNBFEBs=larNoisyROFlags.KnownMNBFEBs() + KnownMNBFEBs=larNoisyROFlags.KnownMNBFEBs(), + MNBLooseCut=larNoisyROFlags.MNBLooseCut(), + MNBTightCut=larNoisyROFlags.MNBTightCut() ) diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx index 1980589e9d8dcec30ecdc4689d993676516af6fc..b9e57c9f2234bec18aed06e152941c2711e05fe6 100644 --- a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx +++ b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx @@ -30,7 +30,7 @@ LArNoisyROTool::LArNoisyROTool( const std::string& type, { declareInterface<ILArNoisyROTool >(this); declareProperty( "BadChanPerFEB", m_BadChanPerFEB=30 ); - declareProperty( "BadChanPerPA", m_BadChanPerPA=2 ); + // declareProperty( "BadChanPerPA", m_BadChanPerPA=2 ); declareProperty( "CellQualityCut", m_CellQualityCut=4000 ); declareProperty( "IgnoreMaskedCells", m_ignore_masked_cells=false ); declareProperty( "IgnoreFrontInnerWheelCells", m_ignore_front_innerwheel_cells=true ); @@ -122,10 +122,6 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain unsigned int NsaturatedTightCutBarrelC = 0; unsigned int NsaturatedTightCutEMECA = 0; unsigned int NsaturatedTightCutEMECC = 0; - unsigned int NsaturatedTightCutHECA = 0; - unsigned int NsaturatedTightCutHECC = 0; - unsigned int NsaturatedTightCutFCALA = 0; - unsigned int NsaturatedTightCutFCALC = 0; CaloCellContainer::const_iterator cellItr = cellContainer->begin(); @@ -160,16 +156,6 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain if ( sideA ) { NsaturatedTightCutEMECA++; } else { NsaturatedTightCutEMECC++; } } - else if ( m_calo_id->is_hec(id) ) - { - if ( sideA ) { NsaturatedTightCutHECA++; } - else { NsaturatedTightCutHECC++; } - } - else if ( m_calo_id->is_fcal(id) ) - { - if ( sideA ) { NsaturatedTightCutFCALA++; } - else { NsaturatedTightCutFCALC++; } - } } @@ -185,15 +171,11 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain } } - // exclude FCAL for now - // And also HEC (since 08/2015 - B.Trocme) uint8_t SatTightPartitions = 0; if ( NsaturatedTightCutBarrelA >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMBAMask; if ( NsaturatedTightCutBarrelC >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMBCMask; if ( NsaturatedTightCutEMECA >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMECAMask; if ( NsaturatedTightCutEMECC >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::EMECCMask; -// if ( NsaturatedTightCutHECA >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::HECAMask; -// if ( NsaturatedTightCutHECC >= m_SaturatedCellTightCut ) SatTightPartitions |= LArNoisyROSummary::HECCMask; bool badSaturatedTightCut = (SatTightPartitions != 0); if ( badSaturatedTightCut ) noisyRO-> SetSatTightFlaggedPartitions(SatTightPartitions); @@ -203,8 +185,6 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain m_SaturatedCellTightCutEvents++; } - - // are there any bad FEB or preamp ? for ( FEBEvtStatMapCstIt it = FEBStats.begin(); it != FEBStats.end(); it++ ) { ATH_MSG_DEBUG(" bad FEB " << it->first << " with " << it->second.badChannels() << " bad channels"); @@ -213,6 +193,7 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain if (m_printSummary) m_badFEB_counters[it->first]++; //BadFEBCount++; } + // Tight MNBs if ( it->second.badChannels() > m_MNBTightCut ){ noisyRO->add_MNBTight_feb(HWIdentifier(it->first)); @@ -223,15 +204,17 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain noisyRO->add_MNBLoose_feb(HWIdentifier(it->first)); } - const unsigned int* PAcounters = it->second.PAcounters(); - for ( size_t i = 0; i < 32; i++ ) { - if ( PAcounters[i] > m_BadChanPerPA ) { - uint64_t PAid = static_cast<uint64_t>(1000000000)*static_cast<uint64_t>(i)+static_cast<uint64_t>(it->first); - ATH_MSG_DEBUG(" bad preamp " << i << " in FEB " << it->first << " ID " << PAid); - noisyRO->add_noisy_preamp(HWIdentifier(it->first),4*i); - if (m_printSummary) m_badPA_counters[PAid]++; - } - } +// // Noisy preamp removed as no used currently +// // Kept here just in case we may want to revive it +// const unsigned int* PAcounters = it->second.PAcounters(); +// for ( size_t i = 0; i < 32; i++ ) { +// if ( PAcounters[i] > m_BadChanPerPA ) { +// uint64_t PAid = static_cast<uint64_t>(1000000000)*static_cast<uint64_t>(i)+static_cast<uint64_t>(it->first); +// ATH_MSG_DEBUG(" bad preamp " << i << " in FEB " << it->first << " ID " << PAid); +// noisyRO->add_noisy_preamp(HWIdentifier(it->first),4*i); +// if (m_printSummary) m_badPA_counters[PAid]++; +// } +// } }//end loop over m_FEBats @@ -256,10 +239,8 @@ std::unique_ptr<LArNoisyROSummary> LArNoisyROTool::process(const CaloCellContain // If the FEB is known to be subject to noise burst (list defiend as property) // give a weight 2 const unsigned int int_id = febid.get_identifier32().get_compact(); - //if (knownFEB(int_id)) weight = 2; if (m_knownBadFEBs.find(int_id)!=m_knownBadFEBs.end()) weight=2; - if ( m_onlineID->isEMBchannel(chanID) ) { if ( m_onlineID->pos_neg(chanID) == 1 ){ @@ -343,15 +324,15 @@ StatusCode LArNoisyROTool::finalize() { ATH_MSG_INFO( "FEB " << it->first << " declared noisy in " << it->second << " events " ); } - ATH_MSG_INFO( "List of bad preamps found in at least max(2,0.1%) events" ); - unsigned int cut = static_cast<unsigned int>(0.001*static_cast<float>(m_invocation_counter)); - if ( cut < 2 ) cut = 2; - uint64_t PAfactor = 1000000000L; - for ( std::map<uint64_t, unsigned int>::const_iterator it = m_badPA_counters.begin(); it != m_badPA_counters.end(); it++ ) - { - if ( it->second > cut ) - ATH_MSG_INFO( "Preamplifier " << (it->first)/PAfactor << " of FEB " << (it->first)%PAfactor << " declared noisy in " << it->second << " events " ); - } +// ATH_MSG_INFO( "List of bad preamps found in at least max(2,0.1%) events" ); +// unsigned int cut = static_cast<unsigned int>(0.001*static_cast<float>(m_invocation_counter)); +// if ( cut < 2 ) cut = 2; +// uint64_t PAfactor = 1000000000L; +// for ( std::map<uint64_t, unsigned int>::const_iterator it = m_badPA_counters.begin(); it != m_badPA_counters.end(); it++ ) +// { +// if ( it->second > cut ) +// ATH_MSG_INFO( "Preamplifier " << (it->first)/PAfactor << " of FEB " << (it->first)%PAfactor << " declared noisy in " << it->second << " events " ); +// } ATH_MSG_INFO( "Number of events with too many saturated QFactor cells (Tight cuts): " << m_SaturatedCellTightCutEvents ); } diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h b/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h index e1d1e4e7a0b5563c0d7706e4ee753eedccaed21d..78cbad774d8457ca415da1f0e7960da7f340a367 100755 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArDigitMon.h @@ -83,6 +83,7 @@ private: /**declaration histo summary*/ TH2F_LW* m_summary; + TH2F_LW* m_summaryGain; /** Define the monitoring histograms used for each partitions of the LArCalorimeter*/ diff --git a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h b/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h index 210f101e29ed49c11ee7a23a8e707436268d47e7..b33bb5f35586856fd051fa0b3c17fe2ab07b9227 100644 --- a/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h +++ b/LArCalorimeter/LArMonTools/LArMonTools/LArNoisyROMon.h @@ -5,7 +5,7 @@ /** * @class LArNoisyROMon * @author Laurent Duflot <duflot at lal.in2p3.fr> - * + * 2017 : major upgrade/rewriting by B.Trocme (LPSC Grenoble) */ #ifndef LArNoisyROMon_h @@ -15,15 +15,19 @@ #include "TrigDecisionTool/TrigDecisionTool.h" #include "TTree.h" +#include "Identifier/HWIdentifier.h" +#include "LArIdentifier/LArOnlineID.h" #include <string> +#include <array> class TH1I_LW; class TH1F_LW; +class TH2I_LW; class TH2F_LW; class LWHist2D; class LWHist1D; -class LArOnlineID; +//class LArOnlineID; class LArOnlineIDStrHelper; class LArNoisyROMon: public ManagedMonitorToolBase @@ -41,6 +45,8 @@ public: StatusCode fillHistograms(); StatusCode checkHists(bool fromFinalize); StatusCode procHistograms(); + + size_t partitionNumber(const HWIdentifier); private: @@ -76,12 +82,13 @@ private: TH1F_LW* h_SaturatedNoisyEventFrac=nullptr; TH1F_LW* h_MNBTightEventFrac=nullptr; TH1F_LW* h_MNBLooseEventFrac=nullptr; - TH1F_LW* h_NoisyWEventFrac=nullptr; + // TH1F_LW* h_NoisyWEventFrac=nullptr; TH1F_LW* h_NoisyEventTimeVetoFrac=nullptr; TH1F_LW* h_SaturatedNoisyEventTimeVetoFrac=nullptr; TH1F_LW* h_MNBTightEventTimeVetoFrac=nullptr; TH1F_LW* h_MNBLooseEventTimeVetoFrac=nullptr; - TH1F_LW* h_NoisyWEventTimeVetoFrac=nullptr; + // TH1F_LW* h_NoisyWEventTimeVetoFrac=nullptr; + TH2I_LW* h_MNBKnownFEB=nullptr; TH1I_LW* h_NoisyEventTrigger=nullptr; TH1I_LW* h_NoisyEventTriggerL1=nullptr; @@ -97,44 +104,24 @@ private: TH1I_LW* h_SaturatedNoisyEvent=nullptr; TH1I_LW* h_MNBTightEvent=nullptr; TH1I_LW* h_MNBLooseEvent=nullptr; - TH1I_LW* h_NoisyWEvent=nullptr; + // TH1I_LW* h_NoisyWEvent=nullptr; TH1I_LW* h_NoisyEventTimeVeto=nullptr; TH1I_LW* h_SaturatedNoisyEventTimeVeto=nullptr; TH1I_LW* h_MNBTightEventTimeVeto=nullptr; TH1I_LW* h_MNBLooseEventTimeVeto=nullptr; - TH1I_LW* h_NoisyWEventTimeVeto=nullptr; + //TH1I_LW* h_NoisyWEventTimeVeto=nullptr; }; TH1I_LW* m_h_NoisyFEB=nullptr; - TH1F_LW* m_h_NoisyEventFrac=nullptr; - TH1F_LW* m_h_NoisyEventTimeVetoFrac=nullptr; - TH1I_LW* m_h_MNBTightFEB=nullptr; - TH1F_LW* m_h_MNBTightEventFrac=nullptr; - TH1F_LW* m_h_MNBTightEventTimeVetoFrac=nullptr; - TH1I_LW* m_h_MNBLooseFEB=nullptr; - TH1F_LW* m_h_MNBLooseEventFrac=nullptr; - TH1F_LW* m_h_MNBLooseEventTimeVetoFrac=nullptr; - TH1I_LW* m_h_CandidateMNBTightFEB=nullptr; - TH1I_LW* m_h_CandidateMNBLooseFEB=nullptr; - TH1F_LW* m_h_SaturatedTightFrac=nullptr; - TH1I_LW* m_h_NoisyEvent=nullptr; - TH1I_LW* m_h_NoisyEventTimeVeto=nullptr; - TH1I_LW* m_h_MNBTightEvent=nullptr; - TH1I_LW* m_h_MNBTightEventTimeVeto=nullptr; - TH1I_LW* m_h_MNBLooseEvent=nullptr; - TH1I_LW* m_h_MNBLooseEventTimeVeto=nullptr; - TH1I_LW* m_h_SaturatedTight=nullptr; - TH1I_LW* m_h_SaturatedTightTimeVeto=nullptr; - TH1F_LW* m_h_SaturatedTightTimeVetoFrac=nullptr; TH1I_LW* m_h_LBN=nullptr; void bookPartitionHistos(partitionHistos&, const std::string& name, MonGroup& group, MonGroup& groupfrac, MonGroup& groupfracbin); - void CopyHisto(LWHist2D* from,LWHist2D* to); - void CopyHisto(LWHist1D* from,LWHist1D* to); + void copyHisto(LWHist2D* from,LWHist2D* to); + void copyHisto(LWHist1D* from,LWHist1D* to); // divide num by denom and store in to, assuming num is a subset of denom - void Divide(LWHist1D* to,LWHist1D* num,LWHist1D* denom); + void divideHisto(LWHist1D* to,LWHist1D* num,LWHist1D* denom); // fill histogram of triggers void fillTriggerHisto(partitionHistos& partition, uint8_t triggerbits, uint8_t L1triggerbits); @@ -143,7 +130,9 @@ private: bool m_doTrigger; unsigned int m_eventCounter; - partitionHistos m_BarrelA, m_BarrelC, m_EMECA, m_EMECC; + // partitionHistos m_BarrelA, m_BarrelC, m_EMECA, m_EMECC; + std::vector<partitionHistos> m_partHistos; + const LArOnlineID* m_LArOnlineIDHelper; LArOnlineIDStrHelper* m_strHelper; @@ -151,6 +140,9 @@ private: std::string m_NoisyFEBDefStr; + std::string m_MNBTightFEBDefStr; + std::string m_MNBLooseFEBDefStr; + std::vector<unsigned int> m_knownMNBFEBs; unsigned int m_BadFEBCut; std::vector<std::string> m_EF_NoiseBurst_Triggers; @@ -160,5 +152,23 @@ private: std::string m_inputKey; }; +inline size_t LArNoisyROMon::partitionNumber(const HWIdentifier hwid) { + + int pn=m_LArOnlineIDHelper->pos_neg(hwid); + if (m_LArOnlineIDHelper->isEMECchannel(hwid)) { + if (pn) + return 0; //positive EMECA side + else + return 3; //negative EMECC side + } + if (m_LArOnlineIDHelper->isEMBchannel(hwid)) { + if (pn) + return 1; //positive EMBA side + else + return 2; //negative EMBC side + } + + return 4;//Anything else +} #endif diff --git a/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py b/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py index f7eff0fb13fe7258e64ad3486c921bf38c8acb56..91e13153685f4bac94bc39efc12947a4717a47cc 100644 --- a/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py +++ b/LArCalorimeter/LArMonTools/share/LArNoisyROMon_jobOptions.py @@ -19,8 +19,11 @@ from LArCellRec.LArNoisyROFlags import larNoisyROFlags theLArNoisyROMon = LArNoisyROMon(name="LArNoisyROMon") theLArNoisyROMon.IsOnline = OnlineMode theLArNoisyROMon.ProcessNEvents= EventBlockSize -theLArNoisyROMon.NoisyFEBDefStr = '(>'+str(larNoisyROFlags.BadChanPerFEB())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' #LArNoisyROCutHelper('BadChanPerFEB') -theLArNoisyROMon.BadFEBCut = larNoisyROFlags.BadFEBCut() #LArNoisyROFEBCutHelper() +theLArNoisyROMon.NoisyFEBDefStr = '(>'+str(larNoisyROFlags.BadChanPerFEB())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' +theLArNoisyROMon.MNBLooseFEBDefStr = '(>'+str(larNoisyROFlags.MNBLooseCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' +theLArNoisyROMon.MNBTightFEBDefStr = '(>'+str(larNoisyROFlags.MNBTightCut())+' chan with Q>'+str(larNoisyROFlags.CellQualityCut())+')' +theLArNoisyROMon.KnownMNBFEBs = larNoisyROFlags.KnownMNBFEBs() +theLArNoisyROMon.BadFEBCut = larNoisyROFlags.BadFEBCut() from RecExConfig.RecFlags import rec if rec.doTrigger or LArNoisyROMonForceTrigger: diff --git a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx index 18a222c49da5c05ec9f981abcca695a57c2186e0..d88fc1719e124b9919c16ce72ca1c1591e4c94d8 100755 --- a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx @@ -252,30 +252,47 @@ LArDigitMon::bookHistograms() /**Book summary histo*/ MonGroup generalGroup( this, "/LAr/Digits", run, ATTRIB_MANAGED ); const char * hName = "summary"; - const char * hTitle = "High Energy Digit Summary"; + const char * hTitle = "LArDigit Summary"; m_summary = TH2F_LW::create(hName, hTitle,4,0.,4.,8,0.,8.); m_summary->GetXaxis()->SetTitle("Status"); - m_summary->GetYaxis()->SetTitle("Sub Detector"); - m_summary->GetYaxis()->SetBinLabel(1,"Barrel C"); - m_summary->GetYaxis()->SetBinLabel(2,"Barrel A"); - m_summary->GetYaxis()->SetBinLabel(3,"EMEC C"); - m_summary->GetYaxis()->SetBinLabel(4,"EMEC A"); - m_summary->GetYaxis()->SetBinLabel(5,"HEC C"); - m_summary->GetYaxis()->SetBinLabel(6,"HEC A"); - m_summary->GetYaxis()->SetBinLabel(7,"FCAL C"); - m_summary->GetYaxis()->SetBinLabel(8,"FCAL A"); + m_summary->GetYaxis()->SetTitle("Partition"); + m_summary->GetYaxis()->SetBinLabel(1,"EMBC"); + m_summary->GetYaxis()->SetBinLabel(2,"EMBA"); + m_summary->GetYaxis()->SetBinLabel(3,"EMECC"); + m_summary->GetYaxis()->SetBinLabel(4,"EMECA"); + m_summary->GetYaxis()->SetBinLabel(5,"HECC"); + m_summary->GetYaxis()->SetBinLabel(6,"HECA"); + m_summary->GetYaxis()->SetBinLabel(7,"FCalC"); + m_summary->GetYaxis()->SetBinLabel(8,"FCalA"); m_summary->GetXaxis()->SetBinLabel(1,"OutOfRange"); m_summary->GetXaxis()->SetBinLabel(2,"Saturation"); m_summary->GetXaxis()->SetBinLabel(3,"Null Digits"); m_summary->GetXaxis()->SetBinLabel(4,"Mean Time"); - m_summary->GetXaxis()->SetLabelSize(0.055); - //Not supported in LWHists: m_summary->GetXaxis()->SetTitleOffset(1.2); - m_summary->GetYaxis()->SetLabelSize(0.055); - //Not supported in LWHists: m_summary->GetYaxis()->SetTitleOffset(3); - + m_summary->GetYaxis()->SetLabelSize(0.055); generalGroup.regHist(m_summary).ignore(); + + hName = "summaryGain"; + hTitle = "Gain per partition (only cells with LArDigit available)"; + m_summaryGain = TH2F_LW::create(hName, hTitle,3,0.,3.,8,0.,8.); + m_summaryGain->GetXaxis()->SetTitle("Gain"); + m_summaryGain->GetYaxis()->SetTitle("Sub Detector"); + m_summaryGain->GetYaxis()->SetTitle("Partition"); + m_summaryGain->GetYaxis()->SetBinLabel(1,"EMBC"); + m_summaryGain->GetYaxis()->SetBinLabel(2,"EMBA"); + m_summaryGain->GetYaxis()->SetBinLabel(3,"EMECC"); + m_summaryGain->GetYaxis()->SetBinLabel(4,"EMECA"); + m_summaryGain->GetYaxis()->SetBinLabel(5,"HECC"); + m_summaryGain->GetYaxis()->SetBinLabel(6,"HECA"); + m_summaryGain->GetYaxis()->SetBinLabel(7,"FCalC"); + m_summaryGain->GetYaxis()->SetBinLabel(8,"FCalA"); + m_summaryGain->GetXaxis()->SetBinLabel(1,"HIGH"); + m_summaryGain->GetXaxis()->SetBinLabel(2,"MEDIUM"); + m_summaryGain->GetXaxis()->SetBinLabel(3,"LOW"); + m_summaryGain->GetXaxis()->SetLabelSize(0.055); + m_summaryGain->GetYaxis()->SetLabelSize(0.055); + generalGroup.regHist(m_summaryGain).ignore(); //} @@ -472,6 +489,10 @@ LArDigitMon::fillHistograms() /** Determine to which partition this channel belongs to*/ LArDigitMon::partition &ThisPartition=WhatPartition(id); + + /** Fill the gain*/ + m_summaryGain->Fill(gain,ThisPartition.sumpos); + /** Retrieve samples*/ const std::vector<short>* digito = &pLArDigit->samples(); diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx index 45890961a4427a946733cc49d89be7f9c8d2ef83..f945bd6ed89b5f0bd4434f7f3eb063b736adb118 100644 --- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx +++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx @@ -12,6 +12,7 @@ #include "LWHists/TH1I_LW.h" #include "LWHists/TH1F_LW.h" +#include "LWHists/TH2I_LW.h" #include "LWHists/TH2F_LW.h" #include "TBranch.h" @@ -27,8 +28,11 @@ LArNoisyROMon::LArNoisyROMon(const std::string& type, m_NoiseTimeTree(NULL), m_CandidateMNBTree(NULL), m_eventCounter(0), m_LArOnlineIDHelper(NULL), m_strHelper(NULL), m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"), m_EF_NoiseBurst_Triggers(), m_L1_NoiseBurst_Triggers() { declareProperty("IsOnline", m_IsOnline=false); - declareProperty("NoisyFEBDefStr", m_NoisyFEBDefStr=""); + declareProperty("NoisyFEBDefStr", m_NoisyFEBDefStr="(unknown)"); + declareProperty("MNBTightFEBDefStr", m_MNBTightFEBDefStr="(unknown)"); + declareProperty("MNBLooseFEBDefStr", m_MNBLooseFEBDefStr="(unknown)"); declareProperty("BadFEBCut", m_BadFEBCut=999999); + declareProperty("KnownMNBFEBs", m_knownMNBFEBs={}); declareProperty("doTrigger", m_doTrigger=true); declareProperty("EFNoiseBurstTriggers",m_EF_NoiseBurst_Triggers); declareProperty("L1NoiseBurstTriggers",m_L1_NoiseBurst_Triggers); @@ -48,26 +52,6 @@ LArNoisyROMon::LArNoisyROMon(const std::string& type, m_CandidateMNB.v_candidate_MNBLooseFEB = new std::vector<int>; m_h_NoisyFEB = NULL; - m_h_NoisyEventFrac = NULL; - m_h_NoisyEventTimeVetoFrac = NULL; - m_h_MNBTightFEB = NULL; - m_h_MNBTightEventFrac = NULL; - m_h_MNBTightEventTimeVetoFrac = NULL; - m_h_MNBLooseFEB = NULL; - m_h_MNBLooseEventFrac = NULL; - m_h_MNBLooseEventTimeVetoFrac = NULL; - m_h_CandidateMNBTightFEB = NULL; - m_h_CandidateMNBLooseFEB = NULL; - m_h_SaturatedTightFrac = NULL; - m_h_NoisyEvent = NULL; - m_h_NoisyEventTimeVeto = NULL; - m_h_MNBTightEvent = NULL; - m_h_MNBTightEventTimeVeto = NULL; - m_h_MNBLooseEvent = NULL; - m_h_MNBLooseEventTimeVeto = NULL; - m_h_SaturatedTight = NULL; - m_h_SaturatedTightTimeVeto = NULL; - m_h_SaturatedTightTimeVetoFrac = NULL; m_h_LBN = NULL; } @@ -118,44 +102,36 @@ StatusCode LArNoisyROMon::bookHistograms() MonGroup GroupBarrel(this, "/LAr/NoisyRO/Barrel", run, ATTRIB_MANAGED ); MonGroup GroupBarrelFrac(this, "/LAr/NoisyRO/Barrel", run, ATTRIB_MANAGED ,"", "weightedEff"); MonGroup GroupBarrelFracBin(this, "/LAr/NoisyRO/Barrel", run, ATTRIB_MANAGED ,"", "perBinEffPerCent"); - bookPartitionHistos(m_BarrelA,"EMBA",GroupBarrel,GroupBarrelFrac,GroupBarrelFracBin); - bookPartitionHistos(m_BarrelC,"EMBC",GroupBarrel,GroupBarrelFrac,GroupBarrelFracBin); + m_partHistos.resize(4); + bookPartitionHistos(m_partHistos[1],"EMBA",GroupBarrel,GroupBarrelFrac,GroupBarrelFracBin); + bookPartitionHistos(m_partHistos[2],"EMBC",GroupBarrel,GroupBarrelFrac,GroupBarrelFracBin); MonGroup GroupEMEC(this, "/LAr/NoisyRO/EMEC", run, ATTRIB_MANAGED ); MonGroup GroupEMECFrac(this, "/LAr/NoisyRO/EMEC", run, ATTRIB_MANAGED,"", "weightedEff" ); MonGroup GroupEMECFracBin(this, "/LAr/NoisyRO/EMEC", run, ATTRIB_MANAGED,"", "perBinEffPerCent" ); - bookPartitionHistos(m_EMECA,"EMECA",GroupEMEC,GroupEMECFrac,GroupEMECFracBin); - bookPartitionHistos(m_EMECC,"EMECC",GroupEMEC,GroupEMECFrac,GroupEMECFracBin); - - - + bookPartitionHistos(m_partHistos[0],"EMECA",GroupEMEC,GroupEMECFrac,GroupEMECFracBin); + bookPartitionHistos(m_partHistos[3],"EMECC",GroupEMEC,GroupEMECFrac,GroupEMECFracBin); - // Book general histograms + // Book general histograms - Number of RNB noisy FEBs hTitle = "Number of noisy FEB "+m_NoisyFEBDefStr+ " per event"; m_h_NoisyFEB = TH1I_LW::create("NoisyFEB", hTitle.c_str(), 50,0.,50.); m_h_NoisyFEB->GetXaxis()->SetTitle("# of noisy FEB"); overall.regHist(m_h_NoisyFEB).ignore(); + + m_h_LBN = TH1I_LW::create("LBN", "Event counter per LB", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + + // Fill Suspicious MNB FEBs + for (uint i=0;i<m_knownMNBFEBs.size();i++){ + const HWIdentifier& febid = HWIdentifier(m_knownMNBFEBs[i]); + HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); + int FT = m_LArOnlineIDHelper->feedthrough(id); + int slot = m_LArOnlineIDHelper->slot(id); + int partition = partitionNumber(febid); + m_partHistos[partition].h_MNBKnownFEB->Fill(slot,FT); + } + - hTitle = "Number of MNB tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - m_h_MNBTightFEB = TH1I_LW::create("NoisyFEBNMBTight", hTitle.c_str(), 50,0.,50.); - m_h_MNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(m_h_MNBTightFEB).ignore(); - - hTitle = "Number of MNB loose noisy FEB "+m_NoisyFEBDefStr+ " per event"; - m_h_MNBLooseFEB = TH1I_LW::create("NoisyFEBMNBLoose", hTitle.c_str(), 50,0.,50.); - m_h_MNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(m_h_MNBLooseFEB).ignore(); - - hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - m_h_CandidateMNBTightFEB = TH1I_LW::create("NoisyFEBMNBCandTight", hTitle.c_str(), 50,0.,50.); - m_h_CandidateMNBTightFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(m_h_CandidateMNBTightFEB).ignore(); - - hTitle = "Number of tight noisy FEB "+m_NoisyFEBDefStr+ " per event"; - m_h_CandidateMNBLooseFEB = TH1I_LW::create("NoisyFEBMNBCandLoose", hTitle.c_str(), 50,0.,50.); - m_h_CandidateMNBLooseFEB->GetXaxis()->SetTitle("# of noisy FEB"); - overall.regHist(m_h_CandidateMNBLooseFEB).ignore(); } m_NoiseTimeTree = new TTree("LArNoise","LAr noisy events"); @@ -173,68 +149,6 @@ StatusCode LArNoisyROMon::bookHistograms() m_CandidateMNBTree->Branch("v_candidate_MNBLooseFEB", "vector<int>", &m_CandidateMNB.v_candidate_MNBLooseFEB); overall.regTree(m_CandidateMNBTree).ignore(); - if(m_doHisto) { - MonGroup overallPerCent(this, "/LAr/NoisyRO", run, ATTRIB_MANAGED, "", "perBinEffPerCent" ); - m_h_NoisyEventFrac = TH1F_LW::create("NoisyEvent", "Yield of events flagged as LArNoisyRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_NoisyEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_NoisyEventFrac).ignore(); - m_h_NoisyEvent = TH1I_LW::create("temp_NoisyEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_NoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); - - m_h_MNBTightEventFrac = TH1F_LW::create("MNBTightEvent", "Yield of events flagged as LArMNBTightRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBTightEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_MNBTightEventFrac).ignore(); - m_h_MNBTightEvent = TH1I_LW::create("temp_MNBTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block"); - - m_h_MNBLooseEventFrac = TH1F_LW::create("MNBLooseEvent", "Yield of events flagged as LArMNBLooseRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBLooseEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_MNBLooseEventFrac).ignore(); - m_h_MNBLooseEvent = TH1I_LW::create("temp_MNBLooseEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBLooseEvent->GetXaxis()->SetTitle("Luminosity Block"); - - m_h_LBN = TH1I_LW::create("LBN", "LBN ", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - - m_h_NoisyEventTimeVetoFrac = TH1F_LW::create("NoisyEvent_TimeVeto", "Yield of events flagged as LArNoisyRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_NoisyEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_NoisyEventTimeVetoFrac).ignore(); - // Histogram below is temporary. Normalized at the end of run to produce the above histograms - m_h_NoisyEventTimeVeto = TH1I_LW::create("temp_NoisyEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_NoisyEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - - m_h_MNBTightEventTimeVetoFrac = TH1F_LW::create("MNBTightEvent_TimeVeto", "Yield of events flagged as LArMNBTightRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBTightEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_MNBTightEventTimeVetoFrac).ignore(); - // Histogram below is temporary. Normalized at the end of run to produce the above histograms - m_h_MNBTightEventTimeVeto = TH1I_LW::create("temp_MNBTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - - m_h_MNBLooseEventTimeVetoFrac = TH1F_LW::create("MNBLooseEvent_TimeVeto", "Yield of events flagged as LArMNBLooseRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBLooseEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - overallPerCent.regHist(m_h_MNBLooseEventTimeVetoFrac).ignore(); - // Histogram below is temporary. Normalized at the end of run to produce the above histograms - m_h_MNBLooseEventTimeVeto = TH1I_LW::create("temp_MNBLooseEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_MNBLooseEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - - hTitle = "Yield of events flagged as LArNoisyROSaturated"; - m_h_SaturatedTightFrac = TH1F_LW::create("SaturatedTightEvent", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_SaturatedTightFrac->GetXaxis()->SetTitle("Luminosity Block"); - m_h_SaturatedTightFrac->GetYaxis()->SetTitle("Yield(%)"); - overallPerCent.regHist(m_h_SaturatedTightFrac).ignore(); - // Histogram below is temporary. Normalized at the end of run to produce the above histograms - m_h_SaturatedTight = TH1I_LW::create("temp_SaturatedTight", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_SaturatedTight->GetXaxis()->SetTitle("Luminosity Block"); - - hTitle = "Yield of events flagged as LArNoisyROSaturated not vetoed by time window"; - m_h_SaturatedTightTimeVetoFrac = TH1F_LW::create("SaturatedTightEvent_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_SaturatedTightTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - m_h_SaturatedTightTimeVetoFrac->GetYaxis()->SetTitle("Yield(%)"); - overallPerCent.regHist(m_h_SaturatedTightTimeVetoFrac).ignore(); - // Histogram below is temporary. Normalized at the end of run to produce the above histograms - m_h_SaturatedTightTimeVeto = TH1I_LW::create("temp_SaturatedTight_TimeVeto", hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - m_h_SaturatedTightTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - } - return StatusCode::SUCCESS; } @@ -339,6 +253,8 @@ StatusCode LArNoisyROMon::fillHistograms() // Loop on all FEBs noisy in Std definition (i.e >30 channels with q factor > 4000) // And fill the 2D maps of fraction of fraction of noisy events unsigned int NbNoisyFEB = 0; + std::array<unsigned,4> partMask({{LArNoisyROSummary::EMECAMask,LArNoisyROSummary::EMBAMask,LArNoisyROSummary::EMBCMask,LArNoisyROSummary::EMECCMask}}); + for (size_t i = 0; i<noisyFEB.size(); i++) { //std::cout << "Noisy FEB " << noisyFEB[i].get_compact() << std::endl; @@ -347,449 +263,125 @@ StatusCode LArNoisyROMon::fillHistograms() HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); int FT = m_LArOnlineIDHelper->feedthrough(id); int slot = m_LArOnlineIDHelper->slot(id); - if ( m_LArOnlineIDHelper->isEMBchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_BarrelC.h_NoisyFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_BarrelC.h_NoisyFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_BarrelA.h_NoisyFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + int partition = partitionNumber(febid); + + if (partition<4){ + if (m_IsOnline) + m_partHistos[partition].h_NoisyFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); else - m_BarrelA.h_NoisyFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } + m_partHistos[partition].h_NoisyFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } - if ( m_LArOnlineIDHelper->isEMECchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_EMECC.h_NoisyFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECC.h_NoisyFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_EMECA.h_NoisyFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECA.h_NoisyFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - } + + } // End of loop on all RNB - noisy FEB m_h_NoisyFEB->Fill(NbNoisyFEB); // Loop on all FEBs noisy in MNB-tight definition // And fill the 2D maps of fraction of fraction of noisy events - // Only for events found MNB-Tight noisy first (i.e at least one FEB defined as suspicious) - unsigned int NbMNBTightFEB = 0; + // Fill two histograms with veto cut and all events for (size_t i = 0; i<mnbtightFEB.size(); i++) { //std::cout << "MNBTight FEB " << noisyFEB[i].get_compact() << std::endl; - NbMNBTightFEB++; const HWIdentifier& febid = mnbtightFEB[i]; HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); int FT = m_LArOnlineIDHelper->feedthrough(id); int slot = m_LArOnlineIDHelper->slot(id); - if ( m_LArOnlineIDHelper->isEMBchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMBCMask) != 0) - m_BarrelC.h_MNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMBCMask) != 0) - m_BarrelC.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - else - { - if (m_IsOnline) + int partition = partitionNumber(febid); + + if (partition<4){ + if (m_IsOnline) { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMBAMask) != 0) - m_BarrelA.h_MNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + m_partHistos[partition].h_CandidateMNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + if((noisyRO->MNBTightFlaggedPartitions() & partMask[partition]) != 0) + m_partHistos[partition].h_MNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } else { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMBAMask) != 0) - m_BarrelA.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + m_partHistos[partition].h_CandidateMNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + if((noisyRO->MNBTightFlaggedPartitions() & partMask[partition]) != 0) + m_partHistos[partition].h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } - } } - if ( m_LArOnlineIDHelper->isEMECchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) - m_EMECC.h_MNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) - m_EMECC.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - else - { - if (m_IsOnline) - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECAMask) != 0) - m_EMECA.h_MNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBTightFlaggedPartitions() & LArNoisyROSummary::EMECAMask) != 0) - m_EMECA.h_MNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - } - } - m_h_MNBTightFEB->Fill(NbMNBTightFEB); + + }// End of loop on all MNB-Tight - noisy FEB // Loop on all FEBs noisy in MNB-loose definition // And fill the 2D maps of fraction of fraction of noisy events - // Only for events found MNB-Loose noisy first (i.e at least one FEB defined as suspicious) - unsigned int NbMNBLooseFEB = 0; + // Fill two histograms with veto cut and all events for (size_t i = 0; i<mnblooseFEB.size(); i++) { //std::cout << "MNBLoose FEB " << noisyFEB[i].get_compact() << std::endl; - NbMNBLooseFEB++; const HWIdentifier& febid = mnblooseFEB[i]; HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); int FT = m_LArOnlineIDHelper->feedthrough(id); int slot = m_LArOnlineIDHelper->slot(id); - if ( m_LArOnlineIDHelper->isEMBchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMBCMask) != 0) - m_BarrelC.h_MNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMBCMask) != 0) - m_BarrelC.h_MNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - else - { - if (m_IsOnline) - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMBAMask) != 0) - m_BarrelA.h_MNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMBAMask) != 0) - m_BarrelA.h_MNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - } - if ( m_LArOnlineIDHelper->isEMECchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) - m_EMECC.h_MNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMECCMask) != 0) - m_EMECC.h_MNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - else - { - if (m_IsOnline) + int partition = partitionNumber(febid); + + if (partition<4){ + if (m_IsOnline) { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMECAMask) != 0) - m_EMECA.h_MNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + m_partHistos[partition].h_CandidateMNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + if((noisyRO->MNBLooseFlaggedPartitions() & partMask[partition]) != 0) + m_partHistos[partition].h_MNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } else { - if((noisyRO->MNBLooseFlaggedPartitions() & LArNoisyROSummary::EMECAMask) != 0) - m_EMECA.h_MNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + m_partHistos[partition].h_CandidateMNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); + if((noisyRO->MNBLooseFlaggedPartitions() & partMask[partition]) != 0) + m_partHistos[partition].h_MNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); } - } } - } - m_h_MNBLooseFEB->Fill(NbMNBLooseFEB); - // Loop on all FEBs noisy in MNB-tight definition - // And fill the 2D maps of fraction of fraction of noisy events - // Done for all events/FEBs (i.e no filtering at all on suspicious FEBs) - unsigned int NbCandidateMNBTightFEB = 0; - for (size_t i = 0; i<mnbtightFEB.size(); i++) - { - //std::cout << "CandidateMNBTight FEB " << noisyFEB[i].get_compact() << std::endl; - NbCandidateMNBTightFEB++; - const HWIdentifier& febid = mnbtightFEB[i]; - HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); - int FT = m_LArOnlineIDHelper->feedthrough(id); - int slot = m_LArOnlineIDHelper->slot(id); - if ( m_LArOnlineIDHelper->isEMBchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_BarrelC.h_CandidateMNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_BarrelC.h_CandidateMNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_BarrelA.h_CandidateMNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_BarrelA.h_CandidateMNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - if ( m_LArOnlineIDHelper->isEMECchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_EMECC.h_CandidateMNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECC.h_CandidateMNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_EMECA.h_CandidateMNBTightFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECA.h_CandidateMNBTightFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - } - m_h_CandidateMNBTightFEB->Fill(NbCandidateMNBTightFEB); + }// End of loop on all MNB-Loose - noisy FEB - // Loop on all FEBs noisy in MNB-loose definition - // And fill the 2D maps of fraction of fraction of noisy events - // Done for all events/FEBs (i.e no filtering at all on suspicious FEBs) - unsigned int NbCandidateMNBLooseFEB = 0; - for (size_t i = 0; i<mnblooseFEB.size(); i++) - { - //std::cout << "CandidateMNBLoose FEB " << noisyFEB[i].get_compact() << std::endl; - NbCandidateMNBLooseFEB++; - const HWIdentifier& febid = mnblooseFEB[i]; - HWIdentifier id = m_LArOnlineIDHelper->channel_Id(febid,0); - int FT = m_LArOnlineIDHelper->feedthrough(id); - int slot = m_LArOnlineIDHelper->slot(id); - if ( m_LArOnlineIDHelper->isEMBchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_BarrelC.h_CandidateMNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_BarrelC.h_CandidateMNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_BarrelA.h_CandidateMNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_BarrelA.h_CandidateMNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - if ( m_LArOnlineIDHelper->isEMECchannel(id) ) - { - if ( m_LArOnlineIDHelper->pos_neg(id) == 0 ) - { - if (m_IsOnline) - m_EMECC.h_CandidateMNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECC.h_CandidateMNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - else - { - if (m_IsOnline) - m_EMECA.h_CandidateMNBLooseFEBPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - else - m_EMECA.h_CandidateMNBLooseFEBFracPerEvt->Fill(static_cast<double>(slot), static_cast<double>(FT)+0.1); - } - } - } - m_h_CandidateMNBLooseFEB->Fill(NbCandidateMNBLooseFEB); // End of 2D map of FEB found as noisy (in any definition : Std, MNB-Tight or MNB-Loose) // Now fill 1D histograms of fraction of events found as noisy vetoed or not m_h_LBN->Fill(LBN); // Event found noisy by Std method uint8_t BadFEBPartitions = noisyRO->BadFEBFlaggedPartitions(); - if ( BadFEBPartitions != 0) - { - m_h_NoisyEvent->Fill(LBN); - if ( ! burstveto ) - { - m_h_NoisyEventTimeVeto->Fill(LBN); - } - if ( (BadFEBPartitions & LArNoisyROSummary::EMECAMask) != 0 ) - { - m_EMECA.h_NoisyEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECA,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECA.h_NoisyEventTimeVeto->Fill(LBN); - } - if ( (BadFEBPartitions & LArNoisyROSummary::EMBAMask) != 0 ) - { - m_BarrelA.h_NoisyEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelA,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelA.h_NoisyEventTimeVeto->Fill(LBN); - } - if ( (BadFEBPartitions & LArNoisyROSummary::EMBCMask) != 0 ) - { - m_BarrelC.h_NoisyEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelC,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelC.h_NoisyEventTimeVeto->Fill(LBN); - } - if ( (BadFEBPartitions & LArNoisyROSummary::EMECCMask) != 0 ) - { - m_EMECC.h_NoisyEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECC,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECC.h_NoisyEventTimeVeto->Fill(LBN); + if ( BadFEBPartitions != 0) { + for (int i= 0;i<4;i++){ + if ( (BadFEBPartitions & partMask[i]) != 0 ) { + m_partHistos[i].h_NoisyEvent->Fill(LBN); + if ( m_doTrigger ) fillTriggerHisto(m_partHistos[i],trigbits,L1trigbits); + if ( ! burstveto ) m_partHistos[i].h_NoisyEventTimeVeto->Fill(LBN); + } } - } + } // End of test on RNB // event flagged by # of saturated quality cells uint8_t SatTightPartitions = noisyRO->SatTightFlaggedPartitions(); - if ( eventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::TIGHTSATURATEDQ) ) - { - m_h_SaturatedTight->Fill(LBN); - if ( !burstveto ) m_h_SaturatedTightTimeVeto->Fill(LBN); - if ( (SatTightPartitions & LArNoisyROSummary::EMECAMask) != 0 ) - { - m_EMECA.h_SaturatedNoisyEvent->Fill(LBN); - if ( ! burstveto ) m_EMECA.h_SaturatedNoisyEventTimeVeto->Fill(LBN); - } - if ( (SatTightPartitions & LArNoisyROSummary::EMBAMask) != 0 ) - { - m_BarrelA.h_SaturatedNoisyEvent->Fill(LBN); - if ( ! burstveto ) m_BarrelA.h_SaturatedNoisyEventTimeVeto->Fill(LBN); - } - if ( (SatTightPartitions & LArNoisyROSummary::EMBCMask) != 0 ) - { - m_BarrelC.h_SaturatedNoisyEvent->Fill(LBN); - if ( ! burstveto ) m_BarrelC.h_SaturatedNoisyEventTimeVeto->Fill(LBN); - } - if ( (SatTightPartitions & LArNoisyROSummary::EMECCMask) != 0 ) - { - m_EMECC.h_SaturatedNoisyEvent->Fill(LBN); - if ( ! burstveto ) m_EMECC.h_SaturatedNoisyEventTimeVeto->Fill(LBN); + if ( eventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::TIGHTSATURATEDQ) ) { + for (int i= 0;i<4;i++){ + if ( (SatTightPartitions & partMask[i]) != 0 ) { + m_partHistos[i].h_SaturatedNoisyEvent->Fill(LBN); + if ( ! burstveto ) m_partHistos[i].h_SaturatedNoisyEventTimeVeto->Fill(LBN); + } } - } + } // end of test on RNB-Saturated // event flagged by tight-MNB uint8_t MNBTightPartitions = noisyRO->MNBTightFlaggedPartitions(); - if ( MNBTightPartitions != 0) - { - m_h_MNBTightEvent->Fill(LBN); - if ( ! burstveto ) - { - m_h_MNBTightEventTimeVeto->Fill(LBN); - } - if ( (MNBTightPartitions & LArNoisyROSummary::EMECAMask) != 0 ) - { - m_EMECA.h_MNBTightEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECA,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECA.h_MNBTightEventTimeVeto->Fill(LBN); - } - if ( (MNBTightPartitions & LArNoisyROSummary::EMBAMask) != 0 ) - { - m_BarrelA.h_MNBTightEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelA,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelA.h_MNBTightEventTimeVeto->Fill(LBN); - } - if ( (MNBTightPartitions & LArNoisyROSummary::EMBCMask) != 0 ) - { - m_BarrelC.h_MNBTightEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelC,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelC.h_MNBTightEventTimeVeto->Fill(LBN); - } - if ( (MNBTightPartitions & LArNoisyROSummary::EMECCMask) != 0 ) - { - m_EMECC.h_MNBTightEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECC,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECC.h_MNBTightEventTimeVeto->Fill(LBN); + if ( MNBTightPartitions != 0) { + for (int i= 0;i<4;i++){ + if ( (MNBTightPartitions & partMask[i]) != 0 ) { + m_partHistos[i].h_MNBTightEvent->Fill(LBN); + if ( ! burstveto ) m_partHistos[i].h_MNBTightEventTimeVeto->Fill(LBN); + } } - } + } // End of test on MNB-Tight // event flagged by loose-MNB uint8_t MNBLoosePartitions = noisyRO->MNBLooseFlaggedPartitions(); - if ( MNBLoosePartitions != 0) - { - m_h_MNBLooseEvent->Fill(LBN); - if ( ! burstveto ) - { - m_h_MNBLooseEventTimeVeto->Fill(LBN); - } - if ( (MNBLoosePartitions & LArNoisyROSummary::EMECAMask) != 0 ) - { - m_EMECA.h_MNBLooseEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECA,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECA.h_MNBLooseEventTimeVeto->Fill(LBN); - } - if ( (MNBLoosePartitions & LArNoisyROSummary::EMBAMask) != 0 ) - { - m_BarrelA.h_MNBLooseEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelA,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelA.h_MNBLooseEventTimeVeto->Fill(LBN); - } - if ( (MNBLoosePartitions & LArNoisyROSummary::EMBCMask) != 0 ) - { - m_BarrelC.h_MNBLooseEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_BarrelC,trigbits,L1trigbits); - if ( ! burstveto ) m_BarrelC.h_MNBLooseEventTimeVeto->Fill(LBN); - } - if ( (MNBLoosePartitions & LArNoisyROSummary::EMECCMask) != 0 ) - { - m_EMECC.h_MNBLooseEvent->Fill(LBN); - if ( m_doTrigger ) fillTriggerHisto(m_EMECC,trigbits,L1trigbits); - if ( ! burstveto ) m_EMECC.h_MNBLooseEventTimeVeto->Fill(LBN); - } - } - - // Event found noisy by weighted Std method - uint8_t BadFEB_WPartitions = noisyRO->BadFEB_WFlaggedPartitions(); - if ( BadFEB_WPartitions != 0) - { - if ( (BadFEB_WPartitions & LArNoisyROSummary::EMECAMask) != 0 ) - { - m_EMECA.h_NoisyWEvent->Fill(LBN); - if ( ! burstveto ) m_EMECA.h_NoisyWEventTimeVeto->Fill(LBN); - } - if ( (BadFEB_WPartitions & LArNoisyROSummary::EMBAMask) != 0 ) - { - m_BarrelA.h_NoisyWEvent->Fill(LBN); - if ( ! burstveto ) m_BarrelA.h_NoisyWEventTimeVeto->Fill(LBN); - } - if ( (BadFEB_WPartitions & LArNoisyROSummary::EMBCMask) != 0 ) - { - m_BarrelC.h_NoisyWEvent->Fill(LBN); - if ( ! burstveto ) m_BarrelC.h_NoisyWEventTimeVeto->Fill(LBN); - } - if ( (BadFEB_WPartitions & LArNoisyROSummary::EMECCMask) != 0 ) - { - m_EMECC.h_NoisyWEvent->Fill(LBN); - if ( ! burstveto ) m_EMECC.h_NoisyWEventTimeVeto->Fill(LBN); + if ( MNBLoosePartitions != 0) { + for (int i= 0;i<4;i++){ + if ( (MNBLoosePartitions & partMask[i]) != 0 ) { + m_partHistos[i].h_MNBLooseEvent->Fill(LBN); + if ( ! burstveto ) m_partHistos[i].h_MNBLooseEventTimeVeto->Fill(LBN); + } } - } + } // end fo test on MNB-Loose return sc; } @@ -807,408 +399,71 @@ StatusCode LArNoisyROMon::procHistograms() if(!m_doHisto) return StatusCode::SUCCESS; if ( endOfRunFlag() || endOfEventsBlockFlag()){ - if ( m_IsOnline ) - { + if ( m_IsOnline ){ // copy the "running" histo to the final ones, to be normalised - CopyHisto(m_BarrelA.h_NoisyFEBPerEvt,m_BarrelA.h_NoisyFEBFracPerEvt); - CopyHisto(m_BarrelC.h_NoisyFEBPerEvt,m_BarrelC.h_NoisyFEBFracPerEvt); - CopyHisto(m_EMECA.h_NoisyFEBPerEvt,m_EMECA.h_NoisyFEBFracPerEvt); - CopyHisto(m_EMECC.h_NoisyFEBPerEvt,m_EMECC.h_NoisyFEBFracPerEvt); - - CopyHisto(m_BarrelA.h_MNBTightFEBPerEvt,m_BarrelA.h_MNBTightFEBFracPerEvt); - CopyHisto(m_BarrelC.h_MNBTightFEBPerEvt,m_BarrelC.h_MNBTightFEBFracPerEvt); - CopyHisto(m_EMECA.h_MNBTightFEBPerEvt,m_EMECA.h_MNBTightFEBFracPerEvt); - CopyHisto(m_EMECC.h_MNBTightFEBPerEvt,m_EMECC.h_MNBTightFEBFracPerEvt); - - CopyHisto(m_BarrelA.h_MNBLooseFEBPerEvt,m_BarrelA.h_MNBLooseFEBFracPerEvt); - CopyHisto(m_BarrelC.h_MNBLooseFEBPerEvt,m_BarrelC.h_MNBLooseFEBFracPerEvt); - CopyHisto(m_EMECA.h_MNBLooseFEBPerEvt,m_EMECA.h_MNBLooseFEBFracPerEvt); - CopyHisto(m_EMECC.h_MNBLooseFEBPerEvt,m_EMECC.h_MNBLooseFEBFracPerEvt); - - CopyHisto(m_BarrelA.h_CandidateMNBTightFEBPerEvt,m_BarrelA.h_CandidateMNBTightFEBFracPerEvt); - CopyHisto(m_BarrelC.h_CandidateMNBTightFEBPerEvt,m_BarrelC.h_CandidateMNBTightFEBFracPerEvt); - CopyHisto(m_EMECA.h_CandidateMNBTightFEBPerEvt,m_EMECA.h_CandidateMNBTightFEBFracPerEvt); - CopyHisto(m_EMECC.h_CandidateMNBTightFEBPerEvt,m_EMECC.h_CandidateMNBTightFEBFracPerEvt); - - CopyHisto(m_BarrelA.h_CandidateMNBLooseFEBPerEvt,m_BarrelA.h_CandidateMNBLooseFEBFracPerEvt); - CopyHisto(m_BarrelC.h_CandidateMNBLooseFEBPerEvt,m_BarrelC.h_CandidateMNBLooseFEBFracPerEvt); - CopyHisto(m_EMECA.h_CandidateMNBLooseFEBPerEvt,m_EMECA.h_CandidateMNBLooseFEBFracPerEvt); - CopyHisto(m_EMECC.h_CandidateMNBLooseFEBPerEvt,m_EMECC.h_CandidateMNBLooseFEBFracPerEvt); - + for (int i=0;i<4;i++){ + copyHisto(m_partHistos[i].h_NoisyFEBPerEvt,m_partHistos[i].h_NoisyFEBFracPerEvt); + copyHisto(m_partHistos[i].h_MNBTightFEBPerEvt,m_partHistos[i].h_MNBTightFEBFracPerEvt); + copyHisto(m_partHistos[i].h_MNBLooseFEBPerEvt,m_partHistos[i].h_MNBLooseFEBFracPerEvt); + copyHisto(m_partHistos[i].h_CandidateMNBTightFEBPerEvt,m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt); + copyHisto(m_partHistos[i].h_CandidateMNBLooseFEBPerEvt,m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt); + } } - + if (m_eventCounter>0) { const double scale = 100./static_cast<double>(m_eventCounter); - m_BarrelA.h_NoisyFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelA.h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter); - m_BarrelC.h_NoisyFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelC.h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECA.h_NoisyFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECA.h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECC.h_NoisyFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECC.h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter); - - m_BarrelA.h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelA.h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_BarrelC.h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelC.h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECA.h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECA.h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECC.h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECC.h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - - m_BarrelA.h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelA.h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_BarrelC.h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelC.h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECA.h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECA.h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECC.h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECC.h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - - m_BarrelA.h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelA.h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_BarrelC.h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelC.h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECA.h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECA.h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECC.h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECC.h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter); - - m_BarrelA.h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelA.h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_BarrelC.h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_BarrelC.h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECA.h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECA.h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - m_EMECC.h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); - m_EMECC.h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); - - Divide(m_h_NoisyEventFrac,m_h_NoisyEvent,m_h_LBN); - m_h_NoisyEventFrac->SetEntries(m_eventCounter); - - Divide(m_h_MNBTightEventFrac,m_h_MNBTightEvent,m_h_LBN); - m_h_MNBTightEventFrac->SetEntries(m_eventCounter); - - Divide(m_h_MNBLooseEventFrac,m_h_MNBLooseEvent,m_h_LBN); - m_h_MNBLooseEventFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_NoisyEventFrac,m_BarrelA.h_NoisyEvent,m_h_LBN); - m_BarrelA.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyEventFrac,m_BarrelC.h_NoisyEvent,m_h_LBN); - m_BarrelC.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyEventFrac,m_EMECA.h_NoisyEvent,m_h_LBN); - m_EMECA.h_NoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyEventFrac,m_EMECC.h_NoisyEvent,m_h_LBN); - m_EMECC.h_NoisyEventFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_SaturatedNoisyEventFrac,m_BarrelA.h_SaturatedNoisyEvent,m_h_LBN); - m_BarrelA.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_SaturatedNoisyEventFrac,m_BarrelC.h_SaturatedNoisyEvent,m_h_LBN); - m_BarrelC.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_SaturatedNoisyEventFrac,m_EMECA.h_SaturatedNoisyEvent,m_h_LBN); - m_EMECA.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_SaturatedNoisyEventFrac,m_EMECC.h_SaturatedNoisyEvent,m_h_LBN); - m_EMECC.h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_MNBTightEventFrac,m_BarrelA.h_MNBTightEvent,m_h_LBN); - m_BarrelA.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBTightEventFrac,m_BarrelC.h_MNBTightEvent,m_h_LBN); - m_BarrelC.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBTightEventFrac,m_EMECA.h_MNBTightEvent,m_h_LBN); - m_EMECA.h_MNBTightEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBTightEventFrac,m_EMECC.h_MNBTightEvent,m_h_LBN); - m_EMECC.h_MNBTightEventFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_MNBLooseEventFrac,m_BarrelA.h_MNBLooseEvent,m_h_LBN); - m_BarrelA.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBLooseEventFrac,m_BarrelC.h_MNBLooseEvent,m_h_LBN); - m_BarrelC.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBLooseEventFrac,m_EMECA.h_MNBLooseEvent,m_h_LBN); - m_EMECA.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBLooseEventFrac,m_EMECC.h_MNBLooseEvent,m_h_LBN); - m_EMECC.h_MNBLooseEventFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_NoisyWEventFrac,m_BarrelA.h_NoisyWEvent,m_h_LBN); - m_BarrelA.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyWEventFrac,m_BarrelC.h_NoisyWEvent,m_h_LBN); - m_BarrelC.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyWEventFrac,m_EMECA.h_NoisyWEvent,m_h_LBN); - m_EMECA.h_NoisyWEventFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyWEventFrac,m_EMECC.h_NoisyWEvent,m_h_LBN); - m_EMECC.h_NoisyWEventFrac->SetEntries(m_eventCounter); - - Divide(m_h_NoisyEventTimeVetoFrac,m_h_NoisyEventTimeVeto,m_h_LBN); - m_h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_NoisyEventTimeVetoFrac,m_BarrelA.h_NoisyEventTimeVeto,m_h_LBN); - m_BarrelA.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyEventTimeVetoFrac,m_BarrelC.h_NoisyEventTimeVeto,m_h_LBN); - m_BarrelC.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyEventTimeVetoFrac,m_EMECA.h_NoisyEventTimeVeto,m_h_LBN); - m_EMECA.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyEventTimeVetoFrac,m_EMECC.h_NoisyEventTimeVeto,m_h_LBN); - m_EMECC.h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelA.h_SaturatedNoisyEventTimeVeto,m_h_LBN); - m_BarrelA.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_SaturatedNoisyEventTimeVetoFrac,m_BarrelC.h_SaturatedNoisyEventTimeVeto,m_h_LBN); - m_BarrelC.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_SaturatedNoisyEventTimeVetoFrac,m_EMECA.h_SaturatedNoisyEventTimeVeto,m_h_LBN); - m_EMECA.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_SaturatedNoisyEventTimeVetoFrac,m_EMECC.h_SaturatedNoisyEventTimeVeto,m_h_LBN); - m_EMECC.h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); - - Divide(m_h_MNBTightEventTimeVetoFrac,m_h_MNBTightEventTimeVeto,m_h_LBN); - m_h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBTightEventTimeVetoFrac,m_BarrelA.h_MNBTightEventTimeVeto,m_h_LBN); - m_BarrelA.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBTightEventTimeVetoFrac,m_BarrelC.h_MNBTightEventTimeVeto,m_h_LBN); - m_BarrelC.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBTightEventTimeVetoFrac,m_EMECA.h_MNBTightEventTimeVeto,m_h_LBN); - m_EMECA.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBTightEventTimeVetoFrac,m_EMECC.h_MNBTightEventTimeVeto,m_h_LBN); - m_EMECC.h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); - - Divide(m_h_MNBLooseEventTimeVetoFrac,m_h_MNBLooseEventTimeVeto,m_h_LBN); - m_h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelA.h_MNBLooseEventTimeVetoFrac,m_BarrelA.h_MNBLooseEventTimeVeto,m_h_LBN); - m_BarrelA.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_MNBLooseEventTimeVetoFrac,m_BarrelC.h_MNBLooseEventTimeVeto,m_h_LBN); - m_BarrelC.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_MNBLooseEventTimeVetoFrac,m_EMECA.h_MNBLooseEventTimeVeto,m_h_LBN); - m_EMECA.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_MNBLooseEventTimeVetoFrac,m_EMECC.h_MNBLooseEventTimeVeto,m_h_LBN); - m_EMECC.h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); - - Divide(m_BarrelA.h_NoisyWEventTimeVetoFrac,m_BarrelA.h_NoisyWEventTimeVeto,m_h_LBN); - m_BarrelA.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_BarrelC.h_NoisyWEventTimeVetoFrac,m_BarrelC.h_NoisyWEventTimeVeto,m_h_LBN); - m_BarrelC.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECA.h_NoisyWEventTimeVetoFrac,m_EMECA.h_NoisyWEventTimeVeto,m_h_LBN); - m_EMECA.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - Divide(m_EMECC.h_NoisyWEventTimeVetoFrac,m_EMECC.h_NoisyWEventTimeVeto,m_h_LBN); - m_EMECC.h_NoisyWEventTimeVetoFrac->SetEntries(m_eventCounter); - - Divide(m_h_SaturatedTightFrac,m_h_SaturatedTight,m_h_LBN); - m_h_SaturatedTightFrac->SetEntries(m_eventCounter); - Divide(m_h_SaturatedTightTimeVetoFrac,m_h_SaturatedTightTimeVeto,m_h_LBN); - m_h_SaturatedTightTimeVetoFrac->SetEntries(m_eventCounter); + + for (int i=0;i<4;i++){ + m_partHistos[i].h_NoisyFEBFracPerEvt->scaleContentsAndErrors(scale); + m_partHistos[i].h_NoisyFEBFracPerEvt->SetEntries(m_eventCounter); + m_partHistos[i].h_MNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); + m_partHistos[i].h_MNBTightFEBFracPerEvt->SetEntries(m_eventCounter); + m_partHistos[i].h_MNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); + m_partHistos[i].h_MNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); + m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt->scaleContentsAndErrors(scale); + m_partHistos[i].h_CandidateMNBTightFEBFracPerEvt->SetEntries(m_eventCounter); + m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt->scaleContentsAndErrors(scale); + m_partHistos[i].h_CandidateMNBLooseFEBFracPerEvt->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_NoisyEventFrac,m_partHistos[i].h_NoisyEvent,m_h_LBN); + m_partHistos[i].h_NoisyEventFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_SaturatedNoisyEventFrac,m_partHistos[i].h_SaturatedNoisyEvent,m_h_LBN); + m_partHistos[i].h_SaturatedNoisyEventFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_MNBTightEventFrac,m_partHistos[i].h_MNBTightEvent,m_h_LBN); + m_partHistos[i].h_MNBTightEventFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_MNBLooseEventFrac,m_partHistos[i].h_MNBLooseEvent,m_h_LBN); + m_partHistos[i].h_MNBLooseEventFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_NoisyEventTimeVetoFrac,m_partHistos[i].h_NoisyEventTimeVeto,m_h_LBN); + m_partHistos[i].h_NoisyEventTimeVetoFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_SaturatedNoisyEventTimeVetoFrac,m_partHistos[i].h_SaturatedNoisyEventTimeVeto,m_h_LBN); + m_partHistos[i].h_SaturatedNoisyEventTimeVetoFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_MNBTightEventTimeVetoFrac,m_partHistos[i].h_MNBTightEventTimeVeto,m_h_LBN); + m_partHistos[i].h_MNBTightEventTimeVetoFrac->SetEntries(m_eventCounter); + divideHisto(m_partHistos[i].h_MNBLooseEventTimeVetoFrac,m_partHistos[i].h_MNBLooseEventTimeVeto,m_h_LBN); + m_partHistos[i].h_MNBLooseEventTimeVetoFrac->SetEntries(m_eventCounter); + } }//end if m_eventCounter>0 } if ( endOfRunFlag() ) { - // delete temposary histograms - if ( m_h_LBN ) { -// LWHist::safeDelete(m_h_LBN); -// m_h_LBN = NULL; - m_h_LBN->Reset(); - } - if ( m_h_NoisyEvent ) { -// LWHist::safeDelete(m_h_NoisyEvent); -// m_h_NoisyEvent = NULL; - m_h_NoisyEvent->Reset(); - } - if ( m_BarrelA.h_NoisyEvent ) { -// LWHist::safeDelete(m_BarrelA.h_NoisyEvent); -// m_BarrelA.h_NoisyEvent = NULL; - m_BarrelA.h_NoisyEvent->Reset(); - } - if ( m_BarrelC.h_NoisyEvent ) { -// LWHist::safeDelete(m_BarrelC.h_NoisyEvent); -// m_BarrelC.h_NoisyEvent = NULL; - m_BarrelC.h_NoisyEvent->Reset(); - } - if ( m_EMECA.h_NoisyEvent ) { -// LWHist::safeDelete(m_EMECA.h_NoisyEvent); -// m_EMECA.h_NoisyEvent = NULL; - m_EMECA.h_NoisyEvent->Reset(); - } - if ( m_EMECC.h_NoisyEvent ) { -// LWHist::safeDelete(m_EMECC.h_NoisyEvent); -// m_EMECC.h_NoisyEvent = NULL; - m_EMECC.h_NoisyEvent->Reset(); - } - if ( m_h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(m_h_NoisyEventTimeVeto); -// m_h_NoisyEventTimeVeto = NULL; - m_h_NoisyEventTimeVeto->Reset(); - } - if ( m_BarrelA.h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelA.h_NoisyEventTimeVeto); -// m_BarrelA.h_NoisyEventTimeVeto = NULL; - m_BarrelA.h_NoisyEventTimeVeto->Reset(); - } - if ( m_BarrelC.h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelC.h_NoisyEventTimeVeto); -// m_BarrelC.h_NoisyEventTimeVeto = NULL; - m_BarrelC.h_NoisyEventTimeVeto->Reset(); - } - if ( m_EMECA.h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(m_EMECA.h_NoisyEventTimeVeto); -// m_EMECA.h_NoisyEventTimeVeto = NULL; - m_EMECA.h_NoisyEventTimeVeto->Reset(); - } - if ( m_EMECC.h_NoisyEventTimeVeto ) { -// LWHist::safeDelete(m_EMECC.h_NoisyEventTimeVeto); -// m_EMECC.h_NoisyEventTimeVeto = NULL; - m_EMECC.h_NoisyEventTimeVeto->Reset(); - } - if ( m_h_MNBTightEvent ) { -// LWHist::safeDelete(m_h_MNBTightEvent); -// m_h_MNBTightEvent = NULL; - m_h_MNBTightEvent->Reset(); - } - if ( m_BarrelA.h_MNBTightEvent ) { -// LWHist::safeDelete(m_BarrelA.h_MNBTightEvent); -// m_BarrelA.h_MNBTightEvent = NULL; - m_BarrelA.h_MNBTightEvent->Reset(); - } - if ( m_BarrelC.h_MNBTightEvent ) { -// LWHist::safeDelete(m_BarrelC.h_MNBTightEvent); -// m_BarrelC.h_MNBTightEvent = NULL; - m_BarrelC.h_MNBTightEvent->Reset(); - } - if ( m_EMECA.h_MNBTightEvent ) { -// LWHist::safeDelete(m_EMECA.h_MNBTightEvent); -// m_EMECA.h_MNBTightEvent = NULL; - m_EMECA.h_MNBTightEvent->Reset(); - } - if ( m_EMECC.h_MNBTightEvent ) { -// LWHist::safeDelete(m_EMECC.h_MNBTightEvent); -// m_EMECC.h_MNBTightEvent = NULL; - m_EMECC.h_MNBTightEvent->Reset(); - } - if ( m_h_MNBTightEventTimeVeto ) { -// LWHist::safeDelete(h_MNBTightEventTimeVeto); -// h_MNBTightEventTimeVeto = NULL; - m_h_MNBTightEventTimeVeto->Reset(); - } - if ( m_BarrelA.h_MNBTightEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelA.h_MNBTightEventTimeVeto); -// m_BarrelA.h_MNBTightEventTimeVeto = NULL; - m_BarrelA.h_MNBTightEventTimeVeto->Reset(); - } - if ( m_BarrelC.h_MNBTightEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelC.h_MNBTightEventTimeVeto); -// m_BarrelC.h_MNBTightEventTimeVeto = NULL; - m_BarrelC.h_MNBTightEventTimeVeto->Reset(); - } - if ( m_EMECA.h_MNBTightEventTimeVeto ) { -// LWHist::safeDelete(m_EMECA.h_MNBTightEventTimeVeto); -// m_EMECA.h_MNBTightEventTimeVeto = NULL; - m_EMECA.h_MNBTightEventTimeVeto->Reset(); - } - if ( m_EMECC.h_MNBTightEventTimeVeto ) { -// LWHist::safeDelete(m_EMECC.h_MNBTightEventTimeVeto); -// m_EMECC.h_MNBTightEventTimeVeto = NULL; - m_EMECC.h_MNBTightEventTimeVeto->Reset(); - } - - if ( m_h_MNBLooseEvent ) { -// LWHist::safeDelete(m_h_MNBLooseEvent); -// m_h_MNBLooseEvent = NULL; - m_h_MNBLooseEvent->Reset(); - } - if ( m_BarrelA.h_MNBLooseEvent ) { -// LWHist::safeDelete(m_BarrelA.h_MNBLooseEvent); -// m_BarrelA.h_MNBLooseEvent = NULL; - m_BarrelA.h_MNBLooseEvent->Reset(); - } - if ( m_BarrelC.h_MNBLooseEvent ) { -// LWHist::safeDelete(m_BarrelC.h_MNBLooseEvent); -// m_BarrelC.h_MNBLooseEvent = NULL; - m_BarrelC.h_MNBLooseEvent->Reset(); - } - if ( m_EMECA.h_MNBLooseEvent ) { -// LWHist::safeDelete(m_EMECA.h_MNBLooseEvent); -// m_EMECA.h_MNBLooseEvent = NULL; - m_EMECA.h_MNBLooseEvent->Reset(); - } - if ( m_EMECC.h_MNBLooseEvent ) { -// LWHist::safeDelete(m_EMECC.h_MNBLooseEvent); -// m_EMECC.h_MNBLooseEvent = NULL; - m_EMECC.h_MNBLooseEvent->Reset(); - } - if ( m_h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(m_h_MNBLooseEventTimeVeto); -// m_h_MNBLooseEventTimeVeto = NULL; - m_h_MNBLooseEventTimeVeto->Reset(); - } - if ( m_BarrelA.h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelA.h_MNBLooseEventTimeVeto); -// m_BarrelA.h_MNBLooseEventTimeVeto = NULL; - m_BarrelA.h_MNBLooseEventTimeVeto->Reset(); - } - if ( m_BarrelC.h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelC.h_MNBLooseEventTimeVeto); -// m_BarrelC.h_MNBLooseEventTimeVeto = NULL; - m_BarrelC.h_MNBLooseEventTimeVeto->Reset(); - } - if ( m_EMECA.h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(m_EMECA.h_MNBLooseEventTimeVeto); -// m_EMECA.h_MNBLooseEventTimeVeto = NULL; - m_EMECA.h_MNBLooseEventTimeVeto->Reset(); - } - if ( m_EMECC.h_MNBLooseEventTimeVeto ) { -// LWHist::safeDelete(m_EMECC.h_MNBLooseEventTimeVeto); -// m_EMECC.h_MNBLooseEventTimeVeto = NULL; - m_EMECC.h_MNBLooseEventTimeVeto->Reset(); - } - if ( m_h_SaturatedTight ) { -// LWHist::safeDelete(m_h_SaturatedTight); -// m_h_SaturatedTight = NULL; - m_h_SaturatedTight->Reset(); - } - if ( m_BarrelA.h_SaturatedNoisyEvent ) { -// LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEvent); -// m_BarrelA.h_SaturatedNoisyEvent = NULL; - m_BarrelA.h_SaturatedNoisyEvent->Reset(); - } - if ( m_BarrelC.h_SaturatedNoisyEvent ) { -// LWHist::safeDelete(m_BarrelC.h_SaturatedNoisyEvent); -// m_BarrelC.h_SaturatedNoisyEvent = NULL; - m_BarrelC.h_SaturatedNoisyEvent->Reset(); - } - if ( m_EMECA.h_SaturatedNoisyEvent ) { -// LWHist::safeDelete(m_EMECA.h_SaturatedNoisyEvent); -// m_EMECA.h_SaturatedNoisyEvent = NULL; - m_EMECA.h_SaturatedNoisyEvent->Reset(); - } - if ( m_EMECC.h_SaturatedNoisyEvent ) { -// LWHist::safeDelete(m_EMECC.h_SaturatedNoisyEvent); -// m_EMECC.h_SaturatedNoisyEvent = NULL; - m_EMECC.h_SaturatedNoisyEvent->Reset(); - } - if ( m_h_SaturatedTightTimeVeto ) { -// LWHist::safeDelete(m_h_SaturatedTightTimeVeto); -// m_h_SaturatedTightTimeVeto = NULL; - m_h_SaturatedTightTimeVeto->Reset(); - } - if ( m_BarrelA.h_SaturatedNoisyEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelA.h_SaturatedNoisyEventTimeVeto); -// m_BarrelA.h_SaturatedNoisyEventTimeVeto = NULL; - m_BarrelA.h_SaturatedNoisyEventTimeVeto->Reset(); - } - if ( m_BarrelC.h_SaturatedNoisyEventTimeVeto ) { -// LWHist::safeDelete(m_BarrelC.h_SaturatedNoisyEventTimeVeto); -// m_BarrelC.h_SaturatedNoisyEventTimeVeto = NULL; - m_BarrelC.h_SaturatedNoisyEventTimeVeto->Reset(); - } - if ( m_EMECA.h_SaturatedNoisyEventTimeVeto ) { -// LWHist::safeDelete(m_EMECA.h_SaturatedNoisyEventTimeVeto); -// m_EMECA.h_SaturatedNoisyEventTimeVeto = NULL; - m_EMECA.h_SaturatedNoisyEventTimeVeto->Reset(); - } - if ( m_EMECC.h_SaturatedNoisyEventTimeVeto ) { -// LWHist::safeDelete(m_EMECC.h_SaturatedNoisyEventTimeVeto); -// m_EMECC.h_SaturatedNoisyEventTimeVeto = NULL; - m_EMECC.h_SaturatedNoisyEventTimeVeto->Reset(); + if ( m_h_LBN ) m_h_LBN->Reset(); + + for (int i=0;i<4;i++){ + + if (m_partHistos[i].h_NoisyEvent) m_partHistos[i].h_NoisyEvent->Reset(); + if (m_partHistos[i].h_NoisyEventTimeVeto) m_partHistos[i].h_NoisyEventTimeVeto->Reset(); + if (m_partHistos[i].h_SaturatedNoisyEvent) m_partHistos[i].h_SaturatedNoisyEvent->Reset(); + if (m_partHistos[i].h_SaturatedNoisyEventTimeVeto) m_partHistos[i].h_SaturatedNoisyEventTimeVeto->Reset(); + if (m_partHistos[i].h_MNBTightEvent) m_partHistos[i].h_MNBTightEvent->Reset(); + if (m_partHistos[i].h_MNBTightEventTimeVeto) m_partHistos[i].h_MNBTightEventTimeVeto->Reset(); + if (m_partHistos[i].h_MNBLooseEvent) m_partHistos[i].h_MNBLooseEvent->Reset(); + if (m_partHistos[i].h_MNBLooseEventTimeVeto) m_partHistos[i].h_MNBLooseEventTimeVeto->Reset(); } } + return StatusCode::SUCCESS; } -void LArNoisyROMon::CopyHisto(LWHist2D* from,LWHist2D* to) +void LArNoisyROMon::copyHisto(LWHist2D* from,LWHist2D* to) { unsigned xbin, ybin; double numer, error; @@ -1221,7 +476,7 @@ void LArNoisyROMon::CopyHisto(LWHist2D* from,LWHist2D* to) } -void LArNoisyROMon::CopyHisto(LWHist1D* from,LWHist1D* to) +void LArNoisyROMon::copyHisto(LWHist1D* from,LWHist1D* to) { unsigned xbin; double numer, error; @@ -1234,7 +489,7 @@ void LArNoisyROMon::CopyHisto(LWHist1D* from,LWHist1D* to) } -void LArNoisyROMon::Divide(LWHist1D* to,LWHist1D* num,LWHist1D* denom) +void LArNoisyROMon::divideHisto(LWHist1D* to,LWHist1D* num,LWHist1D* denom) { static double OneSigOneSided = 0.159; // 0.5*(1-0.681) where 0.681 means 68%CL @@ -1280,6 +535,14 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } // 2D FEB maps (x : slot / y : FT) with z: fraction of events for which the FEB is noisy or mini-noisy. + hName = "MNBKnownFEB_"+name; + hTitle = "Suspicious MNB FEBs - "+name; + partition.h_MNBKnownFEB = TH2I_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); + partition.h_MNBKnownFEB->GetXaxis()->SetTitle("Slot"); + partition.h_MNBKnownFEB->GetYaxis()->SetTitle("Feedthrough"); + groupfrac.regHist(partition.h_MNBKnownFEB).ignore(); + + hName = "NoisyFEBFracPerEvt_"+name; hTitle = "Yield of events with FEB noisy "+m_NoisyFEBDefStr+" - "+name; partition.h_NoisyFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); @@ -1295,7 +558,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "MNBTightFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Tight (>17 chan with Q>4000) - "+name; + hTitle = "Yield of events with FEB MNB-Tight " + m_MNBTightFEBDefStr+ " - "+name+" (only vetoed events)"; partition.h_MNBTightFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_MNBTightFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_MNBTightFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1309,7 +572,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "MNBLooseFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Loose (>5 chan with Q>4000) - "+name; + hTitle = "Yield of events with FEB MNB-Loose " + m_MNBLooseFEBDefStr + " - "+name+" (only vetoed events)"; partition.h_MNBLooseFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_MNBLooseFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_MNBLooseFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1323,7 +586,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "CandidateMNBTightFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Tight Candidate (>17 chan with Q>4000) - "+name; + hTitle = "Yield of events with FEB MNB-Tight "+ m_MNBTightFEBDefStr+ " - "+name; partition.h_CandidateMNBTightFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_CandidateMNBTightFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_CandidateMNBTightFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1337,7 +600,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s } hName = "CandidateMNBLooseFEBFracPerEvt_"+name; - hTitle = "Yield of events with FEB MNB Loose Candidate (>5 chan with Q>4000) - "+name; + hTitle = "Yield of events with FEB MNB-Loose " + m_MNBLooseFEBDefStr + " - "+name; partition.h_CandidateMNBLooseFEBFracPerEvt = TH2F_LW::create(hName.c_str(), hTitle.c_str(), slot,slot_low,slot_up,FEB,FEB_low,FEB_up); partition.h_CandidateMNBLooseFEBFracPerEvt->GetXaxis()->SetTitle("Slot"); partition.h_CandidateMNBLooseFEBFracPerEvt->GetYaxis()->SetTitle("Feedthrough"); @@ -1350,9 +613,10 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s group.regHist(partition.h_CandidateMNBLooseFEBPerEvt).ignore(); } - // Fraction of events found noisy per LB - Std flag + // Fraction of events found noisy per LB - Regular Noise Burst(RNB) Standard flag hName = "NoisyEvent_"+name; - partition.h_NoisyEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArNoisyRO_Std", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as RNB-Standard - " + name; + partition.h_NoisyEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_NoisyEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_NoisyEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1360,9 +624,10 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_NoisyEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_NoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); - // Fraction of events found noisy per LB - Std flag + // Fraction of events found noisy per LB - RNB-Saturated flag hName = "SaturatedNoisyEvent_"+name; - partition.h_SaturatedNoisyEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArNoisyRO Saturated", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as RNB-Saturated - "+name; + partition.h_SaturatedNoisyEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_SaturatedNoisyEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_SaturatedNoisyEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1371,7 +636,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_SaturatedNoisyEvent->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBTightEvent_"+name; - partition.h_MNBTightEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBTight", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as MNB-Tight - "+name; + partition.h_MNBTightEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBTightEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBTightEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1380,7 +646,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBTightEvent->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBLooseEvent_"+name; - partition.h_MNBLooseEventFrac = TH1F_LW::create(hName.c_str(),"Yield of events flagged as LArMNBLoose", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as MNB-Loose - "+name; + partition.h_MNBLooseEventFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEventFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBLooseEventFrac).ignore(); // Histogram below is temporary. Normalized at the end of run to produce the above histograms @@ -1388,18 +655,19 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBLooseEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEvent->GetXaxis()->SetTitle("Luminosity Block"); - // Fraction of events found noisy per LB - Weighted flag - hName = "NoisyWEvent_"+name; - partition.h_NoisyWEventFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArNoisyRO_StdOpt", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - partition.h_NoisyWEventFrac->GetXaxis()->SetTitle("Luminosity Block"); - groupfracbin.regHist(partition.h_NoisyWEventFrac).ignore(); - hName = "temp_NoisyWEvent_"+name; - partition.h_NoisyWEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - partition.h_NoisyWEvent->GetXaxis()->SetTitle("Luminosity Block"); +// // Fraction of events found noisy per LB - Weighted flag +// hName = "NoisyWEvent_"+name; +// partition.h_NoisyWEventFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArNoisyRO_StdOpt", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); +// partition.h_NoisyWEventFrac->GetXaxis()->SetTitle("Luminosity Block"); +// groupfracbin.regHist(partition.h_NoisyWEventFrac).ignore(); +// hName = "temp_NoisyWEvent_"+name; +// partition.h_NoisyWEvent = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); +// partition.h_NoisyWEvent->GetXaxis()->SetTitle("Luminosity Block"); // Fraction of events found noisy per LB after time veto - Std flag hName = "NoisyEvent_TimeVeto_"+name; - partition.h_NoisyEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArNoisyRO_Std not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as RNB-Standard not vetoed by time window - "+name; + partition.h_NoisyEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_NoisyEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_NoisyEventTimeVetoFrac).ignore(); @@ -1409,7 +677,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s // Fraction of events found noisy per LB after time veto - Sat flag hName = "SaturatedNoisyEvent_TimeVeto_"+name; - partition.h_SaturatedNoisyEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArNoisyRO Sat not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as RNB-Saturated not vetoed by time window - "+ name; + partition.h_SaturatedNoisyEventTimeVetoFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_SaturatedNoisyEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_SaturatedNoisyEventTimeVetoFrac).ignore(); @@ -1418,7 +687,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_SaturatedNoisyEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBTightEvent_TimeVeto_"+name; - partition.h_MNBTightEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBTight not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as MNB-Tight not vetoed by time window - " + name; + partition.h_MNBTightEventTimeVetoFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBTightEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBTightEventTimeVetoFrac).ignore(); @@ -1427,7 +697,8 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBTightEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); hName = "MNBLooseEvent_TimeVeto_"+name; - partition.h_MNBLooseEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArMNBLoose not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); + hTitle = "Yield of events flagged as MNB-Loose not vetoed by time window - " + name; + partition.h_MNBLooseEventTimeVetoFrac = TH1F_LW::create(hName.c_str(),hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); groupfracbin.regHist(partition.h_MNBLooseEventTimeVetoFrac).ignore(); @@ -1435,21 +706,21 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s partition.h_MNBLooseEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); partition.h_MNBLooseEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); - // Fraction of events found noisy per LB after time veto - Weighted flag - hName = "NoisyWEvent_TimeVeto_"+name; - partition.h_NoisyWEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as LArNoisyRO_StdOpt not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - partition.h_NoisyWEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); - groupfracbin.regHist(partition.h_NoisyWEventTimeVetoFrac).ignore(); - - hName = "temp_NoisyWEvent_TimeVeto_"+name; - partition.h_NoisyWEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); - partition.h_NoisyWEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); +// // Fraction of events found noisy per LB after time veto - Weighted flag +// hName = "NoisyWEvent_TimeVeto_"+name; +// partition.h_NoisyWEventTimeVetoFrac = TH1F_LW::create(hName.c_str(), "Yield of events flagged as RNB-StandardOpt not vetoed by time window", m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); +// partition.h_NoisyWEventTimeVetoFrac->GetXaxis()->SetTitle("Luminosity Block"); +// groupfracbin.regHist(partition.h_NoisyWEventTimeVetoFrac).ignore(); +// +// hName = "temp_NoisyWEvent_TimeVeto_"+name; +// partition.h_NoisyWEventTimeVeto = TH1I_LW::create(hName.c_str(), hTitle.c_str(), m_lumi_blocks+1, -0.5, (float)m_lumi_blocks+0.5); +// partition.h_NoisyWEventTimeVeto->GetXaxis()->SetTitle("Luminosity Block"); if ( m_doTrigger ) { unsigned int siz = m_EF_NoiseBurst_Triggers.size(); hName = "NoisyEventTrigger_"+name; - hTitle = "Trigger fired for noisy event - "+name; + hTitle = "Trigger fired for RNB flagged events - "+name; partition.h_NoisyEventTrigger = TH1I_LW::create(hName.c_str(), hTitle.c_str(), siz+1, 0.5, siz+1.5); LWHist::LWHistAxis* axis = partition.h_NoisyEventTrigger->GetXaxis(); axis->SetTitle("Special trigger fired"); @@ -1463,7 +734,7 @@ void LArNoisyROMon::bookPartitionHistos(partitionHistos& partition, const std::s siz = m_L1_NoiseBurst_Triggers.size(); hName = "NoisyEventL1Term_"+name; - hTitle = "L1 term fired for noisy event - "+name; + hTitle = "L1 term fired for RNB flagged events - "+name; partition.h_NoisyEventTriggerL1 = TH1I_LW::create(hName.c_str(), hTitle.c_str(), siz+1, 0.5, siz+1.5); axis = partition.h_NoisyEventTriggerL1->GetXaxis(); axis->SetTitle("L1 term fired"); @@ -1507,85 +778,45 @@ void LArNoisyROMon::fillTriggerHisto(partitionHistos& partition, uint8_t trigger StatusCode LArNoisyROMon::finalize() { - ATH_MSG_INFO( " in LArNoisyROMon::finalHists() " ); + ATH_MSG_INFO( " in LArNoisyROMon::finalHists()" ); // delete temposary histograms if ( m_h_LBN ) { LWHist::safeDelete(m_h_LBN); m_h_LBN = nullptr; } - - if ( m_h_NoisyEvent ) { - LWHist::safeDelete(m_h_NoisyEvent); - m_h_NoisyEvent = nullptr; - } - - if ( m_h_NoisyEventTimeVeto ) { - LWHist::safeDelete(m_h_NoisyEventTimeVeto); - m_h_NoisyEventTimeVeto = nullptr; - } - - if ( m_h_MNBTightEvent ) { - LWHist::safeDelete(m_h_MNBTightEvent); - m_h_MNBTightEvent = nullptr; - } - - if ( m_h_MNBTightEventTimeVeto ) { - LWHist::safeDelete(m_h_MNBTightEventTimeVeto); - m_h_MNBTightEventTimeVeto = nullptr; - } - - if ( m_h_MNBLooseEvent ) { - LWHist::safeDelete(m_h_MNBLooseEvent); - m_h_MNBLooseEvent = nullptr; - } - - if ( m_h_MNBLooseEventTimeVeto ) { - LWHist::safeDelete(m_h_MNBLooseEventTimeVeto); - m_h_MNBLooseEventTimeVeto = nullptr; - } - - if ( m_h_SaturatedTight ) { - LWHist::safeDelete(m_h_SaturatedTight); - m_h_SaturatedTight = nullptr; - } - - if ( m_h_SaturatedTightTimeVeto ) { - LWHist::safeDelete(m_h_SaturatedTightTimeVeto); - m_h_SaturatedTightTimeVeto = nullptr; - } - - - for (partitionHistos* part : {&m_BarrelA, &m_BarrelC, &m_EMECA, &m_EMECC}) { - LWHist::safeDelete(part->h_NoisyEvent); - part->h_NoisyEvent = nullptr; + + // for (partitionHistos* part : {&m_BarrelA, &m_BarrelC, &m_EMECA, &m_EMECC}) { + for (int i=0;i<4;i++){ + LWHist::safeDelete(m_partHistos[i].h_NoisyEvent); + m_partHistos[i].h_NoisyEvent = nullptr; - LWHist::safeDelete(part->h_NoisyWEvent); - part->h_NoisyWEvent = nullptr; +// LWHist::safeDelete(part->h_NoisyWEvent); +// part->h_NoisyWEvent = nullptr; - LWHist::safeDelete(part->h_NoisyEventTimeVeto); - part->h_NoisyEventTimeVeto = nullptr; + LWHist::safeDelete(m_partHistos[i].h_NoisyEventTimeVeto); + m_partHistos[i].h_NoisyEventTimeVeto = nullptr; - LWHist::safeDelete(part->h_MNBTightEvent); - part->h_MNBTightEvent = nullptr; + LWHist::safeDelete(m_partHistos[i].h_MNBTightEvent); + m_partHistos[i].h_MNBTightEvent = nullptr; - LWHist::safeDelete(part->h_MNBTightEventTimeVeto); - part->h_MNBTightEventTimeVeto = nullptr; + LWHist::safeDelete(m_partHistos[i].h_MNBTightEventTimeVeto); + m_partHistos[i].h_MNBTightEventTimeVeto = nullptr; - LWHist::safeDelete(part->h_MNBLooseEvent); - part->h_MNBLooseEvent = nullptr; + LWHist::safeDelete(m_partHistos[i].h_MNBLooseEvent); + m_partHistos[i].h_MNBLooseEvent = nullptr; - LWHist::safeDelete(part->h_MNBLooseEventTimeVeto); - part->h_MNBLooseEventTimeVeto = nullptr; + LWHist::safeDelete(m_partHistos[i].h_MNBLooseEventTimeVeto); + m_partHistos[i].h_MNBLooseEventTimeVeto = nullptr; - LWHist::safeDelete(part->h_SaturatedNoisyEvent); - part->h_SaturatedNoisyEvent = nullptr; + LWHist::safeDelete(m_partHistos[i].h_SaturatedNoisyEvent); + m_partHistos[i].h_SaturatedNoisyEvent = nullptr; - LWHist::safeDelete(part->h_SaturatedNoisyEventTimeVeto); - part->h_SaturatedNoisyEventTimeVeto = nullptr; + LWHist::safeDelete(m_partHistos[i].h_SaturatedNoisyEventTimeVeto); + m_partHistos[i].h_SaturatedNoisyEventTimeVeto = nullptr; - LWHist::safeDelete(part->h_NoisyWEventTimeVeto); - part->h_NoisyWEventTimeVeto=nullptr; +// LWHist::safeDelete(part->h_NoisyWEventTimeVeto); +// part->h_NoisyWEventTimeVeto=nullptr; }