5 #include "CLHEP/Units/GlobalSystemOfUnits.h"
17 <<
"Module Label: " <<
g4Label <<
" Hits: "
18 << zdcHits <<
" / "<< checkHit_
120 <<
"Run = " << e.
id().
run() <<
" Event = "
124 std::vector<PCaloHit> caloHits;
127 bool getHits =
false;
130 if (hitsZdc.
isValid()) getHits =
true;
133 LogDebug(
"ZdcSim") <<
"ZdcValidation: Input flags Hits " << getHits;
136 caloHits.insert(caloHits.end(),hitsZdc->begin(),hitsZdc->end());
139 <<
"ZdcValidation: Hit buffer "
147 int nHit = hits.size();
148 int nZdcEM = 0, nZdcHad = 0, nZdcLum = 0;
149 int nBad1=0, nBad2=0, nBad=0;
150 std::vector<double> encontZdcEM(140, 0.);
151 std::vector<double> encontZdcHad(140, 0.);
152 double entotZdcEM = 0;
153 double entotZdcHad = 0;
163 for (
int i=0;
i<nHit;
i++) {
164 double energy = hits[
i].energy();
165 double log10en = log10(energy);
166 int log10i = int( (log10en+10.)*10. );
167 double time = hits[
i].time();
168 unsigned int id_ = hits[
i].id();
171 int side =
id.zside();
172 int section =
id.section();
173 int channel =
id.channel();
180 <<
"Hit[" <<
i <<
"] ID " << std::hex << id_
181 << std::dec <<
" DetID "<<
id
182 <<
" Det "<< det <<
" side "<< side
183 <<
" Section " << section
184 <<
" channel "<< channel
186 <<
" time \n" <<
time;
193 else { nBad++; nBad2++;}
194 }
else { nBad++; nBad1++;}
205 if( log10i >=0 && log10i < 140 )encontZdcEM[log10i] +=
energy;
211 if( log10i >=0 && log10i < 140 )encontZdcHad[log10i] +=
energy;
222 if( entotZdcEM != 0 )
for(
int i=0;
i<140;
i++ )
meZdcEML10EneP_->
Fill( -10.+(
float(
i)+0.5)/10., encontZdcEM[
i]/entotZdcEM);
223 if( entotZdcHad != 0 )
for(
int i=0;
i<140;
i++ )
meZdcHadL10EneP_->
Fill( -10.+(
float(
i)+0.5)/10.,encontZdcHad[
i]/entotZdcHad);
225 if (
dbe_ && nHit>0) {
245 <<
"HcalSimHitStudy::analyzeHits: Had " << nZdcHad
247 <<
" Bad " << nBad <<
" All " << nHit;
MonitorElement * meZdcEneTHadP3_
MonitorElement * meZdcEnergyHit_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meZdcEneTEmN1_
void analyzeHits(std::vector< PCaloHit > &)
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_
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 * meZdcEneTEmN2_
MonitorElement * meZdcEneHadN4_
MonitorElement * meZdcEneTHadN2_
MonitorElement * meZdcEneEmNTot_
MonitorElement * meZdcChannelHit_
MonitorElement * meZdcEneEmP2_
MonitorElement * meZdcEneHadP1_
MonitorElement * meZdcEML10EneP_
MonitorElement * meZdcEneTEmN5_
MonitorElement * meZdcEneEmN3_
MonitorElement * meZdcNHitHad_
MonitorElement * meBadZdcDetHit_
ZdcSimHitStudy(const edm::ParameterSet &ps)
MonitorElement * meZdcEneTEmP5_
MonitorElement * meZdcEnePTot_
MonitorElement * meZdcEneTEmN4_
MonitorElement * meZdcCorEEmPEHadP_
MonitorElement * meZdcEneTHadP2_
MonitorElement * meZdcSideHit_
MonitorElement * meZdcEneHadN3_
MonitorElement * meZdcEneEmN2_
MonitorElement * meZdcEneTHadN1_
MonitorElement * meZdcEneTEmP3_
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_
int FillHitValHist(int side, int section, int channel, double energy, double time)
MonitorElement * meZdcEneTot_
MonitorElement * meZdcEneHadP3_
MonitorElement * meZdcEneTEmN3_
MonitorElement * meBadZdcSecHit_
MonitorElement * meZdcEneTHadP1_
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * meZdcTimeHit_
MonitorElement * meBadZdcIdHit_
MonitorElement * meZdcEneTHadP4_
MonitorElement * meZdcEneHadNTot_
MonitorElement * meZdcCorEtotNEtotP_
MonitorElement * meZdcEneHadP2_
MonitorElement * meZdcEneEmP4_
MonitorElement * meZdcHadEnergyHit_
MonitorElement * meZdcEneEmP5_
MonitorElement * meZdcEneTEmP2_
MonitorElement * meZdcSectionHit_
MonitorElement * meZdcEneNTot_
MonitorElement * meZdcEneHadN2_
MonitorElement * meZdcEneHadPTot_
MonitorElement * meZdcEEMCh_
void showDirStructure(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_
MonitorElement * meZdcTimeWHit_
MonitorElement * meZdcEHadCh_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meZdcETime_
MonitorElement * meZdcEMEnergyHit_
MonitorElement * meZdcNHitLum_