diff --git a/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py index a169df0c469cc9bc68ce7aa12504feb400b72ab9..d9e206e197495e9051271ee475e5122980b5fd06 100644 --- a/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArCollisionTimeMonAlg.py @@ -113,6 +113,7 @@ def LArCollisionTimeMonConfigCore(helper, algoinstance,inputFlags,larColTime_his title='Events with 20 ns < abs(<t_{C}> - <t_{A}>) < 30ns as a function of LB;Luminosity Block Number;Number of events per LB', type='TH1F', path=larColTime_hist_path, + opt='kAlwaysCreate', weight='weight', xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max) diff --git a/LArCalorimeter/LArMonitoring/python/LArDigitMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArDigitMonAlg.py index a82494bcbd55c7724208103c2f1f7668cfbddff0..65a6f8ea4cd206d12a9f491d2340789b34e31edf 100644 --- a/LArCalorimeter/LArMonitoring/python/LArDigitMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArDigitMonAlg.py @@ -149,20 +149,20 @@ def LArDigitMonConfigCore(helper, algoinstance,inputFlags): xbins=int(slot_n),xmin=slot_low,xmax=slot_up, ybins=int(ft_n), ymin=ft_low, ymax=ft_up) array.defineHistogram('Nullslot,NullFT,Nullweight;RAW_NullDigit', - title='% chan/FEB/events with min=0 ADC ', + title='% chan/FEB/events with min=0 ADC;Slot;FT', type='TProfile2D', path=hist_path, xbins=int(slot_n),xmin=slot_low,xmax=slot_up, ybins=int(ft_n), ymin=ft_low, ymax=ft_up) array.defineHistogram('Nullcrate,Nullchan;RAW_NullDigitChan', - title='% chan/FEB/events with min=0 ADC - All Gain - All Stream', + title='% chan/FEB/events with min=0 ADC - All Gain - All Stream;Crate;Channel', type='TH2I', path=hist_path, xbins=crates_n,xmin=crates_low,xmax=crates_up, ybins=chan_n, ymin=chan_low, ymax=chan_up) array.defineHistogram('slot,FT,MaxPos;RAW_AvePosMaxDig', - title='Average position of Max Digit ', + title='Average position of Max Digit;Slot;FT', type='TProfile2D', path=hist_path, xbins=int(slot_n),xmin=slot_low,xmax=slot_up, diff --git a/LArCalorimeter/LArMonitoring/python/LArDigitalTriggMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArDigitalTriggMonAlg.py index b7006219bafb169bb613720af882e8843d99180c..e4a415a6000c2d4c26cb02ab6d657ffe4ed136ae 100644 --- a/LArCalorimeter/LArMonitoring/python/LArDigitalTriggMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArDigitalTriggMonAlg.py @@ -1,6 +1,8 @@ # # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration # +from ROOT import TMath + def LArDigitalTriggMonConfigOld(inputFlags, topSequence): from AthenaMonitoring.AthMonitorCfgHelper import AthMonitorCfgHelperOld from LArMonitoring.LArMonitoringConf import LArDigitalTriggMonAlg @@ -23,6 +25,40 @@ def LArDigitalTriggMonConfig(inputFlags): def LArDigitalTriggMonConfigCore(helper, algoinstance,inputFlags): from LArMonitoring.GlobalVariables import lArDQGlobals + + from AthenaCommon.AlgSequence import AthSequencer + #from IOVDbSvc.CondDB import conddb + + #get SC onl-offl mapping from DB + from AthenaConfiguration.ComponentFactory import isRun3Cfg + folder="/LAR/Identifier/OnOffIdMap_SC" + persClass="AthenaAttributeList" + dbString="<db>COOLONL_LAR/CONDBR2</db>" + if isRun3Cfg(): + from AthenaConfiguration.ComponentFactory import CompFactory + try: + condLoader=helper.resobj.getCondAlgo("CondInputLoader") + except Exception: + from IOVDbSvc.IOVDbSvcConfig import IOVDbSvcCfg + helper.resobj.merge(IOVDbSvcCfg(inputFlags)) + condLoader=helper.resobj.getCondAlgo("CondInputLoader") + iovDbSvc=helper.resobj.getService("IOVDbSvc") + helper.resobj.addCondAlgo(CompFactory.LArOnOffMappingAlg("LArOnOffMappingAlgSC",ReadKey=folder, WriteKey="LArOnOffIdMapSC", isSuperCell=True)) + else: + from LArRecUtils.LArRecUtilsConf import LArOnOffMappingAlg#, LArFebRodMappingAlg, LArCalibLineMappingAlg + from AthenaCommon import CfgGetter + iovDbSvc=CfgGetter.getService("IOVDbSvc") + #from AthenaCommon.AlgSequence import AthSequencer + condSeq = AthSequencer("AthCondSeq") + if hasattr(condSeq,"LArOnOffMappingAlgSC") : + return #Already there.... + #folder="/LAR/IdentifierOfl/OnOffIdMap_SC" + #conddb.addFolder("","<db>sqlite://;schema=/det/lar/project/databases/OnOffIdMap_SC.db;dbname=OFLP200</db>"+folder,className="AthenaAttributeList",forceMC=True) + #conddb.addOverride(folder,"LARIdentifierOflOnOffIdMap_SC-000") + condLoader=condSeq.CondInputLoader + condSeq+=LArOnOffMappingAlg("LArOnOffMappingAlgSC",ReadKey=folder, WriteKey="LArOnOffIdMapSC", isSuperCell=True) + iovDbSvc.Folders.append(folder+dbString) + condLoader.Load.append((persClass,folder)) larDigitalTriggMonAlg = helper.addAlgorithm(algoinstance,'larDigitalTriggMonAlg') @@ -31,7 +67,6 @@ def LArDigitalTriggMonConfigCore(helper, algoinstance,inputFlags): # uncomment if needed: #larDigitalTriggMonAlg.FileKey="CombinedMonitoring" - SCGroup = helper.addGroup( larDigitalTriggMonAlg, SCGroupName, @@ -67,99 +102,191 @@ def LArDigitalTriggMonConfigCore(helper, algoinstance,inputFlags): phi+=1 - SCGroup.defineHistogram('Mmaxpos,Mpartition;h_maxposPart', + SCGroup.defineHistogram('Mmaxpos,Mpartition;Partition_maxSamplePosition', title='Partition vs. position of max sample', type='TH2F', path=sc_hist_path, xbins=32,xmin=0.5,xmax=32.5, ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5, - xlabels=["1","2","3","4","5"],ylabels=lArDQGlobals.Partitions) + xlabels = [str(x) for x in range(1,33)], + ylabels=lArDQGlobals.Partitions) - SCGroup.defineHistogram('Msampos,MADC;h_ADCsampos', - title='ADC vs sample position', + SCGroup.defineHistogram('Msampos,MADC;ADC_samplePosition', + title='ADC (zoom) vs sample position', type='TH2F', path=sc_hist_path, xbins=32,xmin=0.5,xmax=32.5, - ybins=400, ymin=500, ymax=1300)#, + xlabels = [str(x) for x in range(1,33)], + ybins=750, ymin=0, ymax=1300) #start from 0 otherwise miss endcap pedestals - SCGroup.defineHistogram('Msampos,MADC;h_ADCFullRangesampos', + SCGroup.defineHistogram('Msampos,MADC;ADCFullRange_samplePosition', title='ADC vs sample position', type='TH2F', path=sc_hist_path, xbins=32,xmin=0.5,xmax=32.5, - ybins=4000, ymin=0, ymax=40000)#, + xlabels = [str(x) for x in range(1,33)], + ybins=500, ymin=0, ymax=5000) #raw ADC is 12 bit - SCGroup.defineHistogram('MlatomeSourceIdBIN,Mmaxpos;h_maxposLatID', - title='Position of max sample vs. LATOME', + SCGroup.defineHistogram('MlatomeSourceIdBIN,Mmaxpos;MaxSamplePosition_LATOME', + title='Position of max sample vs. LATOME name', type='TH2F', path=sc_hist_path, - xbins=NLatomeBins,xmin=0,xmax=NLatomeBins, - ybins=5,ymin=0.5,ymax=5.5, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=32,ymin=0.5,ymax=32.5, xlabels=BinLabel, - ylabels=["1","2","3","4","5"]) + ylabels = [str(x) for x in range(1,33)]) + + SCGroup.defineHistogram('MlatomeSourceIdBIN,MADC;ADC_LATOME', + title='ADC (zoom) vs LATOME name', + type='TH2F', + path=sc_hist_path, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=750, ymin=0, ymax=1300, + xlabels=BinLabel) - SCGroup.defineHistogram('MlatomeSourceIdBIN,MADC;h_ADCLatID', - title='ADC vs LATOME', + SCGroup.defineHistogram('MlatomeSourceIdBIN,MADC;ADCFullRange_LATOME', + title='ADC vs LATOME name', type='TH2F', path=sc_hist_path, - xbins=NLatomeBins,xmin=0,xmax=NLatomeBins, - ybins=400, ymin=500, ymax=1300, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=500, ymin=0, ymax=5000, #raw ADC is 12 bit xlabels=BinLabel) - SCGroup.defineHistogram('MlatomeSourceIdBIN,MADC;h_ADCFullRangeLatID', - title='ADC vs LATOME', + + #have to make plots per sampling and per subdetector, as in LArCoverageAlg, also update GlobalVariables.py + SCGroup.defineHistogram('MSCeta,MSCphi;Coverage_eta_phi', + title='SC coverage: #phi vs #eta;#eta;#phi', + type='TH2F', + path=sc_hist_path, + xbins=400, xmin=-5, xmax=5, #smallest eta bin size 0.025 + ybins=64, ymin=-TMath.Pi(), ymax=TMath.Pi()) #at most 64 phi bins of 0.1 size + + #NEW + #for part in LArDigitalTriggMonAlg.LayerNames: + for part in ["EMBPA", "EMBPC", "EMB1A", "EMB1C", "EMB2A", "EMB2C", "EMB3A", "EMB3C", "HEC0A", "HEC0C", "HEC1A", "HEC1C", "HEC2A", "HEC2C", "HEC3A", "HEC3C", "EMECPA", "EMECPC", "EMEC1A", "EMEC1C", "EMEC2A", "EMEC2C", "EMEC3A", "EMEC3C", "FCAL1A", "FCAL1C", "FCAL2A", "FCAL2C", "FCAL3A", "FCAL3C"]: + Part = part[:-2] + if Part == "FCAL": + Part = "FCal" + Side = part[-1] + Sampling = part[-2] + if Sampling == "P": + Sampling = "0" + + + SCGroup.defineHistogram('superCellEta_'+part+',superCellPhi_'+part+';CoverageEtaPhi_'+part, + title='SC coverage '+part+': #phi vs #eta;#eta;#phi', + type='TH2F', + path=sc_hist_path+'CoveragePerPartition/NoCut', + xbins=lArDQGlobals.Cell_Variables["etaRange"][Part][Side][Sampling], + ybins=lArDQGlobals.Cell_Variables["phiRange"][Part][Side][Sampling]) + + SCGroup.defineHistogram('eta_digi_'+part+',phi_digi_'+part+';CoverageEtaPhi_CutADC_'+part, + title='SC coverage '+part+': #phi vs #eta with adc[max]-adc[0]>15;#eta;#phi', + type='TH2F', + path=sc_hist_path+'CoveragePerPartition/CutADC', + xbins=lArDQGlobals.Cell_Variables["etaRange"][Part][Side][Sampling], + ybins=lArDQGlobals.Cell_Variables["phiRange"][Part][Side][Sampling]) + + + + # --> IT SEEMS TH3 IS NOT IMPLEMENTED YET... + #SCGroup.defineHistogram('superCellEta_Et10_'+part+',superCellPhi_Et10_'+part+',superCellEt_Et10_'+part+';CoverageEtaPhi_Et10_'+part, + # title='SC Energy $E_T>10$ coverage'+part+': #phi vs #eta;#eta;#phi;$E_T$', + # type='TH3F', + # path=sc_hist_path, + # xbins=lArDQGlobals.Cell_Variables["etaRange"][Part][Side][Sampling], + # ybins=lArDQGlobals.Cell_Variables["phiRange"][Part][Side][Sampling]) + + #SCGroup.defineHistogram('superCellEta_'+part+',superCellPhi_'+part+',superCellEt_'+part+';CoverageEtaPhi_'+part, + # title='SC Energy coverage'+part+': #phi vs #eta;#eta;#phi;$E_T$', + # type='TH3F', + # path=sc_hist_path, + # xbins=lArDQGlobals.Cell_Variables["etaRange"][Part][Side][Sampling], + # ybins=lArDQGlobals.Cell_Variables["phiRange"][Part][Side][Sampling]) + + SCGroup.defineHistogram('superCellEta_EtCut_'+part+',superCellPhi_EtCut_'+part+';CoverageEtaPhi_EtCut_'+part, + title='SC coverage E_T>1GeV '+part+': #phi vs #eta;#eta;#phi', + type='TH2F', + path=sc_hist_path+'CoveragePerPartition/CutET', + xbins=lArDQGlobals.Cell_Variables["etaRange"][Part][Side][Sampling], + ybins=lArDQGlobals.Cell_Variables["phiRange"][Part][Side][Sampling]) + + + for layer in ["0","1","2","3"]: + SCGroup.defineHistogram('MlatomeSourceIdBIN_'+layer+',Mmaxpos_'+layer+';MaxSamplePosition_LATOME_Layer'+layer, + title='Position of max sample vs. LATOME in layer '+layer, type='TH2F', path=sc_hist_path, - xbins=NLatomeBins,xmin=0,xmax=NLatomeBins, - ybins=1000, ymin=0, ymax=40000, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=32,ymin=0.5,ymax=32.5, + xlabels=BinLabel, + ylabels = [str(x) for x in range(1,33)]) + + SCGroup.defineHistogram('MlatomeSourceIdBIN_'+layer+'_cut,Mmaxpos_'+layer+'_cut'+';MaxSamplePosition_LATOME_Layer'+layer+'_cut', + title='Position of max sample vs. LATOME in layer '+layer+' with adc[max]-adc[0]>15', + type='TH2F', + path=sc_hist_path, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=32,ymin=0.5,ymax=32.5, + xlabels=BinLabel, + ylabels = [str(x) for x in range(1,33)]) + + + SCGroup.defineHistogram('MlatomeSourceIdBIN,MSCChannel;Coverage_SCchan_LATOME', + title='SC coverage: channel vs LATOME name', + type='TH2F', + path=sc_hist_path, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, + ybins=360,ymin=1,ymax=360, xlabels=BinLabel) - SCGroup.defineHistogram('MlatomeSourceIdBIN,MSCeT;h_eTLatID', - title='SC eT [MeV] vs LATOME', + SCGroup.defineHistogram('MlatomeSourceIdBIN,MSCeT;SCeT_LATOME', + title='SC eT [MeV] vs LATOME name', type='TH2F', path=sc_hist_path, - xbins=NLatomeBins,xmin=0,xmax=NLatomeBins, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, ybins=400, ymin=0, ymax=400000, xlabels=BinLabel) - SCGroup.defineHistogram('MlatomeSourceIdBIN,MSCsatur;h_saturLatID', - title='SC saturation vs LATOME', + + SCGroup.defineHistogram('MlatomeSourceIdBIN,MSCsatur;SCsaturation_LATOME', + title='SC saturation vs LATOME name', type='TH2F', path=sc_hist_path, - xbins=NLatomeBins,xmin=0,xmax=NLatomeBins, + xbins=NLatomeBins,xmin=1,xmax=NLatomeBins+1, ybins=3, ymin=-0.5, ymax=2.5, xlabels=BinLabel, ylabels=["0","1","2"]) - SCGroup.defineHistogram('MSCsatur;h_satur', + SCGroup.defineHistogram('MSCsatur;SCsaturation', title='SC saturation', type='TH1F', path=sc_hist_path, xbins=3, xmin=0, xmax=3) - SCGroup.defineHistogram('MSCeT;h_eT', + SCGroup.defineHistogram('MSCeT;SCeT', title='SC eT [MeV]', type='TH1F', path=sc_hist_path, xbins=400, xmin=0, xmax=400000) - SCGroup.defineHistogram('MNsamples;h_Nsamples', + SCGroup.defineHistogram('MNsamples;SCNsamples', title='Nsamples', type='TH1F', path=sc_hist_path, xbins=40,xmin=1,xmax=40) - SCGroup.defineHistogram('MlatomeChannel;h_latomeChannel', - title='LATOME Channel', + SCGroup.defineHistogram('MSCChannel;SCchannel', + title='SC Channel number', type='TH1F', path=sc_hist_path, xbins=360,xmin=1,xmax=360) - SCGroup.defineHistogram('MlatomeSourceId;h_latomeID', + SCGroup.defineHistogram('MlatomeSourceId;LATOMEsourceID', title='LATOME sourceID', type='TH1F', path=sc_hist_path, @@ -172,35 +299,47 @@ def LArDigitalTriggMonConfigCore(helper, algoinstance,inputFlags): if __name__=='__main__': + #import os from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaCommon.Logging import log - from AthenaCommon.Constants import DEBUG ,WARNING + from AthenaCommon.Constants import DEBUG, ERROR #WARNING, from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=1 log.setLevel(DEBUG) - - + + #from LArMonitoring.LArMonitoringConf import LArSuperCellMonAlg from LArMonitoring.LArMonConfigFlags import createLArMonConfigFlags createLArMonConfigFlags() - from AthenaConfiguration.TestDefaults import defaultTestFiles - ConfigFlags.Input.Files = defaultTestFiles.RAW - + ConfigFlags.Input.Files = ["/eos/atlas/atlastier0/rucio/data21_idcomm/physics_CosmicCalo/00401410/data21_idcomm.00401410.physics_CosmicCalo.merge.RAW/data21_idcomm.00401410.physics_CosmicCalo.merge.RAW._lb0722._SFO-ALL._0001.1"] + ConfigFlags.Output.HISTFileName = 'LArDigitalTriggMonOutput.root' ConfigFlags.DQ.enableLumiAccess = False ConfigFlags.DQ.useTrigger = False ConfigFlags.Beam.Type = 'collisions' ConfigFlags.lock() + # in case of tier0 workflow: from CaloRec.CaloRecoConfig import CaloRecoCfg cfg=CaloRecoCfg(ConfigFlags) + #from AthenaCommon.AppMgr import (ServiceMgr as svcMgr,ToolSvc) + from LArByteStream.LArRawSCDataReadingConfig import LArRawSCDataReadingCfg + SCData_acc = LArRawSCDataReadingCfg(ConfigFlags) + SCData_acc.OutputLevel=DEBUG + + cfg.merge(SCData_acc) + + aff_acc = LArDigitalTriggMonConfig(ConfigFlags) cfg.merge(aff_acc) + + cfg.getCondAlgo("LArHVCondAlg").OutputLevel=ERROR + #cfg.getEventAlgo("LArHVCondAlg").OutputLevel=ERROR ConfigFlags.dump() f=open("LArDigitalTriggMon.pkl","wb") cfg.store(f) f.close() - cfg.run(100,OutputLevel=WARNING) + diff --git a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py index 4d88a4844ae57b03142cc16ca11b00e8b0620956..7c76c90116aedb49d2eb6276dd7ae1651e9d0703 100644 --- a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py @@ -117,7 +117,7 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu path=summary_hist_path, xbins=lArDQGlobals.N_FEB+11, xmin=-0.5, xmax=lArDQGlobals.N_FEB+10+0.5) Group.defineHistogram('nbFEBpart,part;NbOfEvts2d', - title='# of readout FEB/DSP header:Num. FEBs:Partition', + title='# of readout FEB/DSP header;Num. FEBs;Partition', type='TH2I', path=summary_hist_path, xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max-0.5, @@ -132,13 +132,13 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu ybins=lArDQGlobals.N_Partitions, ymin=-0.5, ymax=lArDQGlobals.N_Partitions-0.5, xlabels=lArDQGlobals.FEBErrors, ylabels=lArDQGlobals.Partitions) Group.defineHistogram('dspThrADC;dspThresholdsADC', - title='DSP thresholds to readout samples:Number of cells:Cell threshold in ADC counts', + title='DSP thresholds to readout samples;Number of cells;Cell threshold in ADC counts', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.DSPThr_Bins+1, xmin=-0.5, xmax=lArDQGlobals.DSPThr_Bins+0.5, merge='identical') Group.defineHistogram('dspThrQT;dspThresholds_qfactortime', - title='DSP thresholds to readout (qfactor+time):Number of cells:Cell threshold in ADC counts', + title='DSP thresholds to readout (qfactor+time);Number of cells;Cell threshold in ADC counts', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.DSPThr_Bins+1, xmin=-0.5, xmax=lArDQGlobals.DSPThr_Bins+0.5, @@ -150,12 +150,12 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu xbins=lArDQGlobals.Evt_Bins, xmin=lArDQGlobals.Evt_Min, xmax=lArDQGlobals.Evt_Max, xlabels=lArDQGlobals.Evt_labels) Group.defineHistogram('LVL1Trig;TriggerWord', - title='Number of Events per L1 trigger word (8 bits):L1 trigger word', + title='Number of Events per L1 trigger word (8 bits);L1 trigger word', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.L1Trig_Bins, xmin=lArDQGlobals.L1Trig_Min, xmax=lArDQGlobals.L1Trig_Max) Group.defineHistogram('LVL1TrigAllDSP;TriggerWordAllDSP', - title='Number of L1 trigger word per DSP (8 bits):L1 trigger word', + title='Number of L1 trigger word per DSP (8 bits);L1 trigger word', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.L1Trig_Bins, xmin=lArDQGlobals.L1Trig_Min, xmax=lArDQGlobals.L1Trig_Max) @@ -166,43 +166,43 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu xbins=lArDQGlobals.EvtRej_Bins, xmin=lArDQGlobals.EvtRej_Min, xmax=lArDQGlobals.EvtRej_Max, xlabels=lArDQGlobals.EvtRej_labels) Group.defineHistogram('EvtRej,EvtRejYield1D;EventsRejectedYield', - title='Data corruption yield:Corruption type:Yield(%)', + title='Data corruption yield;Corruption type;Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.EvtRej_Bins-1, xmin=lArDQGlobals.EvtRej_Min, xmax=lArDQGlobals.EvtRej_Max-1, xlabels=lArDQGlobals.EvtRejYield_labels) Group.defineHistogram('LB0,EvtRejYield;RAW_YieldOfRejectedEventsVsLB', - title='Yield of corrupted events (DATACORRUPTED):Luminosity Block:Yield(%)', + title='Yield of corrupted events (DATACORRUPTED);Luminosity Block;Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram('LB0,EvtRejYieldOut;RAW_YieldOfRejectedEventsVsLBout', - title='Yield of corrupted events (DATACORRUPTED) not vetoed by time window:Luminosity Block:Yield(%)', + title='Yield of corrupted events (DATACORRUPTED) not vetoed by time window;Luminosity Block;Yield(%)', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram('rejBits;rejectionBits', - title='Errors at the origin of event rejection:Bits:Number of (rejected) events', + title='Errors at the origin of event rejection;Bits;Number of (rejected) events', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.rejBits_Bins, xmin=-0.5, xmax=lArDQGlobals.rejBits_Bins-0.5) Group.defineHistogram('LB0;NbOfEventsVsLB', - title='Nb of events per LB:Luminosity Block', + title='Nb of events per LB;Luminosity Block', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram('NbOfSweet2;NbOfSw2', - title='# of cells with samples readout:Number of cells:Number of events', + title='# of cells with samples readout;Number of cells;Number of events', type='TH1I', path=summary_hist_path, xbins=int(lArDQGlobals.N_Cells/10), xmin=-1000, xmax=lArDQGlobals.N_Cells-1000) Group.defineHistogram('LB0,LArEvSize;eventSizeVsLB', - title='LAr event size (w/o ROS headers):Luminosity Block:Megabytes', + title='LAr event size (w/o ROS headers);Luminosity Block;Megabytes', type='TProfile', path=summary_hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) Group.defineHistogram('NbOfSamp;NbOfSamples', - title='# of samples (1st readout FEB):Samples:Number of events', + title='# of samples (1st readout FEB);Samples;Number of events', type='TH1I', path=summary_hist_path, xbins=lArDQGlobals.Samples_Bins, xmin=lArDQGlobals.Samples_Min, xmax=lArDQGlobals.Samples_Max) @@ -244,139 +244,142 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu darray = helper.addArray([lArDQGlobals.Partitions[2*subdet:2*subdet+2]],larFEBMonAlg,lArDQGlobals.SubDet[subdet]) darray.defineHistogram('slotPar,FTPar;RAW_Parity', - title='Parity error:Slot:FT', + title='Parity error;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotBcid,FTBcid;RAW_BCID', - title='BCID mismatch betw. 2 halves of FEB:Slot:FT', + title='BCID mismatch betw. 2 halves of FEB;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotRadd,FTRadd;RAW_RADD', - title='Sample header mismatch betw. 2 halves of FEB:Slot:FT', + title='Sample header mismatch betw. 2 halves of FEB;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotEvtid,FTEvtid;RAW_EVTID', - title='EVTID mismatch betw. 2 halves of FEB:Slot:FT', + title='EVTID mismatch betw. 2 halves of FEB;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotScac,FTScac;RAW_SCACStatus', - title='Wrong SCAC status in one half of a FEB:Slot:FT', + title='Wrong SCAC status in one half of a FEB;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotscout,FTscout;RAW_scaOutOfRange', - title='Sca out of range:Slot:FT', + title='Sca out of range;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotgain,FTgain;RAW_gainMismatch', - title='Gain mismatch within time samples:Slot:FT', + title='Gain mismatch within time samples;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slottype,FTtype;RAW_typeMismatch', - title='Event type mismatch:Slot:FT', + title='Event type mismatch;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotsmp,FTsmp;RAW_badNbOfSamp', - title='Non uniform number of samples:Slot:FT', + title='Non uniform number of samples;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotzero,FTzero;RAW_zeroSamp', - title='Empty FEB data blocks:Slot:FT', + title='Empty FEB data blocks;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotsum,FTsum;RAW_checkSum', - title='Checksum / DSP block size:Slot:FT', + title='Checksum / DSP block size;Slot;FT', type='TH2I', path=hist_path, + opt='kAlwaysCreate', xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotmis,FTmis;RAW_missingHeader', - title='Missing header :Slot:FT', + title='Missing header ;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotgain,FTgain;RAW_badGain', - title='Bad gain :Slot:FT', + title='Bad gain ;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotabs,FTabs;RAW_LArFEBMonErrorsAbsolute', - title='Nb of events with at least one error :Slot:FT', + title='Nb of events with at least one error ;Slot;FT', type='TH2I', path=hist_path, + opt='kAlwaysCreate', xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotmist,FTmist;RAW_missingTriggerType', - title='LVL1 trigger type missing or different from event type :Slot:FT', + title='LVL1 trigger type missing or different from event type ;Slot;FT', type='TH2I', path=hist_path, + opt='kAlwaysCreate', xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotnb,FTnb;RAW_nbOfEvts', - title='Nb of events (DSP header check only) :Slot:FT', + title='Nb of events (DSP header check only) ;Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotnb,FTnb,weightsweet1;RAW_NbOfSweet1PerFEB', - title='Average # of cells with (qfactor+time) readout :Slot:FT', + title='Average # of cells with (qfactor+time) readout ;Slot;FT', type='TProfile2D', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('slotnb,FTnb,weightsweet2;RAW_NbOfSweet2PerFEB', - title='Average # of cells with samples readout :Slot:FT', + title='Average # of cells with samples readout ;Slot;FT', type='TProfile2D', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, ybins=ft_n, ymin=ft_low, ymax=ft_up) darray.defineHistogram('nbFEBpart;nbOfFebBlocks', - title='# of readout FEBs (DSP header check only) :Slot:FT', + title='# of readout FEBs (DSP header check only) ;Slot;FT', type='TH1I', path=hist_path, xbins=lArDQGlobals.N_FEB_Parttions_Max, xmin=-0.5, xmax=lArDQGlobals.N_FEB_Parttions_Max-0.5) darray.defineHistogram('slotMasked,FTMasked;RAW_knownFaultyFEB', - title='FEB with known errors (1:err. ignored 2:FEB masked):Slot:FT', + title='FEB with known errors (1:err. ignored 2:FEB masked);Slot;FT', type='TH2I', path=hist_path, xbins=slot_n,xmin=slot_low,xmax=slot_up, @@ -384,7 +387,7 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu merge='identical') darray.defineHistogram('LB,LArEvSizePart;eventSizeVsLB', - title='LAr event size per LB (w/o ROS headers):Luminosity Block', + title='LAr event size per LB (w/o ROS headers);Luminosity Block', type='TProfile', path=hist_path, xbins=lArDQGlobals.LB_Bins, xmin=lArDQGlobals.LB_Min, xmax=lArDQGlobals.LB_Max) diff --git a/LArCalorimeter/LArMonitoring/python/LArHVCorrMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArHVCorrMonAlg.py index ef28e4e5e1da53fe360e47ca39335d37af90ae08..7caf4699f9a01520750b72d779606ba7190aaeac 100644 --- a/LArCalorimeter/LArMonitoring/python/LArHVCorrMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArHVCorrMonAlg.py @@ -65,6 +65,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - EMBA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrEMBA', xbins=int(lArDQGlobals.HVeta_EMB["EMBAPS"][2]/delta_eta),xmin=lArDQGlobals.HVeta_EMB["EMBAPS"][1],xmax=lArDQGlobals.HVeta_EMB["EMBAPS"][2], ybins=lArDQGlobals.HVphi_EMB["EMBAPS"][0],ymin=lArDQGlobals.HVphi_EMB["EMBAPS"][1],ymax=lArDQGlobals.HVphi_EMB["EMBAPS"][2], @@ -74,6 +75,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - EMBA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrEMBC', xbins=int(lArDQGlobals.HVeta_EMB["EMBAPS"][2]/delta_eta),xmax=lArDQGlobals.HVeta_EMB["EMBAPS"][1]-0.01,xmin=-lArDQGlobals.HVeta_EMB["EMBAPS"][2]-0.01, ybins=lArDQGlobals.HVphi_EMB["EMBAPS"][0],ymin=lArDQGlobals.HVphi_EMB["EMBAPS"][1],ymax=lArDQGlobals.HVphi_EMB["EMBAPS"][2], @@ -98,6 +100,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - EMECA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrEMECA', xbins=lArDQGlobals.HVeta_EMEC["EMECA"], ybins=lArDQGlobals.HVphi_EMEC["EMECA"], @@ -107,6 +110,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - EMECA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrEMECC', xbins=lArDQGlobals.HVeta_EMEC["EMECC"], ybins=lArDQGlobals.HVphi_EMEC["EMECC"], @@ -131,6 +135,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - HECA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrHECA', xbins=lArDQGlobals.HVeta_HECFcal["HECA"][0],xmin=lArDQGlobals.HVeta_HECFcal["HECA"][1], xmax=lArDQGlobals.HVeta_HECFcal["HECA"][2], ybins=lArDQGlobals.HVphi_HECFcal["HECA"][0], ymin=lArDQGlobals.HVphi_HECFcal["HECA"][1], ymax=lArDQGlobals.HVphi_HECFcal["HECA"][2], @@ -140,6 +145,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - HECA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrHECC', xbins=lArDQGlobals.HVeta_HECFcal["HECC"][0],xmin=lArDQGlobals.HVeta_HECFcal["HECC"][1], xmax=lArDQGlobals.HVeta_HECFcal["HECC"][2], ybins=lArDQGlobals.HVphi_HECFcal["HECC"][0], ymin=lArDQGlobals.HVphi_HECFcal["HECC"][1], ymax=lArDQGlobals.HVphi_HECFcal["HECC"][2], @@ -164,6 +170,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - FCALA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrFCALA', xbins=lArDQGlobals.HVeta_HECFcal["FCalA"][0],xmin=lArDQGlobals.HVeta_HECFcal["FCalA"][1], xmax=lArDQGlobals.HVeta_HECFcal["FCalA"][2], ybins=lArDQGlobals.HVphi_HECFcal["FCalA"][0], ymin=lArDQGlobals.HVphi_HECFcal["FCalA"][1], ymax=lArDQGlobals.HVphi_HECFcal["FCalA"][2], @@ -173,6 +180,7 @@ def LArHVCorrMonConfigCore(helper, algoinstance,inputFlags): title='HV deviation (nominal - corrected) - FCALA;#eta;#phi', type='TH2F', path=larHVCorr_hist_path, + opt='kAlwaysCreate', weight='hvcorrFCALC', xbins=lArDQGlobals.HVeta_HECFcal["FCalC"][0],xmin=lArDQGlobals.HVeta_HECFcal["FCalC"][1], xmax=lArDQGlobals.HVeta_HECFcal["FCalC"][2], ybins=lArDQGlobals.HVphi_HECFcal["FCalC"][0], ymin=lArDQGlobals.HVphi_HECFcal["FCalC"][1], ymax=lArDQGlobals.HVphi_HECFcal["FCalC"][2], diff --git a/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py index 22f3ed02393b24606ce20d36ba93cea44a2e4872..31c6b81248484cf492cbaa03bf6cd8f81fcf993d 100644 --- a/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py @@ -79,30 +79,29 @@ def LArNoisyROMonConfigCore(helper,algoinstance,inputFlags, LArNoisyROMonForceTrigger = False EFNoiseBurstTriggersList=[ - "EF_j165_u0uchad_LArNoiseBurst", - "EF_j30_u0uchad_empty_LArNoiseBurst", - "EF_j55_u0uchad_firstempty_LArNoiseBurst", - "EF_j55_u0uchad_empty_LArNoiseBurst", - "EF_xe45_LArNoiseBurst", - "EF_xe55_LArNoiseBurst", - "EF_xe60_LArNoiseBurst", - "EF_j55_u0uchad_firstempty_LArNoiseBurstT", - "EF_j100_u0uchad_LArNoiseBurstT", - "EF_j165_u0uchad_LArNoiseBurstT", - "EF_j130_u0uchad_LArNoiseBurstT", - "EF_j35_u0uchad_empty_LArNoiseBurst", - "EF_j35_u0uchad_firstempty_LArNoiseBurst", - "EF_j80_u0uchad_LArNoiseBurstT" + "HLT_larnoiseburst_L1XE60", + "HLT_larnoiseburst_L1XE70", + "HLT_larnoiseburst_L1XE80", + "HLT_larnoiseburst_L1J100", + "HLT_larnoiseburst_L1J40_XE60", + "HLT_larnoiseburst_L1J40_XE50", + "HLT_larpsall_L1J12_FIRSTEMPTY", + "HLT_larpsall_L1J30_FIRSTEMPTY", + "HLT_larpsallem_L1EM7_FIRSTEMPTY" ] L1NoiseBurstTriggersList = [ "L1_J75", + "L1_J100", + "L1_J40_XE50", + "L1_J40_XE60", "L1_J10_EMPTY", - "L1_J30_FIRSTEMPTY", "L1_J30_EMPTY", - "L1_XE40", - "L1_XE50", - "L1_XE50_BGRP7", - "L1_XE70" + "L1_EM7_FIRSTEMPTY", + "L1_J12_FIRSTEMPTY", + "L1_J30_FIRSTEMPTY", + "L1_XE60", + "L1_XE70", + "L1_XE80" ] doTrigger=False if isRun3Cfg(): diff --git a/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py index f165ff8e24d2c3b12bad9b7b77372b5ddca48500..5622cd42be76d60555252ffe3445fd443e1797e5 100644 --- a/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArRODMonAlg.py @@ -112,16 +112,16 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb path=summary_hist_path, xbins=lArDQGlobals.DSPTime_Bins, xmin=lArDQGlobals.DSPTime_Min, xmax=lArDQGlobals.DSPTime_Max) Group.defineHistogram('Qdiff;Q_all', - title='Q_offline - Q_online / #sqrt{Q_offline} for all partitions;Q_offline - Q_online / sqrt{Q_offline} (ps)', + title='Q_offline - Q_online / sqrt(Q_offline) for all partitions;Q_offline - Q_online / sqrt(Q_offline) (ps)', type='TH1F', path=summary_hist_path, xbins=lArDQGlobals.DSPQuality_Bins, xmin=lArDQGlobals.DSPQuality_Min, xmax=lArDQGlobals.DSPQuality_Max) #Infos histos (vs. LB) info_hist_path='Infos/' - cut = "#delta ADC>"+str(larRODMonAlg.ADCthreshold)+" and |t_offline| < "+str(larRODMonAlg.peakTimeCut)+" ns" + cut = "#delta ADC>"+str(larRODMonAlg.ADCthreshold)+" and |T_offline| < "+str(larRODMonAlg.peakTimeCut)+" ns" Group.defineHistogram('LBN,partitionI;EErrorsPerLB', - title='Nb of errors in E per LB - ' +cut+':Luminosity Block:Partition', + title='Nb of errors in E per LB -' +cut+';Luminosity Block;Partition', type='TH2I', weight='numE', path=info_hist_path, @@ -130,7 +130,7 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb ylabels = lArDQGlobals.Partitions ) Group.defineHistogram('LBN,partitionI;TErrorsPerLB', - title='Nb of errors in T per LB - ' +cut+':Luminosity Block:Partition', + title='Nb of errors in T per LB - ' +cut+';Luminosity Block;Partition', type='TH2I', weight='numT', path=info_hist_path, @@ -139,7 +139,7 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb ylabels = lArDQGlobals.Partitions ) Group.defineHistogram('LBN,partitionI;QErrorsPerLB', - title='Nb of errors in Q per LB - ' +cut+':Luminosity Block:Partition', + title='Nb of errors in Q per LB - ' +cut+';Luminosity Block;Partition', type='TH2I', weight='numQ', path=info_hist_path, @@ -151,13 +151,13 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb #DQMD histos dqmd_hist_path='/LAr/DSPMonitoring/DQMD/' darray = helper.addArray([lArDQGlobals.Partitions],larRODMonAlg,"RODMon") - darray.defineHistogram('Ediff,Erange;DE_ranges', title='EOnline - E_offline for all ranges : E_offline - E_online (MeV) : Energy range',#'E_online - E_offline for all ranges : E_offline - E_online (MeV) : Energy range', + darray.defineHistogram('Ediff,Erange;DE_ranges', title='E_offline - E_online for all ranges ; E_offline - E_online (MeV) ; Energy range', type='TH2F', path=dqmd_hist_path, xbins=lArDQGlobals.DSP1Energy_Bins, xmin=lArDQGlobals.DSP1Energy_Min, xmax=lArDQGlobals.DSP1Energy_Max, ybins=lArDQGlobals.DSPRanges_Bins, ymin=lArDQGlobals.DSPRanges_Min, ymax=lArDQGlobals.DSPRanges_Max, ylabels=lArDQGlobals.DSPRanges ) - Group.defineHistogram('Ediff,Erange;E_ranges_all', title='E_online - E_offline for all ranges : E_offline - E_online (MeV) : Energy range', + Group.defineHistogram('Ediff,Erange;E_ranges_all', title='E_online - E_offline for all ranges ; E_offline - E_online (MeV) ; Energy range', type='TH2F', path='DQMD/', xbins=lArDQGlobals.DSP1Energy_Bins, xmin=lArDQGlobals.DSP1Energy_Min, xmax=lArDQGlobals.DSP1Energy_Max, ybins=lArDQGlobals.DSPRanges_Bins, ymin=lArDQGlobals.DSPRanges_Min, ymax=lArDQGlobals.DSPRanges_Max, @@ -167,50 +167,53 @@ def LArRODMonConfigCore(helper, algoinstance,inputFlags, cellDebug=False, dspDeb #per partition, currently in one dir only part_hist_path='/LAr/DSPMonitoring/perPartition/' - darray.defineHistogram('Ediff;DE', title='E_offline - E_online:E_offline - E_online', + darray.defineHistogram('Ediff;DE', title='E_offline - E_online;E_offline - E_online (MeV)', type='TH1F', path=part_hist_path, xbins=lArDQGlobals.DSPEnergy_Bins, xmin=lArDQGlobals.DSPEnergy_Min, xmax=lArDQGlobals.DSPEnergy_Max) - darray.defineHistogram('Tdiff;DT', title='T_offline - T_online:T_offline - T_online', + darray.defineHistogram('Tdiff;DT', title='T_offline - T_online;T_offline - T_online (ps)', type='TH1F', path=part_hist_path, xbins=lArDQGlobals.DSPTime_Bins, xmin=lArDQGlobals.DSPTime_Min, xmax=lArDQGlobals.DSPTime_Max) - darray.defineHistogram('Qdiff;DG', title='Q_offline - Q_online:Q_offline - Q_online / #sqrtQ_offline' , + darray.defineHistogram('Qdiff;DQ', title='Q_offline - Q_online / sqrt(Q_offline);Q_offline - Q_online / sqrt(Q_offline)' , type='TH1F', path=part_hist_path, xbins=lArDQGlobals.DSPTime_Bins, xmin=lArDQGlobals.DSPTime_Min, xmax=lArDQGlobals.DSPTime_Max) - darray.defineHistogram('slot,FT;RAW_Out_E_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision : Slot : Feedthrough', + darray.defineHistogram('slot,FT;RAW_Out_E_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision ; Slot ; Feedthrough', type='TH2I', path=part_hist_path, + opt='kAlwaysCreate', weight='weight_e', xbins=lArDQGlobals.FEB_Slot["EMECA"][1], xmin=lArDQGlobals.FEB_Slot["EMECA"][0]-0.5, xmax=lArDQGlobals.FEB_Slot["EMECA"][1]+0.5, ybins=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+1, ymin=lArDQGlobals.FEB_Feedthrough["EMBA"][0]-0.5, ymax=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+0.5) - darray.defineHistogram('slot,FT;RAW_Out_T_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision : Slot : Feedthrough', + darray.defineHistogram('slot,FT;RAW_Out_T_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision ; Slot ; Feedthrough', type='TH2I', path=part_hist_path, + opt='kAlwaysCreate', weight='weight_t', xbins=lArDQGlobals.FEB_Slot["EMECA"][1], xmin=lArDQGlobals.FEB_Slot["EMECA"][0]-0.5, xmax=lArDQGlobals.FEB_Slot["EMECA"][1]+0.5, ybins=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+1, ymin=lArDQGlobals.FEB_Feedthrough["EMBA"][0]-0.5, ymax=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+0.5) - darray.defineHistogram('slot,FT;RAW_Out_Q_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision : Slot : Feedthrough', + darray.defineHistogram('slot,FT;RAW_Out_Q_FT_vs_SLOT',title='# of cells with E_offline - E_online > numerical precision ; Slot ; Feedthrough', type='TH2I', path=part_hist_path, + opt='kAlwaysCreate', weight='weight_q', xbins=lArDQGlobals.FEB_Slot["EMECA"][1], xmin=lArDQGlobals.FEB_Slot["EMECA"][0]-0.5, xmax=lArDQGlobals.FEB_Slot["EMECA"][1]+0.5, ybins=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+1, ymin=lArDQGlobals.FEB_Feedthrough["EMBA"][0]-0.5, ymax=lArDQGlobals.FEB_Feedthrough["EMBA"][1]+0.5) - darray.defineHistogram('Eoff,Eon;Eon_VS_Eoff', title='E_online VS E_offline:E_offline (MeV):E_online (MeV)', + darray.defineHistogram('Eoff,Eon;Eon_VS_Eoff', title='E_online VS E_offline;E_offline (MeV);E_online (MeV)', type='TH2F', path=part_hist_path, xbins=lArDQGlobals.DSPEonEoff_Bins, xmin=-lArDQGlobals.DSPEonEoff_Max, xmax=lArDQGlobals.DSPEonEoff_Max, ybins=lArDQGlobals.DSPEonEoff_Bins, ymin=-lArDQGlobals.DSPEonEoff_Max, ymax=lArDQGlobals.DSPEonEoff_Max) - darray.defineHistogram('Toff,Ton;Ton_VS_Toff', title='T_online VS T_offline:T_offline (ps):T_online (ps)', + darray.defineHistogram('Toff,Ton;Ton_VS_Toff', title='T_online VS T_offline;T_offline (ps);T_online (ps)', type='TH2F', path=part_hist_path, xbins=lArDQGlobals.DSPTonToff_Bins, xmin=-lArDQGlobals.DSPTonToff_Max, xmax=lArDQGlobals.DSPTonToff_Max, ybins=lArDQGlobals.DSPTonToff_Bins, ymin=-lArDQGlobals.DSPTonToff_Max, ymax=lArDQGlobals.DSPTonToff_Max) - darray.defineHistogram('Qoff,Qon;Qon_VS_Qoff', title='Q_online VS Q_offline:Q_offline :Q_online ', + darray.defineHistogram('Qoff,Qon;Qon_VS_Qoff', title='Q_online VS Q_offline;Q_offline ;Q_online ', type='TH2F', path=part_hist_path, xbins=lArDQGlobals.DSPQonQoff_Bins, xmin=-lArDQGlobals.DSPQonQoff_Max, xmax=lArDQGlobals.DSPQonQoff_Max, ybins=lArDQGlobals.DSPQonQoff_Bins, ymin=-lArDQGlobals.DSPQonQoff_Max, ymax=lArDQGlobals.DSPQonQoff_Max) - darray.defineHistogram('Sweetc;Sweet_cells', title='Number of sweet Cells in LAr:Sweet cells per feb', + darray.defineHistogram('Sweetc;Sweet_cells', title='Number of sweet Cells in LAr;Sweet cells per feb', type='TH1F', path=part_hist_path, xbins=lArDQGlobals.FEB_N_channels, xmin=lArDQGlobals.FEB_channels_Min, xmax=lArDQGlobals.FEB_channels_Max) diff --git a/LArCalorimeter/LArMonitoring/python/LArSuperCellMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArSuperCellMonAlg.py index c87ca84d8947d7af1c61d236579417896221181a..6ded957687693ae5c7f1918275ab1bc15075d7c9 100644 --- a/LArCalorimeter/LArMonitoring/python/LArSuperCellMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArSuperCellMonAlg.py @@ -124,7 +124,7 @@ def LArSuperCellMonConfigCore(helper, algclass, inputFlags, isCosmics=False, isM cellMonGroup = helper.addGroup( LArSuperCellMonAlg, GroupName, - '/LArMonitoring/LArSuperCellMon_NoTrigSel/' + '/LAr/LArSuperCellMon_NoTrigSel/' ) diff --git a/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.cxx index 09478635d3457527c0f674c359880b971e4f0fb0..30bf163dbeca142225ae289eb95678410921136b 100755 --- a/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.cxx +++ b/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ + // ******************************************************************** // // NAME: LArDigitalTriggMonAlg.cxx @@ -9,6 +10,7 @@ // // AUTHOR: Pavol Strizenec (pavol@mail.cern.ch) // Ljiljana Morvaj (ljiljana.morvaj@cern.ch) +// Yesenia Hernadez (yesenia@cern.ch) // Based on LAtDigitMon tool by L. Hellary and LArOddCellsMonTool.cxx by Benjamin Trocme // // Monitor a few things in the LArDigit... @@ -39,7 +41,8 @@ #include "LArRawEvent/LArSCDigit.h" #include "LArRawEvent/LArLATOMEHeaderContainer.h" - +#include "CaloDetDescr/CaloDetDescrManager.h" +#include "CaloIdentifier/CaloCell_SuperCell_ID.h" #include "LArTrigStreamMatching.h" //STL: @@ -53,7 +56,8 @@ LArDigitalTriggMonAlg::LArDigitalTriggMonAlg(const std::string& name, ISvcLocator* pSvcLocator ) : AthMonitorAlgorithm(name, pSvcLocator), m_LArOnlineIDHelper(0), - m_LArEM_IDHelper(0) + m_LArEM_IDHelper(0), + m_SCID_helper(0) { @@ -86,11 +90,17 @@ LArDigitalTriggMonAlg::initialize() return StatusCode::FAILURE; } + /** Get LAr Online SC Id Helper*/ + if ( detStore()->retrieve( m_SCID_helper, "CaloCell_SuperCell_ID" ).isSuccess() ) { + ATH_MSG_DEBUG("connected non-tool: CaloCell_SuperCell_ID" ); + } else { + return StatusCode::FAILURE; + } + ATH_CHECK(m_digitContainerKey.initialize()); - ATH_CHECK(m_digitContainerKey1.initialize()); ATH_CHECK(m_rawSCContainerKey.initialize()); - ATH_CHECK(m_rawSCContainerKey1.initialize()); ATH_CHECK(m_eventInfoKey.initialize()); + ATH_CHECK(m_cablingKey.initialize()); return AthMonitorAlgorithm::initialize(); } @@ -99,18 +109,20 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const { ATH_MSG_DEBUG("in fillHists()" ); - + //monitored variables auto MNsamples = Monitored::Scalar<int>("MNsamples",-1); - auto MlatomeChannel = Monitored::Scalar<int>("MlatomeChannel",-1); auto MSCChannel = Monitored::Scalar<int>("MSCChannel",-1); auto MlatomeSourceId = Monitored::Scalar<int>("MlatomeSourceId",-1); auto Mmaxpos = Monitored::Scalar<int>("Mmaxpos",-1); auto Mpartition = Monitored::Scalar<int>("Mpartition",-1); auto Msampos = Monitored::Scalar<int>("Msampos",-1); auto MADC = Monitored::Scalar<int>("MADC",-1); + auto MADC_0 = Monitored::Scalar<int>("MADC_0",-1); auto MSCeT = Monitored::Scalar<float>("MSCeT",0.0); + auto MSCphi = Monitored::Scalar<float>("MSCphi",0.0); + auto MSCeta = Monitored::Scalar<float>("MSCeta",0.0); auto MSCsatur = Monitored::Scalar<float>("MSCsatur",0.0); auto MlatomeSourceIdBIN = Monitored::Scalar<int>("MlatomeSourceIdBIN",1); auto MlatomeSourceIdBIN_subdet = Monitored::Scalar<int>("MlatomeSourceIdBIN_subdet",1); @@ -121,41 +133,32 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const const std::vector<unsigned> streamsThisEvent=LArMon::trigStreamMatching(m_streams,thisEvent->streamTags()); - SG::ReadHandle<LArDigitContainer> hLArDigitContainer{m_digitContainerKey,ctx}; //"SC" - SG::ReadHandle<LArDigitContainer> hLArDigitContainer1{m_digitContainerKey1,ctx}; + SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey,ctx}; + const LArOnOffIdMapping* cabling=*cablingHdl; + SG::ReadHandle<LArDigitContainer> hLArDigitContainer{m_digitContainerKey,ctx}; //"SC" SG::ReadHandle<LArRawSCContainer > hSCetContainer{m_rawSCContainerKey,ctx}; //"SC_ET" - SG::ReadHandle<LArRawSCContainer > hSCetContainer1{m_rawSCContainerKey1,ctx}; - - ATH_MSG_DEBUG("hLArDigitContainer->size() " << hLArDigitContainer->size()); - ATH_MSG_DEBUG("hLArDigitContainer1->size() " << hLArDigitContainer1->size()); - ATH_MSG_DEBUG("hSCetContainer->size() " << hSCetContainer->size()); - ATH_MSG_DEBUG("hSCetContainer1->size() " << hSCetContainer1->size()); ATH_MSG_DEBUG("hLArDigitContainer.isValid() " << hLArDigitContainer.isValid()); - ATH_MSG_DEBUG("hLArDigitContainer1.isValid() " << hLArDigitContainer1.isValid()); ATH_MSG_DEBUG("hSCetContainer.isValid() " << hSCetContainer.isValid()); - ATH_MSG_DEBUG("hSCetContainer1.isValid() " << hSCetContainer1.isValid()); const LArDigitContainer* pLArDigitContainer= nullptr; - const LArDigitContainer* pLArDigitContainer1= nullptr; const LArRawSCContainer* pSCetContainer= nullptr; - const LArRawSCContainer* pSCetContainer1= nullptr; StatusCode sc=evtStore()->retrieve(pLArDigitContainer,"SC"); - sc=evtStore()->retrieve(pLArDigitContainer1,"SC_ADC_BAS"); sc=evtStore()->retrieve(pSCetContainer,"SC_ET"); - sc=evtStore()->retrieve(pSCetContainer1,"SC_ET_ID"); - - ATH_MSG_DEBUG(" pLArDigitContainer: "<< pLArDigitContainer<< " pLArDigitContainer1: "<< pLArDigitContainer1<< " pSCetContainer: "<< pSCetContainer<< " pSCetContainer1: "<< pSCetContainer1); - ATH_MSG_DEBUG(" pLArDigitContainer->size(): "<< pLArDigitContainer->size()<< " pLArDigitContainer1->size(): "<< pLArDigitContainer1->size()<< " pSCetContainer->size(): "<< pSCetContainer->size()<< " pSCetContainer1->size(): "<< pSCetContainer1->size()); + ATH_MSG_DEBUG(" pLArDigitContainer: " << pLArDigitContainer << " pSCetContainer: " << pSCetContainer ); + ATH_MSG_DEBUG(" pLArDigitContainer->size(): " << pLArDigitContainer->size() << " pSCetContainer->size(): " << pSCetContainer->size() ); if (pLArDigitContainer && pLArDigitContainer->size()>0 && hLArDigitContainer.isValid()){ + /** Define iterators to loop over Digits containers*/ LArDigitContainer::const_iterator itDig = hLArDigitContainer->begin(); LArDigitContainer::const_iterator itDig_e= hLArDigitContainer->end(); const LArDigit* pLArDigit; - + + std::string layer; + /** Loop over digits*/ for ( ; itDig!=itDig_e;++itDig) { pLArDigit = *itDig; @@ -164,10 +167,31 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const fill(m_scMonGroupName, MNsamples); - HWIdentifier id = pLArDigit->hardwareID(); + HWIdentifier id = pLArDigit->hardwareID(); //gives online ID // will be used in next iteration //int channelHWID = m_LArOnlineIDHelper->channel(id); + const Identifier offlineID=cabling->cnvToIdentifier(id); + const CaloSuperCellDetDescrManager* ddman = nullptr; + ATH_CHECK( detStore()->retrieve (ddman) ); + + const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID); + + if(caloDetElement == 0 ){ + ATH_MSG_ERROR( "Cannot retrieve caloDetElement" ); + continue; + } + + float etaSC = caloDetElement->eta_raw(); + float phiSC = caloDetElement->phi_raw(); + + int calosample=caloDetElement->getSampling(); + unsigned iLyrNS=m_caloSamplingToLyrNS.at(calosample); + + const unsigned whichSide=(etaSC>0) ? 0 : 1; //Value >0 means A-side + unsigned iLyr=iLyrNS*2+whichSide; + auto layerName=m_layerNames[iLyr]; + /** Determine to which partition this channel belongs to*/ int side = m_LArOnlineIDHelper->pos_neg(id); const int ThisPartition=WhatPartition(id,side); @@ -181,9 +205,8 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const const LArSCDigit* scdigi = dynamic_cast<const LArSCDigit*>(pLArDigit); if(!scdigi){ ATH_MSG_DEBUG(" CAN'T CAST "); }else{ - MlatomeChannel = scdigi->Channel(); - fill(m_scMonGroupName, MlatomeChannel); - + MSCChannel = scdigi->Channel(); + fill(m_scMonGroupName, MSCChannel); MlatomeSourceId = scdigi->SourceId(); MlatomeSourceIdBIN=getXbinFromSourceID(MlatomeSourceId); @@ -199,21 +222,55 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const Mmaxpos=thismaxPos+1; //count samples [1,5] fill(m_scMonGroupName, Mmaxpos, Mpartition, MlatomeSourceIdBIN); + /** max sample per layer*/ + if(layerName.find("P")!= std::string::npos || layerName.find("0")!= std::string::npos){ + layer = "0"; + } + else if(layerName.find("1")!= std::string::npos){ + layer = "1"; + } + else if(layerName.find("2")!= std::string::npos){ + layer = "2"; + } + else{ + layer = "3"; + } + + auto MlatomeSourceIdBIN_layer = Monitored::Scalar<float>("MlatomeSourceIdBIN_"+layer,MlatomeSourceIdBIN); + auto Mmaxpos_layer = Monitored::Scalar<float>("Mmaxpos_"+layer,Mmaxpos); + //samples for(unsigned i=0; i<trueNSamples;++i) { Msampos=i+1; MADC=pLArDigit->samples().at(i); + if(i==0) + MADC_0=pLArDigit->samples().at(i); + fill(m_scMonGroupName, Msampos, MADC, MlatomeSourceIdBIN); + + } + + /** max sample vs latome per layer*/ + fill(m_scMonGroupName, Mmaxpos_layer, Mpartition, MlatomeSourceIdBIN_layer); + + /** max sample vs latome per layer if adc[i] - adc[0] > 15*/ + if(pLArDigit->samples().at(Mmaxpos-1) - MADC_0 > 15) { + auto MlatomeSourceIdBIN_layer_cut = Monitored::Scalar<float>("MlatomeSourceIdBIN_"+layer+"_cut",MlatomeSourceIdBIN); + auto Mmaxpos_layer_cut = Monitored::Scalar<float>("Mmaxpos_"+layer+"_cut",Mmaxpos); + fill(m_scMonGroupName, Mmaxpos_layer_cut, Mpartition, MlatomeSourceIdBIN_layer_cut); + + auto eta_digi = Monitored::Scalar<float>("eta_digi_"+layerName,etaSC); + auto phi_digi = Monitored::Scalar<float>("phi_digi_"+layerName,phiSC); + fill(m_scMonGroupName, eta_digi, phi_digi); } - }/** End of loop on LArDigit*/ } // pLArDigitContainer + if (pSCetContainer && pSCetContainer->size()>0 && hSCetContainer.isValid()){ - if (pSCetContainer && pSCetContainer->size()>0){ LArRawSCContainer::const_iterator itSC = hSCetContainer->begin(); LArRawSCContainer::const_iterator itSC_e = hSCetContainer->end(); const LArRawSC* rawSC = 0; @@ -224,7 +281,13 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const MSCChannel = rawSC->chan(); if (rawSC->energies().size()>0){ - MSCeT = rawSC->energies().at(0); + int energy = rawSC->energies().at(0); + if (rawSC->energies().size()>1) + energy = rawSC->energies().at(1); + + if ( energy & (1<<17)) energy=energy-std::pow(2,18); + + MSCeT = energy; } if (rawSC->satur().size()>0){ @@ -236,12 +299,67 @@ StatusCode LArDigitalTriggMonAlg::fillHistograms(const EventContext& ctx) const fill(m_scMonGroupName, MSCChannel, MSCeT, MSCsatur, MlatomeSourceIdBIN); if (MSCChannel<10){ - ATH_MSG_DEBUG("--- from etcontainer rawSC->energies() = " << MSCeT); + ATH_MSG_DEBUG("--- from etcontainer MSCeT = " << MSCeT); ATH_MSG_DEBUG(" |______ --------- MSCChannel = "<< MSCChannel); ATH_MSG_DEBUG(" |______ --------- MSCsatur = "<< MSCsatur); ATH_MSG_DEBUG(" |______ --------- MlatomeSourceIdBIN = "<< MlatomeSourceIdBIN); ATH_MSG_DEBUG(" |______ --------- rawSC->SourceId() = "<< rawSC->SourceId()); } + + ////////////////// make coverage plots + HWIdentifier id = rawSC->hardwareID(); //gives online ID + // /**skip disconnected channels:*/ ? + // if(!cabling->isOnlineConnected(id)) continue; + + const Identifier offlineID=cabling->cnvToIdentifier(id); //converts online to offline ID + Identifier32 Ofl32 =offlineID.get_identifier32(); + Identifier32 Onl32 =id.get_identifier32(); + + + // m_SCID_helper + //https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/LArCalorimeter/LArMonTools/src/LArCoverage.cxx + // Get Physical Coordinates + const CaloSuperCellDetDescrManager* ddman = nullptr; + + ATH_CHECK( detStore()->retrieve (ddman) ); + + float etaSC = 0; float phiSC = 0.; + const CaloDetDescrElement* caloDetElement = ddman->get_element(offlineID); + if(caloDetElement == 0 ){ + + ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" ); + ATH_MSG_ERROR( " ==============> etaSC, phiSC: " << etaSC << " ," << phiSC << std::hex << "; offlineID = "<< offlineID << "; Ofl32 compact= "<< Ofl32.get_compact()<< "; online ID =" << id << "; Onl32 = " << Onl32.get_compact() << "; rawSC->SourceId() = " << rawSC->SourceId()); + continue; + } + etaSC = caloDetElement->eta_raw(); + phiSC = caloDetElement->phi_raw(); + + int calosample=caloDetElement->getSampling(); + unsigned iLyrNS=m_caloSamplingToLyrNS.at(calosample); + + const unsigned side=(etaSC>0) ? 0 : 1; //Value >0 means A-side + unsigned iLyr=iLyrNS*2+side; + + MSCeta = etaSC; MSCphi = phiSC; + + auto layerName=m_layerNames[iLyr]; + + auto LMSCphi = Monitored::Scalar<float>("superCellPhi_"+layerName,phiSC); + auto LMSCeta = Monitored::Scalar<float>("superCellEta_"+layerName,etaSC); + auto LMSCet = Monitored::Scalar<float>("superCellEt_"+layerName,MSCeT); + + fill(m_scMonGroupName, MSCeta, MSCphi); + fill(m_scMonGroupName, LMSCeta, LMSCphi); + fill(m_scMonGroupName, LMSCeta, LMSCphi, LMSCet); + + if (MSCeT>1000) { //make some conditions for filling + auto LMSCphi_EtCut = Monitored::Scalar<float>("superCellPhi_EtCut_"+layerName,phiSC); + auto LMSCeta_EtCut = Monitored::Scalar<float>("superCellEta_EtCut_"+layerName,etaSC); + auto LMSCet_EtCut = Monitored::Scalar<float>("superCellEt_EtCut_"+layerName,MSCeT); + + fill(m_scMonGroupName, LMSCeta_EtCut, LMSCphi_EtCut); + } + }//end loop over SCs if (rawSC && (rawSC->energies().size() != 1 || rawSC->satur().size() !=1 )) ATH_MSG_WARNING("GAH rawSC->energies().size() = " <<rawSC->energies().size() <<" , why didn't I get only 1 SC with 1 energy? or is the saturation? "); @@ -262,7 +380,7 @@ int LArDigitalTriggMonAlg::WhatPartition(HWIdentifier id, int side) const if (m_LArOnlineIDHelper->isEmBarrelOnline(id)) { if(side==0) return 0; else return 1; - } else if (m_LArOnlineIDHelper-> isEMECchannel(id)) { + } else if (m_LArOnlineIDHelper->isEMECchannel(id)) { if(side==0) return 2; else return 3; } else if (m_LArOnlineIDHelper->isHECchannel(id)) { @@ -317,18 +435,17 @@ int LArDigitalTriggMonAlg::getXbinFromSourceID(int sourceID) const } } - // std::cout<<"sourceIDhex: "<<sourceIDhex<<", detID "<<detID<<", detName "<< detName<< ", det starting Bin "<<detStartingBin<<std::endl; - std::stringstream ss2; std::string phiBin = sourceIDhex.substr(sourceIDhex.size()-1); ss2 << phiBin; int value; - ss2 >> std::hex >> value; - + ss2 >> std::hex >> value; //value is in hex + binx = detStartingBin + value; if (binx>m_NLatomeBins){ ATH_MSG_WARNING("something wrong with binning, filling overflowbin"); binx=m_NLatomeBins; } + return binx; } diff --git a/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.h index bbba124bafc31c525992d7c849aa614f0a6cea07..bbde6a7e0d7dc334bc483fe5428505fcfe989aec 100755 --- a/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.h +++ b/LArCalorimeter/LArMonitoring/src/LArDigitalTriggMonAlg.h @@ -18,7 +18,7 @@ #include "xAODEventInfo/EventInfo.h" #include "LArRawEvent/LArDigitContainer.h" #include "LArRawEvent/LArRawSCContainer.h" - +#include "LArCabling/LArOnOffIdMapping.h" #include <mutex> class LArEM_ID; @@ -26,6 +26,7 @@ class LArOnlineID; class HWIdentifier; class LArOnlineIDStrHelper; class LArOnOffIdMapping; +class CaloCell_SuperCell_ID; class LArDigitalTriggMonAlg: public AthMonitorAlgorithm { @@ -67,21 +68,42 @@ private: //Histogram group names Gaudi::Property<std::string> m_scMonGroupName {this, "SCMonGroup", "SC"}; + //\** Handle to cabling *\/ + SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingSCKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"}; + SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfo","EventInfo","SG Key of EventInfo object"}; /** Handle to digits */ - SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey{this,"LArDigitContainerKey","SC","SG key of LArDigitContainer read from Bytestream"}; - SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey1{this,"LArDigitContainerKey1","SC_ADC_BAS","SG key of LArDigitContainer read from Bytestream"}; + SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey{this,"LArDigitContainerKey","SC","SG key of LArDigitContainer read from Bytestream"}; //raw ADC 12 bits - ADC axis up to 4096 SG::ReadHandleKey<LArRawSCContainer> m_rawSCContainerKey{this,"LArRawSCContainerKey","SC_ET","SG key of LArRawSCContainer read from Bytestream"}; - SG::ReadHandleKey<LArRawSCContainer> m_rawSCContainerKey1{this,"LArRawSCContainerKey1","SC_ET_ID","SG key of LArRawSCContainer read from Bytestream"}; + + // SC_ET_ID cuts on taus selection, SC_ET just takes everything /* Id helpers */ const LArOnlineID* m_LArOnlineIDHelper; const LArEM_ID* m_LArEM_IDHelper; - + const CaloCell_SuperCell_ID* m_SCID_helper; int WhatPartition(HWIdentifier id, int side) const; int getXbinFromSourceID(int sourceID) const; + + //Enumerate layer-types, ignoring sides. Useful for configuration that is per-definition symmetric + enum LayerEnumNoSides{EMBPNS=0, EMB1NS, EMB2NS, EMB3NS, HEC0NS, HEC1NS, HEC2NS, HEC3NS, + EMECPNS,EMEC1NS,EMEC2NS,EMEC3NS,FCAL1NS,FCAL2NS,FCAL3NS,MAXLYRNS}; + + //Mapping of CaloCell nomencature to CaloCellMonitoring nomencature + const std::map<unsigned,LayerEnumNoSides> m_caloSamplingToLyrNS{ + {CaloSampling::PreSamplerB, EMBPNS},{CaloSampling::EMB1,EMB1NS},{CaloSampling::EMB2,EMB2NS},{CaloSampling::EMB3,EMB3NS}, //LAr Barrel + {CaloSampling::PreSamplerE, EMECPNS},{CaloSampling::EME1,EMEC1NS}, {CaloSampling::EME2,EMEC2NS}, {CaloSampling::EME3,EMEC3NS}, //LAr Endcap + {CaloSampling::HEC0,HEC0NS}, {CaloSampling::HEC1,HEC1NS}, {CaloSampling::HEC2,HEC2NS}, {CaloSampling::HEC3,HEC3NS}, //Hadronic endcap + {CaloSampling::FCAL0,FCAL1NS}, {CaloSampling::FCAL1,FCAL2NS}, {CaloSampling::FCAL2,FCAL3NS} //FCAL + }; + + StringArrayProperty m_layerNames{this, "LayerNames", {"EMBPA", "EMBPC", "EMB1A", "EMB1C", "EMB2A", "EMB2C", "EMB3A", "EMB3C", + "HEC0A", "HEC0C", "HEC1A", "HEC1C", "HEC2A", "HEC2C", "HEC3A", "HEC3C", + "EMECPA", "EMECPC", "EMEC1A", "EMEC1C", "EMEC2A", "EMEC2C", "EMEC3A", "EMEC3C", + "FCAL1A", "FCAL1C", "FCAL2A", "FCAL2C", "FCAL3A", "FCAL3C"}, + "Names of individual layers to monitor"}; }; #endif