67 if (
zside_ ==
"+") zsign = 1;
68 if (
zside_ ==
"-") zsign = -1;
86 double emax_Sim = -9999.;
92 iEvent.
getByLabel(
"g4SimHits",
"HcalHits",hcalHits);
96 if ( subdet != 0 &&
noise_ == 0) {
98 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
101 double en = simhits->energy();
103 int ieta = cell.ieta();
105 int iphi = cell.iphi()-1;
108 if(en > emax_Sim && sub == subdet) {
113 if (
mode_ ==
"multi" &&
114 ((sub == 4 && en < 100. && en > 1.)
115 || ((sub !=4) && en < 1. && en > 0.02)))
126 if(
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
140 for (digiItr=digiCollection->begin();digiItr!=digiCollection->end();digiItr++) {
143 int depth = cell.
depth();
144 int iphi = cell.iphi()-1;
145 int ieta = cell.ieta();
147 int sub = cell.subdet();
158 if ( ((
nevent1 == 1 && subdet == 1) ||
159 (
nevent2 == 1 && subdet == 2) ||
160 (
nevent3 == 1 && subdet == 3) ||
161 (
nevent4 == 1 && subdet == 4)) &&
noise_ == 1 && sub == subdet) {
171 double gainValue0 = gain->
getValue(0);
172 double gainValue1 = gain->
getValue(1);
173 double gainValue2 = gain->
getValue(2);
174 double gainValue3 = gain->
getValue(3);
176 double gainWidthValue0 = gainWidth->
getValue(0);
177 double gainWidthValue1 = gainWidth->
getValue(1);
178 double gainWidthValue2 = gainWidth->
getValue(2);
179 double gainWidthValue3 = gainWidth->
getValue(3);
192 double pedValue0 = pedestal->getValue(0);
193 double pedValue1 = pedestal->getValue(1);
194 double pedValue2 = pedestal->getValue(2);
195 double pedValue3 = pedestal->getValue(3);
197 double pedWidth0 = pedWidth->
getWidth(0);
198 double pedWidth1 = pedWidth->
getWidth(1);
199 double pedWidth2 = pedWidth->
getWidth(2);
200 double pedWidth3 = pedWidth->
getWidth(3);
320 if ( sub == subdet) Ndig++;
324 if ( sub == subdet &&
noise_ == 0 ) {
331 coder.
adc2fC(*digiItr,tool);
333 double noiseADC = (*digiItr)[0].adc();
334 double noisefC = tool[0];
355 double deta = double(ieta);
356 double dphi = double(iphi);
371 if(ieta == ieta_Sim && iphi == iphi_Sim ) closen = seedSimHit;
373 for (
int ii=0;ii<tool.
size();ii++) {
374 int capid = (*digiItr)[ii].capid();
376 double val = (tool[ii]-calibrations.
pedestal(capid));
381 if( closen == 1 &&( ieta * zsign >= 0 )) {
387 if (subdet != 4 && ii>=4 && ii<=7) {
389 if(depth == 1) ampl1 += val;
390 if(depth == 2) ampl2 += val;
391 if(depth == 3) ampl3 += val;
392 if(depth == 4) ampl4 += val;
394 if( closen == 1 && ( ieta * zsign >= 0 )) {
396 if(depth == 1) ampl1_c += val;
397 if(depth == 2) ampl2_c += val;
398 if(depth == 3) ampl3_c += val;
399 if(depth == 4) ampl4_c += val;
405 if (subdet == 4 && ii==3 ) {
407 if(depth == 1) ampl1 += val;
408 if(depth == 2) ampl2 += val;
409 if(depth == 3) ampl3 += val;
410 if(depth == 4) ampl4 += val;
411 if( closen == 1 && ( ieta * zsign >= 0 )) {
413 if(depth == 1) ampl1_c += val;
414 if(depth == 2) ampl2_c += val;
415 if(depth == 3) ampl3_c += val;
416 if(depth == 4) ampl4_c += val;
430 if(ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10. ) ndigis++;
433 if(ampl1 > 30. && depth == 1 && closen == 1 ) {
434 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
435 double fBin67 = tool[5] + tool[6]
436 - calibrations.
pedestal((*digiItr)[5].capid())
437 - calibrations.
pedestal((*digiItr)[6].capid());
455 if ( subdet != 0 &&
noise_ == 0) {
469 iEvent.
getByLabel(
"g4SimHits",
"HcalHits",hcalHits);
471 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
474 int ieta = cell.
ieta();
476 int iphi = cell.iphi()-1;
477 int sub = cell.subdet();
480 if (sub == subdet && ieta == ieta_Sim && iphi == iphi_Sim){
481 int depth = cell.depth();
482 double en = simhits->energy();
485 if(depth == 1) ehits1 += en;
486 if(depth == 2) ehits2 += en;
487 if(depth == 3) ehits3 += en;
488 if(depth == 4) ehits4 += en;
520 inputTag_(iConfig.getParameter<edm::InputTag>(
"digiLabel")),
521 outputFile_(iConfig.getUntrackedParameter<std::string>(
"outputFile",
"")),
522 hcalselector_(iConfig.getUntrackedParameter<std::string>(
"hcalselector",
"all")),
523 zside_(iConfig.getUntrackedParameter<std::string>(
"zside",
"*")),
524 mode_(iConfig.getUntrackedParameter<std::string>(
"mode",
"multi")),
525 mc_(iConfig.getUntrackedParameter<std::string>(
"mc",
"no")),
531 edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
576 float fev = float (
nevtot);
579 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
582 for (
int i = 1;
i <= nx;
i++) {
588 for (
int j = 1;
j <= ny;
j++) {
608 if(ieta >=0 ) ieta +=1;
610 if(ieta >= -20 && ieta <= 20 )
613 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
619 if(ieta >= 0) ieta -= 1;
620 double deta = double(ieta);
622 cnorm = sumphi_1 / phi_factor;
623 monitor() -> fillmeOccupancy_vs_ieta_depth1(deta, cnorm);
624 cnorm = sumphi_2 / phi_factor;
625 monitor() -> fillmeOccupancy_vs_ieta_depth2(deta, cnorm);
626 cnorm = sumphi_3 / phi_factor;
627 monitor() -> fillmeOccupancy_vs_ieta_depth3(deta, cnorm);
628 cnorm = sumphi_4 / phi_factor;
629 monitor() -> fillmeOccupancy_vs_ieta_depth4(deta, cnorm);
650 std::map<std::string, HcalSubdetDigiMonitor*>::iterator monitorItr
656 std::pair<std::string, HcalSubdetDigiMonitor*> mapElement(
658 monitorItr =
monitors_.insert(mapElement).first;
660 return monitorItr->second;
693 reco<HBHEDataFrame>(
iEvent,iSetup);
695 reco<HBHEDataFrame>(
iEvent,iSetup);
696 hcalselector_ =
"HO";
697 reco<HODataFrame>(
iEvent,iSetup);
698 hcalselector_ =
"HF";
699 reco<HFDataFrame>(
iEvent,iSetup);
700 hcalselector_ =
"noise";
708 reco<HBHEDataFrame>(
iEvent,iSetup);
710 reco<HBHEDataFrame>(
iEvent,iSetup);
711 hcalselector_ =
"HO";
712 reco<HODataFrame>(
iEvent,iSetup);
713 hcalselector_ =
"HF";
714 reco<HFDataFrame>(
iEvent,iSetup);
715 hcalselector_ =
"all";
723 double PI = 3.1415926535898;
724 double deltaphi= phi1 - phi2;
725 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
726 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
727 double deltaeta = eta2 - eta1;
728 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
void fillmePed0Depth1(double v1)
void fillmeAll10slices1D(double v1, double v2)
void fillmeGain0Depth4(double v1)
void fillmeGainWidth0Depth2(double v1)
void setBinContent_depth2(int i, int j, double v)
void fillmePedWidth2Depth1(double v1)
void fillmeGain2Depth2(double v1)
void fillmeGain1Depth1(double v1)
void fillmePedWidth1Depth3(double v1)
void fillmeGainWidth2Depth1(double v1)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void fillmeAmplIetaIphi4(double v1, double v2, double v3)
void fillmeADC0_depth1(double v1)
void fillmeDigiSimhitProfile3(double v1, double v2)
std::vector< PCaloHit > PCaloHitContainer
void fillmeGainWidth0Depth4(double v1)
HcalSubdetDigiMonitor * monitor()
void fillmePed2Depth4(double v1)
void fillmePedWidth1Depth1(double v1)
void fillmeNdigis(double v1)
void fillmeGainWidth2Depth4(double v1)
HcalSubdetector subdet() const
get the subdetector
void fillmenDigis(double v1)
void fillmeGainMap2(double v1, double v2, double v3)
void fillmePwidthMap3(double v1, double v2, double v3)
void fillmeDigiSimhit4(double v1, double v2)
void fillmePed1Depth4(double v1)
edm::ESHandle< CaloGeometry > geometry
std::string hcalselector_
void fillmeOccupancy_map_depth2(double v1, double v2)
void fillmeGainWidth3Depth4(double v1)
void fillmeGain2Depth4(double v1)
void fillmeDigiSimhit3(double v1, double v2)
double getBinContent_depth4(int i, int j)
#define DEFINE_FWK_MODULE(type)
void fillmeADC0fC_depth2(double v1)
void fillmeGainWidth1Depth1(double v1)
void fillmeRatioDigiSimhit4(double v1)
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")
void fillmeDigiSimhit2(double v1, double v2)
void fillmeRatioDigiSimhit(double v1)
void fillmePedWidth1Depth4(double v1)
std::vector< T >::const_iterator const_iterator
void fillmeGainWidth1Depth4(double v1)
void setBinContent_depth3(int i, int j, double v)
void fillmeGain3Depth2(double v1)
void fillmePed1Depth2(double v1)
double pedestal(int fCapId) const
get pedestal for capid=0..3
void fillmeRatioDigiSimhit2(double v1)
void fillmeAmplIetaIphi2(double v1, double v2, double v3)
void fillmePwidthMap1(double v1, double v2, double v3)
HcalDigiTester(const edm::ParameterSet &)
std::map< std::string, HcalSubdetDigiMonitor * > monitors_
float getValue(int fCapId) const
get value for capId = 0..3
void fillmeGainWidth1Depth2(double v1)
double getBinContent_depth2(int i, int j)
void fillmeGainWidth2Depth2(double v1)
edm::ESHandle< HcalDbService > conditions
float getValue(int fCapId) const
get value for capId = 0..3
double dR(double eta1, double phi1, double eta2, double phi2)
void fillmeGainWidth3Depth2(double v1)
void fillmeBin67Frac(double v1)
void fillmeSumAmp(double v1)
void fillmeSignalAmp4(double v1)
void fillmeDigiSimhitProfile2(double v1, double v2)
void fillmePed0Depth4(double v1)
int depth() const
get the tower depth
void fillmeGain3Depth3(double v1)
void fillmePed0Depth3(double v1)
void fillmeGainMap4(double v1, double v2, double v3)
void fillmePed3Depth3(double v1)
void fillmeDigiSimhit(double v1, double v2)
void fillmeRatioDigiSimhit1(double v1)
void fillmeOccupancy_map_depth1(double v1, double v2)
void fillmeGain1Depth2(double v1)
void fillmeGain1Depth3(double v1)
void fillmeGainWidth0Depth1(double v1)
void fillmeGainWidth2Depth3(double v1)
void fillmeSignalAmp1(double v1)
void fillmeGain3Depth4(double v1)
double getBinContent_depth1(int i, int j)
void fillmeADC0_depth2(double v1)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
void fillmeGain3Depth1(double v1)
void fillmeDigiSimhitProfile4(double v1, double v2)
void fillmeAmplIetaIphi3(double v1, double v2, double v3)
int ieta() const
get the cell ieta
void fillmeADC0_depth4(double v1)
void fillmePedWidth2Depth2(double v1)
void fillmeGainMap1(double v1, double v2, double v3)
void fillmeGainWidth0Depth3(double v1)
void fillmePedWidth2Depth4(double v1)
void fillmePedWidth1Depth2(double v1)
void fillmePedWidth2Depth3(double v1)
void fillmeSignalTimeSlice(double v1, double v2)
void fillmePedWidth0Depth1(double v1)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void fillmePedWidth3Depth2(double v1)
void setBinContent_depth4(int i, int j, double v)
void reco(const edm::Event &, const edm::EventSetup &)
void fillmePedWidth3Depth4(double v1)
void fillmeADC0fC_depth4(double v1)
void setBinContent_depth1(int i, int j, double v)
void fillmeSignalAmp(double v1)
void fillmeGainMap3(double v1, double v2, double v3)
void fillmePedWidth3Depth1(double v1)
int size() const
get the size
void fillmeDigiSimhitProfile(double v1, double v2)
double getBinContent_depth3(int i, int j)
void fillmePed3Depth2(double v1)
void fillmeGain2Depth1(double v1)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
void fillmeOccupancy_map_depth4(double v1, double v2)
void fillmePed2Depth2(double v1)
void fillmePed3Depth4(double v1)
T const * product() const
void fillmePedWidth0Depth4(double v1)
std::vector< std::vector< double > > tmp
void fillmeSignalAmp3(double v1)
void fillmePed0Depth2(double v1)
void fillmePwidthMap4(double v1, double v2, double v3)
void fillmeDigiSimhit1(double v1, double v2)
void fillmeADC0fC_depth1(double v1)
void fillmeGain0Depth2(double v1)
void fillmeADC0_depth3(double v1)
void fillmePed2Depth3(double v1)
void fillmeGainWidth3Depth1(double v1)
void fillmePed2Depth1(double v1)
void fillmeRatioDigiSimhit3(double v1)
void fillmeGain2Depth3(double v1)
void fillmePedWidth3Depth3(double v1)
void fillmeGain0Depth1(double v1)
void fillmeDigiSimhitProfile1(double v1, double v2)
void fillmeOccupancy_map_depth3(double v1, double v2)
void fillmePed1Depth1(double v1)
void fillmeBin5Frac(double v1)
void fillmePedWidth0Depth2(double v1)
void fillmeSignalAmp2(double v1)
void fillmeAll10slices(double v1, double v2)
void fillmeGainWidth1Depth3(double v1)
void fillmePwidthMap2(double v1, double v2, double v3)
void fillmePedWidth0Depth3(double v1)
void fillmeADC0fC_depth3(double v1)
void fillmeGain1Depth4(double v1)
void fillmeAmplIetaIphi1(double v1, double v2, double v3)
void fillmePed3Depth1(double v1)
void fillmePed1Depth3(double v1)
void fillmeGain0Depth3(double v1)
void fillmeGainWidth3Depth3(double v1)