470 TFile
f(
"PhiSymmetryCalibration.root",
"recreate");
472 std::vector<TH1F*> etsum_barl_histos(
kBarlRings);
473 std::vector<TH1F*> esum_barl_histos(
kBarlRings);
483 for (
int sign=0; sign<
kSides; sign++) {
485 if (etsum<low && etsum!=0.) low=etsum;
486 if (etsum>high) high=etsum;
489 if (esum<low_e && esum!=0.) low_e=esum;
490 if (esum>high_e) high_e=esum;
495 t <<
"etsum_barl_" << ieta+1;
496 etsum_barl_histos[ieta]=
new TH1F(t.str().c_str(),
"",50,low-.2*low,high+.1*high);
499 t <<
"esum_barl_" << ieta+1;
500 esum_barl_histos[ieta]=
new TH1F(t.str().c_str(),
"",50,low_e-.2*low_e,high_e+.1*high_e);
508 for (
int sign=0; sign<
kSides; sign++) {
511 int iphi_r = int(iphi/
nscx);
524 etsum_barl_histos[ieta]->Fill(etsum);
525 esum_barl_histos[ieta]->Fill(esum);
534 etsum_barl_histos[ieta]->Write();
535 esum_barl_histos[ieta]->Write();
539 delete etsum_barl_histos[ieta];
540 delete esum_barl_histos[ieta];
554 float low_uncorr=FLT_MAX;
564 for (
int sign=0; sign<
kSides; sign++) {
566 if (etsum<low && etsum!=0.) low=etsum;
567 if (etsum>high) high=etsum;
570 if (etsum_uncorr<low_uncorr && etsum_uncorr!=0.) low_uncorr=etsum_uncorr;
571 if (etsum_uncorr>high_uncorr) high_uncorr=etsum_uncorr;
574 if (esum<low_e && esum!=0.) low_e=esum;
575 if (esum>high_e) high_e=esum;
578 if (area<low_a) low_a=area;
579 if (area>high_a) high_a=area;
586 t<<
"etsum_endc_" <<
ring+1;
587 etsum_endc_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low-.2*low,high+.1*high);
590 t<<
"etsum_endc_uncorr_" << ring+1;
591 etsum_endc_uncorr_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low_uncorr-.2*low_uncorr,high_uncorr+.1*high_uncorr);
594 t<<
"esum_endc_" << ring+1;
595 esum_endc_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,low_e-.2*low_e,high_e+.1*high_e);
598 t<<
"etsumvsarea_endc_" << ring+1;
599 etsumvsarea_endc_histos[
ring]=
new TH2F(t.str().c_str(),
";A_{#eta#phi};#Sigma E_{T}",50,low_a,high_a,50,low,high);
602 t<<
"esumvsarea_endc_" << ring+1;
603 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);
612 for (
int sign=0; sign<
kSides; sign++) {
617 etsum_endc_histos[
ring]->Fill(etsum);
618 etsum_endc_uncorr_histos[
ring]->Fill(etsum_uncorr);
619 esum_endc_histos[
ring]->Fill(esum);
622 etsumvsarea_endc_histos[
ring]->Fill(area,etsum);
623 esumvsarea_endc_histos[
ring]->Fill(area,esum);
633 etsum_endc_histos[
ring]->Write();
634 etsum_endc_uncorr_histos[
ring]->Write();
635 esum_endc_histos[
ring]->Write();
638 etsumvsarea_endc_histos[
ring]->Write();
639 esumvsarea_endc_histos[
ring]->Write();
641 delete etsum_endc_histos[
ring];
642 delete etsum_endc_uncorr_histos[
ring];
643 delete esum_endc_histos[
ring];
644 delete etsumvsarea_endc_histos[
ring];
645 delete esumvsarea_endc_histos[
ring];
650 TH2F barreletamap(
"barreletamap",
"barreletamap",171, -85,86,100,0,2);
651 TH2F barrelmap(
"barrelmap",
"barrelmap - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{0}}",360,1,360, 171, -85,86);
652 TH2F barrelmap_e(
"barrelmape",
"barrelmape - #frac{#Sigma E}{<#Sigma E>_{0}}",360,1,360, 171, -85,86);
653 TH2F barrelmap_divided(
"barrelmapdiv",
"barrelmapdivided - #frac{#Sigma E_{T}}{hits}",360,1,360,171,-85,86);
654 TH2F barrelmap_e_divided(
"barrelmapediv",
"barrelmapedivided - #frac{#Sigma E}{hits}",360,1,360,171,-85,86);
655 TH2F endcmap_plus_corr(
"endcapmapplus_corrected",
"endcapmapplus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
656 TH2F endcmap_minus_corr(
"endcapmapminus_corrected",
"endcapmapminus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
657 TH2F endcmap_plus_uncorr(
"endcapmapplus_uncorrected",
"endcapmapplus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
658 TH2F endcmap_minus_uncorr(
"endcapmapminus_uncorrected",
"endcapmapminus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",100,1,101,100,1,101);
659 TH2F endcmap_e_plus(
"endcapmapeplus",
"endcapmapeplus - #frac{#Sigma E}{<#Sigma E>_{38}}",100,1,101,100,1,101);
660 TH2F endcmap_e_minus(
"endcapmapeminus",
"endcapmapeminus - #frac{#Sigma E}{<#Sigma E>_{38}}",100,1,101,100,1,101);
662 for (
int sign=0; sign<
kSides; sign++) {
664 int thesign = sign==1 ? 1:-1;
672 barrelmap_divided.Fill( iphi+1,ieta*thesign + thesign,
etsum_barl_[ieta][iphi][sign]/
nhits_barl_[ieta][iphi][sign]);
673 barrelmap_e_divided.Fill( iphi+1,ieta*thesign + thesign,
esum_barl_[ieta][iphi][sign]/
nhits_barl_[ieta][iphi][sign]);
700 barreletamap.Write();
701 barrelmap_divided.Write();
703 barrelmap_e_divided.Write();
705 endcmap_plus_corr.Write();
706 endcmap_minus_corr.Write();
707 endcmap_plus_uncorr.Write();
708 endcmap_minus_uncorr.Write();
709 endcmap_e_plus.Write();
710 endcmap_e_minus.Write();
713 vector<TH1F*> etavsphi_endc(kEndcEtaRings);
714 vector<TH1F*> areavsphi_endc(kEndcEtaRings);
715 vector<TH1F*> etsumvsphi_endcp_corr(kEndcEtaRings);
716 vector<TH1F*> etsumvsphi_endcm_corr(kEndcEtaRings);
717 vector<TH1F*> etsumvsphi_endcp_uncorr(kEndcEtaRings);
718 vector<TH1F*> etsumvsphi_endcm_uncorr(kEndcEtaRings);
719 vector<TH1F*> esumvsphi_endcp(kEndcEtaRings);
720 vector<TH1F*> esumvsphi_endcm(kEndcEtaRings);
722 std::vector<TH1F*> deltaeta_histos(kEndcEtaRings);
723 std::vector<TH1F*> deltaphi_histos(kEndcEtaRings);
728 t<<
"etavsphi_endc_"<<
ring;
732 t<<
"areavsphi_endc_"<<
ring;
736 t<<
"etsumvsphi_endcp_corr_"<<
ring;
740 t <<
"etsumvsphi_endcm_corr_"<<
ring;
744 t <<
"etsumvsphi_endcp_uncorr_"<<
ring;
748 t <<
"etsumvsphi_endcm_uncorr_"<<
ring;
752 t <<
"esumvsphi_endcp_"<<
ring;
756 t <<
"esumvsphi_endcm_"<<
ring;
760 t <<
"deltaeta_" <<
ring;
761 deltaeta_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,-.1,.1);
763 t <<
"deltaphi_" <<
ring;
764 deltaphi_histos[
ring]=
new TH1F(t.str().c_str(),
"",50,-.1,.1);
779 for (
int sign=0; sign<
kSides; sign++) {
782 etsumvsphi_endcp_corr[
ring]->Fill(iphi_endc,
etsum_endc_[ix][iy][sign]);
786 etsumvsphi_endcm_corr[
ring]->Fill(iphi_endc,
etsum_endc_[ix][iy][sign]);
804 etavsphi_endc[
ring]->Write();
805 areavsphi_endc[
ring]->Write();
806 etsumvsphi_endcp_corr[
ring]->Write();
807 etsumvsphi_endcm_corr[
ring]->Write();
808 etsumvsphi_endcp_uncorr[
ring]->Write();
809 etsumvsphi_endcm_uncorr[
ring]->Write();
810 esumvsphi_endcp[
ring]->Write();
811 esumvsphi_endcm[
ring]->Write();
812 deltaeta_histos[
ring]->Write();
813 deltaphi_histos[
ring]->Write();
816 delete etsumvsphi_endcp_corr[
ring];
817 delete etsumvsphi_endcm_corr[
ring];
818 delete etsumvsphi_endcp_uncorr[
ring];
819 delete etsumvsphi_endcm_uncorr[
ring];
820 delete etavsphi_endc[
ring];
821 delete areavsphi_endc[
ring];
822 delete esumvsphi_endcp[
ring];
823 delete esumvsphi_endcm[
ring];
824 delete deltaeta_histos[
ring];
825 delete deltaphi_histos[
ring];
double etsumMean_endc_[kEndcEtaRings]
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
int nRing_[kEndcEtaRings]
int nBads_endc[kEndcEtaRings]
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
double etsumMean_barl_[kBarlRings]
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
double esumMean_endc_[kEndcEtaRings]
double etsumMean_barl_SM_[kBarlRings]
int nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
double phi_endc_[kMaxEndciPhi][kEndcEtaRings]
double esumMean_barl_[kBarlRings]
static const int kBarlWedges
static const int kEndcWedgesX
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const int kEndcEtaRings
double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double cellPhi_[kEndcWedgesX][kEndcWedgesY]
double cellArea_[kEndcWedgesX][kEndcWedgesY]
double etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides]
double esum_barl_[kBarlRings][kBarlWedges][kSides]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
int nBads_barl[kBarlRings]
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
static const int kEndcWedgesY