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
13 
14 //DQM
19 
20 //Candidate handling
22 
23 // Electron & photon collections
26 
27 // Vertex utilities
30 
31 // Trigger
35 
36 // stage2 collections:
38 
40 
41 public:
42 
44  ~L1TEGammaOffline() override;
45 
46  enum PlotConfig {
50  };
51 
52  static const std::map<std::string, unsigned int> PlotConfigNames;
53 
54 protected:
55 
56  void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
57  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
58  void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
59  void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup) override;
60  void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup) override;
61  void endRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
62 
63 private:
64  bool passesLooseEleId(reco::GsfElectron const& electron) const;
65  bool passesMediumEleId(reco::GsfElectron const& electron) const;
68 
69  //other functions
70  double Distance(const reco::Candidate & c1, const reco::Candidate & c2);
71  double DistancePhi(const reco::Candidate & c1, const reco::Candidate & c2);
72  double calcDeltaPhi(double phi1, double phi2);
73 
74  void fillElectrons(edm::Event const& e, const unsigned int nVertex);
75  void fillPhotons(edm::Event const& e, const unsigned int nVertex);
77  bool matchesAnHLTObject(double eta, double phi) const;
78 
80 
81  //variables from config file
89  std::vector<std::string> triggerNames_;
92 
94 
95  std::vector<double> electronEfficiencyThresholds_;
96  std::vector<double> electronEfficiencyBins_;
99 
100  std::vector<double> photonEfficiencyThresholds_;
101  std::vector<double> photonEfficiencyBins_;
102 
106 
108  std::vector<unsigned int> triggerIndices_;
112 
113  // TODO: add turn-on cuts (vectors of doubles)
114  // Histograms
117 
118  // electron reco vs L1
122 
126 
128 
129  // electron resolutions
133 
137 
139 
140  // electron turn-ons
141  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_pass_;
142  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_pass_;
143  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_pass_;
144  std::map<double, MonitorElement*> h_efficiencyElectronPhi_vs_Eta_pass_;
145  // for deep inspection only
146  std::map<double, MonitorElement*> h_efficiencyElectronEta_pass_;
147  std::map<double, MonitorElement*> h_efficiencyElectronPhi_pass_;
148  std::map<double, MonitorElement*> h_efficiencyElectronNVertex_pass_;
149 
150  // we could drop the map here, but L1TEfficiency_Harvesting expects
151  // identical names except for the suffix
152  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_total_;
153  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_total_;
154  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_total_;
155  std::map<double, MonitorElement*> h_efficiencyElectronPhi_vs_Eta_total_;
156  // for deep inspection only
157  std::map<double, MonitorElement*> h_efficiencyElectronEta_total_;
158  std::map<double, MonitorElement*> h_efficiencyElectronPhi_total_;
159  std::map<double, MonitorElement*> h_efficiencyElectronNVertex_total_;
160 
161  // photons
165 
169 
171 
172  // electron resolutions
176 
180 
182 
183  // electron turn-ons
184  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_pass_;
185  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_pass_;
186  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_pass_;
187 
188  // we could drop the map here, but L1TEfficiency_Harvesting expects
189  // identical names except for the suffix
190  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_total_;
191  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_total_;
192  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_total_;
193 
194 };
195 
196 #endif
void bookElectronHistos(DQMStore::IBooker &)
std::map< double, MonitorElement * > h_efficiencyElectronNVertex_pass_
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_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
std::map< double, MonitorElement * > h_efficiencyPhotonET_EE_total_
MonitorElement * h_L1EGammaETvsElectronET_EB_EE_
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
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_
std::vector< HistDefinition > HistDefinitions
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_efficiencyElectronPhi_pass_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_total_
MonitorElement * h_resolutionPhotonET_EE_
MonitorElement * h_resolutionElectronET_EB_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_total_
dqmoffline::l1t::HistDefinitions histDefinitions_
bool passesLooseEleId(reco::GsfElectron const &electron) const
void bookPhotonHistos(DQMStore::IBooker &)
~L1TEGammaOffline() override
std::map< double, MonitorElement * > h_efficiencyElectronPhi_vs_Eta_total_
L1TEGammaOffline(const edm::ParameterSet &ps)
MonitorElement * h_L1EGammaETvsElectronET_EB_
std::map< double, MonitorElement * > h_efficiencyElectronPhi_vs_Eta_pass_
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
MonitorElement * h_L1EGammaPhivsElectronPhi_EB_EE_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_pass_
MonitorElement * h_resolutionElectronET_EE_
edm::EDGetTokenT< trigger::TriggerEvent > triggerInputTag_
std::vector< double > electronEfficiencyThresholds_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EB_EE_
double tagAndProbleInvariantMass_
std::map< double, MonitorElement * > h_efficiencyElectronEta_pass_
std::map< double, MonitorElement * > h_efficiencyElectronNVertex_total_
MonitorElement * h_L1EGammaEtavsElectronEta_
std::string triggerProcess_
MonitorElement * h_resolutionPhotonET_EB_
edm::EDGetTokenT< l1t::EGammaBxCollection > stage2CaloLayer2EGammaToken_
MonitorElement * h_resolutionElectronEta_
void endRun(edm::Run const &run, edm::EventSetup const &eSetup) override
reco::GsfElectron tagElectron_
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
MonitorElement * h_resolutionPhotonEta_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EE_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsInputTag_
static const std::map< std::string, unsigned int > PlotConfigNames
std::map< double, MonitorElement * > h_efficiencyElectronET_EE_total_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
HLTConfigProvider hltConfig_
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_
std::vector< double > deepInspectionElectronThresholds_
reco::GsfElectron probeElectron_
bool matchesAnHLTObject(double eta, double phi) const
MonitorElement * h_resolutionPhotonPhi_EB_EE_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::map< double, MonitorElement * > h_efficiencyElectronPhi_total_
MonitorElement * h_resolutionElectronET_EB_EE_
std::map< double, MonitorElement * > h_efficiencyElectronEta_total_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_EE_total_
std::vector< std::string > triggerNames_
MonitorElement * h_resolutionElectronPhi_EB_
edm::TriggerResults triggerResults_
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< unsigned int > triggerIndices_
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_
trigger::TriggerEvent triggerEvent_
Definition: Run.h:43