50 #include "TPostScript.h" 72 static const int mapx1[6][3] = {{1, 4, 8}, {12, 7, 3}, {5, 9, 13}, {11, 6, 2}, {16, 15, 14}, {19, 18, 17}};
74 static const int mapx2[6][3] = {{1, 4, 8}, {12, 7, 3}, {5, 9, 13}, {11, 6, 2}, {16, 15, 14}, {-1, -1, -1}};
76 static const int mapx0p[9][2] = {{3, 1}, {7, 4}, {6, 5}, {12, 8}, {0, 0}, {11, 9}, {16, 13}, {15, 14}, {19, 17}};
77 static const int mapx0m[9][2] = {{17, 19}, {14, 15}, {13, 16}, {9, 11}, {0, 0}, {8, 12}, {5, 6}, {4, 7}, {1, 3}};
79 static const int etamap[4][21] = {{-1, 0, 3, 1, 0, 2, 3, 1, 0, 2, -1, 3, 1, 2, 4, 4, 4, -1, -1, -1, -1},
80 {-1, 0, 3, 1, 0, 2, 3, 1, 0, 2, -1, 3, 1, 2, 4, 4, 4, 5, 5, 5, -1},
81 {-1, 0, -1, 0, 1, 2, 2, 1, 3, 5, -1, 5, 3, 6, 7, 7, 6, 8, -1, 8, -1},
82 {-1, 8, -1, 8, 7, 6, 6, 7, 5, 3, -1, 3, 5, 2, 1, 1, 2, 0, -1, 0, -1}};
84 static const int phimap[4][21] = {{-1, 0, 2, 2, 1, 0, 1, 1, 2, 1, -1, 0, 0, 2, 2, 1, 0, 2, 1, 0, -1},
85 {-1, 0, 2, 2, 1, 0, 1, 1, 2, 1, -1, 0, 0, 2, 2, 1, 0, 2, 1, 0, -1},
86 {-1, 1, -1, 0, 1, 1, 0, 0, 1, 1, -1, 0, 0, 1, 1, 0, 0, 1, -1, 0, -1},
87 {-1, 0, -1, 1, 0, 0, 1, 1, 0, 0, -1, 1, 1, 0, 0, 1, 1, 0, -1, 1, -1}};
90 static const int npixleft[21] = {0, 0, 1, 2, 0, 4, 5, 6, 0, 8, 0, 0, 11, 0, 13, 14, 15, 0, 17, 18, 0};
91 static const int npixrigh[21] = {0, 2, 3, 0, 5, 6, 7, 0, 9, 0, 0, 12, 0, 14, 15, 16, 0, 18, 19, 0, 0};
92 static const int npixlebt[21] = {0, 0, 0, 0, 0, 1, 2, 3, 0, 4, 0, 6, 7, 8, 9, 0, 11, 13, 14, 15, 0};
93 static const int npixribt[21] = {0, 0, 0, 0, 1, 2, 3, 0, 4, 5, 0, 7, 0, 9, 0, 11, 12, 14, 15, 16, 0};
94 static const int npixleup[21] = {0, 4, 5, 6, 8, 9, 0, 11, 0, 13, 0, 15, 16, 0, 17, 18, 19, 0, 0, 0, 0};
95 static const int npixriup[21] = {0, 5, 6, 7, 9, 0, 11, 12, 13, 14, 0, 16, 0, 17, 18, 19, 0, 0, 0, 0, 0};
112 Double_t
gausX(Double_t*
x, Double_t* par) {
return par[0] * (TMath::Gaus(x[0], par[1], par[2], kTRUE)); }
127 Double_t invsq2pi = 0.3989422804014;
128 Double_t mpshift = -0.22278298;
143 mpc = par[1] - mpshift * par[0] * par[1];
146 xlow = x[0] - sc * par[3];
147 xupp = x[0] + sc * par[3];
149 step = (xupp - xlow) / np;
152 for (
double ij = 1.0; ij <= np / 2; ij++) {
153 xx = xlow + (ij - .5) *
step;
154 fland = TMath::Landau(xx, mpc, par[0] * par[1], kTRUE);
155 sum += fland * TMath::Gaus(x[0], xx, par[3]);
156 xx = xupp - (ij - .5) *
step;
157 fland = TMath::Landau(xx, mpc, par[0] * par[1], kTRUE);
158 sum += fland * TMath::Gaus(x[0], xx, par[3]);
161 return (par[2] * step * sum * invsq2pi / par[3]);
166 void fcnbg(Int_t& npar, Double_t* gin, Double_t&
f, Double_t* par, Int_t
flag) {
167 double fval = -par[0];
170 fval +=
std::log(
std::max(1.
e-30, par[0] * TMath::Gaus(xval, par[1], par[2],
true)));
176 void fcnsg(Int_t& npar, Double_t* gin, Double_t&
f, Double_t* par, Int_t
flag) {
178 double fval = -(par[0] + par[5]);
402 float inslumi,
trkdr,
trkdz,
trkvx,
trkvy,
trkvz,
trkmm,
trkth,
trkph,
chisq,
therr,
pherr,
hodx,
hody,
hoang,
htime,
470 T1 =
new TTree(
"T1",
"DT+CSC+HO");
472 T1->Branch(
"irun", &
irun,
"irun/I");
473 T1->Branch(
"ievt", &
ievt,
"ievt/i");
478 T1->Branch(
"isect", &
isect,
"isect/I");
479 T1->Branch(
"isect2", &
isect2,
"isect2/I");
480 T1->Branch(
"ndof", &
ndof,
"ndof/I");
481 T1->Branch(
"nmuon", &
nmuon,
"nmuon/I");
483 T1->Branch(
"ilumi", &
ilumi,
"ilumi/I");
485 T1->Branch(
"inslumi", &
inslumi,
"inslumi/F");
486 T1->Branch(
"nprim", &
nprim,
"nprim/I");
487 T1->Branch(
"tkpt03", &
tkpt03,
" tkpt03/F");
488 T1->Branch(
"ecal03", &
ecal03,
" ecal03/F");
489 T1->Branch(
"hcal03", &
hcal03,
" hcal03/F");
492 T1->Branch(
"trkdr", &
trkdr,
"trkdr/F");
493 T1->Branch(
"trkdz", &
trkdz,
"trkdz/F");
495 T1->Branch(
"trkvx", &
trkvx,
"trkvx/F");
496 T1->Branch(
"trkvy", &
trkvy,
"trkvy/F");
497 T1->Branch(
"trkvz", &
trkvz,
"trkvz/F");
498 T1->Branch(
"trkmm", &
trkmm,
"trkmm/F");
499 T1->Branch(
"trkth", &
trkth,
"trkth/F");
500 T1->Branch(
"trkph", &
trkph,
"trkph/F");
502 T1->Branch(
"chisq", &
chisq,
"chisq/F");
503 T1->Branch(
"therr", &
therr,
"therr/F");
504 T1->Branch(
"pherr", &
pherr,
"pherr/F");
505 T1->Branch(
"hodx", &
hodx,
"hodx/F");
506 T1->Branch(
"hody", &
hody,
"hody/F");
507 T1->Branch(
"hoang", &
hoang,
"hoang/F");
509 T1->Branch(
"momatho", &
momatho,
"momatho/F");
510 T1->Branch(
"hoflag", &
hoflag,
"hoflag/i");
511 T1->Branch(
"htime", &
htime,
"htime/F");
512 T1->Branch(
"hosig",
hosig,
"hosig[9]/F");
513 T1->Branch(
"hocro", &
hocro,
"hocro/F");
514 T1->Branch(
"hocorsig",
hocorsig,
"hocorsig[18]/F");
515 T1->Branch(
"caloen",
caloen,
"caloen[3]/F");
518 T1->Branch(
"hbhesig",
hbhesig,
"hbhesig[9]/F");
526 "ho_entry",
"ho entry",
netamx + 1, -netamx / 2 - 0.5, netamx / 2 + 0.5,
nphimx, 0.5,
nphimx + 0.5);
529 "ho_energy",
"ho energy (GeV)", netamx + 1, -netamx / 2 - 0.5, netamx / 2 + 0.5,
nphimx, 0.5,
nphimx + 0.5);
532 "ho energy2 (GeV*GeV)",
541 "ho_rms",
"ho rms (GeV)", netamx + 1, -netamx / 2 - 0.5, netamx / 2 + 0.5,
nphimx, 0.5,
nphimx + 0.5);
543 for (
int ij = 0; ij <
netamx; ij++) {
545 for (
int jk = 0; jk <
nphimx; jk++) {
546 sprintf(name,
"ho_indenergy_%i_%i", ij, jk);
547 sprintf(title,
"ho IndEnergy (GeV) i#eta=%i i#phi=%i", ieta, jk + 1);
553 muonnm = fs->
make<TH1F>(
"muonnm",
"No of muon", 10, -0.5, 9.5);
554 muonmm = fs->
make<TH1F>(
"muonmm",
"P_{mu}", 200, -100., 100.);
555 muonth = fs->
make<TH1F>(
"muonth",
"{Theta}_{mu}", 180, 0., 180.);
556 muonph = fs->
make<TH1F>(
"muonph",
"{Phi}_{mu}", 180, -180., 180.);
557 muonch = fs->
make<TH1F>(
"muonch",
"{chi^2}/ndf", 100, 0., 1000.);
559 sel_muonnm = fs->
make<TH1F>(
"sel_muonnm",
"No of muon(sel)", 10, -0.5, 9.5);
560 sel_muonmm = fs->
make<TH1F>(
"sel_muonmm",
"P_{mu}(sel)", 200, -100., 100.);
561 sel_muonth = fs->
make<TH1F>(
"sel_muonth",
"{Theta}_{mu}(sel)", 180, 0., 180.);
562 sel_muonph = fs->
make<TH1F>(
"sel_muonph",
"{Phi}_{mu}(sel)", 180, -180., 180.);
563 sel_muonch = fs->
make<TH1F>(
"sel_muonch",
"{chi^2}/ndf(sel)", 100, 0., 1000.);
578 for (
int ij = 0; ij < 15; ij++) {
579 sprintf(title,
"sigvsndof_ring%i", ij + 1);
582 sprintf(title,
"sigvschisq_ring%i", ij + 1);
585 sprintf(title,
"sigvsth_ring%i", ij + 1);
588 sprintf(title,
"sigvsph_ring%i", ij + 1);
591 sprintf(title,
"sigvstherr_ring%i", ij + 1);
594 sprintf(title,
"sigvspherr_ring%i", ij + 1);
597 sprintf(title,
"sigvsdircos_ring%i", ij + 1);
600 sprintf(title,
"sigvstrkmm_ring%i", ij + 1);
603 sprintf(title,
"sigvsnmuon_ring%i", ij + 1);
606 sprintf(title,
"sigvserr_ring%i", ij + 1);
609 sprintf(title,
"sigvsaccx_ring%i", ij + 1);
612 sprintf(title,
"sigvsaccy_ring%i", ij + 1);
615 sprintf(title,
"sigvscalo_ring%i", ij + 1);
619 for (
int jk = 0; jk <
netamx; jk++) {
620 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
621 for (
int ij = 0; ij <
nphimx + 1; ij++) {
623 sprintf(title,
"sig_eta%i_allphi", ieta);
625 sprintf(title,
"sig_eta%i_phi%i", ieta, ij + 1);
629 sprintf(title,
"ped_eta%i_allphi", ieta);
631 sprintf(title,
"ped_eta%i_phi%i", ieta, ij + 1);
636 for (
int ij = 0; ij <
nphimx; ij++) {
638 sprintf(title,
"hotime_eta%i_phi%i", (jk <= 14) ? jk + 1 : 14 - jk, ij + 1);
641 sprintf(title,
"hopedtime_eta%i_phi%i", (jk <= 14) ? jk + 1 : 14 - jk, ij + 1);
646 sprintf(title,
"hbtime_eta%i_phi%i", (jk <= 15) ? jk + 1 : 15 - jk, ij + 1);
651 sprintf(title,
"corrsg_eta%i_phi%i_leftbottom", ieta, ij + 1);
654 sprintf(title,
"corrsg_eta%i_phi%i_rightbottom", ieta, ij + 1);
657 sprintf(title,
"corrsg_eta%i_phi%i_leftup", ieta, ij + 1);
660 sprintf(title,
"corrsg_eta%i_phi%i_rightup", ieta, ij + 1);
663 sprintf(title,
"corrsg_eta%i_phi%i_all", ieta, ij + 1);
666 sprintf(title,
"corrsg_eta%i_phi%i_left", ieta, ij + 1);
669 sprintf(title,
"corrsg_eta%i_phi%i_right", ieta, ij + 1);
673 sprintf(title,
"corrsg_eta%i_phi%i_centrl", ieta, ij + 1);
693 for (
int ij = 0; ij <
neffip; ij++) {
695 sprintf(title,
"Total projected muon in tower");
696 sprintf(name,
"total_evt");
698 sprintf(title,
"Efficiency with sig >%i #sigma", ij);
699 sprintf(name,
"Effi_with_gt%i_sig", ij);
705 sprintf(title,
"Mean Energy of all towers");
706 sprintf(name,
"mean_energy");
710 mncorrsglb = fs->
make<TH1F>(
"mncorrsglb",
"mncorrsglb", netamx *
nphimx + 60, -0.5, netamx * nphimx + 59.5);
711 rmscorrsglb = fs->
make<TH1F>(
"rmscorrsglb",
"rmscorrsglb", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
712 nevcorrsglb = fs->
make<TH1F>(
"nevcorrsglb",
"nevcorrsglb", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
714 mncorrsgrb = fs->
make<TH1F>(
"mncorrsgrb",
"mncorrsgrb", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
715 rmscorrsgrb = fs->
make<TH1F>(
"rmscorrsgrb",
"rmscorrsgrb", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
716 nevcorrsgrb = fs->
make<TH1F>(
"nevcorrsgrb",
"nevcorrsgrb", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
718 mncorrsglu = fs->
make<TH1F>(
"mncorrsglu",
"mncorrsglu", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
719 rmscorrsglu = fs->
make<TH1F>(
"rmscorrsglu",
"rmscorrsglu", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
720 nevcorrsglu = fs->
make<TH1F>(
"nevcorrsglu",
"nevcorrsglu", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
722 mncorrsgru = fs->
make<TH1F>(
"mncorrsgru",
"mncorrsgru", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
723 rmscorrsgru = fs->
make<TH1F>(
"rmscorrsgru",
"rmscorrsgru", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
724 nevcorrsgru = fs->
make<TH1F>(
"nevcorrsgru",
"nevcorrsgru", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
726 mncorrsgall = fs->
make<TH1F>(
"mncorrsgall",
"mncorrsgall", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
727 rmscorrsgall = fs->
make<TH1F>(
"rmscorrsgall",
"rmscorrsgall", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
728 nevcorrsgall = fs->
make<TH1F>(
"nevcorrsgall",
"nevcorrsgall", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
730 mncorrsgl = fs->
make<TH1F>(
"mncorrsgl",
"mncorrsgl", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
731 rmscorrsgl = fs->
make<TH1F>(
"rmscorrsgl",
"rmscorrsgl", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
732 nevcorrsgl = fs->
make<TH1F>(
"nevcorrsgl",
"nevcorrsgl", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
734 mncorrsgr = fs->
make<TH1F>(
"mncorrsgr",
"mncorrsgr", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
735 rmscorrsgr = fs->
make<TH1F>(
"rmscorrsgr",
"rmscorrsgr", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
736 nevcorrsgr = fs->
make<TH1F>(
"nevcorrsgr",
"nevcorrsgr", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
740 mncorrsgc = fs->
make<TH1F>(
"mncorrsgc",
"mncorrsgc", netamx *
nphimx + 60, -0.5, netamx * nphimx + 59.5);
741 rmscorrsgc = fs->
make<TH1F>(
"rmscorrsgc",
"rmscorrsgc", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
742 nevcorrsgc = fs->
make<TH1F>(
"nevcorrsgc",
"nevcorrsgc", netamx * nphimx + 60, -0.5, netamx * nphimx + 59.5);
746 for (
int jk = 0; jk <
ringmx; jk++) {
747 for (
int ij = 0; ij < routmx + 1; ij++) {
750 int phmn = 3 * ij - 1;
751 int phmx = 3 * ij + 1;
761 if ((jk == 2 && ij == routmx) || (jk != 2 && ij ==
rout12mx)) {
762 sprintf(title,
"sig_ring%i_allrm", jk - 2);
763 sprintf(name,
"sig_ring%i_allrm", jk - 2);
765 sprintf(title,
"sig_ring%i_phi%i-%i", jk - 2, phmn, phmx);
766 sprintf(name,
"sig_ring%i_rout%i", jk - 2, ij + 1);
769 if ((jk == 2 && ij == routmx) || (jk != 2 && ij ==
rout12mx)) {
770 sprintf(title,
"ped_ring%i_allrm", jk - 2);
771 sprintf(name,
"ped_ring%i_allrm", jk - 2);
773 sprintf(title,
"ped_ring%i_phi%i-%i", jk - 2, phmn, phmx);
774 sprintf(name,
"ped_ring%i_rout%i", jk - 2, ij + 1);
779 for (
int ij = 0; ij <
sectmx; ij++) {
781 sprintf(title,
"com_hotime_ring%i_sect%i", jk - 2, ij + 1);
784 sprintf(title,
"com_hopedtime_ring%i_sect%i", jk - 2, ij + 1);
788 sprintf(title,
"_com_hbtime_ring%i_serrct%i", jk - 2, ij + 1);
793 sprintf(title,
"com_corrsg_ring%i_sect%i_leftbottom", jk - 2, ij + 1);
796 sprintf(title,
"com_corrsg_ring%i_sect%i_rightbottom", jk - 2, ij + 1);
799 sprintf(title,
"com_corrsg_ring%i_sect%i_leftup", jk - 2, ij + 1);
802 sprintf(title,
"com_corrsg_ring%i_sect%i_rightup", jk - 2, ij + 1);
805 sprintf(title,
"com_corrsg_ring%i_sect%i_all", jk - 2, ij + 1);
808 sprintf(title,
"com_corrsg_ring%i_sect%i_left", jk - 2, ij + 1);
811 sprintf(title,
"com_corrsg_ring%i_sect%i_right", jk - 2, ij + 1);
816 sprintf(title,
"com_corrsg_ring%i_sect%i_centrl", jk - 2, ij + 1);
823 for (
int ij = -1; ij <= 1; ij++) {
824 for (
int jk = -1; jk <= 1; jk++) {
825 int kl = 3 * (ij + 1) + jk + 1;
827 sprintf(title,
"hosct2p_eta%i_phi%i", ij, jk);
830 sprintf(title,
"hosct1p_eta%i_phi%i", ij, jk);
833 sprintf(title,
"hosct00_eta%i_phi%i", ij, jk);
836 sprintf(title,
"hosct1m_eta%i_phi%i", ij, jk);
839 sprintf(title,
"hosct2m_eta%i_phi%i", ij, jk);
843 sprintf(title,
"hbhesig_eta%i_phi%i", ij, jk);
850 ped_evt = fs->
make<TH1F>(
"ped_evt",
"ped_evt", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
851 ped_mean = fs->
make<TH1F>(
"ped_mean",
"ped_mean", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
852 ped_width = fs->
make<TH1F>(
"ped_width",
"ped_width", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
854 fit_chi = fs->
make<TH1F>(
"fit_chi",
"fit_chi", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
855 sig_evt = fs->
make<TH1F>(
"sig_evt",
"sig_evt", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
856 fit_sigevt = fs->
make<TH1F>(
"fit_sigevt",
"fit_sigevt", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
857 fit_bkgevt = fs->
make<TH1F>(
"fit_bkgevt",
"fit_bkgevt", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
858 sig_mean = fs->
make<TH1F>(
"sig_mean",
"sig_mean", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
859 sig_diff = fs->
make<TH1F>(
"sig_diff",
"sig_diff", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
860 sig_width = fs->
make<TH1F>(
"sig_width",
"sig_width", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
861 sig_sigma = fs->
make<TH1F>(
"sig_sigma",
"sig_sigma", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
862 sig_meanerr = fs->
make<TH1F>(
"sig_meanerr",
"sig_meanerr", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
863 sig_meanerrp = fs->
make<TH1F>(
"sig_meanerrp",
"sig_meanerrp", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
864 sig_signf = fs->
make<TH1F>(
"sig_signf",
"sig_signf", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
866 ped_statmean = fs->
make<TH1F>(
"ped_statmean",
"ped_statmean", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
867 sig_statmean = fs->
make<TH1F>(
"sig_statmean",
"sig_statmean", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
868 ped_rms = fs->
make<TH1F>(
"ped_rms",
"ped_rms", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
869 sig_rms = fs->
make<TH1F>(
"sig_rms",
"sig_rms", netamx *
nphimx, -0.5, netamx * nphimx - 0.5);
872 "const_eta_phi",
"const_eta_phi", netamx + 1, -(netamx + 1) / 2., (netamx + 1) / 2.,
nphimx, 0.5, nphimx + 0.5);
874 for (
int ij = 0; ij <
netamx; ij++) {
875 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
876 sprintf(title,
"Cont_Eta_%i", ieta);
879 sprintf(title,
"Peak_Eta_%i", ieta);
883 for (
int ij = 0; ij <
ringmx; ij++) {
885 int iread = (ij == 2) ? routmx :
rout12mx;
886 sprintf(title,
"Cont_hpdrm_%i", iring);
889 sprintf(title,
"Peak_hpdrm_%i", iring);
893 mean_phi_hst = fs->
make<TH1F>(
"mean_phi_hst",
"mean_phi_hst", netamx + 1, -(netamx + 1) / 2., (netamx + 1) / 2.);
894 mean_phi_ave = fs->
make<TH1F>(
"mean_phi_ave",
"mean_phi_ave", netamx + 1, -(netamx + 1) / 2., (netamx + 1) / 2.);
900 for (
int ij = 0; ij <
netamx; ij++) {
901 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
903 sprintf(title,
"Stat_Eta_%i", ieta);
906 sprintf(title,
"#mu(stat)_Eta_%i", ieta);
910 for (
int jk = 0; jk <
netamx; jk++) {
911 for (
int ij = 0; ij <
nphimx; ij++) {
915 for (
int jk = 0; jk <
ringmx; jk++) {
916 for (
int ij = 0; ij < routmx + 1; ij++) {
950 int mypow_2_10 = 1024;
951 int mypow_2_11 = 2048;
952 int mypow_2_12 = 4096;
1011 using namespace edm;
1013 float pival = acos(-1.);
1021 if (hoht.
isValid() && !(*hoht).empty()) {
1025 int tmpeta =
id.
ieta();
1026 int tmpphi =
id.iphi();
1027 float signal = (*ij).energy();
1029 ho_energy->Fill(tmpeta, tmpphi, signal);
1030 ho_energy2->Fill(tmpeta, tmpphi, signal * signal);
1039 bool isCosMu =
true;
1047 edm::LogInfo(
"HOCalib") <<
"nmuon event # " <<
Nevents <<
" Run # " << iEvent.id().run() <<
" Evt # " 1048 << iEvent.id().event() <<
" " <<
ipass;
1050 if (isCosMu && !(*HOCalib).empty()) {
1051 nmuon = (*HOCalib).size();
1052 for (HOCalibVariableCollection::const_iterator hoC = (*HOCalib).begin(); hoC != (*HOCalib).end(); hoC++) {
1055 trkdr = (*hoC).trkdr;
1056 trkdz = (*hoC).trkdz;
1058 trkvx = (*hoC).trkvx;
1059 trkvy = (*hoC).trkvy;
1060 trkvz = (*hoC).trkvz;
1062 trkmm = (*hoC).trkmm;
1063 trkth = (*hoC).trkth;
1064 trkph = (*hoC).trkph;
1068 chisq = (*hoC).chisq;
1071 therr = (*hoC).therr;
1072 pherr = (*hoC).pherr;
1073 trkph = (*hoC).trkph;
1076 nprim = (*hoC).nprim;
1083 isect = (*hoC).isect;
1087 hoang = (*hoC).hoang;
1088 htime = (*hoC).htime;
1090 for (
int ij = 0; ij < 9; ij++) {
1091 hosig[ij] = (*hoC).hosig[ij];
1093 for (
int ij = 0; ij < 18; ij++) {
1094 hocorsig[ij] = (*hoC).hocorsig[ij];
1096 hocro = (*hoC).hocro;
1097 for (
int ij = 0; ij < 3; ij++) {
1098 caloen[ij] = (*hoC).caloen[ij];
1102 for (
int ij = 0; ij < 9; ij++) {
1103 hbhesig[ij] = (*hoC).hbhesig[ij];
1129 if (fabs(
trkth - pival / 2) < 0.000001)
1133 if (
abs(ieta) >= 16)
1137 int tmpsect =
int((iphi + 1) / 6.) + 1;
1142 int tmpeta = ieta + 4;
1143 if (ieta >= -15 && ieta <= -11) {
1145 tmpeta = -11 - ieta;
1147 if (ieta >= -10 && ieta <= -5) {
1151 if (ieta >= 5 && ieta <= 10) {
1155 if (ieta >= 11 && ieta <= 15) {
1160 int iring2 = iring + 2;
1162 int tmprout =
int((iphi + 1) / 3.) + 1;
1165 tmprout =
int((iphi + 1) / 2.) + 1;
1178 ips0 = (
int)mypow_2_0;
1182 ips1 = (
int)mypow_2_1;
1185 if (fabs(
trkth - pival / 2) < 21.5) {
1186 ips2 = (
int)mypow_2_2;
1189 if (fabs(
trkph + pival / 2) < 21.5) {
1190 ips3 = (
int)mypow_2_3;
1195 ips4 = (
int)mypow_2_4;
1198 if (
pherr < 0.0002) {
1199 ips5 = (
int)mypow_2_5;
1202 if (fabs(
hoang) > 0.30) {
1203 ips6 = (
int)mypow_2_6;
1206 if (fabs(
trkmm) > 0.100) {
1207 ips7 = (
int)mypow_2_7;
1212 ips8 = (
int)mypow_2_8;
1218 ips10 = (
int)mypow_2_10;
1223 ips11 = (
int)mypow_2_11;
1228 if (fabs(
hodx) < 100 && fabs(
hodx) > 2) {
1229 ips10 = (
int)mypow_2_10;
1233 if (fabs(
hody) < 100 && fabs(
hody) > 2) {
1234 ips11 = (
int)mypow_2_11;
1239 ips12 = (
int)mypow_2_12;
1245 ips0 = (
int)mypow_2_0;
1249 ips1 = (
int)mypow_2_1;
1252 if (fabs(
trkth - pival / 2) < 21.5) {
1253 ips2 = (
int)mypow_2_2;
1256 if (fabs(
trkph + pival / 2) < 21.5) {
1257 ips3 = (
int)mypow_2_3;
1262 ips4 = (
int)mypow_2_4;
1265 if (
pherr < 0.0002) {
1266 ips5 = (
int)mypow_2_5;
1269 if (fabs(
hoang) > 0.30) {
1270 ips6 = (
int)mypow_2_6;
1273 if (fabs(
trkmm) > 4.0) {
1274 ips7 = (
int)mypow_2_7;
1278 ips8 = (
int)mypow_2_8;
1284 ips10 = (
int)mypow_2_10;
1289 ips11 = (
int)mypow_2_11;
1294 if (fabs(
hodx) < 100 && fabs(
hodx) > 2) {
1295 ips10 = (
int)mypow_2_10;
1299 if (fabs(
hody) < 100 && fabs(
hody) > 2) {
1300 ips11 = (
int)mypow_2_11;
1306 ips12 = (
int)mypow_2_12;
1313 ips9 = (
int)mypow_2_9;
1422 int tmpphi = (iphi + 1) % 3;
1429 tmpphi = (iphi + 1) % 2;
1430 if (tmpsect == 2 || tmpsect == 3 || tmpsect == 6 || tmpsect == 7 || tmpsect == 10 || tmpsect == 11) {
1431 npixel =
mapx0p[tmpeta][tmpphi];
1434 npixel =
mapx0m[tmpeta][tmpphi];
1439 if (tmpsect % 2 == 1)
1441 if (
abs(iring) == 1) {
1442 npixel =
mapx1[tmpeta][(iflip == 0) ? tmpphi :
abs(tmpphi - 2)];
1445 npixel =
mapx2[tmpeta][(iflip == 0) ? tmpphi :
abs(tmpphi - 2)];
1450 int tmpeta1 = (ieta > 0) ? ieta - 1 : -ieta + 14;
1453 int tmpphi1 = iphi - 1;
1456 if (
hosig[4] != -100) {
1468 if (iselect2 == 1) {
1469 int tmpphi2 = iphi - 1;
1470 tmpphi2 = (iphi + 6 <=
nphimx) ? iphi + 5 : iphi + 5 -
nphimx;
1472 int tmpsect2 =
int((tmpphi2 + 2) / 6.) + 1;
1476 int tmprout2 =
int((tmpphi2 + 2) / 3.) + 1;
1478 tmprout2 =
int((tmpphi2 + 2) / 2.) + 1;
1494 if (tmpphi2 >= 0 && tmpphi2 <
nphimx) {
1504 for (
int ij = 0; ij <
neffip; ij++) {
1506 sig_effi[ij]->Fill(ieta, iphi, 1.);
1509 sig_effi[ij]->Fill(ieta, iphi, 1.);
1525 if (tmpphi1 >= 0 && tmpphi1 <
nphimx) {
1539 tmpeta =
etamap[itag][npixel];
1540 tmpphi =
phimap[itag][npixel];
1541 if (tmpeta >= 0 && tmpphi >= 0) {
1543 tmpphi =
abs(tmpphi - 2);
1544 if (
int((
hocorsig[fact * tmpeta + tmpphi] -
hosig[4]) * 10000) / 10000. != 0) {
1547 << tmpsect <<
" " << ieta <<
" " << iphi <<
" " << npixel <<
" " << tmpeta <<
" " 1548 << tmpphi <<
" " << tmpeta1 <<
" " << tmpphi1 <<
" itag " << itag <<
" " << iflip
1549 <<
" " << fact <<
" " <<
hocorsig[fact * tmpeta + tmpphi] <<
" " 1550 << fact * tmpeta + tmpphi <<
" " <<
hosig[4] <<
" " <<
hodx <<
" " <<
hody;
1552 for (
int ij = 0; ij < 18; ij++) {
1555 edm::LogInfo(
"HOCalib") <<
" ix " << iaxxx <<
" " << ibxxx;
1568 float allcorsig = 0.0;
1571 tmpphi =
phimap[itag][npixleft[npixel]];
1573 if (tmpeta >= 0 && tmpphi >= 0) {
1575 tmpphi =
abs(tmpphi - 2);
1577 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1584 tmpphi =
phimap[itag][npixrigh[npixel]];
1585 if (tmpeta >= 0 && tmpphi >= 0) {
1587 tmpphi =
abs(tmpphi - 2);
1589 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1596 tmpphi =
phimap[itag][npixlebt[npixel]];
1597 if (tmpeta >= 0 && tmpphi >= 0) {
1599 tmpphi =
abs(tmpphi - 2);
1601 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1608 tmpphi =
phimap[itag][npixribt[npixel]];
1609 if (tmpeta >= 0 && tmpphi >= 0) {
1611 tmpphi =
abs(tmpphi - 2);
1613 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1620 tmpphi =
phimap[itag][npixleup[npixel]];
1621 if (tmpeta >= 0 && tmpphi >= 0) {
1623 tmpphi =
abs(tmpphi - 2);
1625 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1632 tmpphi =
phimap[itag][npixriup[npixel]];
1633 if (tmpeta >= 0 && tmpphi >= 0) {
1635 tmpphi =
abs(tmpphi - 2);
1637 allcorsig +=
hocorsig[fact * tmpeta + tmpphi];
1642 corrsgall[tmpeta1][tmpphi1]->Fill(allcorsig);
1648 for (
int k = 0;
k < 9;
k++) {
1686 for (
int jk = 0; jk <
ho_energy->GetNbinsX(); jk++) {
1687 for (
int kl = 0; kl <
ho_energy->GetNbinsY(); kl++) {
1692 double energy =
ho_energy->GetBinContent(jk + 1, kl + 1) /
entry;
1694 double rms =
sqrt(energy2 - energy * energy);
1696 double xval =
ho_energy->GetXaxis()->GetBinCenter(jk + 1);
1697 double yval =
ho_energy->GetYaxis()->GetBinCenter(kl + 1);
1699 ho_rms->Fill(xval, yval, rms);
1704 for (
int ij = 0; ij <
nphimx; ij++) {
1705 for (
int jk = 0; jk <
netamx; jk++) {
1753 for (
int jk = 0; jk <
ringmx; jk++) {
1754 for (
int ij = 0; ij <
routmx; ij++) {
1767 for (
int ij = 0; ij <
sectmx; ij++) {
1768 for (
int jk = 0; jk <
ringmx; jk++) {
1807 for (
int ij = 1; ij <
neffip; ij++) {
1810 for (
int ij = 0; ij <
netamx; ij++) {
1811 for (
int jk = 0; jk <
nphimx; jk++) {
1812 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
1814 double signal =
sigrsg[ij][jk]->GetMean();
1821 gStyle->SetOptLogy(0);
1822 gStyle->SetTitleFillColor(10);
1823 gStyle->SetStatColor(10);
1825 gStyle->SetCanvasColor(10);
1826 gStyle->SetOptStat(0);
1827 gStyle->SetOptTitle(1);
1829 gStyle->SetTitleColor(10);
1830 gStyle->SetTitleFontSize(0.09);
1831 gStyle->SetTitleOffset(-0.05);
1832 gStyle->SetTitleBorderSize(1);
1834 gStyle->SetPadColor(10);
1835 gStyle->SetPadBorderMode(0);
1836 gStyle->SetStatColor(10);
1837 gStyle->SetPadBorderMode(0);
1838 gStyle->SetStatBorderSize(1);
1839 gStyle->SetStatFontSize(.07);
1841 gStyle->SetStatStyle(1001);
1842 gStyle->SetOptFit(101);
1843 gStyle->SetCanvasColor(10);
1844 gStyle->SetCanvasBorderMode(0);
1846 gStyle->SetStatX(.99);
1847 gStyle->SetStatY(.99);
1848 gStyle->SetStatW(.45);
1849 gStyle->SetStatH(.16);
1850 gStyle->SetLabelSize(0.075,
"XY");
1851 gStyle->SetLabelOffset(0.21,
"XYZ");
1852 gStyle->SetTitleSize(0.065,
"XY");
1853 gStyle->SetTitleOffset(0.06,
"XYZ");
1854 gStyle->SetPadTopMargin(.09);
1855 gStyle->SetPadBottomMargin(0.11);
1856 gStyle->SetPadLeftMargin(0.12);
1857 gStyle->SetPadRightMargin(0.15);
1858 gStyle->SetPadGridX(
true);
1859 gStyle->SetPadGridY(
true);
1860 gStyle->SetGridStyle(2);
1861 gStyle->SetNdivisions(303,
"XY");
1863 gStyle->SetMarkerSize(0.60);
1864 gStyle->SetMarkerColor(2);
1865 gStyle->SetMarkerStyle(20);
1866 gStyle->SetTitleFontSize(0.07);
1922 gStyle->SetPadBottomMargin(0.14);
1923 gStyle->SetPadLeftMargin(0.17);
1924 gStyle->SetPadRightMargin(0.03);
1926 gStyle->SetOptStat(1110);
1928 const int nsample = 8;
1929 TF1* gx0[nsample] = {
nullptr};
1930 TF1* ped0fun[nsample] = {
nullptr};
1931 TF1* signal[nsample] = {
nullptr};
1932 TF1* pedfun[nsample] = {
nullptr};
1933 TF1* sigfun[nsample] = {
nullptr};
1934 TF1* signalx[nsample] = {
nullptr};
1936 TH1F* signall[nsample] = {
nullptr};
1937 TH1F* pedstll[nsample] = {
nullptr};
1940 gStyle->SetOptFit(101);
1941 gStyle->SetCanvasBorderMode(0);
1942 gStyle->SetPadBorderMode(0);
1943 gStyle->SetStatBorderSize(1);
1944 gStyle->SetStatStyle(1001);
1945 gStyle->SetTitleColor(10);
1946 gStyle->SetTitleFontSize(0.09);
1947 gStyle->SetTitleOffset(-0.05);
1948 gStyle->SetTitleBorderSize(1);
1950 gStyle->SetCanvasColor(10);
1951 gStyle->SetPadColor(10);
1952 gStyle->SetStatColor(10);
1953 gStyle->SetStatFontSize(.07);
1954 gStyle->SetStatX(0.99);
1955 gStyle->SetStatY(0.99);
1956 gStyle->SetStatW(0.30);
1957 gStyle->SetStatH(0.10);
1958 gStyle->SetTitleSize(0.065,
"XYZ");
1959 gStyle->SetLabelSize(0.075,
"XYZ");
1960 gStyle->SetLabelOffset(0.012,
"XYZ");
1961 gStyle->SetPadGridX(
true);
1962 gStyle->SetPadGridY(
true);
1963 gStyle->SetGridStyle(3);
1964 gStyle->SetNdivisions(101,
"XY");
1965 gStyle->SetOptLogy(0);
1976 TCanvas*
c0 =
new TCanvas(
"c0",
" Pedestal vs signal", xsiz, ysiz);
1985 for (
int ij = 0; ij <
nphimx; ++ij) {
1989 for (
int ij = 0; ij <
netamx; ++ij) {
2004 for (
int iijj = 0; iijj < 4; iijj++) {
2011 }
else if (iijj == 1) {
2016 }
else if (iijj == 2) {
2021 }
else if (iijj == 3) {
2028 for (
int jk = mneta; jk < mxeta; jk++) {
2029 for (
int ij = mnphi; ij < mxphi; ij++) {
2032 if ((iijj == 0 || iijj == 1) && jk != 2 && ij >=
rout12mx)
2034 int izone = iiter % nsample;
2038 signall[izone] = (TH1F*)
com_sigrsg[jk][iread]->Clone(
"hnew");
2039 pedstll[izone] = (TH1F*)
com_crossg[jk][iread]->Clone(
"hnew");
2040 }
else if (iijj == 1) {
2041 signall[izone] = (TH1F*)
com_sigrsg[jk][ij]->Clone(
"hnew");
2042 pedstll[izone] = (TH1F*)
com_crossg[jk][ij]->Clone(
"hnew");
2043 }
else if (iijj == 2) {
2044 signall[izone] = (TH1F*)
sigrsg[jk][nphimx]->Clone(
"hnew");
2045 pedstll[izone] = (TH1F*)
crossg[jk][nphimx]->Clone(
"hnew");
2046 }
else if (iijj == 3) {
2047 signall[izone] = (TH1F*)
sigrsg[jk][ij]->Clone(
"hnew");
2048 pedstll[izone] = (TH1F*)
crossg[jk][ij]->Clone(
"hnew");
2051 pedstll[izone]->SetLineWidth(2);
2052 signall[izone]->SetLineWidth(2);
2053 pedstll[izone]->SetLineColor(2);
2054 signall[izone]->SetLineColor(4);
2055 pedstll[izone]->SetNdivisions(506,
"XY");
2056 signall[izone]->SetNdivisions(506,
"XY");
2058 signall[izone]->GetXaxis()->SetLabelSize(.065);
2059 signall[izone]->GetYaxis()->SetLabelSize(.06);
2060 signall[izone]->GetXaxis()->SetTitle(
"Signal (GeV)");
2062 signall[izone]->GetXaxis()->SetTitleSize(.065);
2063 signall[izone]->GetXaxis()->CenterTitle();
2069 c0->cd(2 * izone + 1);
2100 float mean = pedstll[izone]->GetMean();
2101 float rms = pedstll[izone]->GetRMS();
2112 float xmn = mean - 6. *
rms;
2113 float xmx = mean + 6. *
rms;
2115 binwid = pedstll[izone]->GetBinWidth(1);
2116 if (xmx > pedstll[izone]->GetXaxis()->GetXmax())
2117 xmx = pedstll[izone]->GetXaxis()->GetXmax() - 0.5 *
binwid;
2118 if (xmn < pedstll[izone]->GetXaxis()->GetXmin())
2119 xmn = pedstll[izone]->GetXaxis()->GetXmin() + 0.5 *
binwid;
2121 float height = pedstll[izone]->GetEntries();
2123 double par[
nbgpr] = {height,
mean, 0.75 * rms};
2125 double gaupr[
nbgpr];
2126 double parer[
nbgpr];
2130 pedstll[izone]->GetXaxis()->SetLabelSize(.065);
2131 pedstll[izone]->GetYaxis()->SetLabelSize(.06);
2136 pedstll[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
2140 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal/Signal (GeV)");
2142 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal (GeV)");
2144 pedstll[izone]->GetXaxis()->SetTitleSize(.065);
2145 pedstll[izone]->GetXaxis()->CenterTitle();
2148 pedstll[izone]->Draw();
2153 parer[0] = parer[1] = parer[2] = 0;
2155 if (pedstll[izone]->GetEntries() > 5) {
2158 sprintf(temp,
"gx0_%i", izone);
2159 gx0[izone] =
new TF1(temp,
gausX, xmn, xmx,
nbgpr);
2160 gx0[izone]->SetParameters(par);
2161 gx0[izone]->SetLineWidth(1);
2162 pedstll[izone]->Fit(gx0[izone],
"R+");
2165 parer[
k] = gx0[izone]->GetParError(
k);
2166 gaupr[
k] = gx0[izone]->GetParameter(
k);
2169 double strt[
nbgpr] = {height,
mean, 0.75 * rms};
2170 double step[
nbgpr] = {1.0, 0.001, 0.001};
2171 double alowmn[
nbgpr] = {0.5 * height, mean -
rms, 0.3 * rms};
2172 double ahighmn[
nbgpr] = {1.5 * height, mean +
rms, 1.5 * rms};
2174 TMinuit* gMinuit =
new TMinuit(
nbgpr);
2175 gMinuit->SetFCN(
fcnbg);
2180 gMinuit->mnexcm(
"SET ERR", arglist, 1, ierflg);
2183 sprintf(name,
"pedpar%i",
k);
2184 gMinuit->mnparm(
k, name, strt[
k], step[k], alowmn[k], ahighmn[k], ierflg);
2188 gMinuit->mnexcm(
"SIMPLEX", arglist, 0, ierflg);
2191 gMinuit->mnexcm(
"IMPROVE", arglist, 0, ierflg);
2194 double parv, err, xlo, xup, plerr, mierr, eparab, gcc;
2198 if (step[
k] > -10) {
2199 gMinuit->mnpout(
k, chnam, parv, err, xlo, xup, iuit);
2200 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2215 sprintf(temp,
"ped0fun_%i", izone);
2216 ped0fun[izone] =
new TF1(temp,
gausX, xmn, xmx, nbgpr);
2217 ped0fun[izone]->SetParameters(gaupr);
2218 ped0fun[izone]->SetLineColor(3);
2219 ped0fun[izone]->SetLineWidth(1);
2220 ped0fun[izone]->Draw(
"same");
2232 c0->cd(2 * izone + 2);
2233 if (signall[izone]->GetEntries() > 5) {
2234 Double_t parall[
nsgpr];
2235 double parserr[
nsgpr];
2236 double fitres[
nsgpr];
2240 sprintf(temp,
"signal_%i", izone);
2241 xmn = signall[izone]->GetXaxis()->GetXmin();
2242 xmx = 0.5 * signall[izone]->GetXaxis()->GetXmax();
2246 pedht = (signall[izone]->GetBinContent(
nbn - 1) + signall[izone]->GetBinContent(
nbn) +
2247 signall[izone]->GetBinContent(
nbn + 1)) /
2254 for (
int lm = 0; lm <
nbgpr; lm++) {
2255 parall[lm] = gaupr[lm];
2262 parall[0] = 0.9 * pedht;
2264 double area =
binwid * signall[izone]->GetEntries();
2268 parall[4] =
fitprm[4][jk];
2269 parall[6] =
fitprm[6][jk];
2271 parall[4] = signall[izone]->GetMean();
2272 parall[6] = parall[2];
2275 signal[izone]->SetParameters(parall);
2276 signal[izone]->FixParameter(1, parall[1]);
2277 signal[izone]->FixParameter(2, parall[2]);
2278 signal[izone]->SetParLimits(0, 0.00, 2.0 * pedht + 0.1);
2279 signal[izone]->FixParameter(3, 0.14);
2281 signal[izone]->SetParLimits(5, 0.40 * area, 1.15 * area);
2284 signal[izone]->SetParLimits(4, 0.2 *
fitprm[4][jk], 2.0 *
fitprm[4][jk]);
2285 signal[izone]->SetParLimits(6, 0.2 *
fitprm[6][jk], 2.0 *
fitprm[6][jk]);
2287 signal[izone]->SetParLimits(4, 0.1, 1.0);
2288 signal[izone]->SetParLimits(6, 0.035, 0.3);
2290 signal[izone]->SetParNames(
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma");
2291 signall[izone]->Fit(signal[izone],
"0R+");
2293 signall[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
2295 fitres[
k] =
fitprm[
k][jk] = signal[izone]->GetParameter(
k);
2296 parserr[
k] = signal[izone]->GetParError(
k);
2310 TString
name[
nsgpr] = {
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma"};
2311 double strt[
nsgpr] = {0.9 * pedhtx,
2316 signall[izone]->GetEntries(),
2318 double alowmn[
nsgpr] = {
2319 0.1 * pedhtx - 0.1, gaupr[1] - 0.1, gaupr[2] - 0.1, 0.07, 0.2 * strt[4], 0.1 * strt[5], 0.2 * strt[6]};
2320 double ahighmn[
nsgpr] = {
2321 1.2 * pedhtx + 0.1, gaupr[1] + 0.1, gaupr[2] + 0.1, 0.20, 2.5 * strt[4], 1.5 * strt[5], 2.2 * strt[6]};
2322 double step[
nsgpr] = {1.0, 0.0, 0.0, 0.0, 0.001, 1.0, 0.002};
2324 TMinuit* gMinuit =
new TMinuit(
nsgpr);
2325 gMinuit->SetFCN(
fcnsg);
2330 gMinuit->mnexcm(
"SET ERR", arglist, 1, ierflg);
2333 gMinuit->mnparm(
k, name[
k], strt[k], step[k], alowmn[k], ahighmn[k], ierflg);
2337 gMinuit->mnexcm(
"SIMPLEX", arglist, 0, ierflg);
2340 gMinuit->mnexcm(
"IMPROVE", arglist, 0, ierflg);
2343 double parv, err, xlo, xup, plerr, mierr, eparab, gcc;
2347 if (step[
k] > -10) {
2348 gMinuit->mnpout(
k, chnam, parv, err, xlo, xup, iuit);
2349 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2350 if (
k == 0 ||
k == 5) {
2366 signall[izone]->Draw();
2369 sprintf(temp,
"pedfun_%i", izone);
2370 pedfun[izone] =
new TF1(temp,
gausX, xmn, xmx,
nbgpr);
2371 pedfun[izone]->SetParameters(fitres);
2372 pedfun[izone]->SetLineColor(3);
2373 pedfun[izone]->SetLineWidth(1);
2374 pedfun[izone]->Draw(
"same");
2376 sprintf(temp,
"signalfun_%i", izone);
2378 sigfun[izone]->SetParameters(&fitres[3]);
2379 sigfun[izone]->SetLineWidth(1);
2380 sigfun[izone]->SetLineColor(4);
2381 sigfun[izone]->Draw(
"same");
2383 sprintf(temp,
"total_%i", izone);
2385 signalx[izone]->SetParameters(fitres);
2386 signalx[izone]->SetLineWidth(1);
2387 signalx[izone]->Draw(
"same");
2389 int kl = (jk < 15) ? jk + 1 : 14 - jk;
2391 edm::LogInfo(
"HOCalib") <<
"histinfo" << iijj <<
" fit " << std::setw(3) << kl <<
" " << std::setw(3)
2392 << ij + 1 <<
" " << std::setw(5) << pedstll[izone]->GetEntries() <<
" " 2393 << std::setw(6) << pedstll[izone]->GetMean() <<
" " << std::setw(6)
2394 << pedstll[izone]->GetRMS() <<
" " << std::setw(5) << signall[izone]->GetEntries()
2395 <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" " << std::setw(6)
2396 << signall[izone]->GetRMS() <<
" " << std::setw(6) << signal[izone]->GetChisquare()
2397 <<
" " << std::setw(3) << signal[izone]->GetNDF();
2399 file_out <<
"histinfo" << iijj <<
" fit " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" " 2400 << std::setw(5) << pedstll[izone]->GetEntries() <<
" " << std::setw(6) << pedstll[izone]->GetMean()
2401 <<
" " << std::setw(6) << pedstll[izone]->GetRMS() <<
" " << std::setw(5)
2402 << signall[izone]->GetEntries() <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" " 2403 << std::setw(6) << signall[izone]->GetRMS() <<
" " << std::setw(6) << signal[izone]->GetChisquare()
2404 <<
" " << std::setw(3) << signal[izone]->GetNDF() << std::endl;
2406 file_out <<
"fitres x" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << fitres[0] <<
" " << fitres[1] <<
" " 2407 << fitres[2] <<
" " << fitres[3] <<
" " << fitres[4] <<
" " << fitres[5] <<
" " << fitres[6]
2409 file_out <<
"parserr" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << parserr[0] <<
" " << parserr[1] <<
" " 2410 << parserr[2] <<
" " << parserr[3] <<
" " << parserr[4] <<
" " << parserr[5] <<
" " << parserr[6]
2413 double diff = fitres[4] - fitres[1];
2416 double error = parserr[4] * parserr[4] + parer[2] * parer[2];
2417 error =
pow(error, 0.5);
2419 int ieta = (jk < 15) ? (15 + jk) : (29 - jk);
2420 int ifl = nphimx * ieta + ij;
2423 ped_evt->Fill(ifl, pedstll[izone]->GetEntries());
2426 fit_chi->Fill(ifl, signal[izone]->GetChisquare());
2427 sig_evt->Fill(ifl, signall[izone]->GetEntries());
2429 fit_bkgevt->Fill(ifl, fitres[0] *
sqrt(2 * acos(-1.)) * gaupr[2]);
2431 sig_diff->Fill(ifl, fitres[4] - fitres[1]);
2435 if (fitres[4] - fitres[1] != 0)
2436 sig_meanerrp->Fill(ifl, 100 * parserr[4] / (fitres[4] - fitres[1]));
2438 sig_signf->Fill(ifl, (fitres[4] - fitres[1]) / gaupr[2]);
2442 ped_rms->Fill(ifl, pedstll[izone]->GetRMS());
2443 sig_rms->Fill(ifl, signall[izone]->GetRMS());
2446 if ((iijj == 2) || (iijj == 3) || (iijj == 1)) {
2447 if (signall[izone]->GetEntries() > 5 && fitres[4] > 0.1) {
2462 float calibc = fact * fact2 / (fitres[4] * signall[izone]->GetEntries());
2466 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2469 file_out <<
"intieta " << jk <<
" " << ij <<
" " << ieta <<
" " <<
mean_phi_hst->FindBin(
double(ieta))
2470 <<
" " << calibc <<
" " << caliberr << std::endl;
2471 }
else if (iijj == 3) {
2475 peak_eta[jk]->Fill(ij + 1, fitres[4]);
2478 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2480 file_out <<
"intietax " << jk <<
" " << ij <<
" " << ieta <<
" " 2485 mean_eta[ij] += calibc / (caliberr * caliberr);
2486 mean_phi[jk] += calibc / (caliberr * caliberr);
2488 rms_eta[ij] += 1. / (caliberr * caliberr);
2489 rms_phi[jk] += 1. / (caliberr * caliberr);
2494 }
else if (iijj == 1) {
2502 file_out <<
"HO 4 " << iijj <<
" " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" " 2503 << std::setw(7) << calibc <<
" " << std::setw(7) << caliberr << std::endl;
2508 signall[izone]->Draw();
2510 int kl = (jk < 15) ? jk + 1 : 14 - jk;
2511 file_out <<
"histinfo" << iijj <<
" nof " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" " 2512 << std::setw(5) << pedstll[izone]->GetEntries() <<
" " << std::setw(6) << pedstll[izone]->GetMean()
2513 <<
" " << std::setw(6) << pedstll[izone]->GetRMS() <<
" " << std::setw(5)
2514 << signall[izone]->GetEntries() <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" " 2515 << std::setw(6) << signall[izone]->GetRMS() <<
" " << std::setw(6) << varx <<
" " << std::setw(3)
2516 << varx << std::endl;
2518 file_out <<
"fitres x" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << varx <<
" " << varx <<
" " << varx
2519 <<
" " << varx <<
" " << varx <<
" " << varx <<
" " << varx << std::endl;
2520 file_out <<
"parserr" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << varx <<
" " << varx <<
" " << varx
2521 <<
" " << varx <<
" " << varx <<
" " << varx <<
" " << varx << std::endl;
2524 if (iiter % nsample == 0) {
2527 for (
int kl = 0; kl < nsample; kl++) {
2534 ped0fun[kl] =
nullptr;
2538 signal[kl] =
nullptr;
2542 pedfun[kl] =
nullptr;
2546 sigfun[kl] =
nullptr;
2550 signalx[kl] =
nullptr;
2554 signall[kl] =
nullptr;
2558 pedstll[kl] =
nullptr;
2575 if (iiter % nsample != 0) {
2577 for (
int kl = 0; kl < nsample; kl++) {
2584 ped0fun[kl] =
nullptr;
2588 signal[kl] =
nullptr;
2592 pedfun[kl] =
nullptr;
2596 sigfun[kl] =
nullptr;
2600 signalx[kl] =
nullptr;
2604 signall[kl] =
nullptr;
2608 pedstll[kl] =
nullptr;
2618 gStyle->SetTitleFontSize(0.05);
2619 gStyle->SetTitleSize(0.025,
"XYZ");
2620 gStyle->SetLabelSize(0.025,
"XYZ");
2621 gStyle->SetStatFontSize(.045);
2623 gStyle->SetOptStat(0);
2625 TCanvas*
c1 =
new TCanvas(
"c1",
" Pedestal vs signal", xsiz, ysiz);
2702 gStyle->SetTitleFontSize(0.09);
2703 gStyle->SetPadBottomMargin(0.17);
2704 gStyle->SetPadLeftMargin(0.18);
2705 gStyle->SetPadRightMargin(0.01);
2706 gStyle->SetOptLogy(0);
2707 gStyle->SetOptStat(0);
2709 TCanvas* c2 =
new TCanvas(
"c2",
"runfile", xsiz, ysiz);
2712 for (
int side = 0; side < 2; side++) {
2713 gStyle->SetNdivisions(303,
"XY");
2714 gStyle->SetPadRightMargin(0.01);
2716 int nmx = netamx / 2;
2724 for (
int ij = nmn; ij < nmx; ij++) {
2726 const_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2727 const_eta[ij]->GetXaxis()->SetTitleSize(.08);
2728 const_eta[ij]->GetXaxis()->CenterTitle();
2729 const_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2730 const_eta[ij]->GetXaxis()->SetLabelSize(.085);
2731 const_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2733 const_eta[ij]->GetYaxis()->SetLabelSize(.08);
2734 const_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2735 const_eta[ij]->GetYaxis()->SetTitle(
"GeV/MIP-GeV!!");
2737 const_eta[ij]->GetYaxis()->SetTitleSize(.085);
2738 const_eta[ij]->GetYaxis()->CenterTitle();
2739 const_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2748 sprintf(out_file,
"calibho_%i_side%i.eps", irunold, side);
2749 c2->SaveAs(out_file);
2751 sprintf(out_file,
"calibho_%i_side%i.jpg", irunold, side);
2752 c2->SaveAs(out_file);
2755 for (
int ij = nmn; ij < nmx; ij++) {
2757 peak_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2758 peak_eta[ij]->GetXaxis()->SetTitleSize(.08);
2759 peak_eta[ij]->GetXaxis()->CenterTitle();
2760 peak_eta[ij]->GetXaxis()->SetTitleOffset(0.90);
2761 peak_eta[ij]->GetXaxis()->SetLabelSize(.08);
2762 peak_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2764 peak_eta[ij]->GetYaxis()->SetLabelSize(.08);
2765 peak_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2766 peak_eta[ij]->GetYaxis()->SetTitle(
"GeV");
2768 peak_eta[ij]->GetYaxis()->SetTitleSize(.085);
2769 peak_eta[ij]->GetYaxis()->CenterTitle();
2770 peak_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2780 sprintf(out_file,
"peakho_%i_side%i.eps", irunold, side);
2781 c2->SaveAs(out_file);
2783 sprintf(out_file,
"peakho_%i_side%i.jpg", irunold, side);
2784 c2->SaveAs(out_file);
2789 gStyle->SetTitleFontSize(0.045);
2790 gStyle->SetPadRightMargin(0.13);
2791 gStyle->SetPadBottomMargin(0.15);
2792 gStyle->SetPadLeftMargin(0.1);
2793 gStyle->SetOptStat(0);
2796 TCanvas* c1 =
new TCanvas(
"c1",
"Fitted const in each tower", xsiz, ysiz);
2812 sprintf(out_file,
"high_hoconst_eta_phi_%i.jpg", irunold);
2813 c1->SaveAs(out_file);
2817 for (
int jk = 0; jk <
netamx; jk++) {
2818 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2819 if (rms_phi[jk] > 0) {
2825 for (
int ij = 0; ij <
nphimx; ij++) {
2826 if (rms_eta[ij] > 0) {
2827 mean_eta_ave->Fill(ij + 1, mean_eta[ij] / rms_eta[ij]);
2833 gStyle->SetPadLeftMargin(0.13);
2834 gStyle->SetPadRightMargin(0.03);
2836 TCanvas* c2y =
new TCanvas(
"c2",
"Avearge signal in eta and phi", xsiz, ysiz);
2845 mean_eta_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2865 mean_phi_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2878 sprintf(out_file,
"high_hoaverage_eta_phi_%i.jpg", irunold);
2879 c2y->SaveAs(out_file);
2886 TCanvas* c3 =
new TCanvas(
"c3",
"Avearge signal in eta and phi", xsiz, ysiz);
2907 sprintf(out_file,
"low_mean_phi_hst_%i.jpg", irunold);
2908 c3->SaveAs(out_file);
2914 gStyle->SetOptLogy(1);
2915 gStyle->SetPadTopMargin(.1);
2916 gStyle->SetPadLeftMargin(.15);
2919 TCanvas* c0x =
new TCanvas(
"c0x",
"Signal in each ring", xsiz, ysiz);
2922 for (
int ij = 0; ij <
ringmx; ij++) {
2924 com_sigrsg[ij][iread]->GetXaxis()->SetTitle(
"Signal/ped (GeV)");
2926 com_sigrsg[ij][iread]->GetXaxis()->SetTitleSize(0.060);
2927 com_sigrsg[ij][iread]->GetXaxis()->SetTitleOffset(1.05);
2928 com_sigrsg[ij][iread]->GetXaxis()->CenterTitle();
2929 com_sigrsg[ij][iread]->GetXaxis()->SetLabelSize(0.065);
2930 com_sigrsg[ij][iread]->GetXaxis()->SetLabelOffset(0.01);
2932 com_sigrsg[ij][iread]->GetYaxis()->SetLabelSize(0.065);
2933 com_sigrsg[ij][iread]->GetYaxis()->SetLabelOffset(0.01);
2945 sprintf(out_file,
"hosig_ring_%i.jpg", irunold);
2946 c0x->SaveAs(out_file);
2949 gStyle->SetTitleFontSize(0.06);
2950 gStyle->SetOptStat(0);
2951 gStyle->SetOptLogy(0);
2953 TCanvas* c0 =
new TCanvas(
"c0",
"Signal in each ring", xsiz, ysiz);
2956 for (
int jk = 0; jk <
ringmx; jk++) {
2957 peak_hpdrm[jk]->GetXaxis()->SetTitle(
"RM #");
2958 peak_hpdrm[jk]->GetXaxis()->SetTitleSize(0.070);
2959 peak_hpdrm[jk]->GetXaxis()->SetTitleOffset(1.0);
2961 peak_hpdrm[jk]->GetXaxis()->SetLabelSize(0.065);
2962 peak_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2964 peak_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)/MIP");
2966 peak_hpdrm[jk]->GetYaxis()->SetTitleSize(0.07);
2967 peak_hpdrm[jk]->GetYaxis()->SetTitleOffset(1.3);
2969 peak_hpdrm[jk]->GetYaxis()->SetLabelSize(0.065);
2970 peak_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2980 sprintf(out_file,
"comb_peak_hpdrm_%i.jpg", irunold);
2981 c0->SaveAs(out_file);
2985 TCanvas* c1y =
new TCanvas(
"c1y",
"Signal in each ring", xsiz, ysiz);
2988 for (
int jk = 0; jk <
ringmx; jk++) {
2994 const_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2996 const_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)");
3001 const_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
3012 sprintf(out_file,
"comb_const_hpdrm_%i.jpg", irunold);
3013 c1y->SaveAs(out_file);
3025 for (
int ij = 0; ij <
nphimx; ij++) {
3026 for (
int jk = 0; jk <
netamx; jk++) {
3034 gStyle->SetTitleFontSize(0.09);
3035 gStyle->SetPadBottomMargin(0.14);
3036 gStyle->SetPadLeftMargin(0.17);
3037 gStyle->SetPadRightMargin(0.01);
3038 gStyle->SetNdivisions(303,
"XY");
3039 gStyle->SetOptLogy(1);
3041 TCanvas* c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
3043 for (
int side = 0; side < 2; side++) {
3045 int nmx = netamx / 2;
3053 for (
int ij = nmn; ij < nmx; ij++) {
3054 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
3056 sprintf(name,
"GeV(#eta=%i)", ieta);
3075 sprintf(out_file,
"sig_ho_%i_side%i.eps", irunold, side);
3076 c2x->SaveAs(out_file);
3078 sprintf(out_file,
"sig_ho_%i_side%i.jpg", irunold, side);
3079 c2x->SaveAs(out_file);
3082 gStyle->SetOptLogy(0);
3083 c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
3085 for (
int side = 0; side < 2; side++) {
3087 int nmx = netamx / 2;
3095 for (
int ij = nmn; ij < nmx; ij++) {
3099 statmn_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
3100 statmn_eta[ij]->GetXaxis()->SetTitleSize(.08);
3102 statmn_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
3103 statmn_eta[ij]->GetYaxis()->SetLabelSize(.08);
3104 statmn_eta[ij]->GetYaxis()->SetLabelOffset(.01);
3105 statmn_eta[ij]->GetXaxis()->SetLabelSize(.08);
3106 statmn_eta[ij]->GetXaxis()->SetLabelOffset(.01);
3108 statmn_eta[ij]->GetYaxis()->SetTitleSize(.075);
3110 statmn_eta[ij]->GetYaxis()->SetTitleOffset(1.30);
3116 sprintf(out_file,
"statmnho_%i_side%i.eps", irunold, side);
3117 c2x->SaveAs(out_file);
3119 sprintf(out_file,
"statmnho_%i_side%i.jpg", irunold, side);
3120 c2x->SaveAs(out_file);
3122 gStyle->SetOptLogy(1);
3123 gStyle->SetNdivisions(203,
"XY");
3126 for (
int ij = nmn; ij < nmx; ij++) {
3130 stat_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
3131 stat_eta[ij]->GetXaxis()->SetTitleSize(.08);
3132 stat_eta[ij]->GetXaxis()->CenterTitle();
3133 stat_eta[ij]->GetXaxis()->SetTitleOffset(0.80);
3134 stat_eta[ij]->GetXaxis()->SetLabelSize(.08);
3135 stat_eta[ij]->GetXaxis()->SetLabelOffset(.01);
3136 stat_eta[ij]->GetYaxis()->SetLabelSize(.08);
3137 stat_eta[ij]->GetYaxis()->SetLabelOffset(.01);
3143 sprintf(out_file,
"statho_%i_side%i.eps", irunold, side);
3144 c2x->SaveAs(out_file);
3146 sprintf(out_file,
"statho_%i_side%i.jpg", irunold, side);
3147 c2x->SaveAs(out_file);
3154 for (
int jk = 0; jk <
netamx; jk++) {
3155 for (
int ij = 0; ij <
nphimx; ij++) {
TH1F * corrsgrb[netamx][nphimx]
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
TH1F * const_hpdrm[ringmx]
TH1F * com_crossg[ringmx][routmx+1]
std::string theRootFileName
TH1F * corrsgr[netamx][nphimx]
static const int npixrigh[21]
static const int mapx2[6][3]
static const int npixleft[21]
TH1F * corrsglu[netamx][nphimx]
std::vector< float > cro_ssg[netamx][nphimx+1]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HOCalibAnalyzer(const edm::ParameterSet &)
static const int rout12mx
TH1F * crossg[netamx][nphimx+1]
std::vector< T >::const_iterator const_iterator
static const int phimap[4][21]
edm::LuminosityBlockNumber_t luminosityBlock() const
TH1F * com_corrsgall[ringmx][sectmx]
float invang[netamx][nphimx+1]
T * make(const Args &...args) const
make new ROOT object
TH1F * corrsgc[netamx][nphimx]
TH1F * peak_hpdrm[ringmx]
static const int mapx1[6][3]
TH1F * corrsglb[netamx][nphimx]
TH1F * sigrsg[netamx][nphimx+1]
void analyze(const edm::Event &, const edm::EventSetup &) override
TH1F * com_corrsglu[ringmx][sectmx]
static const int npixriup[21]
TH1F * ho_indenergy[netamx][nphimx]
edm::InputTag hoCalibVariableCollectionTag
void set_sigma(double &x, bool mdigi)
TProfile * hopedtime[netamx][nphimx]
TProfile * hbtime[netamx][nphimx]
std::string theoutputtxtFile
TH1F * com_sigrsg[ringmx][routmx+1]
TProfile * com_hbtime[ringmx][sectmx]
float com_invang[ringmx][routmx+1]
#define DEFINE_FWK_MODULE(type)
Double_t totalfunc(Double_t *x, Double_t *par)
std::string theoutputpsFile
static const int npixribt[21]
TH1F * corrsgl[netamx][nphimx]
TH1F * com_corrsgc[ringmx][sectmx]
int ieta() const
get the cell ieta
TH1F * com_corrsgrb[ringmx][sectmx]
Abs< T >::type abs(const T &t)
TH1F * com_corrsgr[ringmx][sectmx]
void fcnsg(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t flag)
double fitprm[nsgpr][netamx]
TProfile * hotime[netamx][nphimx]
static const int npixleup[21]
Double_t gausX(Double_t *x, Double_t *par)
int invert_HOieta(int ieta)
TH1F * corrsgru[netamx][nphimx]
TH1F * com_corrsgl[ringmx][sectmx]
static const int mapx0m[9][2]
TH1F * com_corrsglb[ringmx][sectmx]
std::vector< float > sig_reg[netamx][nphimx+1]
edm::EDGetTokenT< HORecHitCollection > tok_allho_
void set_mean(double &x, bool mdigi)
TProfile * com_hopedtime[ringmx][sectmx]
edm::EDGetTokenT< HOCalibVariableCollection > tok_ho_
static const int mapx0p[9][2]
~HOCalibAnalyzer() override
TH1F * com_corrsgru[ringmx][sectmx]
TProfile * com_hotime[ringmx][sectmx]
void fcnbg(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t flag)
Double_t langaufun(Double_t *x, Double_t *par)
static const int etamap[4][21]
static const int npixlebt[21]
static const int mypow_2_ncut
TH1F * statmn_eta[netamx]
Power< A, B >::type pow(const A &a, const B &b)
TProfile * sigvsevt[15][ncut]
TH1F * corrsgall[netamx][nphimx]