Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef LEDTask_h
0002 #define LEDTask_h
0003 
0004 /*
0005  *  file:           LEDTask.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/ElectronicsMap.h"
0013 #include "DQM/HcalCommon/interface/ContainerXXX.h"
0014 #include "DQM/HcalCommon/interface/Container1D.h"
0015 #include "DQM/HcalCommon/interface/Container2D.h"
0016 #include "DQM/HcalCommon/interface/ContainerSingle2D.h"
0017 #include "DQM/HcalCommon/interface/ContainerSingleProf2D.h"
0018 #include "DQM/HcalCommon/interface/ContainerProf1D.h"
0019 #include "DQM/HcalCommon/interface/ContainerProf2D.h"
0020 #include "FWCore/Framework/interface/Run.h"
0021 
0022 class LEDTask : public hcaldqm::DQTask {
0023 public:
0024   LEDTask(edm::ParameterSet const&);
0025   ~LEDTask() override {}
0026 
0027   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0028   void dqmEndRun(edm::Run const& r, edm::EventSetup const&) override {
0029     if (_ptype == hcaldqm::fLocal)
0030       if (r.runAuxiliary().run() == 1)
0031         return;
0032     this->_dump();
0033   }
0034 
0035 protected:
0036   //    funcs
0037   void _process(edm::Event const&, edm::EventSetup const&) override;
0038   void _resetMonitors(hcaldqm::UpdateFreq) override;
0039   bool _isApplicable(edm::Event const&) override;
0040   virtual void _dump();
0041 
0042   //    tags and tokens
0043   edm::InputTag _tagQIE11;
0044   edm::InputTag _tagHO;
0045   edm::InputTag _tagQIE10;
0046   edm::InputTag _tagTrigger;
0047   edm::InputTag _taguMN;
0048   edm::EDGetTokenT<QIE11DigiCollection> _tokQIE11;
0049   edm::EDGetTokenT<HODigiCollection> _tokHO;
0050   edm::EDGetTokenT<QIE10DigiCollection> _tokQIE10;
0051   edm::EDGetTokenT<HcalTBTriggerData> _tokTrigger;
0052   edm::EDGetTokenT<HcalUMNioDigi> _tokuMN;
0053   edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
0054 
0055   //    emap
0056   hcaldqm::electronicsmap::ElectronicsMap _ehashmap;
0057   hcaldqm::filter::HashFilter _filter_uTCA;
0058   hcaldqm::filter::HashFilter _filter_VME;
0059 
0060   //    Cuts
0061   int _nevents;
0062   double _lowHBHE;
0063   double _lowHO;
0064   double _lowHF;
0065 
0066   //    Compact
0067   hcaldqm::ContainerXXX<double> _xSignalSum;
0068   hcaldqm::ContainerXXX<double> _xSignalSum2;
0069   hcaldqm::ContainerXXX<int> _xEntries;
0070   hcaldqm::ContainerXXX<double> _xTimingSum;
0071   hcaldqm::ContainerXXX<double> _xTimingSum2;
0072 
0073   //    1D
0074   hcaldqm::Container1D _cSignalMean_Subdet;
0075   hcaldqm::Container1D _cSignalRMS_Subdet;
0076   hcaldqm::Container1D _cTimingMean_Subdet;
0077   hcaldqm::Container1D _cTimingRMS_Subdet;
0078 
0079   //    Prof1D
0080   hcaldqm::ContainerProf1D _cShapeCut_FEDSlot;
0081 
0082   //    2D timing/signals
0083   hcaldqm::ContainerProf2D _cSignalMean_depth;
0084   hcaldqm::ContainerProf2D _cSignalRMS_depth;
0085   hcaldqm::ContainerProf2D _cTimingMean_depth;
0086   hcaldqm::ContainerProf2D _cTimingRMS_depth;
0087 
0088   hcaldqm::ContainerProf2D _cSignalMean_FEDuTCA;
0089   hcaldqm::ContainerProf2D _cTimingMean_FEDuTCA;
0090   hcaldqm::ContainerProf2D _cSignalRMS_FEDuTCA;
0091   hcaldqm::ContainerProf2D _cTimingRMS_FEDuTCA;
0092 
0093   //    Bad Quality and Missing Channels
0094   hcaldqm::Container2D _cMissing_depth;
0095   hcaldqm::Container2D _cMissing_FEDuTCA;
0096 
0097   // For hcalcalib online LED
0098   hcaldqm::Container2D _cADCvsTS_SubdetPM;
0099   hcaldqm::Container1D _cSumQ_SubdetPM;
0100   hcaldqm::Container1D _cTDCTime_SubdetPM;
0101   hcaldqm::ContainerProf2D _cTDCTime_depth;
0102   hcaldqm::ContainerSingle2D _cLowSignal_CrateSlot;
0103 
0104   // For monitoring LED firing: ADC vs BX
0105   std::map<HcalSubdetector, std::vector<HcalDetId> > _ledCalibrationChannels;
0106   hcaldqm::Container2D _LED_ADCvsBX_Subdet;   // Pin diode amplitude vs BX for online DQM
0107   hcaldqm::Container2D _LED_ADCvsEvn_Subdet;  // Pin diode amplitude vs Evn for local DQM
0108 };
0109 
0110 #endif