Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:41:57

0001 #ifndef DTTriggerEfficiencyTask_H
0002 #define DTTriggerEfficiencyTask_H
0003 
0004 /*
0005  * \file DTTriggerEfficiencyTask.h
0006  *
0007  * \author C. Battilana - CIEMAT
0008  *
0009 */
0010 
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "DataFormats/Common/interface/Handle.h"
0013 #include "FWCore/Framework/interface/LuminosityBlock.h"
0014 
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 #include "FWCore/Utilities/interface/InputTag.h"
0021 
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0024 
0025 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
0026 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
0027 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
0028 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
0029 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
0030 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0031 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0032 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0033 
0034 #include <vector>
0035 #include <string>
0036 #include <map>
0037 
0038 class DTGeometry;
0039 class DTChamberId;
0040 class DTTrigGeomUtils;
0041 
0042 class DTTriggerEfficiencyTask : public DQMEDAnalyzer {
0043 public:
0044   /// Constructor
0045   DTTriggerEfficiencyTask(const edm::ParameterSet& ps);
0046 
0047   /// Destructor
0048   ~DTTriggerEfficiencyTask() override;
0049 
0050 protected:
0051   /// BeginRun
0052   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0053 
0054   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0055 
0056   /// Book chamber granularity histograms
0057   void bookChamberHistos(DQMStore::IBooker& ibooker,
0058                          const DTChamberId& dtCh,
0059                          std::string histoTag,
0060                          std::string folder = "");
0061 
0062   /// Book wheel granularity histograms
0063   void bookWheelHistos(DQMStore::IBooker& ibooker, int wheel, std::string histoTag, std::string folder = "");
0064 
0065   /// checks for RPC Triggers
0066   bool hasRPCTriggers(const edm::Event& e);
0067 
0068   /// return the top folder
0069   std::string topFolder() {
0070     return "DT/03-LocalTrigger-TM/";  //DDU no longer existing, leaving folder here for past references
0071   }
0072 
0073   /// Analyze
0074   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0075 
0076   /// To reset the MEs
0077 
0078 private:
0079   int nevents;
0080 
0081   std::string SegmArbitration;
0082 
0083   bool processTM, detailedPlots, checkRPCtriggers;
0084   std::vector<std::string> processTags;
0085 
0086   float phiAccRange;
0087   int nMinHitsPhi;
0088 
0089   edm::EDGetTokenT<reco::MuonCollection> muons_Token_;
0090   edm::EDGetTokenT<L1MuDTChambPhContainer> tm_Token_;
0091   edm::InputTag inputTagSEG;
0092   edm::EDGetTokenT<L1MuGMTReadoutCollection> gmt_Token_;
0093 
0094   edm::ParameterSet parameters;
0095   edm::ESGetToken<DTGeometry, MuonGeometryRecord> muonGeomToken_;
0096   const DTGeometry* muonGeom;
0097   DTTrigGeomUtils* trigGeomUtils;
0098   std::map<uint32_t, std::map<std::string, MonitorElement*> > chamberHistos;
0099   std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
0100 };
0101 
0102 #endif
0103 
0104 /* Local Variables: */
0105 /* show-trailing-whitespace: t */
0106 /* truncate-lines: t */
0107 /* End: */