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
18 
19 //Candidate handling
21 
22 // Electron & photon collections
25 
26 // Vertex utilities
29 
30 // Trigger
34 
35 // stage2 collections:
37 
39 public:
41  ~L1TEGammaOffline() override;
42 
44 
45  static const std::map<std::string, unsigned int> PlotConfigNames;
46 
47 protected:
48  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
49  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
50  void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;
51  void dqmEndRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
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  bool matchesAnHLTObject(double eta, double phi) const;
68 
70 
72 
73  //variables from config file
81  std::vector<std::string> triggerNames_;
84 
86 
87  std::vector<double> electronEfficiencyThresholds_;
88  std::vector<double> electronEfficiencyBins_;
90  std::vector<double> deepInspectionElectronThresholds_;
91 
92  std::vector<double> photonEfficiencyThresholds_;
93  std::vector<double> photonEfficiencyBins_;
94 
98 
102 
104  std::vector<unsigned int> triggerIndices_;
108 
109  // TODO: add turn-on cuts (vectors of doubles)
110  // Histograms
113 
114  // electron reco vs L1
118 
122 
124 
125  // electron resolutions
129 
133 
135 
136  // electron turn-ons
137  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_pass_;
138  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_pass_;
139  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_pass_;
140  std::map<double, MonitorElement*> h_efficiencyElectronPhi_vs_Eta_pass_;
141  // for deep inspection only
142  std::map<double, MonitorElement*> h_efficiencyElectronEta_pass_;
143  std::map<double, MonitorElement*> h_efficiencyElectronPhi_pass_;
144  std::map<double, MonitorElement*> h_efficiencyElectronNVertex_pass_;
145 
146  // we could drop the map here, but L1TEfficiency_Harvesting expects
147  // identical names except for the suffix
148  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_total_;
149  std::map<double, MonitorElement*> h_efficiencyElectronET_EE_total_;
150  std::map<double, MonitorElement*> h_efficiencyElectronET_EB_EE_total_;
151  std::map<double, MonitorElement*> h_efficiencyElectronPhi_vs_Eta_total_;
152  // for deep inspection only
153  std::map<double, MonitorElement*> h_efficiencyElectronEta_total_;
154  std::map<double, MonitorElement*> h_efficiencyElectronPhi_total_;
155  std::map<double, MonitorElement*> h_efficiencyElectronNVertex_total_;
156 
157  // photons
161 
165 
167 
168  // electron resolutions
172 
176 
178 
179  // photon turn-ons
180  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_pass_;
181  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_pass_;
182  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_pass_;
183 
184  // we could drop the map here, but L1TEfficiency_Harvesting expects
185  // identical names except for the suffix
186  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_total_;
187  std::map<double, MonitorElement*> h_efficiencyPhotonET_EE_total_;
188  std::map<double, MonitorElement*> h_efficiencyPhotonET_EB_EE_total_;
189 };
190 
191 #endif
L1TEGammaOffline::fillPhotons
void fillPhotons(edm::Event const &e, const unsigned int nVertex)
Definition: L1TEGammaOffline.cc:458
L1TEGammaOffline::theGsfElectronCollection_
edm::EDGetTokenT< reco::GsfElectronCollection > theGsfElectronCollection_
Definition: L1TEGammaOffline.h:74
L1TEGammaOffline::efficiencyFolder_
std::string efficiencyFolder_
Definition: L1TEGammaOffline.h:83
L1TEGammaOffline::L1TEGammaOffline
L1TEGammaOffline(const edm::ParameterSet &ps)
Definition: L1TEGammaOffline.cc:28
L1TEGammaOffline::dqmEndRun
void dqmEndRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition: L1TEGammaOffline.cc:574
L1TEGammaOffline::passesMediumEleId
bool passesMediumEleId(reco::GsfElectron const &electron) const
Definition: L1TEGammaOffline.cc:417
L1TEGammaOffline::h_resolutionElectronET_EE_
MonitorElement * h_resolutionElectronET_EE_
Definition: L1TEGammaOffline.h:127
L1TEGammaOffline::h_L1EGammaETvsPhotonET_EE_
MonitorElement * h_L1EGammaETvsPhotonET_EE_
Definition: L1TEGammaOffline.h:159
L1TEGammaOffline::electronEfficiencyBins_
std::vector< double > electronEfficiencyBins_
Definition: L1TEGammaOffline.h:88
L1TEGammaOffline::h_L1EGammaETvsElectronET_EB_EE_
MonitorElement * h_L1EGammaETvsElectronET_EB_EE_
Definition: L1TEGammaOffline.h:117
L1TEGammaOffline::triggerEvent_
trigger::TriggerEvent triggerEvent_
Definition: L1TEGammaOffline.h:106
L1TEGammaOffline::h_efficiencyPhotonET_EB_pass_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_pass_
Definition: L1TEGammaOffline.h:180
L1TEGammaOffline::h_L1EGammaPhivsPhotonPhi_EB_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EB_
Definition: L1TEGammaOffline.h:162
L1TEGammaOffline::nVertex
Definition: L1TEGammaOffline.h:43
TriggerResults.h
L1TEGammaOffline::h_L1EGammaETvsPhotonET_EB_
MonitorElement * h_L1EGammaETvsPhotonET_EB_
Definition: L1TEGammaOffline.h:158
edm::Run
Definition: Run.h:45
TriggerEvent.h
edm::EDGetTokenT< reco::GsfElectronCollection >
L1TEGammaOffline::h_L1EGammaEtavsElectronEta_
MonitorElement * h_L1EGammaEtavsElectronEta_
Definition: L1TEGammaOffline.h:123
L1TEGammaOffline::triggerResults_
edm::TriggerResults triggerResults_
Definition: L1TEGammaOffline.h:105
L1TEGammaOffline::photonEfficiencyBins_
std::vector< double > photonEfficiencyBins_
Definition: L1TEGammaOffline.h:93
L1TEGammaOffline::h_L1EGammaETvsPhotonET_EB_EE_
MonitorElement * h_L1EGammaETvsPhotonET_EB_EE_
Definition: L1TEGammaOffline.h:160
L1TEGammaOffline::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: L1TEGammaOffline.cc:117
L1TEGammaOffline::bookPhotonHistos
void bookPhotonHistos(DQMStore::IBooker &)
Definition: L1TEGammaOffline.cc:801
L1TEGammaOffline::h_resolutionElectronPhi_EB_EE_
MonitorElement * h_resolutionElectronPhi_EB_EE_
Definition: L1TEGammaOffline.h:132
L1TEGammaOffline::PVPoint_
math::XYZPoint PVPoint_
Definition: L1TEGammaOffline.h:71
L1TEGammaOffline::h_tagAndProbeMass_
MonitorElement * h_tagAndProbeMass_
Definition: L1TEGammaOffline.h:112
L1TEGammaOffline::tagAndProbleInvariantMass_
double tagAndProbleInvariantMass_
Definition: L1TEGammaOffline.h:101
L1TEGammaOffline::h_resolutionPhotonET_EB_EE_
MonitorElement * h_resolutionPhotonET_EB_EE_
Definition: L1TEGammaOffline.h:171
L1TEGammaOffline::h_L1EGammaEtavsPhotonEta_
MonitorElement * h_L1EGammaEtavsPhotonEta_
Definition: L1TEGammaOffline.h:166
L1TEGammaOffline::h_efficiencyPhotonET_EB_EE_total_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_total_
Definition: L1TEGammaOffline.h:188
L1TEGammaOffline::h_resolutionPhotonET_EE_
MonitorElement * h_resolutionPhotonET_EE_
Definition: L1TEGammaOffline.h:170
L1TEGammaOffline::h_efficiencyPhotonET_EB_EE_pass_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_EE_pass_
Definition: L1TEGammaOffline.h:182
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
L1TEGammaOffline::analyze
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: L1TEGammaOffline.cc:143
L1TEGammaOffline::h_resolutionPhotonPhi_EE_
MonitorElement * h_resolutionPhotonPhi_EE_
Definition: L1TEGammaOffline.h:174
DQMStore.h
L1TEGammaOffline::h_resolutionElectronET_EB_
MonitorElement * h_resolutionElectronET_EB_
Definition: L1TEGammaOffline.h:126
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
L1TEGammaOffline::DistancePhi
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2)
L1TEGammaOffline::h_efficiencyElectronEta_pass_
std::map< double, MonitorElement * > h_efficiencyElectronEta_pass_
Definition: L1TEGammaOffline.h:142
L1TEGammaOffline::fillElectrons
void fillElectrons(edm::Event const &e, const unsigned int nVertex)
Definition: L1TEGammaOffline.cc:180
L1TEGammaOffline::h_efficiencyPhotonET_EE_total_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EE_total_
Definition: L1TEGammaOffline.h:187
L1TEGammaOffline::h_efficiencyElectronPhi_pass_
std::map< double, MonitorElement * > h_efficiencyElectronPhi_pass_
Definition: L1TEGammaOffline.h:143
L1TEGammaOffline::calcDeltaPhi
double calcDeltaPhi(double phi1, double phi2)
edm::Handle< reco::GsfElectronCollection >
HistDefinition.h
L1TEGammaOffline::thePhotonCollection_
edm::EDGetTokenT< std::vector< reco::Photon > > thePhotonCollection_
Definition: L1TEGammaOffline.h:75
L1TEGammaOffline::bookElectronHistos
void bookElectronHistos(DQMStore::IBooker &)
Definition: L1TEGammaOffline.cc:581
L1TEGammaOffline::h_efficiencyElectronET_EB_EE_pass_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_EE_pass_
Definition: L1TEGammaOffline.h:139
DQMOneEDAnalyzer.h
L1TEGammaOffline::h_L1EGammaPhivsElectronPhi_EE_
MonitorElement * h_L1EGammaPhivsElectronPhi_EE_
Definition: L1TEGammaOffline.h:120
L1TEGammaOffline::h_L1EGammaETvsElectronET_EB_
MonitorElement * h_L1EGammaETvsElectronET_EB_
Definition: L1TEGammaOffline.h:115
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
Photon.h
L1TEGammaOffline::h_efficiencyElectronNVertex_total_
std::map< double, MonitorElement * > h_efficiencyElectronNVertex_total_
Definition: L1TEGammaOffline.h:155
L1TEGammaOffline::h_efficiencyElectronET_EB_total_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_total_
Definition: L1TEGammaOffline.h:148
L1TEGammaOffline::stage2CaloLayer2EGammaToken_
edm::EDGetTokenT< l1t::EGammaBxCollection > stage2CaloLayer2EGammaToken_
Definition: L1TEGammaOffline.h:85
L1TEGammaOffline::maxDeltaRForHLTMatching_
double maxDeltaRForHLTMatching_
Definition: L1TEGammaOffline.h:96
L1TEGammaOffline::maxDeltaRForL1Matching_
double maxDeltaRForL1Matching_
Definition: L1TEGammaOffline.h:95
EGamma.h
Service.h
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1TEGammaOffline::h_efficiencyElectronPhi_vs_Eta_total_
std::map< double, MonitorElement * > h_efficiencyElectronPhi_vs_Eta_total_
Definition: L1TEGammaOffline.h:151
L1TEGammaOffline::triggerNames_
std::vector< std::string > triggerNames_
Definition: L1TEGammaOffline.h:81
L1TEGammaOffline::h_efficiencyElectronPhi_vs_Eta_pass_
std::map< double, MonitorElement * > h_efficiencyElectronPhi_vs_Eta_pass_
Definition: L1TEGammaOffline.h:140
L1TEGammaOffline::normalise2DHistogramsToBinArea
void normalise2DHistogramsToBinArea()
Definition: L1TEGammaOffline.cc:946
L1TEGammaOffline::histFolder_
std::string histFolder_
Definition: L1TEGammaOffline.h:82
reco::GsfElectron
Definition: GsfElectron.h:35
L1TEGammaOffline::matchesAnHLTObject
bool matchesAnHLTObject(double eta, double phi) const
Definition: L1TEGammaOffline.cc:445
GsfElectron.h
L1TEGammaOffline::PlotConfigNames
static const std::map< std::string, unsigned int > PlotConfigNames
Definition: L1TEGammaOffline.h:45
L1TEGammaOffline::h_resolutionElectronEta_
MonitorElement * h_resolutionElectronEta_
Definition: L1TEGammaOffline.h:134
L1TEGammaOffline::tagElectron_
reco::GsfElectron tagElectron_
Definition: L1TEGammaOffline.h:99
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
L1TEGammaOffline::passesLooseEleId
bool passesLooseEleId(reco::GsfElectron const &electron) const
Definition: L1TEGammaOffline.cc:383
L1TEGammaOffline::triggerProcess_
std::string triggerProcess_
Definition: L1TEGammaOffline.h:80
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
L1TEGammaOffline::h_efficiencyElectronET_EB_pass_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_pass_
Definition: L1TEGammaOffline.h:137
L1TEGammaOffline::h_resolutionPhotonEta_
MonitorElement * h_resolutionPhotonEta_
Definition: L1TEGammaOffline.h:177
L1TEGammaOffline::deepInspectionElectronThresholds_
std::vector< double > deepInspectionElectronThresholds_
Definition: L1TEGammaOffline.h:90
L1TEGammaOffline::PHIvsPHI
Definition: L1TEGammaOffline.h:43
Event.h
L1TEGammaOffline::triggerInputTag_
edm::EDGetTokenT< trigger::TriggerEvent > triggerInputTag_
Definition: L1TEGammaOffline.h:78
L1TEGammaOffline::hltConfig_
HLTConfigProvider hltConfig_
Definition: L1TEGammaOffline.h:103
L1TEGammaOffline::h_resolutionPhotonET_EB_
MonitorElement * h_resolutionPhotonET_EB_
Definition: L1TEGammaOffline.h:169
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
L1TEGammaOffline::photonEfficiencyThresholds_
std::vector< double > photonEfficiencyThresholds_
Definition: L1TEGammaOffline.h:92
L1TEGammaOffline::PlotConfig
PlotConfig
Definition: L1TEGammaOffline.h:43
L1TEGammaOffline::h_efficiencyPhotonET_EB_total_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EB_total_
Definition: L1TEGammaOffline.h:186
L1TEGammaOffline::h_efficiencyElectronET_EE_pass_
std::map< double, MonitorElement * > h_efficiencyElectronET_EE_pass_
Definition: L1TEGammaOffline.h:138
L1TEGammaOffline::probeElectron_
reco::GsfElectron probeElectron_
Definition: L1TEGammaOffline.h:100
edm::EventSetup
Definition: EventSetup.h:57
L1TEGammaOffline::h_nVertex_
MonitorElement * h_nVertex_
Definition: L1TEGammaOffline.h:111
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
HLTConfigProvider.h
L1TEGammaOffline::theBSCollection_
edm::EDGetTokenT< reco::BeamSpot > theBSCollection_
Definition: L1TEGammaOffline.h:77
HPSPFTauProducerPuppi_cfi.electron
electron
Definition: HPSPFTauProducerPuppi_cfi.py:13
dqmoffline::l1t::HistDefinitions
std::vector< HistDefinition > HistDefinitions
Definition: HistDefinition.h:51
L1TEGammaOffline::findTagAndProbePair
bool findTagAndProbePair(edm::Handle< reco::GsfElectronCollection > const &electrons)
Definition: L1TEGammaOffline.cc:337
TriggerObject.h
InputTag.h
reco::Candidate
Definition: Candidate.h:27
L1TEGammaOffline::triggerResultsInputTag_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsInputTag_
Definition: L1TEGammaOffline.h:79
VertexFwd.h
L1TEGammaOffline::h_resolutionPhotonPhi_EB_EE_
MonitorElement * h_resolutionPhotonPhi_EB_EE_
Definition: L1TEGammaOffline.h:175
DDAxes::phi
L1TEGammaOffline::h_efficiencyElectronET_EB_EE_total_
std::map< double, MonitorElement * > h_efficiencyElectronET_EB_EE_total_
Definition: L1TEGammaOffline.h:150
L1TEGammaOffline::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: L1TEGammaOffline.cc:132
L1TEGammaOffline::h_efficiencyElectronET_EE_total_
std::map< double, MonitorElement * > h_efficiencyElectronET_EE_total_
Definition: L1TEGammaOffline.h:149
HLTConfigProvider
Definition: HLTConfigProvider.h:28
L1TEGammaOffline
Definition: L1TEGammaOffline.h:38
writedatasetfile.run
run
Definition: writedatasetfile.py:27
L1TEGammaOffline::triggerIndices_
std::vector< unsigned int > triggerIndices_
Definition: L1TEGammaOffline.h:104
L1TEGammaOffline::h_L1EGammaPhivsPhotonPhi_EB_EE_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EB_EE_
Definition: L1TEGammaOffline.h:164
pwdgSkimBPark_cfi.electrons
electrons
Definition: pwdgSkimBPark_cfi.py:6
L1TEGammaOffline::electronEfficiencyThresholds_
std::vector< double > electronEfficiencyThresholds_
Definition: L1TEGammaOffline.h:87
L1TEGammaOffline::probeToL1Offset_
double probeToL1Offset_
Definition: L1TEGammaOffline.h:89
L1TEGammaOffline::ETvsET
Definition: L1TEGammaOffline.h:43
L1TEGammaOffline::h_efficiencyElectronPhi_total_
std::map< double, MonitorElement * > h_efficiencyElectronPhi_total_
Definition: L1TEGammaOffline.h:154
L1TEGammaOffline::h_efficiencyPhotonET_EE_pass_
std::map< double, MonitorElement * > h_efficiencyPhotonET_EE_pass_
Definition: L1TEGammaOffline.h:181
L1TEGammaOffline::h_resolutionElectronPhi_EE_
MonitorElement * h_resolutionElectronPhi_EE_
Definition: L1TEGammaOffline.h:131
L1TEGammaOffline::h_resolutionPhotonPhi_EB_
MonitorElement * h_resolutionPhotonPhi_EB_
Definition: L1TEGammaOffline.h:173
EventSetup.h
L1TEGammaOffline::h_L1EGammaETvsElectronET_EE_
MonitorElement * h_L1EGammaETvsElectronET_EE_
Definition: L1TEGammaOffline.h:116
L1TEGammaOffline::thePVCollection_
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
Definition: L1TEGammaOffline.h:76
L1TEGammaOffline::Distance
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
L1TEGammaOffline::h_resolutionElectronET_EB_EE_
MonitorElement * h_resolutionElectronET_EB_EE_
Definition: L1TEGammaOffline.h:128
Candidate.h
L1TEGammaOffline::h_efficiencyElectronEta_total_
std::map< double, MonitorElement * > h_efficiencyElectronEta_total_
Definition: L1TEGammaOffline.h:153
ParameterSet.h
L1TEGammaOffline::h_resolutionElectronPhi_EB_
MonitorElement * h_resolutionElectronPhi_EB_
Definition: L1TEGammaOffline.h:130
L1TEGammaOffline::h_efficiencyElectronNVertex_pass_
std::map< double, MonitorElement * > h_efficiencyElectronNVertex_pass_
Definition: L1TEGammaOffline.h:144
L1TEGammaOffline::h_L1EGammaPhivsElectronPhi_EB_
MonitorElement * h_L1EGammaPhivsElectronPhi_EB_
Definition: L1TEGammaOffline.h:119
edm::Event
Definition: Event.h:73
L1TEGammaOffline::~L1TEGammaOffline
~L1TEGammaOffline() override
Definition: L1TEGammaOffline.cc:110
L1TEGammaOffline::h_L1EGammaPhivsPhotonPhi_EE_
MonitorElement * h_L1EGammaPhivsPhotonPhi_EE_
Definition: L1TEGammaOffline.h:163
edm::TriggerResults
Definition: TriggerResults.h:35
L1TEGammaOffline::h_L1EGammaPhivsElectronPhi_EB_EE_
MonitorElement * h_L1EGammaPhivsElectronPhi_EB_EE_
Definition: L1TEGammaOffline.h:121
L1TEGammaOffline::recoToL1TThresholdFactor_
double recoToL1TThresholdFactor_
Definition: L1TEGammaOffline.h:97
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
L1TEGammaOffline::histDefinitions_
dqmoffline::l1t::HistDefinitions histDefinitions_
Definition: L1TEGammaOffline.h:107