|
|
Go to the documentation of this file.
25 #include "CLHEP/Units/GlobalPhysicalConstants.h"
34 : outputFileName_(iConfig.getParameter<
std::
string>(
"outputFileName")),
87 iBooker.
book1D(histname +
"All_miniAOD",
" Photon Transverse Energy: All ecal ",
etBin,
etMin,
etMax);
89 iBooker.
book1D(histname +
"Barrel_miniAOD",
" Photon Transverse Energy: Barrel ",
etBin,
etMin,
etMax);
91 iBooker.
book1D(histname +
"Endcap_miniAOD",
" Photon Transverse Energy: Endcap ",
etBin,
etMin,
etMax);
95 histname +
"All_miniAOD",
" Photon E/E_{true}: All ecal; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
97 histname +
"Barrel_miniAOD",
"Photon E/E_{true}: Barrel; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
99 histname +
"Endcap_miniAOD",
" Photon E/E_{true}: Endcap; E/E_{true} (GeV)",
resBin,
resMin,
resMax);
101 histname =
"sigmaEoE";
103 iBooker.
book1D(histname +
"All_miniAOD",
"#sigma_{E}/E: All ecal; #sigma_{E}/E", 100, 0., 0.08);
105 iBooker.
book1D(histname +
"Barrel_miniAOD",
"#sigma_{E}/E: Barrel; #sigma_{E}/E", 100, 0., 0.08);
107 iBooker.
book1D(histname +
"Endcap_miniAOD",
"#sigma_{E}/E: Endcap, #sigma_{E}/E", 100, 0., 0.08);
113 histname =
"full5x5_r9";
126 h_hOverE_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"H/E: All Ecal", 100, 0., 0.2);
127 h_hOverE_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"H/E: Barrel ", 100, 0., 0.2);
128 h_hOverE_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"H/E: Endcap ", 100, 0., 0.2);
130 histname =
"newhOverE";
131 h_newhOverE_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"new H/E: All Ecal", 100, 0., 0.2);
132 h_newhOverE_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"new H/E: Barrel ", 100, 0., 0.2);
133 h_newhOverE_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"new H/E: Endcap ", 100, 0., 0.2);
135 histname =
"sigmaIetaIeta";
136 h_sigmaIetaIeta_[0][0] = iBooker.
book1D(histname +
"All_miniAOD",
"sigmaIetaIeta: All Ecal", 100, 0., 0.1);
137 h_sigmaIetaIeta_[0][1] = iBooker.
book1D(histname +
"Barrel_miniAOD",
"sigmaIetaIeta: Barrel ", 100, 0., 0.05);
138 h_sigmaIetaIeta_[0][2] = iBooker.
book1D(histname +
"Endcap_miniAOD",
"sigmaIetaIeta: Endcap ", 100, 0., 0.1);
139 histname =
"full5x5_sigmaIetaIeta";
141 iBooker.
book1D(histname +
"All_miniAOD",
"Full5x5 sigmaIetaIeta: All Ecal", 100, 0., 0.1);
143 iBooker.
book1D(histname +
"Barrel_miniAOD",
"Full5x5 sigmaIetaIeta: Barrel ", 100, 0., 0.05);
145 iBooker.
book1D(histname +
"Endcap_miniAOD",
"Full5x5 sigmaIetaIeta: Endcap ", 100, 0., 0.1);
147 histname =
"ecalRecHitSumEtConeDR04";
149 iBooker.
book1D(histname +
"All_miniAOD",
"ecalRecHitSumEtDR04: All Ecal",
etBin,
etMin, 20.);
151 iBooker.
book1D(histname +
"Barrel_miniAOD",
"ecalRecHitSumEtDR04: Barrel ",
etBin,
etMin, 20.);
153 iBooker.
book1D(histname +
"Endcap_miniAOD",
"ecalRecHitSumEtDR04: Endcap ",
etBin,
etMin, 20.);
154 histname =
"hcalTowerSumEtConeDR04";
156 iBooker.
book1D(histname +
"All_miniAOD",
"hcalTowerSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
158 iBooker.
book1D(histname +
"Barrel_miniAOD",
"hcalTowerSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
160 iBooker.
book1D(histname +
"Endcap_miniAOD",
"hcalTowerSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
162 histname =
"hcalTowerBcSumEtConeDR04";
164 iBooker.
book1D(histname +
"All_miniAOD",
"hcalTowerBcSumEtConeDR04: All Ecal",
etBin,
etMin, 20.);
166 iBooker.
book1D(histname +
"Barrel_miniAOD",
"hcalTowerBcSumEtConeDR04: Barrel ",
etBin,
etMin, 20.);
168 iBooker.
book1D(histname +
"Endcap_miniAOD",
"hcalTowerBcSumEtConeDR04: Endcap ",
etBin,
etMin, 20.);
169 histname =
"isoTrkSolidConeDR04";
171 iBooker.
book1D(histname +
"All_miniAOD",
"isoTrkSolidConeDR04: All Ecal",
etBin,
etMin,
etMax * 0.1);
173 iBooker.
book1D(histname +
"Barrel_miniAOD",
"isoTrkSolidConeDR04: Barrel ",
etBin,
etMin,
etMax * 0.1);
175 iBooker.
book1D(histname +
"Endcap_miniAOD",
"isoTrkSolidConeDR04: Endcap ",
etBin,
etMin,
etMax * 0.1);
176 histname =
"nTrkSolidConeDR04";
182 histname =
"chargedHadIso";
186 histname =
"neutralHadIso";
190 histname =
"photonIso";
203 const auto &
photons = *photonsHandle;
210 if (!(mcIter->pdgId() == 22))
212 if (mcIter->mother() !=
nullptr && !(mcIter->mother()->pdgId() == 25))
214 if (fabs(mcIter->eta()) > 2.5)
219 float mcPhi = mcIter->phi();
220 float mcEta = mcIter->eta();
222 float mcEnergy = mcIter->energy();
224 double dR = 9999999.;
225 float minDr = 10000.;
228 for (
size_t ipho = 0; ipho <
photons.size(); ipho++) {
231 double dphi = pho->
phi() - mcPhi;
233 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
235 double deta = pho->
superCluster()->position().eta() - mcEta;
238 if (
dR < 0.1 &&
dR < minDr) {
251 bool phoIsInBarrel =
false;
252 bool phoIsInEndcap =
false;
254 float phoEta = matchingPho->
superCluster()->position().eta();
255 if (fabs(phoEta) < 1.479) {
256 phoIsInBarrel =
true;
258 phoIsInEndcap =
true;
261 float photonE = matchingPho->
energy();
263 float photonEt = matchingPho->
energy() / cosh(matchingPho->
eta());
266 float r9 = matchingPho->
r9();
268 float r1 = matchingPho->
r1x5();
269 float r2 = matchingPho->
r2x5();
MonitorElement * h_newhOverE_[3][3]
MonitorElement * h_phoIso_[3]
MonitorElement * h_scPhi_[2]
MonitorElement * h_nTrkSolidConeDR04_[3][3]
MonitorElement * h_phoERes_[3][3]
int etaBin(const l1t::HGCalMulticluster *cl)
float sigmaIetaIeta() const
~PhotonValidatorMiniAOD() override
MonitorElement * h_hOverE_[3][3]
MonitorElement * h_phoE_[2][3]
float hadTowOverEm() const
the ration of hadronic energy in towers behind the BCs in the SC and the SC energy
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
MonitorElement * h_r9_[3][3]
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_phoEt_[2][3]
MonitorElement * h_hcalTowerSumEtConeDR04_[3][3]
edm::EDGetTokenT< edm::View< pat::Photon > > photonToken_
float neutralHadronIso() const
MonitorElement * h_r2_[3][3]
int nTrkSolidConeDR04() const
edm::EDGetTokenT< reco::GenParticleCollection > genpartToken_
PhotonValidatorMiniAOD(const edm::ParameterSet &)
MonitorElement * h_scEta_[2]
float hcalTowerSumEtBcConeDR04() const
Hcal isolation sum subtracting the hadronic energy in towers behind the BCs in the SC.
double eta() const final
momentum pseudorapidity
float getCorrectedEnergyError(P4type type) const
MonitorElement * h_full5x5_sigmaIetaIeta_[3][3]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_full5x5_r9_[3][3]
void analyze(const edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
MonitorElement * h_phoSigmaEoE_[3][3]
MonitorElement * h_nHadIso_[3]
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
MonitorElement * h_r1_[3][3]
double phi() const final
momentum azimuthal angle
MonitorElement * h_ecalRecHitSumEtConeDR04_[3][3]
float trkSumPtSolidConeDR04() const
P4type getCandidateP4type() const
float ecalRecHitSumEtConeDR04() const
float chargedHadronIso() const
edm::ParameterSet parameters_
double energy() const final
energy
float full5x5_sigmaIetaIeta() const
Power< A, B >::type pow(const A &a, const B &b)
MonitorElement * h_hcalTowerBcSumEtConeDR04_[3][3]
MonitorElement * h_isoTrkSolidConeDR04_[3][3]
MonitorElement * h_sigmaIetaIeta_[3][3]
float hcalTowerSumEtConeDR04() const
Hcal isolation sum.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_chHadIso_[3]
eBin
CAREFULL for the time being only Loos exists 1 => Tight Photon = GoodCandidate.
reco::SuperClusterRef superCluster() const override
override the superCluster method from CaloJet, to access the internal storage of the supercluster