47 static constexpr
double partR2 = 0.3 * 0.3;
118 constexpr
auto size = 100;
122 -5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853,
123 -2.65, -2.5, -2.322, -2.172, -2.043, -1.93, -1.83, -1.74, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218,
124 -1.131, -1.044, -0.957, -0.879, -0.783, -0.696, -0.609, -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, 0,
125 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.879, 0.957, 1.044, 1.131, 1.218,
126 1.305, 1.392, 1.479, 1.566, 1.653, 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.5, 2.65, 2.853,
127 2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
146 strncpy(
histo,
"emean_vs_eta_EHF",
size);
148 strncpy(
histo,
"emean_vs_eta_EHFO",
size);
153 strncpy(
histo,
"Ratio_Esummed_ECAL_0",
size);
155 strncpy(
histo,
"Ratio_Esummed_HCAL_0",
size);
157 strncpy(
histo,
"Ratio_Esummed_HO_0",
size);
159 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_0",
size);
161 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_HO_0",
size);
164 strncpy(
histo,
"Ratio_Esummed_ECAL_1",
size);
166 strncpy(
histo,
"Ratio_Esummed_HCAL_1",
size);
168 strncpy(
histo,
"Ratio_Esummed_HO_1",
size);
170 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_1",
size);
172 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_HO_1",
size);
175 strncpy(
histo,
"Ratio_Esummed_ECAL_2",
size);
177 strncpy(
histo,
"Ratio_Esummed_HCAL_2",
size);
179 strncpy(
histo,
"Ratio_Esummed_HO_2",
size);
181 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_2",
size);
183 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_HO_2",
size);
186 strncpy(
histo,
"Ratio_Esummed_ECAL_3",
size);
188 strncpy(
histo,
"Ratio_Esummed_HCAL_3",
size);
190 strncpy(
histo,
"Ratio_Esummed_HO_3",
size);
192 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_3",
size);
194 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_HO_3",
size);
197 strncpy(
histo,
"Ratio_Esummed_ECAL_4",
size);
199 strncpy(
histo,
"Ratio_Esummed_HCAL_4",
size);
201 strncpy(
histo,
"Ratio_Esummed_HO_4",
size);
203 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_4",
size);
205 strncpy(
histo,
"Ratio_Esummed_ECAL_HCAL_HO_4",
size);
208 strncpy(
histo,
"Ratio_Esummed_HF_5",
size);
210 strncpy(
histo,
"Ratio_Esummed_HF_6",
size);
220 double energy_MC = 0.;
224 if (not
hepMC.isValid()) {
230 double maxPt = -99999.;
232 for (
auto p = myGenEvent->particles_begin();
p != myGenEvent->particles_end(); ++
p) {
233 double phip = (*p)->momentum().phi();
234 double etap = (*p)->momentum().eta();
235 double pt = (*p)->momentum().perp();
236 double energy = (*p)->momentum().e();
260 const double Econe =
sumEnergy(pfClusterECAL, eta_MC, phi_MC);
261 const double Hcone =
sumEnergy(pfClusterHCAL, eta_MC, phi_MC);
262 const double HOcone =
sumEnergy(pfClusterHO, eta_MC, phi_MC);
263 const double HFcone =
sumEnergy(pfClusterHF, eta_MC, phi_MC);
265 if (energy_MC > 0.) {
319 for (
auto pf = pfClusters->begin();
pf != pfClusters->end(); ++
pf) {
MonitorElement * ratio_Esummed_HCAL_4_
MonitorElement * ratio_Esummed_ECAL_4_
void analyze(edm::Event const &e, edm::EventSetup const &c) override
PFClusterValidation(edm::ParameterSet const &conf)
MonitorElement * emean_vs_eta_EHFO_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * emean_vs_eta_E_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHCALTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHOTok_
MonitorElement * ratio_Esummed_HO_3_
MonitorElement * ratio_Esummed_HCAL_0_
MonitorElement * ratio_Esummed_ECAL_0_
MonitorElement * ratio_Esummed_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_1_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * emean_vs_eta_EH_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * ratio_Esummed_HF_5_
MonitorElement * ratio_Esummed_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_1_
MonitorElement * ratio_Esummed_HF_6_
MonitorElement * emean_vs_eta_EHF_
MonitorElement * emean_vs_eta_H_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * ratio_Esummed_ECAL_HCAL_0_
MonitorElement * ratio_Esummed_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_3_
Abs< T >::type abs(const T &t)
MonitorElement * ratio_Esummed_HO_4_
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHFTok_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_0_
MonitorElement * egen_MC_
edm::EDGetTokenT< edm::HepMCProduct > hepMCTok_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_4_
~PFClusterValidation() override
static double sumEnergy(edm::Handle< reco::PFClusterCollection > const &pfClusters, double eta, double phi)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * ratio_Esummed_HCAL_1_
MonitorElement * ratio_Esummed_ECAL_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_4_
MonitorElement * ratio_Esummed_HO_0_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_1_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
static constexpr double partR2
MonitorElement * ratio_Esummed_HO_1_
MonitorElement * emean_vs_eta_HF_
MonitorElement * emean_vs_eta_HO_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterECALTok_
MonitorElement * ratio_Esummed_ECAL_2_