138 <<
"Module Label: " <<
g4Label <<
" Hits: " << zdcHits <<
" / " << checkHit_ <<
" Output: " <<
outFile_;
163 meBadZdcDetHit_ = ib.
book1D(
"Hiits with the wrong Det",
"Hits with wrong Det in ZDC", 100, 0., 100.);
222 meZdcTimeWHit_ = ib.
book1D(
"Energy Weighted Time in ZDC",
"Time in ZDC (E wtd)", 300, 0., 600.);
231 "Log(EHAD) vs Contribution",
"Log10Energy in Had ZDC vs Hit contribution", 140, -1., 20., 100, 0., 1.);
236 "Log(EEM) vs Contribution",
"Log10Energy in EM ZDC vs Hit contribution", 140, -1., 20., 100, 0., 1.);
241 meZdcEHadCh_ = ib.
book2D(
"ZDC EHAD vs Channel",
"ZDC Had Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6.);
245 meZdcEEMCh_ = ib.
book2D(
"ZDC EEM vs Channel",
"ZDC EM Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6.);
250 meZdcETime_ = ib.
book2D(
"E vs T",
"Hits ZDC Energy vs Time", 4000, 0., 8000., 300, 0., 600.);
254 ib.
setCurrentFolder(
"ZDCValidation/ZdcSimHits/ENERGY_SUMS/Individual_Channels/NZDC");
291 ib.
setCurrentFolder(
"ZDCValidation/ZdcSimHits/Excess_Info/Individual_ChannelvsTime/NZDC");
292 meZdcEneTEmN1_ = ib.
book2D(
"NZDC EM1 Energy vs Time",
"Energy EM mod N1 vs Time", 4000, 0., 8000., 300, 0., 600.);
296 meZdcEneTEmN2_ = ib.
book2D(
"NZDC EM2 Energy vs Time",
"Energy EM mod N2 vs Time", 4000, 0., 8000., 300, 0., 600.);
300 meZdcEneTEmN3_ = ib.
book2D(
"NZDC EM3 Energy vs Time",
"Energy EM mod N3 vs Time", 4000, 0., 8000., 300, 0., 600.);
304 meZdcEneTEmN4_ = ib.
book2D(
"NZDC EM4 Energy vs Time",
"Energy EM mod N4 vs Time", 4000, 0., 8000., 300, 0., 600.);
308 meZdcEneTEmN5_ = ib.
book2D(
"NZDC EM5 Energy vs Time",
"Energy EM mod N5 vs Time", 4000, 0., 8000., 300, 0., 600.);
313 ib.
book2D(
"NZDC HAD1 Energy vs Time",
"Energy HAD mod N1 vs Time", 4000, 0., 8000., 300, 0., 600.);
318 ib.
book2D(
"NZDC HAD2 Energy vs Time",
"Energy HAD mod N2 vs Time", 4000, 0., 8000., 300, 0., 600.);
323 ib.
book2D(
"NZDC HAD3 Energy vs Time",
"Energy HAD mod N3 vs Time", 4000, 0., 8000., 300, 0., 600.);
328 ib.
book2D(
"NZDC HAD4 Energy vs Time",
"Energy HAD mod N4 vs Time", 4000, 0., 8000., 300, 0., 600.);
345 ib.
setCurrentFolder(
"ZDCValidation/ZdcSimHits/ENERGY_SUMS/Individual_Channels/PZDC");
382 ib.
setCurrentFolder(
"ZDCValidation/ZdcSimHits/Excess_Info/Individual_ChannelvsTime/PZDC");
383 meZdcEneTEmP1_ = ib.
book2D(
"PZDC EM1 Energy vs Time",
"Energy EM mod P1 vs Time", 4000, 0., 8000., 300, 0., 600.);
387 meZdcEneTEmP2_ = ib.
book2D(
"PZDC EM2 Energy vs Time",
"Energy EM mod P2 vs Time", 4000, 0., 8000., 300, 0., 600.);
391 meZdcEneTEmP3_ = ib.
book2D(
"PZDC EM3 Energy vs Time",
"Energy EM mod P3 vs Time", 4000, 0., 8000., 300, 0., 600.);
395 meZdcEneTEmP4_ = ib.
book2D(
"PZDC EM4 Energy vs Time",
"Energy EM mod P4 vs Time", 4000, 0., 8000., 300, 0., 600.);
399 meZdcEneTEmP5_ = ib.
book2D(
"PZDC EM5 Energy vs Time",
"Energy EM mod P5 vs Time", 4000, 0., 8000., 300, 0., 600.);
404 ib.
book2D(
"PZDC HAD1 Energy vs Time",
"Energy HAD mod P1 vs Time", 4000, 0., 8000., 300, 0., 600.);
409 ib.
book2D(
"PZDC HAD2 Energy vs Time",
"Energy HAD mod P2 vs Time", 4000, 0., 8000., 300, 0., 600.);
414 ib.
book2D(
"PZDC HAD3 Energy vs Time",
"Energy HAD mod P3 vs Time", 4000, 0., 8000., 300, 0., 600.);
419 ib.
book2D(
"PZDC HAD4 Energy vs Time",
"Energy HAD mod P4 vs Time", 4000, 0., 8000., 300, 0., 600.);
463 genpart_Pi0F = ib.
book2D(
"Pi0_Forward",
"Forward Generated Pi0s", 200, 7.5, 13, 100, -3.15, 3.15);
472 ib.
book2D(
"Pi0_Forward_Counts",
"Number of Forward Generated Pi0s", 200, 7.5, 13, 100, -3.15, 3.15);
482 genpart_NeutF = ib.
book2D(
"Neutron_Forward",
"Forward Generated Neutrons", 200, 7.5, 13, 100, -3.15, 3.15);
491 ib.
book2D(
"Neutron_Forward_Counts",
"Number of Forward Generated Neutrons", 200, 7.5, 13, 100, -3.15, 3.15);
501 genpart_GammaF = ib.
book2D(
"Gamma_Forward",
"Forward Generated Gammas", 200, 7.5, 13, 100, -3.15, 3.15);
510 ib.
book2D(
"Gamma_Forward_Counts",
"Number of Forward Generated Gammas", 200, 7.5, 13, 100, -3.15, 3.15);
531 ib.
book1D(
"Gamma_Forward_EDistribution",
"Gen-Level Fowarad Gamma Energy", 1500, 0, 1500);
538 genpart_Pi0B = ib.
book2D(
"Pi0_Backward",
"Backward Generated Pi0s", 1000, -13, -7.5, 100, -3.15, 3.15);
547 ib.
book2D(
"Pi0_Backwards_Counts",
"Number of Backward Generated Pi0s", 200, -13, -7.5, 100, -3.15, 3.15);
557 genpart_NeutB = ib.
book2D(
"Neutron_Backward",
"Backward Generated Neutrons", 1000, -13, -7.5, 100, -3.15, 3.15);
566 "Neutron_Backwards_Counts",
"Number of Backward Generated Neutrons", 200, -13, -7.5, 100, -3.15, 3.15);
575 genpart_GammaB = ib.
book2D(
"Gamma_Backward",
"Backward Generated Gammas", 1000, -13, -7.5, 100, -3.15, 3.15);
584 ib.
book2D(
"Gamma_Backwards_Counts",
"Number of Backward Generated Gammas", 200, -13, -7.5, 100, -3.15, 3.15);
607 ib.
book1D(
"Gamma_Backward_EDistribution",
"Gen-Level Backward Gamma Energy", 1500, 0, 1500);
624 bool gotGenParticles =
true;
629 gotGenParticles =
false;
632 if (!(genhandle.isValid())) {
633 gotGenParticles =
false;
641 if (gotGenParticles ==
true) {
643 for (reco::GenParticleCollection::const_iterator
gen = genhandle->begin();
gen != genhandle->end();
648 double energy_2 = thisParticle.
energy();
651 double gen_phi = thisParticle.
phi();
652 double gen_eta = thisParticle.
eta();
653 int gen_id = thisParticle.
pdgId();
673 if (gen_eta < -8.3) {
680 if (gen_id == 2112) {
687 if (gen_eta < -8.3) {
702 if (gen_eta < -8.3) {
719 std::vector<PCaloHit> caloHits;
722 bool getHits =
false;
725 if (hitsZdc.isValid())
729 edm::LogVerbatim(
"ZdcSim") <<
"ZdcValidation: Input flags Hits " << getHits;
732 caloHits.insert(caloHits.end(), hitsZdc->begin(), hitsZdc->end());
733 edm::LogVerbatim(
"ZdcSimHitStudy") <<
"ZdcValidation: Hit buffer " << caloHits.size();
739 int nHit = hits.size();
740 int nZdcEM = 0, nZdcHad = 0, nZdcLum = 0;
741 int nBad1 = 0, nBad2 = 0, nBad = 0;
742 std::vector<double> encontZdcEM(140, 0.);
743 std::vector<double> encontZdcHad(140, 0.);
744 double entotZdcEM = 0;
745 double entotZdcHad = 0;
755 for (
int i = 0;
i < nHit;
i++) {
756 double energy = hits[
i].energy();
757 double log10en = log10(energy);
758 int log10i = int((log10en + 10.) * 10.);
759 double time = hits[
i].time();
760 unsigned int id_ = hits[
i].id();
763 int side =
id.zside();
765 int channel =
id.channel();
770 <<
" Det " << det <<
" side " << side <<
" Section " << section <<
" channel "
771 << channel <<
" E " << energy <<
" time \n"
799 if (log10i >= 0 && log10i < 140)
800 encontZdcEM[log10i] +=
energy;
806 if (log10i >= 0 && log10i < 140)
807 encontZdcHad[log10i] +=
energy;
818 for (
int i = 0;
i < 140;
i++)
820 if (entotZdcHad != 0)
821 for (
int i = 0;
i < 140;
i++)
843 edm::LogVerbatim(
"HcalSimHitStudy") <<
"HcalSimHitStudy::analyzeHits: Had " << nZdcHad <<
" EM " << nZdcEM <<
" Bad "
844 << nBad <<
" All " << nHit;
MonitorElement * meZdcEneTHadP3_
Log< level::Info, true > LogVerbatim
MonitorElement * meZdcEnergyHit_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meZdcEneTEmN1_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const edm::EventSetup & c
MonitorElement * genpart_NeutB
void analyzeHits(std::vector< PCaloHit > &)
MonitorElement * genpart_Pi0F
MonitorElement * meZdcEneTEmP1_
MonitorElement * meZdcHadL10EneP_
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meZdcEneEmP3_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meZdcEneEmPTot_
MonitorElement * meZdcEneEmN1_
virtual void setOption(const char *option)
#define DEFINE_FWK_MODULE(type)
MonitorElement * meZdcEneTEmP4_
MonitorElement * meZdcEneHadN1_
MonitorElement * meZdcCorEEmNEHadN_
MonitorElement * meZdcEneEmN4_
MonitorElement * meZdcEneTHadN4_
MonitorElement * meZdcEneEmN5_
MonitorElement * meAllZdcNHit_
MonitorElement * genpart_Pi0F_energydist
MonitorElement * meZdcEneTEmN2_
MonitorElement * meZdcEneHadN4_
MonitorElement * genpart_GammaF_counts
MonitorElement * genpart_NeutF
MonitorElement * meZdcEneTHadN2_
MonitorElement * genpart_Pi0B
int pdgId() const final
PDG identifier.
MonitorElement * meZdcEneEmNTot_
MonitorElement * meZdcChannelHit_
MonitorElement * meZdcEneEmP2_
MonitorElement * meZdcEneHadP1_
MonitorElement * meZdcEML10EneP_
MonitorElement * meZdcEneTEmN5_
MonitorElement * meZdcEneEmN3_
MonitorElement * meZdcNHitHad_
MonitorElement * genpart_Pi0B_counts
MonitorElement * meBadZdcDetHit_
ZdcSimHitStudy(const edm::ParameterSet &ps)
MonitorElement * genpart_GammaB_energydist
MonitorElement * meZdcEneTEmP5_
MonitorElement * genpart_Pi0F_counts
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
MonitorElement * meZdcEnePTot_
MonitorElement * meZdcEneTEmN4_
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 * meZdcCorEEmPEHadP_
MonitorElement * meZdcEneTHadP2_
MonitorElement * genpart_GammaF_energydist
MonitorElement * meZdcSideHit_
MonitorElement * meZdcEneHadN3_
MonitorElement * meZdcEneEmN2_
MonitorElement * meZdcEneTHadN1_
MonitorElement * meZdcEneTEmP3_
MonitorElement * genpart_NeutF_energydist
MonitorElement * meZdcDetectHit_
MonitorElement * meZdc10Ene_
edm::EDGetTokenT< reco::GenParticleCollection > tok_gen_
MonitorElement * meZdcEneHadP4_
int FillHitValHist(int side, int section, int channel, double energy, double time)
MonitorElement * meZdcEneTot_
MonitorElement * meZdcEneHadP3_
MonitorElement * genpart_GammaF
Log< level::Info, false > LogInfo
MonitorElement * meZdcEneTEmN3_
MonitorElement * meBadZdcSecHit_
MonitorElement * meZdcEneTHadP1_
MonitorElement * genpart_GammaB
MonitorElement * meZdcNHit_
MonitorElement * meZdcTimeHit_
MonitorElement * meBadZdcIdHit_
MonitorElement * meZdcEneTHadP4_
MonitorElement * meZdcEneHadNTot_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * genpart_NeutB_energydist
MonitorElement * meZdcCorEtotNEtotP_
MonitorElement * genpart_NeutF_counts
MonitorElement * meZdcEneHadP2_
MonitorElement * meZdcEneEmP4_
MonitorElement * meZdcHadEnergyHit_
MonitorElement * genpart_Pi0B_energydist
MonitorElement * meZdcEneEmP5_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * meZdcEneTEmP2_
MonitorElement * genpart_GammaB_counts
MonitorElement * meZdcSectionHit_
MonitorElement * meZdcEneNTot_
MonitorElement * meZdcEneHadN2_
MonitorElement * meZdcEneHadPTot_
MonitorElement * meZdcEEMCh_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * genpart_NeutB_counts
MonitorElement * meZdcEneEmP1_
MonitorElement * meZdc10EneP_
MonitorElement * meZdcNHitEM_
double phi() const final
momentum azimuthal angle
MonitorElement * meZdcEneTHadN3_
MonitorElement * meZdcTimeWHit_
MonitorElement * meZdcEHadCh_
MonitorElement * meZdcETime_
MonitorElement * meZdcEMEnergyHit_
MonitorElement * meZdcNHitLum_
~ZdcSimHitStudy() override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
double energy() const final
energy
double eta() const final
momentum pseudorapidity