Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:01

0001 #ifndef EFFICIENCYANALYZER_H
0002 #define EFFICIENCYANALYZER_H
0003 
0004 /**   Class EfficiencyAnalyzer
0005  *  
0006  *    DQM monitoring for dimuon mass
0007  *    
0008  *    Author:  S.Folgueras, A. Calderon
0009  */
0010 
0011 /* Base Class Headers */
0012 #include <memory>
0013 #include <fstream>
0014 #include "FWCore/Framework/interface/Frameworkfwd.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "FWCore/Utilities/interface/InputTag.h"
0019 #include "FWCore/ServiceRegistry/interface/Service.h"
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0022 
0023 #include "DataFormats/MuonReco/interface/Muon.h"
0024 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0025 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0026 #include "DataFormats/VertexReco/interface/Vertex.h"
0027 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0028 #include "DataFormats/TrackReco/interface/Track.h"
0029 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0030 
0031 class EfficiencyAnalyzer : public DQMEDAnalyzer {
0032 public:
0033   /* Constructor */
0034   EfficiencyAnalyzer(const edm::ParameterSet& pset);
0035 
0036   /* Destructor */
0037   ~EfficiencyAnalyzer() override;
0038 
0039   /* Operations */
0040   void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0041   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0042 
0043 private:
0044   edm::ParameterSet parameters;
0045 
0046   // Switch for verbosity
0047   std::string metname;
0048 
0049   //histo binning parameters
0050   int etaBin_;
0051   int phiBin_;
0052   int ptBin_;
0053 
0054   double ptMin_;
0055   double ptMax_;
0056 
0057   double etaMin_;
0058   double etaMax_;
0059 
0060   double phiMin_;
0061   double phiMax_;
0062 
0063   int vtxBin_;
0064   double vtxMin_;
0065   double vtxMax_;
0066 
0067   std::string ID_;
0068 
0069   MonitorElement* h_passProbes_ID_pt;
0070   MonitorElement* h_passProbes_ID_inner_pt;
0071   MonitorElement* h_passProbes_ID_inner_eta;
0072   MonitorElement* h_passProbes_ID_inner_phi;
0073   MonitorElement* h_passProbes_ID_EB_pt;
0074   MonitorElement* h_passProbes_ID_EE_pt;
0075   MonitorElement* h_passProbes_ID_eta;
0076   MonitorElement* h_passProbes_ID_hp_eta;
0077   MonitorElement* h_passProbes_ID_phi;
0078   MonitorElement* h_passProbes_detIsoID_pt;
0079   MonitorElement* h_passProbes_EB_detIsoID_pt;
0080   MonitorElement* h_passProbes_EE_detIsoID_pt;
0081   MonitorElement* h_passProbes_pfIsoID_pt;
0082   MonitorElement* h_passProbes_EB_pfIsoID_pt;
0083   MonitorElement* h_passProbes_EE_pfIsoID_pt;
0084   MonitorElement* h_passProbes_detIsoID_nVtx;
0085   MonitorElement* h_passProbes_pfIsoID_nVtx;
0086   MonitorElement* h_passProbes_EB_detIsoID_nVtx;
0087   MonitorElement* h_passProbes_EE_detIsoID_nVtx;
0088   MonitorElement* h_passProbes_EB_pfIsoID_nVtx;
0089   MonitorElement* h_passProbes_EE_pfIsoID_nVtx;
0090 
0091   MonitorElement* h_failProbes_ID_pt;
0092   MonitorElement* h_failProbes_ID_eta;
0093   MonitorElement* h_failProbes_ID_phi;
0094 
0095   MonitorElement* h_allProbes_pt;
0096   MonitorElement* h_allProbes_EB_pt;
0097   MonitorElement* h_allProbes_EE_pt;
0098   MonitorElement* h_allProbes_eta;
0099   MonitorElement* h_allProbes_hp_eta;
0100   MonitorElement* h_allProbes_phi;
0101   MonitorElement* h_allProbes_ID_pt;
0102   MonitorElement* h_allProbes_inner_pt;
0103   MonitorElement* h_allProbes_inner_eta;
0104   MonitorElement* h_allProbes_inner_phi;
0105   MonitorElement* h_allProbes_EB_ID_pt;
0106   MonitorElement* h_allProbes_EE_ID_pt;
0107   MonitorElement* h_allProbes_ID_nVtx;
0108   MonitorElement* h_allProbes_EB_ID_nVtx;
0109   MonitorElement* h_allProbes_EE_ID_nVtx;
0110 
0111   // Apply deltaBeta PU corrections to the PF isolation eficiencies.
0112   MonitorElement* h_passProbes_pfIsodBID_pt;
0113   MonitorElement* h_passProbes_EB_pfIsodBID_pt;
0114   MonitorElement* h_passProbes_EE_pfIsodBID_pt;
0115   MonitorElement* h_passProbes_pfIsodBID_nVtx;
0116   MonitorElement* h_passProbes_EB_pfIsodBID_nVtx;
0117   MonitorElement* h_passProbes_EE_pfIsodBID_nVtx;
0118 
0119   int _numPV;
0120 
0121   // STA Label
0122   edm::EDGetTokenT<edm::View<reco::Muon> > theMuonCollectionLabel_;
0123   edm::EDGetTokenT<reco::TrackCollection> theTrackCollectionLabel_;
0124 
0125   //Vertex requirements
0126   bool doPVCheck_;
0127   edm::EDGetTokenT<reco::VertexCollection> theVertexLabel_;
0128   edm::EDGetTokenT<reco::BeamSpot> theBeamSpotLabel_;
0129 
0130   std::string theFolder;
0131 };
0132 #endif