590 float etaRegions[][2] = { {0.0, 0.1}, {1.4, 1.7}, {2.0, 2.1}, {3.3, 3.4}, {4.0, 4.1} };
591 std::cout <<
"CaloHadDMCoeffFit::make_report() -> Info. Making report..." << std::endl;
592 gStyle->SetCanvasColor(10);
593 gStyle->SetCanvasBorderMode(0);
594 gStyle->SetPadColor(10);
595 gStyle->SetPadBorderMode(0);
596 gStyle->SetPalette(1);
597 gStyle->SetTitleBorderSize(1);
598 gStyle->SetTitleFillColor(10);
599 int cc_xx = 768, cc_yy = 1024;
602 gROOT->SetBatch(kTRUE);
604 std::string sfname = sreport;
605 TCanvas *ctmp =
new TCanvas(
"ctmp",
"ctmp", cc_xx, cc_yy);
607 ctmp->Print(sfname.c_str());
610 TCanvas *c1ps =
new TCanvas(
"c1ps",
"c1ps", cc_xx, cc_yy);
623 std::vector<int > v_indx;
625 for(
int i_frac=0; i_frac<dimFrac->
getNbins(); i_frac++) {
626 for(
int i_ener=0; i_ener<dimEner->
getNbins(); i_ener++) {
627 for(
int i_lambda=0; i_lambda<dimLambda->
getNbins(); i_lambda++) {
628 for(
int i_side=0; i_side<dimSide->
getNbins(); i_side++) {
629 for(
int i_phi=0; i_phi<dimPhi->
getNbins(); i_phi++) {
635 for(
int k=0;
k<2;
k++){
637 TPad *pad1 =
new TPad(
"p1ps",
"p1ps",0.0, 0.95, 1.0, 1.0); pad1->Draw();
638 TPad *pad2 =
new TPad(
"p2ps",
"p2ps",0.0, 0.0, 1.0, 0.95); pad2->Draw();
643 sprintf(
str,
"%s em:%d ener:%d> %5.1f-%6.1f phi:%d s:%d",dmArea->
getTitle().c_str(),i_frac,i_ener, ener1, ener2, i_phi, i_side);
644 tex.SetTextSize(0.4);
645 tex.SetTextColor(kBlue);
646 tex.DrawTextNDC(0.05,0.1,
str);
662 for(
int i_eta=0; i_eta<dimEta->
getNbins(); i_eta++){
666 std::cout <<
"Panic! iBin == -1, i_frac:" << i_frac <<
" i_ener:" << i_ener <<
" i_lambda:" << i_lambda <<
" i_eta:" << i_eta << std::endl;
677 pad2->cd(1+i_eta); gPad->SetGrid();
678 hh->GetXaxis()->SetNdivisions(508);
679 hh->GetYaxis()->SetNdivisions(508);
680 hh->GetXaxis()->SetTitle(
"edmtrue");
681 hh->GetYaxis()->SetTitle(
"eprep");
683 gStyle->SetOptStat(111111);
686 gStyle->SetOptStat(1);
692 tex.SetTextSize(0.095);
693 tex.SetTextColor(kBlue);
695 tex.DrawTextNDC(0.2,0.8,
str);
696 sprintf(
str,
"%d",iBin);
697 tex.DrawTextNDC(0.5,0.28,
str);
700 tex.SetTextColor(kBlue);
701 float p0inv, s0inv, p1inv, s1inv;
702 m_FitData[iBin]->getInverted(p0inv, s0inv, p1inv, s1inv);
703 tex.SetTextColor(kBlue); tex.SetTextSize(0.07);
705 tex.DrawTextNDC(0.2,0.7,
str);
706 sprintf(
str,
"inv:%6.3f %6.3f",p0inv, p1inv);
707 tex.DrawTextNDC(0.2,0.7-0.1,
str);
708 sprintf(
str,
"err:%6.3f %6.3f",s0inv, s1inv);
709 tex.DrawTextNDC(0.2,0.7-0.2,
str);
711 tex.SetTextColor(kRed);
715 sprintf(
str,
"Oops!");
716 tex.SetTextColor(kMagenta); tex.SetTextSize(0.095);
717 tex.DrawTextNDC(0.2,0.7,
str);
720 c1ps->Print(sfname.c_str());
721 printf(
"page:%d dmArea->m_title:%s frac:%d ener:%d phi:%d side:%d\n",
722 npage++, dmArea->
getTitle().c_str(), i_frac, i_ener, i_phi, i_side);
732 for(
int i_side=0; i_side<dimSide->
getNbins(); i_side++){
734 for(
int i_phi=0; i_phi<dimPhi->
getNbins(); i_phi++){
736 for(
int i_par=0; i_par<2; i_par++){
738 TPad *pad1 =
new TPad(
"p1ps",
"p1ps",0.0, 0.95, 1.0, 1.0); pad1->Draw();
739 TPad *pad2 =
new TPad(
"p2ps",
"p2ps",0.0, 0.0, 1.0, 0.95); pad2->Draw();
742 sprintf(
str,
"Summary: %s par:%d frac:%d phi:%d side:%d",dmArea->
getTitle().c_str(),i_par,i_frac, i_phi, i_side);
743 tex.SetTextSize(0.5); tex.SetTextColor(kBlue);
744 tex.DrawTextNDC(0.05,0.1,
str);
760 for(
int i_eta=0; i_eta<dimEta->
getNbins(); i_eta++){
762 TGraphErrors *
gr =
new TGraphErrors(dimEner->
getNbins());
763 for(
int i_ener=0; i_ener<dimEner->
getNbins(); i_ener++) {
768 float p0inv, s0inv, p1inv, s1inv;
769 m_FitData[iBin]->getInverted(p0inv, s0inv, p1inv, s1inv);
779 gr->SetPointError(i_ener, 0.0, ye);
781 pad2->cd(1+i_eta); gPad->SetGrid();
785 tex.SetTextSize(0.095);
786 tex.SetTextColor(kBlue);
787 sprintf(
str,
"%4.2f-%4.2f phibin:%d",
eta1,
eta2,i_phi);
788 tex.DrawTextNDC(0.2,0.8,
str);
790 c1ps->Print(sfname.c_str());
791 printf(
"page:%d dmArea->m_title:%s frac:%d Energy summary\n",
792 npage++, dmArea->
getTitle().c_str(), i_frac);
813 for(
int i_frac=0; i_frac<dimFrac->
getNbins(); i_frac++){
814 for(
int i_side=0; i_side<dimSide->
getNbins(); i_side++){
815 for(
int i_phi=0; i_phi<dimPhi->
getNbins(); i_phi++){
816 for(
int i_eta=0; i_eta<dimEta->
getNbins(); i_eta++){
818 bool ShowThisEta =
false;
819 for(
int i=0;
i<
int(
sizeof(etaRegions)/
sizeof(
float)/2);
i++){
821 if(xeta>=etaRegions[
i][0] && xeta <= etaRegions[
i][1]) {
826 if(!ShowThisEta)
continue;
827 std::vector<int > v_indx;
837 bzero(xx,100*
sizeof(Double_t));
838 for(
int i_ener=0; i_ener<dimEner->
getNbins()+1; i_ener++){
839 xx[i_ener] = dimEner->
getXmin() + dimEner->
getDx()*i_ener;
842 bzero(
yy,100*
sizeof(Double_t));
843 for(
int i_lambda=0; i_lambda<dimLambda->
getNbins()+1; i_lambda++){
844 yy[i_lambda] = dimLambda->
getXmin() + dimLambda->
getDx()*i_lambda;
852 sprintf(
hname,
"%s dm:%d frac:%d eta:%d phi:%d indx:%d-%d<ecls>/<edm>",dmArea->
getTitle().c_str(),i_dms, i_frac, i_eta, i_phi, ibin_min, ibin_max);
854 sprintf(
hname,
"%s dm:%d frac:%d eta:%d phi:%d indx:%d-%d nev",dmArea->
getTitle().c_str(),i_dms, i_frac, i_eta, i_phi, ibin_min, ibin_max);
856 for(
int i=0;
i<n_prof;
i++){
857 hp2[
i]->GetXaxis()->SetTitle(
"log10(E_{cls}(MeV))");
858 hp2[
i]->GetYaxis()->SetTitle(
"log10(#lambda)");
859 hp2[
i]->GetZaxis()->SetTitle(
"<E_{cls}>/<E_{dm}>");
862 float hp_aver[n_prof];
863 bzero(hp_aver,n_prof*
sizeof(
float));
864 std::vector<std::pair<int, int> > v_occupancy;
865 for(
int i_ener=0; i_ener<dimEner->
getNbins(); i_ener++) {
866 for(
int i_lambda=0; i_lambda<dimLambda->
getNbins(); i_lambda++) {
871 std::cout <<
"Panic in pp3, Wrong iBin=-1" << std::endl;
875 hp2[0]->Fill(dimEner->
getXmin() + dimEner->
getDx()*(i_ener+0.5), dimLambda->
getXmin() + dimLambda->
getDx()*(i_lambda+0.5),
x);
878 hp2[1]->Fill(dimEner->
getXmin() + dimEner->
getDx()*(i_ener+0.5), dimLambda->
getXmin() + dimLambda->
getDx()*(i_lambda+0.5),
x );
880 std::pair<int, int> pp;
883 v_occupancy.push_back(pp);
886 TCanvas *cp2 =
new TCanvas(
"cp2",
"cp2",cc_xx,cc_yy);
888 TPad *pad1 =
new TPad(
"cp2_p1ps",
"cp2_p1ps",0.0, 0.95, 1.0, 1.0); pad1->Draw();
889 TPad *pad2 =
new TPad(
"cp2_p2ps",
"cp2_p2ps",0.0, 0.0, 1.0, 0.95); pad2->Draw();
892 sprintf(
str,
"Summary: %s frac:%d phi:%d side:%d",dmArea->
getTitle().c_str(),i_frac, i_phi, i_side);
893 tex.SetTextSize(0.5); tex.SetTextColor(kBlue);
894 tex.DrawTextNDC(0.05,0.1,
str);
898 gPad->SetRightMargin(0.2);
899 hp2[1]->Draw(
"colz");
908 for(
int i_ener=0; i_ener<dimEner->
getNbins(); i_ener++) {
911 sprintf(
str,
"%d",iBin);
913 tex.SetTextSize(0.03);
914 tex.SetTextAngle(90.);
919 std::sort(v_occupancy.begin(), v_occupancy.end());
921 for(
unsigned int i_spec=0; i_spec<v_occupancy.size(); i_spec++){
922 int iBin = v_occupancy[i_spec].second;
924 std::cout <<
"Panic in pp3, Wrong iBin=-1" << std::endl;
928 std::cout <<
"Undefined h1 for " << iBin << std::endl;
931 std::vector<int > indexes;
933 sprintf(
str,
"ibin:%d frac:%d ener:%d lambda:%d eta:%d phi:%d",iBin,
940 gStyle->SetOptStat(111111);
944 tex.SetTextSize(0.05);
945 tex.DrawTextNDC(0.2,0.7,
str);
946 if(i_spec >= 3)
break;
948 cp2->Print(sfname.c_str());
949 printf(
"page:%d dmArea->m_title:%s i_frac:%d eta:%d phi:%d side:%d\n",
950 npage, dmArea->
getTitle().c_str(), i_frac, i_eta, i_phi, i_side);
960 ctmp->Print(sfname.c_str());