Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-26 03:51:38

0001 #ifndef PedestalTask_h
0002 #define PedestalTask_h
0003 
0004 /*
0005  *  file:           PedestalTask.h
0006  *  Author:         Viktor Khristenko
0007  *  Date:           16.10.2015
0008  */
0009 
0010 #include "DQM/HcalCommon/interface/DQTask.h"
0011 #include "DQM/HcalCommon/interface/Utilities.h"
0012 #include "DQM/HcalCommon/interface/Container1D.h"
0013 #include "DQM/HcalCommon/interface/Container2D.h"
0014 #include "DQM/HcalCommon/interface/ContainerProf1D.h"
0015 #include "DQM/HcalCommon/interface/ContainerProf2D.h"
0016 #include "DQM/HcalCommon/interface/ContainerSingle2D.h"
0017 #include "DQM/HcalCommon/interface/ContainerXXX.h"
0018 #include "DQM/HcalCommon/interface/HashFilter.h"
0019 #include "DQM/HcalCommon/interface/ElectronicsMap.h"
0020 
0021 class PedestalTask : public hcaldqm::DQTask {
0022 public:
0023   PedestalTask(edm::ParameterSet const &);
0024   ~PedestalTask() override {}
0025 
0026   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0027   std::shared_ptr<hcaldqm::Cache> globalBeginLuminosityBlock(edm::LuminosityBlock const &,
0028                                                              edm::EventSetup const &) const override;
0029   void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override;
0030   void dqmEndRun(edm::Run const &, edm::EventSetup const &) override;
0031 
0032 protected:
0033   //    funcs
0034   void _process(edm::Event const &, edm::EventSetup const &) override;
0035   void _resetMonitors(hcaldqm::UpdateFreq) override;
0036   bool _isApplicable(edm::Event const &) override;
0037   virtual void _dump();
0038 
0039   //    tags and tokens
0040   edm::InputTag _tagQIE11;
0041   edm::InputTag _tagHO;
0042   edm::InputTag _tagQIE10;
0043   edm::InputTag _tagTrigger;
0044   edm::InputTag _taguMN;
0045   edm::EDGetTokenT<HcalUMNioDigi> _tokuMN;
0046   edm::EDGetTokenT<QIE11DigiCollection> _tokQIE11;
0047   edm::EDGetTokenT<HODigiCollection> _tokHO;
0048   edm::EDGetTokenT<QIE10DigiCollection> _tokQIE10;
0049   edm::EDGetTokenT<HcalTBTriggerData> _tokTrigger;
0050   edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
0051 
0052   std::vector<hcaldqm::flag::Flag> _vflags;
0053   enum PedestalFlag { fMsn = 0, fBadM = 1, fBadR = 2, nPedestalFlag = 3 };
0054 
0055   //    emap
0056   hcaldqm::electronicsmap::ElectronicsMap _ehashmap;
0057   hcaldqm::filter::HashFilter _filter_uTCA;
0058   hcaldqm::filter::HashFilter _filter_VME;
0059   hcaldqm::filter::HashFilter _filter_C38;
0060 
0061   //    thresholds
0062   double _thresh_mean, _thresh_rms, _thresh_badm, _thresh_badr;
0063   double _thresh_missing_high, _thresh_missing_low;
0064 
0065   //    hashed ids of FEDs
0066   std::vector<uint32_t> _vhashFEDs;
0067 
0068   //    need containers total over the run and per 1LS
0069   hcaldqm::ContainerXXX<double> _xPedSum1LS;
0070   hcaldqm::ContainerXXX<double> _xPedSum21LS;
0071   hcaldqm::ContainerXXX<int> _xPedEntries1LS;
0072   hcaldqm::ContainerXXX<double> _xPedSumTotal;
0073   hcaldqm::ContainerXXX<double> _xPedSum2Total;
0074   hcaldqm::ContainerXXX<int> _xPedEntriesTotal;
0075   hcaldqm::ContainerXXX<int> _xNChs;     // number of channels per FED as in emap
0076   hcaldqm::ContainerXXX<int> _xNMsn1LS;  // #missing for 1LS per FED
0077   hcaldqm::ContainerXXX<int> _xNBadMean1LS, _xNBadRMS1LS;
0078 
0079   //    CondBD Reference
0080   hcaldqm::ContainerXXX<double> _xPedRefMean;
0081   hcaldqm::ContainerXXX<double> _xPedRefRMS;
0082 
0083   //    1D actual Means/RMSs
0084   hcaldqm::Container1D _cMeanTotal_Subdet;
0085   hcaldqm::Container1D _cRMSTotal_Subdet;
0086   hcaldqm::Container1D _cMean1LS_Subdet;  // 1LS
0087   hcaldqm::Container1D _cRMS1LS_Subdet;   // 1LS
0088 
0089   //    2D actual values
0090   hcaldqm::ContainerProf2D _cMean1LS_depth;    // 1LS
0091   hcaldqm::ContainerProf2D _cRMS1LS_depth;     //  1lS
0092   hcaldqm::ContainerProf2D _cMean1LS_FEDuTCA;  // 1ls
0093   hcaldqm::ContainerProf2D _cRMS1LS_FEDuTCA;   // 1ls
0094 
0095   hcaldqm::ContainerProf2D _cMeanTotal_depth;
0096   hcaldqm::ContainerProf2D _cRMSTotal_depth;
0097   hcaldqm::ContainerProf2D _cMeanTotal_FEDuTCA;
0098   hcaldqm::ContainerProf2D _cRMSTotal_FEDuTCA;
0099 
0100   //    Comparison with DB Conditions
0101   hcaldqm::Container1D _cMeanDBRef1LS_Subdet;  // 1LS
0102   hcaldqm::Container1D _cRMSDBRef1LS_Subdet;   // 1LS
0103   hcaldqm::Container1D _cMeanDBRefTotal_Subdet;
0104   hcaldqm::Container1D _cRMSDBRefTotal_Subdet;
0105   hcaldqm::ContainerProf2D _cMeanDBRef1LS_depth;
0106   hcaldqm::ContainerProf2D _cRMSDBRef1LS_depth;
0107   hcaldqm::ContainerProf2D _cMeanDBRef1LS_FEDuTCA;
0108   hcaldqm::ContainerProf2D _cRMSDBRef1LS_FEDuTCA;
0109 
0110   hcaldqm::ContainerProf2D _cMeanDBRefTotal_depth;
0111   hcaldqm::ContainerProf2D _cRMSDBRefTotal_depth;
0112   hcaldqm::ContainerProf2D _cMeanDBRefTotal_FEDuTCA;
0113   hcaldqm::ContainerProf2D _cRMSDBRefTotal_FEDuTCA;
0114 
0115   //    vs LS
0116   hcaldqm::Container1D _cMissingvsLS_Subdet;
0117   hcaldqm::Container1D _cOccupancyvsLS_Subdet;
0118   hcaldqm::Container1D _cNBadMeanvsLS_Subdet;
0119   hcaldqm::Container1D _cNBadRMSvsLS_Subdet;
0120 
0121   //    averaging per event
0122   hcaldqm::ContainerProf1D _cOccupancyEAvsLS_Subdet;
0123 
0124   //    map of missing channels
0125   hcaldqm::Container2D _cMissing1LS_depth;
0126   hcaldqm::Container2D _cMissing1LS_FEDuTCA;
0127   hcaldqm::Container2D _cMissingTotal_depth;
0128   hcaldqm::Container2D _cMissingTotal_FEDuTCA;
0129 
0130   //    Mean/RMS Bad Maps
0131   hcaldqm::Container2D _cMeanBad1LS_depth;
0132   hcaldqm::Container2D _cRMSBad1LS_depth;
0133   hcaldqm::Container2D _cRMSBad1LS_FEDuTCA;
0134   hcaldqm::Container2D _cMeanBad1LS_FEDuTCA;
0135 
0136   hcaldqm::Container2D _cMeanBadTotal_depth;
0137   hcaldqm::Container2D _cRMSBadTotal_depth;
0138   hcaldqm::Container2D _cRMSBadTotal_FEDuTCA;
0139   hcaldqm::Container2D _cMeanBadTotal_FEDuTCA;
0140 
0141   hcaldqm::Container1D _cADC_SubdetPM;
0142 
0143   //    Summaries
0144   hcaldqm::Container2D _cSummaryvsLS_FED;
0145   hcaldqm::ContainerSingle2D _cSummaryvsLS;
0146 };
0147 
0148 #endif