Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecHitTask_h
0002 #define RecHitTask_h
0003 
0004 /**
0005  *  module:         RecHitTask.h
0006  *  Author:         VK
0007  *  Description:    
0008  *      HCAL RECO Data Tier Evaluation
0009  *
0010  *  Online:
0011  *  Offline:
0012  */
0013 
0014 #include "DQM/HcalCommon/interface/DQTask.h"
0015 #include "DQM/HcalCommon/interface/Utilities.h"
0016 #include "DQM/HcalCommon/interface/HashFilter.h"
0017 #include "DQM/HcalCommon/interface/Container1D.h"
0018 #include "DQM/HcalCommon/interface/Container2D.h"
0019 #include "DQM/HcalCommon/interface/ContainerProf1D.h"
0020 #include "DQM/HcalCommon/interface/ContainerProf2D.h"
0021 #include "DQM/HcalCommon/interface/ContainerSingle1D.h"
0022 #include "DQM/HcalCommon/interface/ContainerSingle2D.h"
0023 #include "DQM/HcalCommon/interface/ContainerSingleProf2D.h"
0024 #include "DQM/HcalCommon/interface/ElectronicsMap.h"
0025 
0026 class RecHitTask : public hcaldqm::DQTask {
0027 public:
0028   RecHitTask(edm::ParameterSet const &);
0029   ~RecHitTask() override {}
0030 
0031   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0032   std::shared_ptr<hcaldqm::Cache> globalBeginLuminosityBlock(edm::LuminosityBlock const &,
0033                                                              edm::EventSetup const &) const override;
0034   void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override;
0035 
0036 protected:
0037   void _process(edm::Event const &, edm::EventSetup const &) override;
0038   void _resetMonitors(hcaldqm::UpdateFreq) override;
0039 
0040   edm::InputTag _tagHBHE;
0041   edm::InputTag _tagHO;
0042   edm::InputTag _tagHF;
0043   edm::InputTag _tagPreHF;
0044   bool _hfPreRecHitsAvailable;
0045   edm::EDGetTokenT<HBHERecHitCollection> _tokHBHE;
0046   edm::EDGetTokenT<HORecHitCollection> _tokHO;
0047   edm::EDGetTokenT<HFRecHitCollection> _tokHF;
0048   edm::EDGetTokenT<HFPreRecHitCollection> _tokPreHF;
0049   edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
0050 
0051   double _cutE_HBHE, _cutE_HO, _cutE_HF;
0052   double _thresh_unihf;
0053 
0054   //    hashes/FED vectors
0055   std::vector<uint32_t> _vhashFEDs;
0056 
0057   //    flag vectors
0058   std::vector<hcaldqm::flag::Flag> _vflags;
0059   enum RecoFlag { fUni = 0, fTCDS = 1, fUnknownIds = 2, nRecoFlag = 3 };
0060 
0061   //    emap
0062   hcaldqm::electronicsmap::ElectronicsMap _ehashmap;
0063 
0064   //    Filters
0065   hcaldqm::filter::HashFilter _filter_VME;
0066   hcaldqm::filter::HashFilter _filter_uTCA;
0067   hcaldqm::filter::HashFilter _filter_FEDsVME;
0068   hcaldqm::filter::HashFilter _filter_FEDsuTCA;
0069   hcaldqm::filter::HashFilter _filter_HF;
0070 
0071   //    Energy. Just filling. No Summary Generation
0072   hcaldqm::Container1D _cEnergy_Subdet;
0073   hcaldqm::ContainerProf1D _cEnergyvsieta_Subdet;    // online only!
0074   hcaldqm::ContainerProf1D _cEnergyvsiphi_SubdetPM;  // online only!
0075   hcaldqm::ContainerProf2D _cEnergy_depth;
0076   hcaldqm::ContainerProf1D _cEnergyvsLS_SubdetPM;  // online only!
0077   hcaldqm::ContainerProf1D _cEnergyvsBX_SubdetPM;  // online only
0078 
0079   //    Timing vs Energy. No Summary Generation
0080   hcaldqm::Container2D _cTimingvsEnergy_SubdetPM;
0081 
0082   //    Timing. HBHE Partition is used for TCDS shift monitoring
0083   hcaldqm::Container1D _cTimingCut_SubdetPM;
0084   hcaldqm::Container1D _cTimingCut_HBHEPartition;
0085   hcaldqm::ContainerProf2D _cTimingCut_FEDuTCA;
0086   hcaldqm::ContainerProf2D _cTimingCut_ElectronicsuTCA;
0087   hcaldqm::ContainerProf2D _cTimingCut_depth;
0088   hcaldqm::ContainerProf1D _cTimingCutvsLS_FED;
0089   hcaldqm::ContainerProf1D _cTimingCutvsLS_SubdetPM;
0090   hcaldqm::ContainerProf1D _cTimingCutvsieta_Subdet;    //  online only
0091   hcaldqm::ContainerProf1D _cTimingCutvsiphi_SubdetPM;  //  online only
0092   hcaldqm::ContainerProf1D _cTimingCutvsBX_SubdetPM;    // online only
0093 
0094   //    Occupancy w/o a cut. Used for checking missing channels
0095   hcaldqm::Container2D _cOccupancy_depth;
0096   hcaldqm::Container2D _cOccupancy_FEDuTCA;
0097   hcaldqm::Container2D _cOccupancy_ElectronicsuTCA;
0098   hcaldqm::ContainerProf1D _cOccupancyvsLS_Subdet;
0099   hcaldqm::Container1D _cOccupancyvsiphi_SubdetPM;  // online only
0100   hcaldqm::Container1D _cOccupancyvsieta_Subdet;    //  online only
0101 
0102   //    Occupancy w/ a Cut.
0103   hcaldqm::Container2D _cOccupancyCut_FEDuTCA;
0104   hcaldqm::Container2D _cOccupancyCut_ElectronicsuTCA;
0105   hcaldqm::ContainerProf1D _cOccupancyCutvsLS_Subdet;  // online only
0106   hcaldqm::Container2D _cOccupancyCut_depth;
0107   hcaldqm::Container1D _cOccupancyCutvsiphi_SubdetPM;      // online only
0108   hcaldqm::Container1D _cOccupancyCutvsieta_Subdet;        // online only
0109   hcaldqm::ContainerProf1D _cOccupancyCutvsBX_Subdet;      // online only!
0110   hcaldqm::Container2D _cOccupancyCutvsiphivsLS_SubdetPM;  // online only
0111   hcaldqm::ContainerXXX<uint32_t> _xUniHF, _xUni;
0112 
0113   // QIE10 dual anode histograms
0114   hcaldqm::Container2D _cDAAsymmetryVsCharge_SubdetPM;
0115   hcaldqm::ContainerProf2D _cDAAsymmetryMean_cut_depth;
0116   hcaldqm::Container1D _cDAAsymmetry_cut_SubdetPM;
0117 
0118   //    tracks the unknown ids
0119   MonitorElement *meUnknownIds1LS;
0120   bool _unknownIdsPresent;
0121 
0122   std::vector<HcalGenericDetId> _gids;     // online only
0123   hcaldqm::Container2D _cSummaryvsLS_FED;  // online only!
0124   hcaldqm::ContainerSingle2D _cSummaryvsLS;
0125 };
0126 
0127 #endif