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");
532 "ho energy2 (GeV*GeV)",
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");
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;
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);
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);
874 for (
int ij = 0; ij <
netamx; ij++) {
875 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
883 for (
int ij = 0; ij <
ringmx; ij++) {
886 sprintf(
title,
"Cont_hpdrm_%i", iring);
889 sprintf(
title,
"Peak_hpdrm_%i", iring);
900 for (
int ij = 0; ij <
netamx; ij++) {
901 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
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;
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)
1137 int tmpsect =
int((
iphi + 1) / 6.) + 1;
1142 int tmpeta =
ieta + 4;
1145 tmpeta = -11 -
ieta;
1160 int iring2 = iring + 2;
1162 int tmprout = (iring == 0) ?
int((
iphi + 1) / 2.) + 1 :
int((
iphi + 1) / 3.) + 1;
1164 if (tmprout > tmproutmx)
1171 ips0 = (
int)mypow_2_0;
1175 ips1 = (
int)mypow_2_1;
1178 if (fabs(
trkth - pival / 2) < 21.5) {
1179 ips2 = (
int)mypow_2_2;
1182 if (fabs(
trkph + pival / 2) < 21.5) {
1183 ips3 = (
int)mypow_2_3;
1188 ips4 = (
int)mypow_2_4;
1191 if (
pherr < 0.0002) {
1192 ips5 = (
int)mypow_2_5;
1195 if (fabs(
hoang) > 0.30) {
1196 ips6 = (
int)mypow_2_6;
1199 if (fabs(
trkmm) > 0.100) {
1200 ips7 = (
int)mypow_2_7;
1205 ips8 = (
int)mypow_2_8;
1211 ips10 = (
int)mypow_2_10;
1216 ips11 = (
int)mypow_2_11;
1221 if (fabs(
hodx) < 100 && fabs(
hodx) > 2) {
1222 ips10 = (
int)mypow_2_10;
1226 if (fabs(
hody) < 100 && fabs(
hody) > 2) {
1227 ips11 = (
int)mypow_2_11;
1232 ips12 = (
int)mypow_2_12;
1238 ips0 = (
int)mypow_2_0;
1242 ips1 = (
int)mypow_2_1;
1245 if (fabs(
trkth - pival / 2) < 21.5) {
1246 ips2 = (
int)mypow_2_2;
1249 if (fabs(
trkph + pival / 2) < 21.5) {
1250 ips3 = (
int)mypow_2_3;
1255 ips4 = (
int)mypow_2_4;
1258 if (
pherr < 0.0002) {
1259 ips5 = (
int)mypow_2_5;
1262 if (fabs(
hoang) > 0.30) {
1263 ips6 = (
int)mypow_2_6;
1266 if (fabs(
trkmm) > 4.0) {
1267 ips7 = (
int)mypow_2_7;
1271 ips8 = (
int)mypow_2_8;
1277 ips10 = (
int)mypow_2_10;
1282 ips11 = (
int)mypow_2_11;
1287 if (fabs(
hodx) < 100 && fabs(
hodx) > 2) {
1288 ips10 = (
int)mypow_2_10;
1292 if (fabs(
hody) < 100 && fabs(
hody) > 2) {
1293 ips11 = (
int)mypow_2_11;
1299 ips12 = (
int)mypow_2_12;
1306 ips9 = (
int)mypow_2_9;
1415 int tmpphi = (
iphi + 1) % 3;
1422 tmpphi = (
iphi + 1) % 2;
1423 if (tmpsect == 2 || tmpsect == 3 || tmpsect == 6 || tmpsect == 7 || tmpsect == 10 || tmpsect == 11) {
1424 npixel =
mapx0p[tmpeta][tmpphi];
1427 npixel =
mapx0m[tmpeta][tmpphi];
1432 if (tmpsect % 2 == 1)
1434 if (
abs(iring) == 1) {
1435 npixel =
mapx1[tmpeta][(iflip == 0) ? tmpphi :
abs(tmpphi - 2)];
1438 npixel =
mapx2[tmpeta][(iflip == 0) ? tmpphi :
abs(tmpphi - 2)];
1446 if (
hosig[4] != -100) {
1458 if (iselect2 == 1) {
1461 int tmprout2 = (iring == 0) ?
int((tmpphi2 + 2) / 2.) + 1 :
int((tmpphi2 + 2) / 3.) + 1;
1462 if (tmprout2 > tmproutmx)
1473 if (tmpphi2 >= 0 && tmpphi2 <
nphimx) {
1483 for (
int ij = 0; ij <
neffip; ij++) {
1494 int tmpphi1 =
iphi - 1;
1505 if (tmpphi1 >= 0 && tmpphi1 <
nphimx) {
1519 tmpeta =
etamap[itag][npixel];
1520 tmpphi =
phimap[itag][npixel];
1521 if (tmpeta >= 0 && tmpphi >= 0) {
1523 tmpphi =
abs(tmpphi - 2);
1527 << tmpsect <<
" " <<
ieta <<
" " <<
iphi <<
" " << npixel <<
" " << tmpeta <<
" "
1528 << tmpphi <<
" " << tmpeta1 <<
" " << tmpphi1 <<
" itag " << itag <<
" " << iflip
1532 for (
int ij = 0; ij < 18; ij++) {
1535 edm::LogInfo(
"HOCalib") <<
" ix " << iaxxx <<
" " << ibxxx;
1548 float allcorsig = 0.0;
1553 if (tmpeta >= 0 && tmpphi >= 0) {
1555 tmpphi =
abs(tmpphi - 2);
1565 if (tmpeta >= 0 && tmpphi >= 0) {
1567 tmpphi =
abs(tmpphi - 2);
1577 if (tmpeta >= 0 && tmpphi >= 0) {
1579 tmpphi =
abs(tmpphi - 2);
1589 if (tmpeta >= 0 && tmpphi >= 0) {
1591 tmpphi =
abs(tmpphi - 2);
1601 if (tmpeta >= 0 && tmpphi >= 0) {
1603 tmpphi =
abs(tmpphi - 2);
1613 if (tmpeta >= 0 && tmpphi >= 0) {
1615 tmpphi =
abs(tmpphi - 2);
1622 corrsgall[tmpeta1][tmpphi1]->Fill(allcorsig);
1628 for (
int k = 0;
k < 9;
k++) {
1666 for (
int jk = 0; jk <
ho_energy->GetNbinsX(); jk++) {
1667 for (
int kl = 0; kl <
ho_energy->GetNbinsY(); kl++) {
1676 double xval =
ho_energy->GetXaxis()->GetBinCenter(jk + 1);
1677 double yval =
ho_energy->GetYaxis()->GetBinCenter(kl + 1);
1684 for (
int ij = 0; ij <
nphimx; ij++) {
1685 for (
int jk = 0; jk <
netamx; jk++) {
1733 for (
int jk = 0; jk <
ringmx; jk++) {
1734 for (
int ij = 0; ij <
routmx; ij++) {
1747 for (
int ij = 0; ij <
sectmx; ij++) {
1748 for (
int jk = 0; jk <
ringmx; jk++) {
1787 for (
int ij = 1; ij <
neffip; ij++) {
1790 for (
int ij = 0; ij <
netamx; ij++) {
1791 for (
int jk = 0; jk <
nphimx; jk++) {
1792 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
1794 double signal =
sigrsg[ij][jk]->GetMean();
1801 gStyle->SetOptLogy(0);
1802 gStyle->SetTitleFillColor(10);
1803 gStyle->SetStatColor(10);
1805 gStyle->SetCanvasColor(10);
1806 gStyle->SetOptStat(0);
1807 gStyle->SetOptTitle(1);
1809 gStyle->SetTitleColor(10);
1810 gStyle->SetTitleFontSize(0.09);
1811 gStyle->SetTitleOffset(-0.05);
1812 gStyle->SetTitleBorderSize(1);
1814 gStyle->SetPadColor(10);
1815 gStyle->SetPadBorderMode(0);
1816 gStyle->SetStatColor(10);
1817 gStyle->SetPadBorderMode(0);
1818 gStyle->SetStatBorderSize(1);
1819 gStyle->SetStatFontSize(.07);
1821 gStyle->SetStatStyle(1001);
1822 gStyle->SetOptFit(101);
1823 gStyle->SetCanvasColor(10);
1824 gStyle->SetCanvasBorderMode(0);
1826 gStyle->SetStatX(.99);
1827 gStyle->SetStatY(.99);
1828 gStyle->SetStatW(.45);
1829 gStyle->SetStatH(.16);
1830 gStyle->SetLabelSize(0.075,
"XY");
1831 gStyle->SetLabelOffset(0.21,
"XYZ");
1832 gStyle->SetTitleSize(0.065,
"XY");
1833 gStyle->SetTitleOffset(0.06,
"XYZ");
1834 gStyle->SetPadTopMargin(.09);
1835 gStyle->SetPadBottomMargin(0.11);
1836 gStyle->SetPadLeftMargin(0.12);
1837 gStyle->SetPadRightMargin(0.15);
1838 gStyle->SetPadGridX(
true);
1839 gStyle->SetPadGridY(
true);
1840 gStyle->SetGridStyle(2);
1841 gStyle->SetNdivisions(303,
"XY");
1843 gStyle->SetMarkerSize(0.60);
1844 gStyle->SetMarkerColor(2);
1845 gStyle->SetMarkerStyle(20);
1846 gStyle->SetTitleFontSize(0.07);
1902 gStyle->SetPadBottomMargin(0.14);
1903 gStyle->SetPadLeftMargin(0.17);
1904 gStyle->SetPadRightMargin(0.03);
1906 gStyle->SetOptStat(1110);
1908 const int nsample = 8;
1909 TF1* gx0[nsample] = {
nullptr};
1910 TF1* ped0fun[nsample] = {
nullptr};
1911 TF1* signal[nsample] = {
nullptr};
1912 TF1* pedfun[nsample] = {
nullptr};
1913 TF1* sigfun[nsample] = {
nullptr};
1914 TF1* signalx[nsample] = {
nullptr};
1916 TH1F* signall[nsample] = {
nullptr};
1917 TH1F* pedstll[nsample] = {
nullptr};
1920 gStyle->SetOptFit(101);
1921 gStyle->SetCanvasBorderMode(0);
1922 gStyle->SetPadBorderMode(0);
1923 gStyle->SetStatBorderSize(1);
1924 gStyle->SetStatStyle(1001);
1925 gStyle->SetTitleColor(10);
1926 gStyle->SetTitleFontSize(0.09);
1927 gStyle->SetTitleOffset(-0.05);
1928 gStyle->SetTitleBorderSize(1);
1930 gStyle->SetCanvasColor(10);
1931 gStyle->SetPadColor(10);
1932 gStyle->SetStatColor(10);
1933 gStyle->SetStatFontSize(.07);
1934 gStyle->SetStatX(0.99);
1935 gStyle->SetStatY(0.99);
1936 gStyle->SetStatW(0.30);
1937 gStyle->SetStatH(0.10);
1938 gStyle->SetTitleSize(0.065,
"XYZ");
1939 gStyle->SetLabelSize(0.075,
"XYZ");
1940 gStyle->SetLabelOffset(0.012,
"XYZ");
1941 gStyle->SetPadGridX(
true);
1942 gStyle->SetPadGridY(
true);
1943 gStyle->SetGridStyle(3);
1944 gStyle->SetNdivisions(101,
"XY");
1945 gStyle->SetOptLogy(0);
1956 TCanvas*
c0 =
new TCanvas(
"c0",
" Pedestal vs signal", xsiz, ysiz);
1965 for (
int ij = 0; ij <
nphimx; ++ij) {
1969 for (
int ij = 0; ij <
netamx; ++ij) {
1984 for (
int iijj = 0; iijj < 4; iijj++) {
1991 }
else if (iijj == 1) {
1996 }
else if (iijj == 2) {
2001 }
else if (iijj == 3) {
2008 for (
int jk = mneta; jk < mxeta; jk++) {
2009 for (
int ij = mnphi; ij < mxphi; ij++) {
2012 if ((iijj == 0 || iijj == 1) && jk != 2 && ij >=
rout12mx)
2014 int izone = iiter % nsample;
2018 signall[izone] = (TH1F*)
com_sigrsg[jk][iread]->Clone(
"hnew");
2019 pedstll[izone] = (TH1F*)
com_crossg[jk][iread]->Clone(
"hnew");
2020 }
else if (iijj == 1) {
2021 signall[izone] = (TH1F*)
com_sigrsg[jk][ij]->Clone(
"hnew");
2022 pedstll[izone] = (TH1F*)
com_crossg[jk][ij]->Clone(
"hnew");
2023 }
else if (iijj == 2) {
2024 signall[izone] = (TH1F*)
sigrsg[jk][
nphimx]->Clone(
"hnew");
2025 pedstll[izone] = (TH1F*)
crossg[jk][
nphimx]->Clone(
"hnew");
2026 }
else if (iijj == 3) {
2027 signall[izone] = (TH1F*)
sigrsg[jk][ij]->Clone(
"hnew");
2028 pedstll[izone] = (TH1F*)
crossg[jk][ij]->Clone(
"hnew");
2031 pedstll[izone]->SetLineWidth(2);
2032 signall[izone]->SetLineWidth(2);
2033 pedstll[izone]->SetLineColor(2);
2034 signall[izone]->SetLineColor(4);
2035 pedstll[izone]->SetNdivisions(506,
"XY");
2036 signall[izone]->SetNdivisions(506,
"XY");
2038 signall[izone]->GetXaxis()->SetLabelSize(.065);
2039 signall[izone]->GetYaxis()->SetLabelSize(.06);
2040 signall[izone]->GetXaxis()->SetTitle(
"Signal (GeV)");
2042 signall[izone]->GetXaxis()->SetTitleSize(.065);
2043 signall[izone]->GetXaxis()->CenterTitle();
2049 c0->cd(2 * izone + 1);
2080 float mean = pedstll[izone]->GetMean();
2081 float rms = pedstll[izone]->GetRMS();
2095 binwid = pedstll[izone]->GetBinWidth(1);
2096 if (xmx > pedstll[izone]->GetXaxis()->GetXmax())
2097 xmx = pedstll[izone]->GetXaxis()->GetXmax() - 0.5 *
binwid;
2098 if (xmn < pedstll[izone]->GetXaxis()->GetXmin())
2099 xmn = pedstll[izone]->GetXaxis()->GetXmin() + 0.5 *
binwid;
2101 float height = pedstll[izone]->GetEntries();
2105 double gaupr[
nbgpr];
2106 double parer[
nbgpr];
2110 pedstll[izone]->GetXaxis()->SetLabelSize(.065);
2111 pedstll[izone]->GetYaxis()->SetLabelSize(.06);
2116 pedstll[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
2120 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal/Signal (GeV)");
2122 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal (GeV)");
2124 pedstll[izone]->GetXaxis()->SetTitleSize(.065);
2125 pedstll[izone]->GetXaxis()->CenterTitle();
2128 pedstll[izone]->Draw();
2133 parer[0] = parer[1] = parer[2] = 0;
2135 if (pedstll[izone]->GetEntries() > 5) {
2138 sprintf(
temp,
"gx0_%i", izone);
2140 gx0[izone]->SetParameters(par);
2141 gx0[izone]->SetLineWidth(1);
2142 pedstll[izone]->Fit(gx0[izone],
"R+");
2145 parer[
k] = gx0[izone]->GetParError(
k);
2146 gaupr[
k] = gx0[izone]->GetParameter(
k);
2150 double step[
nbgpr] = {1.0, 0.001, 0.001};
2163 sprintf(
name,
"pedpar%i",
k);
2174 double parv,
err, xlo, xup, plerr, mierr, eparab, gcc;
2178 if (
step[
k] > -10) {
2179 gMinuit->mnpout(
k, chnam, parv,
err, xlo, xup, iuit);
2180 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2195 sprintf(
temp,
"ped0fun_%i", izone);
2197 ped0fun[izone]->SetParameters(gaupr);
2198 ped0fun[izone]->SetLineColor(3);
2199 ped0fun[izone]->SetLineWidth(1);
2200 ped0fun[izone]->Draw(
"same");
2212 c0->cd(2 * izone + 2);
2213 if (signall[izone]->GetEntries() > 5) {
2214 Double_t parall[
nsgpr];
2215 double parserr[
nsgpr];
2216 double fitres[
nsgpr];
2220 sprintf(
temp,
"signal_%i", izone);
2221 xmn = signall[izone]->GetXaxis()->GetXmin();
2222 xmx = 0.5 * signall[izone]->GetXaxis()->GetXmax();
2226 pedht = (signall[izone]->GetBinContent(
nbn - 1) + signall[izone]->GetBinContent(
nbn) +
2227 signall[izone]->GetBinContent(
nbn + 1)) /
2234 for (
int lm = 0; lm <
nbgpr; lm++) {
2235 parall[lm] = gaupr[lm];
2242 parall[0] = 0.9 * pedht;
2244 double area =
binwid * signall[izone]->GetEntries();
2248 parall[4] =
fitprm[4][jk];
2249 parall[6] =
fitprm[6][jk];
2251 parall[4] = signall[izone]->GetMean();
2252 parall[6] = parall[2];
2255 signal[izone]->SetParameters(parall);
2256 signal[izone]->FixParameter(1, parall[1]);
2257 signal[izone]->FixParameter(2, parall[2]);
2258 signal[izone]->SetParLimits(0, 0.00, 2.0 * pedht + 0.1);
2259 signal[izone]->FixParameter(3, 0.14);
2261 signal[izone]->SetParLimits(5, 0.40 *
area, 1.15 *
area);
2264 signal[izone]->SetParLimits(4, 0.2 *
fitprm[4][jk], 2.0 *
fitprm[4][jk]);
2265 signal[izone]->SetParLimits(6, 0.2 *
fitprm[6][jk], 2.0 *
fitprm[6][jk]);
2267 signal[izone]->SetParLimits(4, 0.1, 1.0);
2268 signal[izone]->SetParLimits(6, 0.035, 0.3);
2270 signal[izone]->SetParNames(
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma");
2271 signall[izone]->Fit(signal[izone],
"0R+");
2273 signall[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
2275 fitres[
k] =
fitprm[
k][jk] = signal[izone]->GetParameter(
k);
2276 parserr[
k] = signal[izone]->GetParError(
k);
2290 TString
name[
nsgpr] = {
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma"};
2291 double strt[
nsgpr] = {0.9 * pedhtx,
2296 signall[izone]->GetEntries(),
2298 double alowmn[
nsgpr] = {
2299 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]};
2300 double ahighmn[
nsgpr] = {
2301 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]};
2302 double step[
nsgpr] = {1.0, 0.0, 0.0, 0.0, 0.001, 1.0, 0.002};
2323 double parv,
err, xlo, xup, plerr, mierr, eparab, gcc;
2327 if (
step[
k] > -10) {
2328 gMinuit->mnpout(
k, chnam, parv,
err, xlo, xup, iuit);
2329 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2330 if (
k == 0 ||
k == 5) {
2346 signall[izone]->Draw();
2349 sprintf(
temp,
"pedfun_%i", izone);
2351 pedfun[izone]->SetParameters(fitres);
2352 pedfun[izone]->SetLineColor(3);
2353 pedfun[izone]->SetLineWidth(1);
2354 pedfun[izone]->Draw(
"same");
2356 sprintf(
temp,
"signalfun_%i", izone);
2358 sigfun[izone]->SetParameters(&fitres[3]);
2359 sigfun[izone]->SetLineWidth(1);
2360 sigfun[izone]->SetLineColor(4);
2361 sigfun[izone]->Draw(
"same");
2363 sprintf(
temp,
"total_%i", izone);
2365 signalx[izone]->SetParameters(fitres);
2366 signalx[izone]->SetLineWidth(1);
2367 signalx[izone]->Draw(
"same");
2369 int kl = (jk < 15) ? jk + 1 : 14 - jk;
2371 edm::LogInfo(
"HOCalib") <<
"histinfo" << iijj <<
" fit " << std::setw(3) << kl <<
" " << std::setw(3)
2372 << ij + 1 <<
" " << std::setw(5) << pedstll[izone]->GetEntries() <<
" "
2373 << std::setw(6) << pedstll[izone]->GetMean() <<
" " << std::setw(6)
2374 << pedstll[izone]->GetRMS() <<
" " << std::setw(5) << signall[izone]->GetEntries()
2375 <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" " << std::setw(6)
2376 << signall[izone]->GetRMS() <<
" " << std::setw(6) << signal[izone]->GetChisquare()
2377 <<
" " << std::setw(3) << signal[izone]->GetNDF();
2379 file_out <<
"histinfo" << iijj <<
" fit " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" "
2380 << std::setw(5) << pedstll[izone]->GetEntries() <<
" " << std::setw(6) << pedstll[izone]->GetMean()
2381 <<
" " << std::setw(6) << pedstll[izone]->GetRMS() <<
" " << std::setw(5)
2382 << signall[izone]->GetEntries() <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" "
2383 << std::setw(6) << signall[izone]->GetRMS() <<
" " << std::setw(6) << signal[izone]->GetChisquare()
2384 <<
" " << std::setw(3) << signal[izone]->GetNDF() << std::endl;
2386 file_out <<
"fitres x" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << fitres[0] <<
" " << fitres[1] <<
" "
2387 << fitres[2] <<
" " << fitres[3] <<
" " << fitres[4] <<
" " << fitres[5] <<
" " << fitres[6]
2389 file_out <<
"parserr" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << parserr[0] <<
" " << parserr[1] <<
" "
2390 << parserr[2] <<
" " << parserr[3] <<
" " << parserr[4] <<
" " << parserr[5] <<
" " << parserr[6]
2393 int ieta = (jk < 15) ? (15 + jk) : (29 - jk);
2397 ped_evt->Fill(ifl, pedstll[izone]->GetEntries());
2400 fit_chi->Fill(ifl, signal[izone]->GetChisquare());
2401 sig_evt->Fill(ifl, signall[izone]->GetEntries());
2403 fit_bkgevt->Fill(ifl, fitres[0] *
sqrt(2 * acos(-1.)) * gaupr[2]);
2405 sig_diff->Fill(ifl, fitres[4] - fitres[1]);
2409 if (fitres[4] - fitres[1] != 0)
2410 sig_meanerrp->Fill(ifl, 100 * parserr[4] / (fitres[4] - fitres[1]));
2412 sig_signf->Fill(ifl, (fitres[4] - fitres[1]) / gaupr[2]);
2416 ped_rms->Fill(ifl, pedstll[izone]->GetRMS());
2417 sig_rms->Fill(ifl, signall[izone]->GetRMS());
2420 if ((iijj == 2) || (iijj == 3) || (iijj == 1)) {
2421 if (signall[izone]->GetEntries() > 5 && fitres[4] > 0.1) {
2436 float calibc =
fact * fact2 / (fitres[4] * signall[izone]->GetEntries());
2440 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2443 file_out <<
"intieta " << jk <<
" " << ij <<
" " <<
ieta <<
" " <<
mean_phi_hst->FindBin(
double(
ieta))
2444 <<
" " << calibc <<
" " << caliberr << std::endl;
2445 }
else if (iijj == 3) {
2449 peak_eta[jk]->Fill(ij + 1, fitres[4]);
2452 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2454 file_out <<
"intietax " << jk <<
" " << ij <<
" " <<
ieta <<
" "
2459 mean_eta[ij] += calibc / (caliberr * caliberr);
2460 mean_phi[jk] += calibc / (caliberr * caliberr);
2462 rms_eta[ij] += 1. / (caliberr * caliberr);
2463 rms_phi[jk] += 1. / (caliberr * caliberr);
2468 }
else if (iijj == 1) {
2476 file_out <<
"HO 4 " << iijj <<
" " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" "
2477 << std::setw(7) << calibc <<
" " << std::setw(7) << caliberr << std::endl;
2482 signall[izone]->Draw();
2484 int kl = (jk < 15) ? jk + 1 : 14 - jk;
2485 file_out <<
"histinfo" << iijj <<
" nof " << std::setw(3) << kl <<
" " << std::setw(3) << ij + 1 <<
" "
2486 << std::setw(5) << pedstll[izone]->GetEntries() <<
" " << std::setw(6) << pedstll[izone]->GetMean()
2487 <<
" " << std::setw(6) << pedstll[izone]->GetRMS() <<
" " << std::setw(5)
2488 << signall[izone]->GetEntries() <<
" " << std::setw(6) << signall[izone]->GetMean() <<
" "
2489 << std::setw(6) << signall[izone]->GetRMS() <<
" " << std::setw(6) << varx <<
" " << std::setw(3)
2490 << varx << std::endl;
2492 file_out <<
"fitres x" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << varx <<
" " << varx <<
" " << varx
2493 <<
" " << varx <<
" " << varx <<
" " << varx <<
" " << varx << std::endl;
2494 file_out <<
"parserr" << iijj <<
" " << kl <<
" " << ij + 1 <<
" " << varx <<
" " << varx <<
" " << varx
2495 <<
" " << varx <<
" " << varx <<
" " << varx <<
" " << varx << std::endl;
2498 if (iiter % nsample == 0) {
2501 for (
int kl = 0; kl < nsample; kl++) {
2508 ped0fun[kl] =
nullptr;
2512 signal[kl] =
nullptr;
2516 pedfun[kl] =
nullptr;
2520 sigfun[kl] =
nullptr;
2524 signalx[kl] =
nullptr;
2528 signall[kl] =
nullptr;
2532 pedstll[kl] =
nullptr;
2549 if (iiter % nsample != 0) {
2551 for (
int kl = 0; kl < nsample; kl++) {
2558 ped0fun[kl] =
nullptr;
2562 signal[kl] =
nullptr;
2566 pedfun[kl] =
nullptr;
2570 sigfun[kl] =
nullptr;
2574 signalx[kl] =
nullptr;
2578 signall[kl] =
nullptr;
2582 pedstll[kl] =
nullptr;
2592 gStyle->SetTitleFontSize(0.05);
2593 gStyle->SetTitleSize(0.025,
"XYZ");
2594 gStyle->SetLabelSize(0.025,
"XYZ");
2595 gStyle->SetStatFontSize(.045);
2597 gStyle->SetOptStat(0);
2599 TCanvas*
c1 =
new TCanvas(
"c1",
" Pedestal vs signal", xsiz, ysiz);
2676 gStyle->SetTitleFontSize(0.09);
2677 gStyle->SetPadBottomMargin(0.17);
2678 gStyle->SetPadLeftMargin(0.18);
2679 gStyle->SetPadRightMargin(0.01);
2680 gStyle->SetOptLogy(0);
2681 gStyle->SetOptStat(0);
2683 TCanvas* c2 =
new TCanvas(
"c2",
"runfile", xsiz, ysiz);
2686 for (
int side = 0; side < 2; side++) {
2687 gStyle->SetNdivisions(303,
"XY");
2688 gStyle->SetPadRightMargin(0.01);
2698 for (
int ij = nmn; ij < nmx; ij++) {
2700 const_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2701 const_eta[ij]->GetXaxis()->SetTitleSize(.08);
2702 const_eta[ij]->GetXaxis()->CenterTitle();
2703 const_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2704 const_eta[ij]->GetXaxis()->SetLabelSize(.085);
2705 const_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2707 const_eta[ij]->GetYaxis()->SetLabelSize(.08);
2708 const_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2709 const_eta[ij]->GetYaxis()->SetTitle(
"GeV/MIP-GeV!!");
2711 const_eta[ij]->GetYaxis()->SetTitleSize(.085);
2712 const_eta[ij]->GetYaxis()->CenterTitle();
2713 const_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2729 for (
int ij = nmn; ij < nmx; ij++) {
2731 peak_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2732 peak_eta[ij]->GetXaxis()->SetTitleSize(.08);
2733 peak_eta[ij]->GetXaxis()->CenterTitle();
2734 peak_eta[ij]->GetXaxis()->SetTitleOffset(0.90);
2735 peak_eta[ij]->GetXaxis()->SetLabelSize(.08);
2736 peak_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2738 peak_eta[ij]->GetYaxis()->SetLabelSize(.08);
2739 peak_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2740 peak_eta[ij]->GetYaxis()->SetTitle(
"GeV");
2742 peak_eta[ij]->GetYaxis()->SetTitleSize(.085);
2743 peak_eta[ij]->GetYaxis()->CenterTitle();
2744 peak_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2763 gStyle->SetTitleFontSize(0.045);
2764 gStyle->SetPadRightMargin(0.13);
2765 gStyle->SetPadBottomMargin(0.15);
2766 gStyle->SetPadLeftMargin(0.1);
2767 gStyle->SetOptStat(0);
2770 TCanvas*
c1 =
new TCanvas(
"c1",
"Fitted const in each tower", xsiz, ysiz);
2791 for (
int jk = 0; jk <
netamx; jk++) {
2792 int ieta = (jk < 15) ? jk + 1 : 14 - jk;
2793 if (rms_phi[jk] > 0) {
2799 for (
int ij = 0; ij <
nphimx; ij++) {
2800 if (rms_eta[ij] > 0) {
2801 mean_eta_ave->Fill(ij + 1, mean_eta[ij] / rms_eta[ij]);
2807 gStyle->SetPadLeftMargin(0.13);
2808 gStyle->SetPadRightMargin(0.03);
2810 TCanvas* c2y =
new TCanvas(
"c2",
"Avearge signal in eta and phi", xsiz, ysiz);
2819 mean_eta_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2839 mean_phi_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2860 TCanvas* c3 =
new TCanvas(
"c3",
"Avearge signal in eta and phi", xsiz, ysiz);
2888 gStyle->SetOptLogy(1);
2889 gStyle->SetPadTopMargin(.1);
2890 gStyle->SetPadLeftMargin(.15);
2893 TCanvas* c0x =
new TCanvas(
"c0x",
"Signal in each ring", xsiz, ysiz);
2896 for (
int ij = 0; ij <
ringmx; ij++) {
2898 com_sigrsg[ij][iread]->GetXaxis()->SetTitle(
"Signal/ped (GeV)");
2900 com_sigrsg[ij][iread]->GetXaxis()->SetTitleSize(0.060);
2901 com_sigrsg[ij][iread]->GetXaxis()->SetTitleOffset(1.05);
2902 com_sigrsg[ij][iread]->GetXaxis()->CenterTitle();
2903 com_sigrsg[ij][iread]->GetXaxis()->SetLabelSize(0.065);
2904 com_sigrsg[ij][iread]->GetXaxis()->SetLabelOffset(0.01);
2906 com_sigrsg[ij][iread]->GetYaxis()->SetLabelSize(0.065);
2907 com_sigrsg[ij][iread]->GetYaxis()->SetLabelOffset(0.01);
2923 gStyle->SetTitleFontSize(0.06);
2924 gStyle->SetOptStat(0);
2925 gStyle->SetOptLogy(0);
2927 TCanvas*
c0 =
new TCanvas(
"c0",
"Signal in each ring", xsiz, ysiz);
2930 for (
int jk = 0; jk <
ringmx; jk++) {
2931 peak_hpdrm[jk]->GetXaxis()->SetTitle(
"RM #");
2932 peak_hpdrm[jk]->GetXaxis()->SetTitleSize(0.070);
2933 peak_hpdrm[jk]->GetXaxis()->SetTitleOffset(1.0);
2935 peak_hpdrm[jk]->GetXaxis()->SetLabelSize(0.065);
2936 peak_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2938 peak_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)/MIP");
2940 peak_hpdrm[jk]->GetYaxis()->SetTitleSize(0.07);
2941 peak_hpdrm[jk]->GetYaxis()->SetTitleOffset(1.3);
2943 peak_hpdrm[jk]->GetYaxis()->SetLabelSize(0.065);
2944 peak_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2959 TCanvas* c1y =
new TCanvas(
"c1y",
"Signal in each ring", xsiz, ysiz);
2962 for (
int jk = 0; jk <
ringmx; jk++) {
2968 const_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2970 const_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)");
2975 const_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2999 for (
int ij = 0; ij <
nphimx; ij++) {
3000 for (
int jk = 0; jk <
netamx; jk++) {
3008 gStyle->SetTitleFontSize(0.09);
3009 gStyle->SetPadBottomMargin(0.14);
3010 gStyle->SetPadLeftMargin(0.17);
3011 gStyle->SetPadRightMargin(0.01);
3012 gStyle->SetNdivisions(303,
"XY");
3013 gStyle->SetOptLogy(1);
3015 TCanvas* c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
3017 for (
int side = 0; side < 2; side++) {
3027 for (
int ij = nmn; ij < nmx; ij++) {
3028 int ieta = (ij < 15) ? ij + 1 : 14 - ij;
3030 sprintf(
name,
"GeV(#eta=%i)",
ieta);
3056 gStyle->SetOptLogy(0);
3057 c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
3059 for (
int side = 0; side < 2; side++) {
3069 for (
int ij = nmn; ij < nmx; ij++) {
3073 statmn_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
3074 statmn_eta[ij]->GetXaxis()->SetTitleSize(.08);
3076 statmn_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
3077 statmn_eta[ij]->GetYaxis()->SetLabelSize(.08);
3078 statmn_eta[ij]->GetYaxis()->SetLabelOffset(.01);
3079 statmn_eta[ij]->GetXaxis()->SetLabelSize(.08);
3080 statmn_eta[ij]->GetXaxis()->SetLabelOffset(.01);
3082 statmn_eta[ij]->GetYaxis()->SetTitleSize(.075);
3084 statmn_eta[ij]->GetYaxis()->SetTitleOffset(1.30);
3096 gStyle->SetOptLogy(1);
3097 gStyle->SetNdivisions(203,
"XY");
3100 for (
int ij = nmn; ij < nmx; ij++) {
3104 stat_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
3105 stat_eta[ij]->GetXaxis()->SetTitleSize(.08);
3106 stat_eta[ij]->GetXaxis()->CenterTitle();
3107 stat_eta[ij]->GetXaxis()->SetTitleOffset(0.80);
3108 stat_eta[ij]->GetXaxis()->SetLabelSize(.08);
3109 stat_eta[ij]->GetXaxis()->SetLabelOffset(.01);
3110 stat_eta[ij]->GetYaxis()->SetLabelSize(.08);
3111 stat_eta[ij]->GetYaxis()->SetLabelOffset(.01);
3128 for (
int jk = 0; jk <
netamx; jk++) {
3129 for (
int ij = 0; ij <
nphimx; ij++) {