61 if (
zside_ ==
"+") zsign = 1;
62 if (
zside_ ==
"-") zsign = -1;
80 double emax_Sim = -9999.;
90 if ( subdet != 0 &&
noise_ == 0) {
92 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
95 double en = simhits->energy();
97 int ieta = cell.ieta();
99 int iphi = cell.iphi()-1;
102 if(en > emax_Sim && sub == subdet) {
107 if (
mode_ ==
"multi" &&
108 ((sub == 4 && en < 100. && en > 1.)
109 || ((sub !=4) && en < 1. && en > 0.02)))
120 if(
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
134 for (digiItr=digiCollection->begin();digiItr!=digiCollection->end();digiItr++) {
137 int depth = cell.
depth();
138 int iphi = cell.iphi()-1;
139 int ieta = cell.ieta();
141 int sub = cell.subdet();
152 if ( ((
nevent1 == 1 && subdet == 1) ||
153 (
nevent2 == 1 && subdet == 2) ||
154 (
nevent3 == 1 && subdet == 3) ||
155 (
nevent4 == 1 && subdet == 4)) &&
noise_ == 1 && sub == subdet) {
165 double gainValue0 = gain->
getValue(0);
166 double gainValue1 = gain->
getValue(1);
167 double gainValue2 = gain->
getValue(2);
168 double gainValue3 = gain->
getValue(3);
170 double gainWidthValue0 = gainWidth->
getValue(0);
171 double gainWidthValue1 = gainWidth->
getValue(1);
172 double gainWidthValue2 = gainWidth->
getValue(2);
173 double gainWidthValue3 = gainWidth->
getValue(3);
186 double pedValue0 = pedestal->getValue(0);
187 double pedValue1 = pedestal->getValue(1);
188 double pedValue2 = pedestal->getValue(2);
189 double pedValue3 = pedestal->getValue(3);
191 double pedWidth0 = pedWidth->
getWidth(0);
192 double pedWidth1 = pedWidth->
getWidth(1);
193 double pedWidth2 = pedWidth->
getWidth(2);
194 double pedWidth3 = pedWidth->
getWidth(3);
314 if ( sub == subdet) Ndig++;
318 if ( sub == subdet &&
noise_ == 0 ) {
326 coder.
adc2fC(*digiItr,tool);
328 double noiseADC = (*digiItr)[0].adc();
329 double noisefC = tool[0];
350 double deta = double(ieta);
351 double dphi = double(iphi);
366 if(ieta == ieta_Sim && iphi == iphi_Sim ) closen = seedSimHit;
369 int capid = (*digiItr)[
ii].capid();
371 double val = (tool[
ii]-calibrations.
pedestal(capid));
386 if( closen == 1 &&( ieta * zsign >= 0 )) {
392 if (subdet != 4 &&
ii>=4 &&
ii<=7) {
394 if(depth == 1) ampl1 += val;
395 if(depth == 2) ampl2 += val;
396 if(depth == 3) ampl3 += val;
397 if(depth == 4) ampl4 += val;
399 if( closen == 1 && ( ieta * zsign >= 0 )) {
401 if(depth == 1) ampl1_c += val;
402 if(depth == 2) ampl2_c += val;
403 if(depth == 3) ampl3_c += val;
404 if(depth == 4) ampl4_c += val;
410 if (subdet == 4 &&
ii==3 ) {
412 if(depth == 1) ampl1 += val;
413 if(depth == 2) ampl2 += val;
414 if(depth == 3) ampl3 += val;
415 if(depth == 4) ampl4 += val;
416 if( closen == 1 && ( ieta * zsign >= 0 )) {
418 if(depth == 1) ampl1_c += val;
419 if(depth == 2) ampl2_c += val;
420 if(depth == 3) ampl3_c += val;
421 if(depth == 4) ampl4_c += val;
435 if(ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10. ) ndigis++;
438 if(ampl1 > 30. && depth == 1 && closen == 1 ) {
439 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
440 double fBin67 = tool[5] + tool[6]
441 - calibrations.
pedestal((*digiItr)[5].capid())
442 - calibrations.
pedestal((*digiItr)[6].capid());
460 if ( subdet != 0 &&
noise_ == 0) {
476 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
479 int ieta = cell.
ieta();
481 int iphi = cell.iphi()-1;
482 int sub = cell.subdet();
485 if (sub == subdet && ieta == ieta_Sim && iphi == iphi_Sim){
486 int depth = cell.depth();
487 double en = simhits->energy();
490 if(depth == 1) ehits1 += en;
491 if(depth == 2) ehits2 += en;
492 if(depth == 3) ehits3 += en;
493 if(depth == 4) ehits4 += en;
525 inputTag_(iConfig.getParameter<edm::InputTag>(
"digiLabel")),
526 outputFile_(iConfig.getUntrackedParameter<std::
string>(
"outputFile",
"")),
527 hcalselector_(iConfig.getUntrackedParameter<std::
string>(
"hcalselector",
"all")),
528 zside_(iConfig.getUntrackedParameter<std::
string>(
"zside",
"*")),
529 mode_(iConfig.getUntrackedParameter<std::
string>(
"mode",
"multi")),
530 mc_(iConfig.getUntrackedParameter<std::
string>(
"mc",
"no")),
543 edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
588 float fev = float (
nevtot);
591 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
594 for (
int i = 1;
i <= nx;
i++) {
600 for (
int j = 1;
j <= ny;
j++) {
620 if(ieta >=0 ) ieta +=1;
622 if(ieta >= -20 && ieta <= 20 )
625 if(ieta >= 40 || ieta <= -40 ) {phi_factor = 18.;}
631 if(ieta >= 0) ieta -= 1;
632 double deta = double(ieta);
634 cnorm = sumphi_1 / phi_factor;
635 monitor() -> fillmeOccupancy_vs_ieta_depth1(deta, cnorm);
636 cnorm = sumphi_2 / phi_factor;
637 monitor() -> fillmeOccupancy_vs_ieta_depth2(deta, cnorm);
638 cnorm = sumphi_3 / phi_factor;
639 monitor() -> fillmeOccupancy_vs_ieta_depth3(deta, cnorm);
640 cnorm = sumphi_4 / phi_factor;
641 monitor() -> fillmeOccupancy_vs_ieta_depth4(deta, cnorm);
662 std::map<std::string, HcalSubdetDigiMonitor*>::iterator monitorItr
668 std::pair<std::string, HcalSubdetDigiMonitor*> mapElement(
670 monitorItr =
monitors_.insert(mapElement).first;
672 return monitorItr->second;
708 hcalselector_ =
"HO";
710 hcalselector_ =
"HF";
712 hcalselector_ =
"noise";
723 hcalselector_ =
"HO";
725 hcalselector_ =
"HF";
727 hcalselector_ =
"all";
735 double PI = 3.1415926535898;
736 double deltaphi= phi1 - phi2;
737 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
738 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
739 double deltaeta = eta2 - eta1;
740 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
void fillmePed0Depth1(double v1)
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
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > tok_ho_
void fillmeGainWidth0Depth4(double v1)
HcalSubdetDigiMonitor * monitor()
void fillmePed2Depth4(double v1)
void fillmePedWidth1Depth1(double v1)
void fillmeNdigis(double v1)
void fillmeGainWidth2Depth4(double v1)
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe_
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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void reco(const edm::Event &, const edm::EventSetup &, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &)
#define DEFINE_FWK_MODULE(type)
void fillmeADC0fC_depth2(double v1)
void fillmeGainWidth1Depth1(double v1)
void fillmeRatioDigiSimhit4(double v1)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
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 fillmeAll10slices1D_depth1(double v1, double v2)
void fillmeGain3Depth2(double v1)
void fillmePed1Depth2(double v1)
void fillmeAll10slices_depth2(double v1, double v2)
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 fillmeAll10slices1D_depth2(double v1, double v2)
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 save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
void fillmePedWidth2Depth4(double v1)
void fillmePedWidth1Depth2(double v1)
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf_
void fillmePedWidth2Depth3(double v1)
void fillmeSignalTimeSlice(double v1, double v2)
void fillmePedWidth0Depth1(double v1)
void fillmePedWidth3Depth2(double v1)
void setBinContent_depth4(int i, int j, double v)
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 fillmeGainWidth1Depth3(double v1)
void fillmePwidthMap2(double v1, double v2, double v3)
void fillmePedWidth0Depth3(double v1)
void fillmeAll10slices_depth1(double v1, double v2)
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)