448 TFile
f(
"PhiSymmetryCalibration.root",
"recreate");
450 std::vector<TH1F*> etsum_barl_histos(
kBarlRings);
451 std::vector<TH1F*> esum_barl_histos(
kBarlRings);
463 if (etsum<low && etsum!=0.) low=etsum;
464 if (etsum>high) high=etsum;
467 if (esum<low_e && esum!=0.) low_e=esum;
468 if (esum>high_e) high_e=esum;
473 t <<
"etsum_barl_" << ieta+1;
474 etsum_barl_histos[ieta]=
new TH1F(t.str().c_str(),
"",50,low-.2*low,high+.1*high);
477 t <<
"esum_barl_" << ieta+1;
478 esum_barl_histos[ieta]=
new TH1F(t.str().c_str(),
"",50,low_e-.2*low_e,high_e+.1*high_e);
489 etsum_barl_histos[ieta]->Fill(etsum);
490 esum_barl_histos[ieta]->Fill(esum);
497 etsum_barl_histos[ieta]->Write();
498 esum_barl_histos[ieta]->Write();
501 delete etsum_barl_histos[ieta];
502 delete esum_barl_histos[ieta];
517 float low_uncorr=FLT_MAX;
527 for (
int sign=0; sign<
kSides; sign++) {
529 if (etsum<low && etsum!=0.) low=etsum;
530 if (etsum>high) high=etsum;
533 if (etsum_uncorr<low_uncorr && etsum_uncorr!=0.) low_uncorr=etsum_uncorr;
534 if (etsum_uncorr>high_uncorr) high_uncorr=etsum_uncorr;
537 if (esum<low_e && esum!=0.) low_e=esum;
538 if (esum>high_e) high_e=esum;
541 if (area<low_a) low_a=area;
542 if (area>high_a) high_a=area;
549 t<<
"etsum_endc_" <<
ring+1;
550 etsum_endc_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low-.2*low,high+.1*high);
553 t<<
"etsum_endc_uncorr_" << ring+1;
554 etsum_endc_uncorr_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low_uncorr-.2*low_uncorr,high_uncorr+.1*high_uncorr);
557 t<<
"esum_endc_" << ring+1;
558 esum_endc_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low_e-.2*low_e,high_e+.1*high_e);
561 t<<
"etsumvsarea_endc_" << ring+1;
562 etsumvsarea_endc_histos[
ring]=
new TH2F(t.str().c_str(),
";A_{#eta#phi};#Sigma E_{T}",50,low_a,high_a,50,low,high);
565 t<<
"esumvsarea_endc_" << ring+1;
566 esumvsarea_endc_histos[
ring]=
new TH2F(t.str().c_str(),
";A_{#eta#phi};#Sigma E",50,low_a,high_a,50,low_e,high_e);
575 for (
int sign=0; sign<
kSides; sign++) {
580 etsum_endc_histos[
ring]->Fill(etsum);
581 etsum_endc_uncorr_histos[
ring]->Fill(etsum_uncorr);
582 esum_endc_histos[
ring]->Fill(esum);
585 etsumvsarea_endc_histos[
ring]->Fill(area,etsum);
586 esumvsarea_endc_histos[
ring]->Fill(area,esum);
596 etsum_endc_histos[
ring]->Write();
597 etsum_endc_uncorr_histos[
ring]->Write();
598 esum_endc_histos[
ring]->Write();
601 etsumvsarea_endc_histos[
ring]->Write();
602 esumvsarea_endc_histos[
ring]->Write();
604 delete etsum_endc_histos[
ring];
605 delete etsum_endc_uncorr_histos[
ring];
606 delete esum_endc_histos[
ring];
607 delete etsumvsarea_endc_histos[
ring];
608 delete esumvsarea_endc_histos[
ring];
613 TH2F barreletamap(
"barreletamap",
"barreletamap",171, -85,86,100,0,2);
614 TH2F barrelmap(
"barrelmap",
"barrelmap - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{0}}",360,1,360, 171, -85,86);
615 TH2F barrelmap_e(
"barrelmape",
"barrelmape - #frac{#Sigma E}{<#Sigma E>_{0}}",360,1,360, 171, -85,86);
616 TH2F barrelmap_divided(
"barrelmapdiv",
"barrelmapdivided - #frac{#Sigma E_{T}}{hits}",360,1,360,171,-85,86);
617 TH2F barrelmap_e_divided(
"barrelmapediv",
"barrelmapedivided - #frac{#Sigma E}{hits}",360,1,360,171,-85,86);
618 TH2F endcmap_plus_corr(
"endcapmapplus_corrected",
"endcapmapplus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
619 TH2F endcmap_minus_corr(
"endcapmapminus_corrected",
"endcapmapminus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
620 TH2F endcmap_plus_uncorr(
"endcapmapplus_uncorrected",
"endcapmapplus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
621 TH2F endcmap_minus_uncorr(
"endcapmapminus_uncorrected",
"endcapmapminus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
622 TH2F endcmap_e_plus(
"endcapmapeplus",
"endcapmapeplus - #frac{#Sigma E}{<#Sigma E>_{38}}",100,1,101,100,1,101);
623 TH2F endcmap_e_minus(
"endcapmapeminus",
"endcapmapeminus - #frac{#Sigma E}{<#Sigma E>_{38}}",100,1,101,100,1,101);
625 for (
int sign=0; sign<
kSides; sign++) {
627 int thesign = sign==1 ? 1:-1;
635 barrelmap_divided.Fill( iphi+1,ieta*thesign + thesign,
etsum_barl_[ieta][iphi][sign]/
nhits_barl_[ieta][iphi][sign]);
636 barrelmap_e_divided.Fill( iphi+1,ieta*thesign + thesign,
esum_barl_[ieta][iphi][sign]/
nhits_barl_[ieta][iphi][sign]);
663 barreletamap.Write();
664 barrelmap_divided.Write();
666 barrelmap_e_divided.Write();
668 endcmap_plus_corr.Write();
669 endcmap_minus_corr.Write();
670 endcmap_plus_uncorr.Write();
671 endcmap_minus_uncorr.Write();
672 endcmap_e_plus.Write();
673 endcmap_e_minus.Write();
676 vector<TH1F*> etavsphi_endc(kEndcEtaRings);
677 vector<TH1F*> areavsphi_endc(kEndcEtaRings);
678 vector<TH1F*> etsumvsphi_endcp_corr(kEndcEtaRings);
679 vector<TH1F*> etsumvsphi_endcm_corr(kEndcEtaRings);
680 vector<TH1F*> etsumvsphi_endcp_uncorr(kEndcEtaRings);
681 vector<TH1F*> etsumvsphi_endcm_uncorr(kEndcEtaRings);
682 vector<TH1F*> esumvsphi_endcp(kEndcEtaRings);
683 vector<TH1F*> esumvsphi_endcm(kEndcEtaRings);
685 std::vector<TH1F*> deltaeta_histos(kEndcEtaRings);
686 std::vector<TH1F*> deltaphi_histos(kEndcEtaRings);
691 t<<
"etavsphi_endc_"<<
ring;
695 t<<
"areavsphi_endc_"<<
ring;
699 t<<
"etsumvsphi_endcp_corr_"<<
ring;
703 t <<
"etsumvsphi_endcm_corr_"<<
ring;
707 t <<
"etsumvsphi_endcp_uncorr_"<<
ring;
711 t <<
"etsumvsphi_endcm_uncorr_"<<
ring;
715 t <<
"esumvsphi_endcp_"<<
ring;
719 t <<
"esumvsphi_endcm_"<<
ring;
723 t <<
"deltaeta_" <<
ring;
724 deltaeta_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,-.1,.1);
726 t <<
"deltaphi_" <<
ring;
727 deltaphi_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,-.1,.1);
742 for (
int sign=0; sign<
kSides; sign++) {
745 etsumvsphi_endcp_corr[
ring]->Fill(iphi_endc,
etsum_endc_[ix][iy][sign]);
749 etsumvsphi_endcm_corr[
ring]->Fill(iphi_endc,
etsum_endc_[ix][iy][sign]);
767 etavsphi_endc[
ring]->Write();
768 areavsphi_endc[
ring]->Write();
769 etsumvsphi_endcp_corr[
ring]->Write();
770 etsumvsphi_endcm_corr[
ring]->Write();
771 etsumvsphi_endcp_uncorr[
ring]->Write();
772 etsumvsphi_endcm_uncorr[
ring]->Write();
773 esumvsphi_endcp[
ring]->Write();
774 esumvsphi_endcm[
ring]->Write();
775 deltaeta_histos[
ring]->Write();
776 deltaphi_histos[
ring]->Write();
779 delete etsumvsphi_endcp_corr[
ring];
780 delete etsumvsphi_endcm_corr[
ring];
781 delete etsumvsphi_endcp_uncorr[
ring];
782 delete etsumvsphi_endcm_uncorr[
ring];
783 delete etavsphi_endc[
ring];
784 delete areavsphi_endc[
ring];
785 delete esumvsphi_endcp[
ring];
786 delete esumvsphi_endcm[
ring];
787 delete deltaeta_histos[
ring];
788 delete deltaphi_histos[
ring];
double esumMean_endc_[kEndcEtaRings]
double etsumMean_barl_[kBarlRings]
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double esumMean_barl_[kBarlRings]
int nRing_[kEndcEtaRings]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
int nBads_endc[kEndcEtaRings]
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
double phi_endc_[kMaxEndciPhi][kEndcEtaRings]
static const int kBarlWedges
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
static const int kEndcWedgesX
double etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides]
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const int kEndcEtaRings
double etsumMean_endc_[kEndcEtaRings]
double esum_barl_[kBarlRings][kBarlWedges][kSides]
double cellPhi_[kEndcWedgesX][kEndcWedgesY]
double cellArea_[kEndcWedgesX][kEndcWedgesY]
int nBads_barl[kBarlRings]
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
static const int kEndcWedgesY