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;
void fillmePed0Depth1(double v1)
void fillmeAll10slices1D(double v1, double v2)
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 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)
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 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 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)