Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef TPTask_h
0002 #define TPTask_h
0003 
0004 /**
0005  *  file:
0006  *  Author:
0007  *  Description:
0008  */
0009 
0010 #include "DQM/HcalCommon/interface/DQTask.h"
0011 #include "DQM/HcalCommon/interface/Utilities.h"
0012 #include "DQM/HcalCommon/interface/HashFilter.h"
0013 #include "DQM/HcalCommon/interface/Container1D.h"
0014 #include "DQM/HcalCommon/interface/Container2D.h"
0015 #include "DQM/HcalCommon/interface/ContainerProf1D.h"
0016 #include "DQM/HcalCommon/interface/ContainerProf2D.h"
0017 #include "DQM/HcalCommon/interface/ContainerSingle1D.h"
0018 #include "DQM/HcalCommon/interface/ContainerSingle2D.h"
0019 #include "DQM/HcalCommon/interface/ContainerSingleProf2D.h"
0020 #include "DQM/HcalCommon/interface/ElectronicsMap.h"
0021 
0022 class TPTask : public hcaldqm::DQTask {
0023 public:
0024   TPTask(edm::ParameterSet const &);
0025   ~TPTask() override {}
0026 
0027   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0028   std::shared_ptr<hcaldqm::Cache> globalBeginLuminosityBlock(edm::LuminosityBlock const &,
0029                                                              edm::EventSetup const &) const override;
0030   void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override;
0031 
0032 protected:
0033   void _process(edm::Event const &, edm::EventSetup const &) override;
0034   void _resetMonitors(hcaldqm::UpdateFreq) override;
0035 
0036   edm::InputTag _tagData;
0037   edm::InputTag _tagDataL1Rec;
0038   edm::InputTag _tagEmul;
0039   edm::InputTag _tagEmulNoTDCCut;
0040   edm::EDGetTokenT<HcalTrigPrimDigiCollection> _tokData;
0041   edm::EDGetTokenT<HcalTrigPrimDigiCollection> _tokDataL1Rec;
0042   edm::EDGetTokenT<HcalTrigPrimDigiCollection> _tokEmul;
0043   edm::EDGetTokenT<HcalTrigPrimDigiCollection> _tokEmulNoTDCCut;
0044   edm::ESGetToken<HcalDbService, HcalDbRecord> hcalDbServiceToken_;
0045 
0046   //    flag vector
0047   std::vector<hcaldqm::flag::Flag> _vflags;
0048   enum TPFlag { fEtMsm = 0, fDataMsn = 1, fEmulMsn = 2, fUnknownIds = 3, fSentRecL1Msm = 4, nTPFlag = 5 };
0049 
0050   //    switches/cuts/etc...
0051   bool _skip1x1;
0052   int _cutEt;
0053   double _thresh_EtMsmRate_high, _thresh_EtMsmRate_low, _thresh_FGMsmRate_high, _thresh_FGMsmRate_low, _thresh_DataMsn,
0054       _thresh_EmulMsn;
0055   std::vector<bool> _vFGBitsReady;
0056 
0057   //    hashes/FEDs vectors
0058   std::vector<uint32_t> _vhashFEDs;
0059 
0060   //    emap
0061   hcaldqm::electronicsmap::ElectronicsMap _ehashmap;
0062 
0063   //    Filters
0064   hcaldqm::filter::HashFilter _filter_VME;
0065   hcaldqm::filter::HashFilter _filter_uTCA;
0066   hcaldqm::filter::HashFilter _filter_depth0;
0067 
0068   //    Et/FG
0069   hcaldqm::Container1D _cEtData_TTSubdet;
0070   hcaldqm::Container1D _cEtEmul_TTSubdet;
0071   hcaldqm::Container2D _cEtCorr_TTSubdet;
0072   hcaldqm::Container2D _cSOIEtCorr_TTSubdet;
0073   hcaldqm::Container2D _cSOIEtCorrEmulL1_TTSubdet;
0074   hcaldqm::Container2D _cEtCorr2x3_TTSubdet;  //    online only
0075   hcaldqm::Container2D _cFGCorr_TTSubdet[hcaldqm::constants::NUM_FGBITS];
0076   hcaldqm::ContainerProf1D _cEtCutDatavsLS_TTSubdet;  // online only!
0077   hcaldqm::ContainerProf1D _cEtCutEmulvsLS_TTSubdet;  // online only!
0078   hcaldqm::Container2D _cEtCutDatavsBX_TTSubdet;      // online only!
0079   hcaldqm::ContainerProf1D _cEtCutEmulvsBX_TTSubdet;  // online only!
0080 
0081   hcaldqm::ContainerProf2D _cEtData_ElectronicsuTCA;
0082   hcaldqm::ContainerProf2D _cEtEmul_ElectronicsuTCA;
0083 
0084   //    depth like
0085   hcaldqm::ContainerSingleProf2D _cEtData_depthlike;
0086   hcaldqm::ContainerSingleProf2D _cEtEmul_depthlike;
0087   hcaldqm::ContainerSingleProf2D _cEtCutData_depthlike;
0088   hcaldqm::ContainerSingleProf2D _cEtCutEmul_depthlike;
0089 
0090   //    Et Correlation Ratio
0091   hcaldqm::ContainerProf2D _cEtCorrRatio_ElectronicsuTCA;
0092   hcaldqm::ContainerSingleProf2D _cEtCorrRatio_depthlike;
0093   hcaldqm::ContainerProf1D _cEtCorrRatiovsLS_TTSubdet;  // online only!
0094   hcaldqm::ContainerProf1D _cEtCorrRatiovsBX_TTSubdet;  // online only!
0095 
0096   //    Occupancies
0097   hcaldqm::Container2D _cOccupancyData_ElectronicsuTCA;
0098   hcaldqm::Container2D _cOccupancyEmul_ElectronicsuTCA;
0099 
0100   hcaldqm::Container2D _cOccupancyCutData_ElectronicsuTCA;
0101   hcaldqm::Container2D _cOccupancyCutEmul_ElectronicsuTCA;
0102 
0103   //    depth like
0104   hcaldqm::ContainerSingle2D _cOccupancyData_depthlike;
0105   hcaldqm::ContainerSingle2D _cOccupancyEmul_depthlike;
0106   hcaldqm::ContainerSingle2D _cOccupancyCutData_depthlike;
0107   hcaldqm::ContainerSingle2D _cOccupancyCutEmul_depthlike;
0108 
0109   //    2x3 occupancies just in case
0110   hcaldqm::ContainerSingle2D _cOccupancyData2x3_depthlike;  // online only!
0111   hcaldqm::ContainerSingle2D _cOccupancyEmul2x3_depthlike;  // online only!
0112 
0113   //    Mismatches: Et and FG
0114   hcaldqm::Container2D _cEtMsm_ElectronicsuTCA;
0115   hcaldqm::Container2D _cFGMsm_ElectronicsuTCA;
0116   hcaldqm::ContainerSingle2D _cEtMsm_depthlike;
0117   hcaldqm::ContainerSingle2D _cFGMsm_depthlike;
0118   hcaldqm::ContainerProf1D _cEtMsmvsLS_TTSubdet;       // online only
0119   hcaldqm::ContainerProf1D _cEtMsmRatiovsLS_TTSubdet;  // online only
0120   hcaldqm::ContainerProf1D _cEtMsmvsBX_TTSubdet;       // online only
0121   hcaldqm::ContainerProf1D _cEtMsmRatiovsBX_TTSubdet;  // online only
0122 
0123   // Mismatches: data sent vs received
0124   hcaldqm::ContainerSingle2D _cEtMsm_uHTR_L1T_depthlike;
0125   hcaldqm::ContainerSingle1D _cEtMsm_uHTR_L1T_LS;
0126 
0127   //    Missing Data w.r.t. Emulator
0128   hcaldqm::Container2D _cMsnData_ElectronicsuTCA;
0129   hcaldqm::ContainerSingle2D _cMsnData_depthlike;
0130   hcaldqm::ContainerProf1D _cMsnDatavsLS_TTSubdet;     //   online only
0131   hcaldqm::ContainerProf1D _cMsnCutDatavsLS_TTSubdet;  // online only
0132   hcaldqm::ContainerProf1D _cMsnDatavsBX_TTSubdet;     // online only
0133   hcaldqm::ContainerProf1D _cMsnCutDatavsBX_TTSubdet;  // online only
0134 
0135   //    Missing Emulator w.r.t. Data
0136   hcaldqm::Container2D _cMsnEmul_ElectronicsuTCA;
0137   hcaldqm::ContainerSingle2D _cMsnEmul_depthlike;
0138   hcaldqm::ContainerProf1D _cMsnEmulvsLS_TTSubdet;     // online only
0139   hcaldqm::ContainerProf1D _cMsnCutEmulvsLS_TTSubdet;  //   online only
0140   hcaldqm::ContainerProf1D _cMsnEmulvsBX_TTSubdet;     // online only
0141   hcaldqm::ContainerProf1D _cMsnCutEmulvsBX_TTSubdet;  // online only
0142 
0143   //    Occupancy vs BX and LS
0144   hcaldqm::ContainerProf1D _cOccupancyDatavsBX_TTSubdet;     // online only
0145   hcaldqm::ContainerProf1D _cOccupancyEmulvsBX_TTSubdet;     // online only
0146   hcaldqm::ContainerProf1D _cOccupancyCutDatavsBX_TTSubdet;  // online only
0147   hcaldqm::ContainerProf1D _cOccupancyCutEmulvsBX_TTSubdet;  // online only
0148   hcaldqm::ContainerProf1D _cOccupancyDatavsLS_TTSubdet;     // online only
0149   hcaldqm::ContainerProf1D _cOccupancyEmulvsLS_TTSubdet;     // online only
0150   hcaldqm::ContainerProf1D _cOccupancyCutDatavsLS_TTSubdet;  // online only
0151   hcaldqm::ContainerProf1D _cOccupancyCutEmulvsLS_TTSubdet;  // online only
0152 
0153   //    track unknown ids
0154   MonitorElement *meUnknownIds1LS;
0155   bool _unknownIdsPresent;
0156 
0157   hcaldqm::Container2D _cSummaryvsLS_FED;    // online only
0158   hcaldqm::ContainerSingle2D _cSummaryvsLS;  // online only
0159   hcaldqm::ContainerXXX<uint32_t> _xEtMsm, _xFGMsm, _xNumCorr, _xDataMsn, _xDataTotal, _xEmulMsn, _xEmulTotal,
0160       _xSentRecL1Msm;
0161 
0162   // Temporary storage for occupancy with and without HF TDC cut
0163   hcaldqm::ContainerSingle2D _cOccupancy_HF_depth, _cOccupancyNoTDC_HF_depth;
0164   hcaldqm::ContainerSingle1D _cOccupancy_HF_ieta, _cOccupancyNoTDC_HF_ieta;
0165 
0166   // Container storing matched sent-received TPs
0167   std::vector<std::pair<HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi> > _vEmulTPDigis_SentRec;
0168   std::vector<std::pair<HcalTriggerPrimitiveDigi, HcalTriggerPrimitiveDigi> > _vTPDigis_SentRec;
0169 };
0170 
0171 #endif