18 fRefPedestalWidths (0),
20 fRawPedestalWidths (0),
22 fValPedestalWidths (0)
32 for(
int k=0;
k<4;
k++)
state.push_back(
true);
53 if(m_pedValflag<0) m_pedValflag=0;
55 cout<<
"WARNING - incompatible cfg options: nevtsample = "<<
m_nevtsample<<
", pedValflag = "<<m_pedValflag<<endl;
56 cout<<
"Setting pedValflag = 0"<<endl;
59 if(m_pedValflag>1) m_pedValflag=1;
68 hbHists.ALLPEDS =
new TH1F(
"HBHE All Pedestals",
"HBHE All Peds",10,0,9);
69 hbHists.PEDRMS=
new TH1F(
"HBHE All Pedestal Widths",
"HBHE All Pedestal RMS",100,0,3);
70 hbHists.PEDMEAN=
new TH1F(
"HBHE All Pedestal Means",
"HBHE All Pedestal Means",100,0,9);
71 hbHists.CHI2=
new TH1F(
"HBHE Chi2/ndf for whole range Gauss fit",
"HBHE Chi2/ndf Gauss",200,0.,50.);
73 hoHists.ALLPEDS =
new TH1F(
"HO All Pedestals",
"HO All Peds",10,0,9);
74 hoHists.PEDRMS=
new TH1F(
"HO All Pedestal Widths",
"HO All Pedestal RMS",100,0,3);
75 hoHists.PEDMEAN=
new TH1F(
"HO All Pedestal Means",
"HO All Pedestal Means",100,0,9);
76 hoHists.CHI2=
new TH1F(
"HO Chi2/ndf for whole range Gauss fit",
"HO Chi2/ndf Gauss",200,0.,50.);
78 hfHists.ALLPEDS =
new TH1F(
"HF All Pedestals",
"HF All Peds",10,0,9);
79 hfHists.PEDRMS=
new TH1F(
"HF All Pedestal Widths",
"HF All Pedestal RMS",100,0,3);
80 hfHists.PEDMEAN=
new TH1F(
"HF All Pedestal Means",
"HF All Pedestal Means",100,0,9);
81 hfHists.CHI2=
new TH1F(
"HF Chi2/ndf for whole range Gauss fit",
"HF Chi2/ndf Gauss",200,0.,50.);
88 for(
int i=0;
i<16;
i++)
_meot->second[
i].first->Delete();
91 for(
int i=0;
i<16;
i++)
_meot->second[
i].first->Delete();
94 for(
int i=0;
i<16;
i++)
_meot->second[
i].first->Delete();
115 m_file=
new TFile(m_outputFileROOT.c_str(),
"RECREATE");
142 if(!hbhe.
size())
throw (
int)hbhe.
size();
167 if(!ho.
size())
throw (
int)ho.
size();
188 if(!hf.
size())
throw (
int)hf.
size();
219 static const int bins=10;
220 static const int bins2=100;
221 float lo=-0.5;
float hi=9.5;
222 map<int,PEDBUNCH> _mei;
223 static map<HcalDetId, map<int,float> > QieCalibMap;
224 string type =
"HBHE";
227 if(detid.
ieta()<16) type =
"HB";
228 if(detid.
ieta()>16) type =
"HE";
229 if(detid.
ieta()==16){
230 if(detid.
depth()<3) type =
"HB";
231 if(detid.
depth()==3) type =
"HE";
234 else if(
id==1) type =
"HO";
235 else if(
id==2) type =
"HF";
237 _meot = toolT.find(detid);
240 if (
_meot==toolT.end()){
242 map<int,float> qiecalib;
244 for(
int i=0;
i<4;
i++){
250 sprintf(name,
"%s Pedestal, eta=%d phi=%d d=%d cap=%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth(),
i);
251 insert[
i].first =
new TH1F(name,name,bins,lo,hi);
252 sprintf(name,
"%s Product, eta=%d phi=%d d=%d caps=%d*%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth(),
i,(
i+1)%4);
253 insert[4+
i].first =
new TH1F(name,name,bins2,0.,100.);
254 sprintf(name,
"%s Product, eta=%d phi=%d d=%d caps=%d*%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth(),
i,(
i+2)%4);
255 insert[8+
i].first =
new TH1F(name,name,bins2,0.,100.);
256 sprintf(name,
"%s Product, eta=%d phi=%d d=%d caps=%d*%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth(),
i,(
i+3)%4);
257 insert[12+
i].first =
new TH1F(name,name,bins2,0.,100.);
259 sprintf(name,
"%s Signal in TS 4+5, eta=%d phi=%d d=%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth());
260 insert[16].first =
new TH1F(name,name,21,-0.5,20.5);
261 sprintf(name,
"%s Signal in TS 4+5-2-3, eta=%d phi=%d d=%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth());
262 insert[17].first =
new TH1F(name,name,21,-10.5,10.5);
263 sprintf(name,
"%s Signal in TS 4+5-(0+1+2+3)/2., eta=%d phi=%d d=%d",type.c_str(),detid.
ieta(),detid.
iphi(),detid.
depth());
264 insert[18].first =
new TH1F(name,name,21,-10.5,10.5);
266 _meot = toolT.find(detid);
268 QieCalibMap[
detid]=qiecalib;
271 _mei =
_meot->second;
283 _mei[qie1.
capid()].first->Reset();
284 _mei[qie1.
capid()+4].first->Reset();
285 _mei[qie1.
capid()+8].first->Reset();
286 _mei[qie1.
capid()+12].first->Reset();
289 if (qie1.
adc()<bins){
291 else _mei[qie1.
capid()].first->Fill(charge1);
293 else if(qie1.
adc()>=bins){
294 _mei[qie1.
capid()].first->AddBinContent(bins+1,1);
300 map<int,float> qiecalib = QieCalibMap[
detid];
303 if (charge1*charge2<bins2){
304 _mei[qie1.
capid()+4*
flag].first->Fill(charge1*charge2);
307 _mei[qie1.
capid()+4*
flag].first->Fill(bins2);
313 else if(
id==1)
hoHists.ALLPEDS->Fill(qie1.
adc());
314 else if(
id==2)
hfHists.ALLPEDS->Fill(qie1.
adc());
323 _meot = toolT.find(detid);
324 map<int,PEDBUNCH> _mei =
_meot->second;
325 _mei[16].first->Fill(qie4.
adc()+qie5.
adc()-1.);
326 _mei[17].first->Fill(qie4.
adc()+qie5.
adc()-qie2.
adc()-qie3.
adc());
327 _mei[18].first->Fill(qie4.
adc()+qie5.
adc()-(qie0.
adc()+qie1.
adc()+qie2.
adc()+qie3.
adc())/2.);
333 char PedSampleNum[20];
336 sprintf(PedSampleNum,
"HB_Sample%d",
sample);
338 m_file->mkdir(PedSampleNum);
341 sprintf(PedSampleNum,
"HO_Sample%d",
sample);
343 m_file->mkdir(PedSampleNum);
346 sprintf(PedSampleNum,
"HF_Sample%d",
sample);
348 m_file->mkdir(PedSampleNum);
358 float cap[4];
float sig[4][4];
float dcap[4];
float dsig[4][4];
float chi2[4];
365 for (
int i=0;
i<4;
i++) {
366 TF1 *fit =
_meot->second[
i].first->GetFunction(
"gaus");
368 if(fit->GetNDF()!=0) chi2[
i]=fit->GetChisquare()/fit->GetNDF();
369 cap[
i]=fit->GetParameter(1);
370 sig[
i][
i]=fit->GetParameter(2);
371 dcap[
i]=fit->GetParError(1);
372 dsig[
i][
i]=fit->GetParError(2);
376 for (
int i=0;
i<4;
i++) {
377 cap[
i]=
_meot->second[
i].first->GetMean();
378 sig[
i][
i]=
_meot->second[
i].first->GetRMS();
391 for (
int i=0;
i<4;
i++) {
394 _meot->second[
i].first->GetXaxis()->SetTitle(
"ADC");
395 else _meot->second[
i].first->GetXaxis()->SetTitle(
"Charge, fC");
396 _meot->second[
i].first->GetYaxis()->SetTitle(
"CapID samplings");
397 _meot->second[
i].first->Write();
400 _meot->second[
i].second.first[0].push_back(cap[
i]);
401 _meot->second[
i].second.first[1].push_back(dcap[i]);
402 _meot->second[
i].second.first[2].push_back(sig[i][i]);
403 _meot->second[
i].second.first[3].push_back(dsig[i][i]);
404 _meot->second[
i].second.first[4].push_back(chi2[i]);
406 PedMeans->Fill(cap[
i]);
407 PedWidths->Fill(sig[i][i]);
412 for(
int i=16;
i<19;
i++){
414 _meot->second[
i].first->GetXaxis()->SetTitle(
"ADC");
415 else _meot->second[
i].first->GetXaxis()->SetTitle(
"Charge, fC");
416 _meot->second[
i].first->GetYaxis()->SetTitle(
"Events");
417 _meot->second[
i].first->Write();
422 sig[0][0]=sig[0][0]*sig[0][0];
423 sig[1][1]=sig[1][1]*sig[1][1];
424 sig[2][2]=sig[2][2]*sig[2][2];
425 sig[3][3]=sig[3][3]*sig[3][3];
429 sig[0][1]=
_meot->second[4].first->GetMean()-cap[0]*cap[1];
430 sig[0][2]=
_meot->second[8].first->GetMean()-cap[0]*cap[2];
431 sig[1][2]=
_meot->second[5].first->GetMean()-cap[1]*cap[2];
432 sig[1][3]=
_meot->second[9].first->GetMean()-cap[1]*cap[3];
433 sig[2][3]=
_meot->second[6].first->GetMean()-cap[2]*cap[3];
434 sig[0][3]=
_meot->second[12].first->GetMean()-cap[0]*cap[3];
435 sig[1][0]=
_meot->second[13].first->GetMean()-cap[1]*cap[0];
436 sig[2][0]=
_meot->second[10].first->GetMean()-cap[2]*cap[0];
437 sig[2][1]=
_meot->second[14].first->GetMean()-cap[2]*cap[1];
438 sig[3][1]=
_meot->second[11].first->GetMean()-cap[3]*cap[1];
439 sig[3][2]=
_meot->second[15].first->GetMean()-cap[3]*cap[2];
440 sig[3][0]=
_meot->second[7].first->GetMean()-cap[3]*cap[0];
443 for(
int i=0;
i<4;
i++){
445 _meot->second[
i].second.first[5].push_back(sig[
i][(
i+1)%4]);
446 _meot->second[
i].second.first[6].push_back(2*sig[
i][
i]*dsig[
i][
i]);
447 _meot->second[
i].second.first[7].push_back(sig[i][(i+2)%4]);
448 _meot->second[
i].second.first[8].push_back(2*sig[i][i]*dsig[i][i]);
449 _meot->second[
i].second.first[9].push_back(sig[i][(i+3)%4]);
450 _meot->second[
i].second.first[10].push_back(2*sig[i][i]*dsig[i][i]);
455 _meot->second[
i+4].first->GetXaxis()->SetTitle(
"ADC^2");
456 else _meot->second[
i+4].first->GetXaxis()->SetTitle(
"Charge^2, fC^2");
457 _meot->second[
i+4].first->GetYaxis()->SetTitle(
"2-CapID samplings");
458 _meot->second[
i+4].first->Write();
460 _meot->second[
i+8].first->GetXaxis()->SetTitle(
"ADC^2");
461 else _meot->second[
i+8].first->GetXaxis()->SetTitle(
"Charge^2, fC^2");
462 _meot->second[
i+8].first->GetYaxis()->SetTitle(
"2-CapID samplings");
463 _meot->second[
i+8].first->Write();
465 _meot->second[
i+12].first->GetXaxis()->SetTitle(
"ADC^2");
466 else _meot->second[
i+12].first->GetXaxis()->SetTitle(
"Charge^2, fC^2");
467 _meot->second[
i+12].first->GetYaxis()->SetTitle(
"2-CapID samplings");
468 _meot->second[
i+12].first->Write();
602 map<int, std::vector<double> > AverageValues;
605 for(
int i=0;
i<4;
i++){
608 sprintf(name,
"Pedestal trend, eta=%d phi=%d d=%d cap=%d",detid.
ieta(),detid.
iphi(),detid.
depth(),
i);
609 int bins =
_meot->second[
i].second.first[0].size();
611 float hi = (float)bins+0.5;
612 _meot->second[
i].second.second.push_back(
new TH1F(name,name,bins,lo,hi));
613 sprintf(name,
"Width trend, eta=%d phi=%d d=%d cap=%d",detid.
ieta(),detid.
iphi(),detid.
depth(),
i);
614 bins =
_meot->second[
i].second.first[2].size();
615 hi = (float)bins+0.5;
616 _meot->second[
i].second.second.push_back(
new TH1F(name,name,bins,lo,hi));
617 sprintf(name,
"Correlation trend, eta=%d phi=%d d=%d caps=%d*%d",detid.
ieta(),detid.
iphi(),detid.
depth(),
i,(
i+1)%4);
618 bins =
_meot->second[
i].second.first[5].size();
619 hi = (float)bins+0.5;
620 _meot->second[
i].second.second.push_back(
new TH1F(name,name,bins,lo,hi));
630 std::vector<double>::iterator sample_it;
633 for(sample_it=
_meot->second[
i].second.first[0].begin();
634 sample_it!=
_meot->second[
i].second.first[0].end();sample_it++){
635 _meot->second[
i].second.second[0]->SetBinContent(++j,*sample_it);
638 for(sample_it=
_meot->second[
i].second.first[1].begin();
639 sample_it!=
_meot->second[
i].second.first[1].end();sample_it++){
640 _meot->second[
i].second.second[0]->SetBinError(++j,*sample_it);
643 _meot->second[
i].second.second[0]->Fit(
"pol0",
"Q");
644 TF1 *fit =
_meot->second[
i].second.second[0]->GetFunction(
"pol0");
645 AverageValues[0].push_back(fit->GetParameter(0));
646 AverageValues[1].push_back(fit->GetParError(0));
648 AverageValues[2].push_back(fit->GetChisquare()/fit->GetNDF());
650 AverageValues[2].push_back(fit->GetChisquare());
652 _meot->second[
i].second.second[0]->GetXaxis()->SetTitle(name);
653 _meot->second[
i].second.second[0]->GetYaxis()->SetTitle(
"Pedestal value");
654 _meot->second[
i].second.second[0]->Write();
657 for(sample_it=
_meot->second[
i].second.first[2].begin();
658 sample_it!=
_meot->second[
i].second.first[2].end();sample_it++){
659 _meot->second[
i].second.second[1]->SetBinContent(++j,*sample_it);
662 for(sample_it=
_meot->second[
i].second.first[3].begin();
663 sample_it!=
_meot->second[
i].second.first[3].end();sample_it++){
664 _meot->second[
i].second.second[1]->SetBinError(++j,*sample_it);
666 _meot->second[
i].second.second[1]->GetXaxis()->SetTitle(name);
667 _meot->second[
i].second.second[1]->GetYaxis()->SetTitle(
"Pedestal width");
668 _meot->second[
i].second.second[1]->Write();
671 for(sample_it=
_meot->second[
i].second.first[5].begin();
672 sample_it!=
_meot->second[
i].second.first[5].end();sample_it++){
673 _meot->second[
i].second.second[2]->SetBinContent(++j,*sample_it);
676 for(sample_it=
_meot->second[
i].second.first[6].begin();
677 sample_it!=
_meot->second[
i].second.first[6].end();sample_it++){
678 _meot->second[
i].second.second[2]->SetBinError(++j,*sample_it);
680 _meot->second[
i].second.second[2]->GetXaxis()->SetTitle(name);
681 _meot->second[
i].second.second[2]->GetYaxis()->SetTitle(
"Close correlation");
682 _meot->second[
i].second.second[2]->Write();
711 for(sample_it=
_meot->second[
i].second.first[4].begin();
712 sample_it!=
_meot->second[
i].second.first[4].end();sample_it++){
713 Chi2->Fill(*sample_it);
717 CapidAverage=
new TH1F(
"Constant fit: Pedestal Values",
718 "Constant fit: Pedestal Values",
719 AverageValues[0].
size(),0.,AverageValues[0].
size());
720 std::vector<double>::iterator sample_it;
722 for(sample_it=AverageValues[0].
begin();
723 sample_it!=AverageValues[0].end();sample_it++){
724 CapidAverage->SetBinContent(++j,*sample_it);
727 for(sample_it=AverageValues[1].
begin();
728 sample_it!=AverageValues[1].end();sample_it++){
729 CapidAverage->SetBinError(++j,*sample_it);
731 CapidChi2=
new TH1F(
"Constant fit: Chi2/ndf",
732 "Constant fit: Chi2/ndf",
733 AverageValues[2].
size(),0.,AverageValues[2].
size());
735 for(sample_it=AverageValues[2].
begin();
736 sample_it!=AverageValues[2].end();sample_it++){
737 CapidChi2->SetBinContent(++j,*sample_it);
740 Chi2->GetXaxis()->SetTitle(
"Chi2/ndf");
741 Chi2->GetYaxis()->SetTitle(
"50 x [(16+2) x 4 x 4] `events`");
743 CapidAverage->GetYaxis()->SetTitle(
"Pedestal value");
744 CapidAverage->GetXaxis()->SetTitle(
"(16+2) x 4 x 4 `events`");
745 CapidAverage->Write();
746 CapidChi2->GetYaxis()->SetTitle(
"Chi2/ndf");
747 CapidChi2->GetXaxis()->SetTitle(
"(16+2) x 4 x 4 `events`");
764 float RefPedVals[4];
float RefPedSigs[4][4];
765 float RawPedVals[4];
float RawPedSigs[4][4];
766 map<HcalDetId,bool> isinRaw;
767 map<HcalDetId,bool> isinRef;
770 std::ofstream PedValLog;
771 PedValLog.open(
"HcalPedVal.log");
773 if(nstat[0]+nstat[1]+nstat[2]+nstat[3]<2500) PedValLog<<
"HcalPedVal: warning - low statistics"<<std::endl;
775 for (
int i=0;
i<(int)RawChanns.size();
i++){
778 for (
int i=0;
i<(int)RefChanns.size();
i++){
780 isinRaw[
detid]=
false;
783 for (
int i=0;
i<(int)RawChanns.size();
i++){
786 if (isinRef[detid]==
false) {
787 PedValLog<<
"HcalPedVal: channel "<<detid<<
" not found in reference set"<<std::endl;
788 std::cerr<<
"HcalPedVal: channel "<<detid<<
" not found in reference set"<<std::endl;
794 for (
int i=0;
i<(int)RefChanns.size();
i++){
796 for (
int icap=0; icap<4; icap++) {
798 for (
int icap2=icap; icap2<4; icap2++) {
799 RefPedSigs[icap][icap2]=fRefPedestalWidths->
getValues(detid)->
getSigma(icap,icap2);
800 if(icap2!=icap)RefPedSigs[icap2][icap]=RefPedSigs[icap][icap2];
806 for (
int icap=0; icap<4; icap++) {
808 for (
int icap2=icap; icap2<4; icap2++) {
809 RawPedSigs[icap][icap2]=fRawPedestalWidths->
getValues(detid)->
getSigma(icap,icap2);
810 if(icap2!=icap)RawPedSigs[icap2][icap]=RawPedSigs[icap][icap2];
815 for (
int icap=0; icap<4; icap++) {
816 if(RawPedVals[icap]<1. || RawPedSigs[icap][icap]<0.01) isinRaw[
detid]=
false;
817 for (
int icap2=icap; icap2<4; icap2++){
818 if(fabs(RawPedSigs[icap][icap2]/
sqrt(RawPedSigs[icap][icap]*RawPedSigs[icap2][icap2]))>1.) isinRaw[
detid]=
false;
825 for (
int icap=0; icap<4; icap++) {
826 int icap2=(icap+1)%4;
827 float width=
sqrt(RawPedSigs[icap][icap]);
828 float erof1=width/
sqrt((
float)nstat[icap]);
829 float erof2=
sqrt(erof1*erof1+RawPedSigs[icap][icap]/(
float)nstat[icap]);
830 float erofwidth=width/
sqrt(2.*nstat[icap]);
831 float diffof1=RawPedVals[icap]-RefPedVals[icap];
832 float diffof2=RawPedVals[icap]+RawPedVals[icap2]-RefPedVals[icap]-RefPedVals[icap2];
833 float diffofw=width-
sqrt(RefPedSigs[icap][icap]);
838 if(nTS==1 && fabs(diffof1)>0.5+erof1) {
840 PedValLog<<
"HcalPedVal: drift in channel "<<detid<<
" cap "<<icap<<
": "<<RawPedVals[icap]<<
" - "<<RefPedVals[icap]<<
" = "<<diffof1<<std::endl;
842 if(nTS==2 && fabs(diffof2)>0.5+erof2) {
844 PedValLog<<
"HcalPedVal: drift in channel "<<detid<<
" caps "<<icap<<
"+"<<icap2<<
": "<<RawPedVals[icap]<<
"+"<<RawPedVals[icap2]<<
" - "<<RefPedVals[icap]<<
"+"<<RefPedVals[icap2]<<
" = "<<diffof2<<std::endl;
846 if(fabs(diffofw)>0.15*width+erofwidth) {
848 PedValLog<<
"HcalPedVal: width changed in channel "<<detid<<
" cap "<<icap<<
": "<<width<<
" - "<<
sqrt(RefPedSigs[icap][icap])<<
" = "<<diffofw<<std::endl;
855 PedValLog<<
"HcalPedVal: no valid data from channel "<<detid<<std::endl;
857 HcalPedestal item(detid,RefPedVals[0],RefPedVals[1],RefPedVals[2],RefPedVals[3]);
860 for (
int icap=0; icap<4; icap++) {
861 for (
int icap2=icap; icap2<4; icap2++) widthsp.
setSigma(icap2,icap,RefPedSigs[icap2][icap]);
869 if(erflag==0) PedValLog<<
"HcalPedVal: all pedestals checked OK"<<std::endl;
873 if(erflag%100000 == 0) {
874 for (
int i=0;
i<(int)RefChanns.size();
i++){
876 if (isinRaw[detid]) {
878 for (
int icap=0; icap<4; icap++) {
880 for (
int icap2=icap; icap2<4; icap2++) {
881 RefPedSigs[icap][icap2]=fRefPedestalWidths->
getValues(detid)->
getSigma(icap,icap2);
882 if(icap2!=icap)RefPedSigs[icap2][icap]=RefPedSigs[icap][icap2];
883 widthsp.
setSigma(icap2,icap,RefPedSigs[icap2][icap]);
887 HcalPedestal item(detid,RefPedVals[0],RefPedVals[1],RefPedVals[2],RefPedVals[3]);
895 for (
int i=0;
i<(int)RawChanns.size();
i++){
897 if (isinRaw[detid]) {
899 for (
int icap=0; icap<4; icap++) {
901 for (
int icap2=icap; icap2<4; icap2++) {
902 RawPedSigs[icap][icap2]=fRawPedestalWidths->
getValues(detid)->
getSigma(icap,icap2);
903 if(icap2!=icap)RawPedSigs[icap2][icap]=RawPedSigs[icap][icap2];
904 widthsp.
setSigma(icap2,icap,RawPedSigs[icap2][icap]);
908 HcalPedestal item(detid,RawPedVals[0],RawPedVals[1],RawPedVals[2],RawPedVals[3]);
T getUntrackedParameter(std::string const &, T const &) const
HcalPedestals * fRawPedestals
void per2CapsHists(int flag, int id, const HcalDetId detid, const HcalQIESample &qie1, const HcalQIESample &qie2, std::map< HcalDetId, std::map< int, PEDBUNCH > > &toolT, const HcalDbService &cond)
HcalPedestalAnalysis(const edm::ParameterSet &ps)
Constructor.
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
int adc() const
get the ADC sample
int size() const
total number of samples in the digi
std::string m_outputFileMean
std::vector< HBHEDataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
const HcalQIESample & sample(int i) const
access a sample
std::vector< bool > state
const HcalPedestalWidths * fRefPedestalWidths
void processEvent(const HBHEDigiCollection &hbhe, const HODigiCollection &ho, const HFDigiCollection &hf, const HcalDbService &cond)
const HcalDetId & id() const
struct HcalPedestalAnalysis::@59 hfHists
const HcalQIECoder * m_coder
struct HcalPedestalAnalysis::@59 hoHists
~HcalPedestalAnalysis()
Destructor.
int depth() const
get the tower depth
int done(const HcalPedestals *fInputPedestals, const HcalPedestalWidths *fInputWidths, HcalPedestals *fOutputPedestals, HcalPedestalWidths *fOutputWidths)
const HcalQIEShape * m_shape
void GetPedConst(std::map< HcalDetId, std::map< int, PEDBUNCH > > &toolT, TH1F *PedMeans, TH1F *PedWidths)
void setup(const std::string &m_outputFileROOT)
std::vector< DetId > getAllChannels() const
int ieta() const
get the cell ieta
int size() const
total number of samples in the digi
const HcalQIESample & sample(int i) const
access a sample
float getValue(int fCapId) const
get value for capId = 0..3
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
std::string m_outputFileWidth
HcalPedestals * fValPedestals
std::string m_outputFileROOT
const_iterator end() const
int iphi() const
get the cell iphi
int size() const
total number of samples in the digi
std::map< HcalDetId, std::map< int, PEDBUNCH > >::iterator _meot
int capid() const
get the Capacitor id
const HcalQIESample & sample(int i) const
access a sample
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
void AllChanHists(const HcalDetId detid, const HcalQIESample &qie0, const HcalQIESample &qie1, const HcalQIESample &qie2, const HcalQIESample &qie3, const HcalQIESample &qie4, const HcalQIESample &qie5, std::map< HcalDetId, std::map< int, PEDBUNCH > > &toolT)
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const HcalPedestals * fRefPedestals
const HcalDetId & id() const
HcalPedestalWidths * fValPedestalWidths
const HcalDetId & id() const
bool addValues(const Item &myItem)
static int HcalPedVal(int nstat[4], const HcalPedestals *fRefPedestals, const HcalPedestalWidths *fRefPedestalWidths, HcalPedestals *fRawPedestals, HcalPedestalWidths *fRawPedestalWidths, HcalPedestals *fValPedestals, HcalPedestalWidths *fValPedestalWidths)
HcalPedestalWidths * fRawPedestalWidths
void Trendings(std::map< HcalDetId, std::map< int, PEDBUNCH > > &toolT, TH1F *Chi2, TH1F *CapidAverage, TH1F *CapidChi2)
void setSigma(int fCapId1, int fCapId2, float fSigma)
tuple size
Write out results.
const_iterator begin() const
struct HcalPedestalAnalysis::@59 hbHists
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -> fC conversion.