CMS 3D CMS Logo

L1TEGammaOffline.h
Go to the documentation of this file.
1 #ifndef L1TEGammaOffline_H
2 #define L1TEGammaOffline_H
3 
4 //Framework
8 
9 //event
12 
13 //DQM
17 
18 //Candidate handling
20 
21 // Electron & photon collections
24 
25 // Vertex utilities
28 
29 // Trigger
33 
34 // stage2 collections:
36 
38 
39 public:
40 
42  virtual ~L1TEGammaOffline();
43 
44 protected:
45 
46  void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
47  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
48  void analyze(edm::Event const& e, edm::EventSetup const& eSetup);
50  void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup);
51  void endRun(edm::Run const& run, edm::EventSetup const& eSetup);
52 
53 private:
54  bool passesLooseEleId(reco::GsfElectron const& electron) const;
55  bool passesMediumEleId(reco::GsfElectron const& electron) const;
58 
59  //other functions
60  double Distance(const reco::Candidate & c1, const reco::Candidate & c2);
61  double DistancePhi(const reco::Candidate & c1, const reco::Candidate & c2);
62  double calcDeltaPhi(double phi1, double phi2);
63 
64  void fillElectrons(edm::Event const& e, const unsigned int nVertex);
65  void fillPhotons(edm::Event const& e, const unsigned int nVertex);
67 
69 
70  //variables from config file
81 
83 
84  std::vector<double> electronEfficiencyThresholds_;
85  std::vector<double> electronEfficiencyBins_;
86 
87  std::vector<double> photonEfficiencyThresholds_;
88  std::vector<double> photonEfficiencyBins_;
89 
93 
94  // TODO: add turn-on cuts (vectors of doubles)
95  // Histograms
98 
99  // electron reco vs L1
103 
107 
109 
110  // electron resolutions
114 
118 
120 
121  // electron turn-ons
122  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_pass_;
123  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_pass_;
124  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_pass_;
125 
126  // we could drop the map here, but L1TEfficiency_Harvesting expects
127  // identical names except for the suffix
128  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_total_;
129  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_total_;
130  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_total_;
131 
132  // photons
136 
140 
142 
143  // electron resolutions
147 
151 
153 
154  // electron turn-ons
155  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_pass_;
156  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_pass_;
157  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_pass_;
158 
159  // we could drop the map here, but L1TEfficiency_Harvesting expects
160  // identical names except for the suffix
161  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_total_;
162  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_total_;
163  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_total_;
164 
165 };
166 
167 #endif
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
void bookElectronHistos(DQMStore::IBooker &)
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
void fillPhotons(edm::Event const &e, const unsigned int nVertex)
std::vector< double > electronEfficiencyBins_
MonitorElement * h_resolutionElectronPhi_EB_EE_
MonitorElement * h_L1EGammaPhivsElectronPhi_EE_
edm::EDGetTokenT< reco::GsfElectronCollection > theGsfElectronCollection_
math::XYZPoint PVPoint_
MonitorElement * h_tagAndProbeMass_
std::string triggerPath_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EE_total_
MonitorElement * h_L1EGammaETvsElectronET_EB_EE_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_pass_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EB_
double calcDeltaPhi(double phi1, double phi2)
bool passesMediumEleId(reco::GsfElectron const &electron) const
MonitorElement * h_L1EGammaETvsPhotonET_EB_
edm::EDGetTokenT< std::vector< reco::Photon > > thePhotonCollection_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_EE_pass_
std::string histFolder_
MonitorElement * h_L1EGammaETvsPhotonET_EE_
void fillElectrons(edm::Event const &e, const unsigned int nVertex)
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_total_
MonitorElement * h_resolutionPhotonET_EE_
void analyze(edm::Event const &e, edm::EventSetup const &eSetup)
MonitorElement * h_resolutionElectronET_EB_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_total_
edm::InputTag triggerFilter_
bool passesLooseEleId(reco::GsfElectron const &electron) const
void bookPhotonHistos(DQMStore::IBooker &)
L1TEGammaOffline(const edm::ParameterSet &ps)
MonitorElement * h_L1EGammaETvsElectronET_EB_
MonitorElement * h_L1EGammaPhivsElectronPhi_EB_EE_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_pass_
MonitorElement * h_resolutionElectronET_EE_
std::vector< double > electronEfficiencyThresholds_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EB_EE_
double tagAndProbleInvariantMass_
virtual ~L1TEGammaOffline()
void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)
MonitorElement * h_L1EGammaEtavsElectronEta_
MonitorElement * h_resolutionPhotonET_EB_
edm::EDGetTokenT< l1t::EGammaBxCollection > stage2CaloLayer2EGammaToken_
MonitorElement * h_resolutionElectronEta_
reco::GsfElectron tagElectron_
MonitorElement * h_resolutionPhotonEta_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EE_
std::map< double, MonitorElement * > h_efficiencyElectronET_EE_total_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool findTagAndProbePair(edm::Handle< reco::GsfElectronCollection > const &electrons)
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_total_
std::string efficiencyFolder_
std::map< double, MonitorElement * > h_efficiencyElectronET_EE_pass_
reco::GsfElectron probeElectron_
MonitorElement * h_resolutionPhotonPhi_EB_EE_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
MonitorElement * h_resolutionElectronET_EB_EE_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_EE_total_
MonitorElement * h_resolutionElectronPhi_EB_
MonitorElement * h_nVertex_
MonitorElement * h_resolutionPhotonPhi_EB_
std::vector< double > photonEfficiencyBins_
MonitorElement * h_L1EGammaETvsPhotonET_EB_EE_
MonitorElement * h_L1EGammaETvsElectronET_EE_
edm::EDGetTokenT< reco::BeamSpot > theBSCollection_
MonitorElement * h_resolutionElectronPhi_EE_
MonitorElement * h_L1EGammaEtavsPhotonEta_
MonitorElement * h_resolutionPhotonPhi_EE_
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2)
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
std::vector< double > photonEfficiencyThresholds_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_pass_
MonitorElement * h_L1EGammaPhivsElectronPhi_EB_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EE_pass_
MonitorElement * h_resolutionPhotonET_EB_EE_
Definition: Run.h:42
edm::EDGetTokenT< trigger::TriggerEvent > triggerEvent_
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup)