28 #include "CLHEP/Units/GlobalSystemOfUnits.h"
40 <<
"Module Label: " <<
g4Label <<
" Hits: "
41 << zdcHits <<
" / "<< checkHit_
154 meZdcEHadCh_ =
dbe_->
book2D(
"ZDC EHAD vs Channel",
"ZDC Had Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6. );
158 meZdcEEMCh_ =
dbe_->
book2D(
"ZDC EEM vs Channel",
"ZDC EM Section Energy vs Channel", 4000, 0., 8000., 6, 0., 6. );
205 meZdcEneTEmN1_ =
dbe_->
book2D(
"NZDC EM1 Energy vs Time",
"Energy EM mod N1 vs Time", 4000, 0., 8000., 300, 0., 600. );
209 meZdcEneTEmN2_ =
dbe_->
book2D(
"NZDC EM2 Energy vs Time",
"Energy EM mod N2 vs Time", 4000, 0., 8000., 300, 0., 600. );
213 meZdcEneTEmN3_ =
dbe_->
book2D(
"NZDC EM3 Energy vs Time",
"Energy EM mod N3 vs Time", 4000, 0., 8000., 300, 0., 600. );
217 meZdcEneTEmN4_ =
dbe_->
book2D(
"NZDC EM4 Energy vs Time",
"Energy EM mod N4 vs Time", 4000, 0., 8000., 300, 0., 600. );
221 meZdcEneTEmN5_ =
dbe_->
book2D(
"NZDC EM5 Energy vs Time",
"Energy EM mod N5 vs Time", 4000, 0., 8000., 300, 0., 600. );
292 meZdcEneTEmP1_ =
dbe_->
book2D(
"PZDC EM1 Energy vs Time",
"Energy EM mod P1 vs Time", 4000, 0., 8000., 300, 0., 600. );
296 meZdcEneTEmP2_ =
dbe_->
book2D(
"PZDC EM2 Energy vs Time",
"Energy EM mod P2 vs Time", 4000, 0., 8000., 300, 0., 600. );
300 meZdcEneTEmP3_ =
dbe_->
book2D(
"PZDC EM3 Energy vs Time",
"Energy EM mod P3 vs Time", 4000, 0., 8000., 300, 0., 600. );
304 meZdcEneTEmP4_ =
dbe_->
book2D(
"PZDC EM4 Energy vs Time",
"Energy EM mod P4 vs Time", 4000, 0., 8000., 300, 0., 600. );
308 meZdcEneTEmP5_ =
dbe_->
book2D(
"PZDC EM5 Energy vs Time",
"Energy EM mod P5 vs Time", 4000, 0., 8000., 300, 0., 600. );
475 bool gotGenParticles=
true;
480 if (!(iEvent.
getByLabel(
"genParticles",genhandle)))
482 gotGenParticles=
false;
484 if (!(genhandle.isValid()))
486 gotGenParticles=
false;
500 if (gotGenParticles==
true){
501 for (reco::GenParticleCollection::const_iterator
gen = genhandle->begin();
502 gen!=genhandle->end();
507 double energy_2= thisParticle.
energy();
508 double gen_phi = thisParticle.
phi();
509 double gen_eta = thisParticle.
eta();
510 int gen_id = thisParticle.
pdgId();
571 <<
"Run = " << iEvent.
id().
run() <<
" Event = "
577 std::vector<PCaloHit> caloHits;
580 bool getHits =
false;
584 if (hitsZdc.isValid()) getHits =
true;
587 LogDebug(
"ZdcSim") <<
"ZdcValidation: Input flags Hits " << getHits;
590 caloHits.insert(caloHits.end(),hitsZdc->begin(),hitsZdc->end());
593 <<
"ZdcValidation: Hit buffer "
601 int nHit = hits.size();
602 int nZdcEM = 0, nZdcHad = 0, nZdcLum = 0;
603 int nBad1=0, nBad2=0, nBad=0;
604 std::vector<double> encontZdcEM(140, 0.);
605 std::vector<double> encontZdcHad(140, 0.);
606 double entotZdcEM = 0;
607 double entotZdcHad = 0;
617 for (
int i=0;
i<nHit;
i++) {
618 double energy = hits[
i].energy();
619 double log10en = log10(energy);
620 int log10i = int( (log10en+10.)*10. );
621 double time = hits[
i].time();
622 unsigned int id_ = hits[
i].id();
625 int side =
id.zside();
626 int section =
id.section();
627 int channel =
id.channel();
634 <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
635 << std::dec <<
" DetID "<<
id
636 <<
" Det "<< det <<
" side "<< side
637 <<
" Section " << section
638 <<
" channel "<< channel
640 <<
" time \n" <<
time;
647 else { nBad++; nBad2++;}
648 }
else { nBad++; nBad1++;}
659 if( log10i >=0 && log10i < 140 )encontZdcEM[log10i] +=
energy;
665 if( log10i >=0 && log10i < 140 )encontZdcHad[log10i] +=
energy;
676 if( entotZdcEM != 0 )
for(
int i=0;
i<140;
i++ )
meZdcEML10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontZdcEM[
i]/entotZdcEM);
677 if( entotZdcHad != 0 )
for(
int i=0;
i<140;
i++ )
meZdcHadL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10.,encontZdcHad[
i]/entotZdcHad);
679 if (
dbe_ && nHit>0) {
700 <<
"HcalSimHitStudy::analyzeHits: Had " << nZdcHad
702 <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * meZdcEneTHadP3_
MonitorElement * meZdcEnergyHit_
virtual double energy() const GCC11_FINAL
energy
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meZdcEneTEmN1_
MonitorElement * genpart_NeutB
void analyzeHits(std::vector< PCaloHit > &)
MonitorElement * genpart_Pi0F
MonitorElement * meZdcEneTEmP1_
MonitorElement * meZdcHadL10EneP_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * meZdcEneEmP3_
MonitorElement * meZdcEneEmPTot_
MonitorElement * meZdcEneEmN1_
virtual int pdgId() const GCC11_FINAL
PDG identifier.
MonitorElement * meZdcEneTEmP4_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
MonitorElement * meZdcEneHadN1_
MonitorElement * meZdcCorEEmNEHadN_
MonitorElement * meZdcEneEmN4_
MonitorElement * meZdcEneTHadN4_
MonitorElement * meZdcEneEmN5_
MonitorElement * meAllZdcNHit_
MonitorElement * genpart_Pi0F_energydist
MonitorElement * meZdcEneTEmN2_
MonitorElement * meZdcEneHadN4_
MonitorElement * genpart_NeutF
MonitorElement * meZdcEneTHadN2_
MonitorElement * genpart_Pi0B
MonitorElement * meZdcEneEmNTot_
MonitorElement * meZdcChannelHit_
MonitorElement * meZdcEneEmP2_
MonitorElement * meZdcEneHadP1_
MonitorElement * meZdcEML10EneP_
MonitorElement * meZdcEneTEmN5_
MonitorElement * meZdcEneEmN3_
MonitorElement * meZdcNHitHad_
MonitorElement * meBadZdcDetHit_
ZdcSimHitStudy(const edm::ParameterSet &ps)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
MonitorElement * genpart_GammaB_energydist
MonitorElement * meZdcEneTEmP5_
MonitorElement * meZdcEnePTot_
MonitorElement * meZdcEneTEmN4_
MonitorElement * meZdcCorEEmPEHadP_
MonitorElement * meZdcEneTHadP2_
MonitorElement * genpart_GammaF_energydist
MonitorElement * meZdcSideHit_
MonitorElement * meZdcEneHadN3_
MonitorElement * meZdcEneEmN2_
MonitorElement * meZdcEneTHadN1_
MonitorElement * meZdcEneTEmP3_
MonitorElement * genpart_NeutF_energydist
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
MonitorElement * meZdcDetectHit_
MonitorElement * meZdc10Ene_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * meZdcEneHadP4_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
int FillHitValHist(int side, int section, int channel, double energy, double time)
MonitorElement * meZdcEneTot_
MonitorElement * meZdcEneHadP3_
MonitorElement * genpart_GammaF
MonitorElement * meZdcEneTEmN3_
MonitorElement * meBadZdcSecHit_
MonitorElement * meZdcEneTHadP1_
MonitorElement * genpart_GammaB
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * meZdcTimeHit_
MonitorElement * meBadZdcIdHit_
MonitorElement * meZdcEneTHadP4_
MonitorElement * meZdcEneHadNTot_
MonitorElement * genpart_NeutB_energydist
MonitorElement * meZdcCorEtotNEtotP_
MonitorElement * meZdcEneHadP2_
MonitorElement * meZdcEneEmP4_
MonitorElement * meZdcHadEnergyHit_
MonitorElement * genpart_Pi0B_energydist
MonitorElement * meZdcEneEmP5_
void endRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * meZdcEneTEmP2_
MonitorElement * meZdcSectionHit_
MonitorElement * meZdcEneNTot_
MonitorElement * meZdcEneHadN2_
MonitorElement * meZdcEneHadPTot_
MonitorElement * meZdcEEMCh_
void showDirStructure(void) const
TH2F * getTH2F(void) const
MonitorElement * meZdcEneEmP1_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * meZdcNHitEM_
MonitorElement * meZdcEneTHadN3_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meZdcTimeWHit_
MonitorElement * meZdcEHadCh_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meZdcETime_
MonitorElement * meZdcEMEnergyHit_
MonitorElement * meZdcNHitLum_