66 if (
zside_ ==
"+") zsign = 1;
67 if (
zside_ ==
"-") zsign = -1;
85 double emax_Sim = -9999.;
91 iEvent.
getByLabel(
"g4SimHits",
"HcalHits",hcalHits);
95 if ( subdet != 0 &&
noise_ == 0) {
97 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
100 double en = simhits->energy();
102 int ieta = cell.ieta();
104 int iphi = cell.iphi()-1;
107 if(en > emax_Sim && sub == subdet) {
112 if (
mode_ ==
"multi" &&
113 ((sub == 4 && en < 100. && en > 1.)
114 || ((sub !=4) && en < 1. && en > 0.02)))
125 if(
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
139 for (digiItr=digiCollection->begin();digiItr!=digiCollection->end();digiItr++) {
142 int depth = cell.
depth();
143 int iphi = cell.iphi()-1;
144 int ieta = cell.ieta();
146 int sub = cell.subdet();
157 if ( ((
nevent1 == 1 && subdet == 1) ||
158 (
nevent2 == 1 && subdet == 2) ||
159 (
nevent3 == 1 && subdet == 3) ||
160 (
nevent4 == 1 && subdet == 4)) &&
noise_ == 1 && sub == subdet) {
170 double gainValue0 = gain->
getValue(0);
171 double gainValue1 = gain->
getValue(1);
172 double gainValue2 = gain->
getValue(2);
173 double gainValue3 = gain->
getValue(3);
175 double gainWidthValue0 = gainWidth->
getValue(0);
176 double gainWidthValue1 = gainWidth->
getValue(1);
177 double gainWidthValue2 = gainWidth->
getValue(2);
178 double gainWidthValue3 = gainWidth->
getValue(3);
191 double pedValue0 = pedestal->getValue(0);
192 double pedValue1 = pedestal->getValue(1);
193 double pedValue2 = pedestal->getValue(2);
194 double pedValue3 = pedestal->getValue(3);
196 double pedWidth0 = pedWidth->
getWidth(0);
197 double pedWidth1 = pedWidth->
getWidth(1);
198 double pedWidth2 = pedWidth->
getWidth(2);
199 double pedWidth3 = pedWidth->
getWidth(3);
319 if ( sub == subdet) Ndig++;
323 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;
374 int capid = (*digiItr)[
ii].capid();
376 double val = (tool[
ii]-calibrations.
pedestal(capid));
391 if( closen == 1 &&( ieta * zsign >= 0 )) {
397 if (subdet != 4 &&
ii>=4 &&
ii<=7) {
399 if(depth == 1) ampl1 += val;
400 if(depth == 2) ampl2 += val;
401 if(depth == 3) ampl3 += val;
402 if(depth == 4) ampl4 += val;
404 if( closen == 1 && ( ieta * zsign >= 0 )) {
406 if(depth == 1) ampl1_c += val;
407 if(depth == 2) ampl2_c += val;
408 if(depth == 3) ampl3_c += val;
409 if(depth == 4) ampl4_c += val;
415 if (subdet == 4 &&
ii==3 ) {
417 if(depth == 1) ampl1 += val;
418 if(depth == 2) ampl2 += val;
419 if(depth == 3) ampl3 += val;
420 if(depth == 4) ampl4 += val;
421 if( closen == 1 && ( ieta * zsign >= 0 )) {
423 if(depth == 1) ampl1_c += val;
424 if(depth == 2) ampl2_c += val;
425 if(depth == 3) ampl3_c += val;
426 if(depth == 4) ampl4_c += val;
440 if(ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10. ) ndigis++;
443 if(ampl1 > 30. && depth == 1 && closen == 1 ) {
444 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
445 double fBin67 = tool[5] + tool[6]
446 - calibrations.
pedestal((*digiItr)[5].capid())
447 - calibrations.
pedestal((*digiItr)[6].capid());
465 if ( subdet != 0 &&
noise_ == 0) {
479 iEvent.
getByLabel(
"g4SimHits",
"HcalHits",hcalHits);
481 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin (); simhits != simhitResult->end () ; ++simhits) {
484 int ieta = cell.
ieta();
486 int iphi = cell.iphi()-1;
487 int sub = cell.subdet();
490 if (sub == subdet && ieta == ieta_Sim && iphi == iphi_Sim){
491 int depth = cell.depth();
492 double en = simhits->energy();
495 if(depth == 1) ehits1 += en;
496 if(depth == 2) ehits2 += en;
497 if(depth == 3) ehits3 += en;
498 if(depth == 4) ehits4 += en;
void fillmePed0Depth1(double v1)
void fillmeGain0Depth4(double v1)
void fillmeGainWidth0Depth2(double v1)
void fillmePedWidth2Depth1(double v1)
void fillmeGain2Depth2(double v1)
void fillmeGain1Depth1(double v1)
void fillmePedWidth1Depth3(double v1)
void fillmeGainWidth2Depth1(double v1)
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)
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)
void fillmeADC0fC_depth2(double v1)
void fillmeGainWidth1Depth1(double v1)
void fillmeRatioDigiSimhit4(double v1)
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 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)
float getValue(int fCapId) const
get value for capId = 0..3
void fillmeGainWidth1Depth2(double v1)
void fillmeGainWidth2Depth2(double v1)
edm::ESHandle< HcalDbService > conditions
float getValue(int fCapId) const
get value for capId = 0..3
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)
void fillmeADC0_depth2(double v1)
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 fillmePedWidth3Depth4(double v1)
void fillmeADC0fC_depth4(double v1)
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)
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)
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)