File indexing completed on 2024-04-06 12:09:37
0001 #ifndef ZCountingElectrons_H
0002 #define ZCountingElectrons_H
0003
0004 #include "FWCore/Framework/interface/MakerMacros.h" // definitions for declaring plug-in modules
0005 #include "FWCore/Framework/interface/Frameworkfwd.h" // declaration of EDM types
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h" // Parameters
0008 #include "FWCore/Utilities/interface/InputTag.h"
0009
0010 #include <string> // string class
0011 #include <cassert>
0012
0013 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0014 #include "DataFormats/VertexReco/interface/Vertex.h"
0015 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0016
0017 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0018 #include "DQMServices/Core/interface/DQMStore.h"
0019
0020 #include "DQMOffline/Lumi/interface/TriggerTools.h"
0021 #include "DQMOffline/Lumi/interface/ElectronIdentifier.h"
0022
0023 class ZCountingElectrons : public DQMEDAnalyzer {
0024 public:
0025 ZCountingElectrons(const edm::ParameterSet& ps);
0026 ~ZCountingElectrons() override;
0027
0028 protected:
0029 void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
0030 void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0031 void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
0032
0033 private:
0034
0035 bool ele_probe_selection(double pt, double abseta);
0036 bool ele_tag_selection(double pt, double abseta);
0037
0038
0039 const edm::InputTag triggerResultsInputTag_;
0040 edm::EDGetTokenT<reco::VertexCollection> fPVName_token;
0041
0042
0043 edm::EDGetTokenT<edm::View<reco::GsfElectron>> fGsfElectronName_token;
0044 edm::EDGetTokenT<edm::View<reco::SuperCluster>> fSCName_token;
0045 edm::EDGetTokenT<double> fRhoToken;
0046 edm::EDGetTokenT<reco::BeamSpot> fBeamspotToken;
0047 edm::EDGetTokenT<reco::ConversionCollection> fConversionToken;
0048
0049 double PtCutL1_;
0050 double PtCutL2_;
0051 double EtaCutL1_;
0052 double EtaCutL2_;
0053
0054 int MassBin_;
0055 double MassMin_;
0056 double MassMax_;
0057
0058 int LumiBin_;
0059 double LumiMin_;
0060 double LumiMax_;
0061
0062 int PVBin_;
0063 double PVMin_;
0064 double PVMax_;
0065
0066 double VtxNTracksFitCut_;
0067 double VtxNdofCut_;
0068 double VtxAbsZCut_;
0069 double VtxRhoCut_;
0070
0071 const std::string ELE_ID_WP;
0072
0073
0074 HLTConfigProvider hltConfigProvider_;
0075 TriggerTools* triggers;
0076
0077
0078 const double DRMAX = 0.1;
0079 const float ELECTRON_MASS = 0.000511;
0080 const float ELE_ETA_CRACK_LOW = 1.4442;
0081 const float ELE_ETA_CRACK_HIGH = 1.56;
0082
0083
0084 ElectronIdentifier EleID_;
0085
0086
0087 MonitorElement* h_npv;
0088
0089
0090 MonitorElement* h_ee_mass_id_pass_central;
0091 MonitorElement* h_ee_mass_id_fail_central;
0092 MonitorElement* h_ee_mass_id_pass_forward;
0093 MonitorElement* h_ee_mass_id_fail_forward;
0094
0095 MonitorElement* h_ee_mass_HLT_pass_central;
0096 MonitorElement* h_ee_mass_HLT_fail_central;
0097 MonitorElement* h_ee_mass_HLT_pass_forward;
0098 MonitorElement* h_ee_mass_HLT_fail_forward;
0099
0100 MonitorElement* h_ee_yield_Z_ebeb;
0101 MonitorElement* h_ee_yield_Z_ebee;
0102 MonitorElement* h_ee_yield_Z_eeee;
0103 };
0104
0105 #endif