46 #include "TPostScript.h"
73 static const int mapx1[6][3]={{1,4,8}, {12,7,3}, {5,9,13}, {11,6,2}, {16,15,14}, {19,18,17}};
75 static const int mapx2[6][3]={{1,4,8}, {12,7,3}, {5,9,13}, {11,6,2}, {16,15,14}, {-1,-1,-1}};
77 static const int mapx0p[9][2]={{3,1}, {7,4}, {6,5}, {12,8}, {0,0}, {11,9}, {16,13}, {15,14}, {19,17}};
78 static const int mapx0m[9][2]={{17,19}, {14,15}, {13,16}, {9,11}, {0,0}, {8,12}, {5,6}, {4,7}, {1,3}};
80 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},
81 {-1, 0,3,1, 0,2,3, 1,0,2, -1, 3,1,2, 4,4,4, 5,5,5, -1},
82 {-1, 0,-1,0, 1,2,2, 1,3,5, -1, 5,3,6, 7,7,6, 8,-1,8, -1},
83 {-1, 8,-1,8, 7,6,6, 7,5,3, -1, 3,5,2, 1,1,2, 0,-1,0, -1}};
85 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},
86 {-1, 0,2,2, 1,0,1, 1,2,1, -1, 0,0,2, 2,1,0, 2,1,0, -1},
87 {-1, 1,-1,0, 1,1,0, 0,1,1, -1, 0,0,1, 1,0,0, 1,-1,0, -1},
88 {-1, 0,-1,1, 0,0,1, 1,0,0, -1, 1,1,0, 0,1,1, 0,-1,1, -1}};
91 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};
92 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};
93 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};
94 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};
95 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};
96 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};
114 Double_t
gausX(Double_t*
x, Double_t* par){
115 return par[0]*(TMath::Gaus(x[0], par[1], par[2], kTRUE));
132 Double_t invsq2pi = 0.3989422804014;
133 Double_t mpshift = -0.22278298;
150 mpc = par[1] - mpshift * par[0]*par[1];
153 xlow = x[0] - sc * par[3];
154 xupp = x[0] + sc * par[3];
156 step = (xupp-xlow) / np;
159 for(i=1.0; i<=np/2; i++) {
160 xx = xlow + (i-.5) *
step;
161 fland = TMath::Landau(xx,mpc,par[0]*par[1], kTRUE);
162 sum += fland * TMath::Gaus(x[0],xx,par[3]);
163 xx = xupp - (i-.5) *
step;
164 fland = TMath::Landau(xx,mpc,par[0]*par[1], kTRUE);
165 sum += fland * TMath::Gaus(x[0],xx,par[3]);
168 return (par[2] * step * sum * invsq2pi / par[3]);
175 void fcnbg(Int_t &npar, Double_t* gin, Double_t &
f, Double_t* par, Int_t
flag) {
177 double fval = -par[0];
180 fval +=
log(
max(1.
e-30,par[0]*TMath::Gaus(xval, par[1], par[2], 1)));
186 void fcnsg(Int_t &npar, Double_t* gin, Double_t &
f, Double_t* par, Int_t
flag) {
189 double fval = -(par[0]+par[5]);
229 virtual void endJob() ;
250 static const int ncut = 13;
251 static const int mypow_2_ncut = 8192;
350 static const int ringmx=5;
351 static const int sectmx=12;
352 static const int routmx=36;
353 static const int rout12mx=24;
354 static const int neffip=6;
357 TProfile* com_hotime[ringmx][sectmx];
358 TProfile* com_hopedtime[ringmx][sectmx];
361 TProfile* com_hbtime[ringmx][sectmx];
364 TH1F* com_corrsglb[ringmx][sectmx];
365 TH1F* com_corrsgrb[ringmx][sectmx];
366 TH1F* com_corrsglu[ringmx][sectmx];
367 TH1F* com_corrsgru[ringmx][sectmx];
368 TH1F* com_corrsgall[ringmx][sectmx];
370 TH1F* com_corrsgl[ringmx][sectmx];
371 TH1F* com_corrsgr[ringmx][sectmx];
374 TH1F* com_corrsgc[ringmx][sectmx];
377 TH1F* com_sigrsg[ringmx][routmx+1];
378 TH1F* com_crossg[ringmx][routmx+1];
379 float com_invang[ringmx][routmx+1];
411 TH1F* const_hpdrm[ringmx];
414 TH1F* peak_hpdrm[ringmx];
420 TH2F* sig_effi[neffip];
426 TProfile* sigvsevt[15][ncut];
430 int irun, ievt, itrg1, itrg2, isect, ndof,
nmuon;
431 float trkdr, trkdz, trkvx, trkvy,
trkvz, trkmm, trkth, trkph, chisq, therr, pherr, hodx, hody,
432 hoang, htime, hosig[9], hocorsig[18], hocro, hbhesig[9], caloen[3];
465 hoCalibVariableCollectionTag(iConfig.getParameter<edm::
InputTag>(
"hoCalibVariableCollectionTag"))
496 T1 =
new TTree(
"T1",
"DT+CSC+HO");
498 T1->Branch(
"irun",&
irun,
"irun/I");
499 T1->Branch(
"ievt",&
ievt,
"ievt/I");
500 T1->Branch(
"itrg1",&
itrg1,
"itrg1/I");
501 T1->Branch(
"itrg2",&
itrg2,
"itrg2/I");
503 T1->Branch(
"isect",&
isect,
"isect/I");
505 T1->Branch(
"ndof",&
ndof,
"ndof/I");
506 T1->Branch(
"nmuon",&
nmuon,
"nmuon/I");
508 T1->Branch(
"trkdr",&
trkdr,
"trkdr/F");
509 T1->Branch(
"trkdz",&
trkdz,
"trkdz/F");
511 T1->Branch(
"trkvx",&
trkvx,
"trkvx/F");
512 T1->Branch(
"trkvy",&
trkvy,
"trkvy/F");
513 T1->Branch(
"trkvz",&
trkvz,
"trkvz/F");
514 T1->Branch(
"trkmm",&
trkmm,
"trkmm/F");
515 T1->Branch(
"trkth",&
trkth,
"trkth/F");
516 T1->Branch(
"trkph",&
trkph,
"trkph/F");
518 T1->Branch(
"chisq",&
chisq,
"chisq/F");
519 T1->Branch(
"therr",&
therr,
"therr/F");
520 T1->Branch(
"pherr",&
pherr,
"pherr/F");
521 T1->Branch(
"hodx",&
hodx,
"hodx/F");
522 T1->Branch(
"hody",&
hody,
"hody/F");
523 T1->Branch(
"hoang",&
hoang,
"hoang/F");
525 T1->Branch(
"htime",&
htime,
"htime/F");
526 T1->Branch(
"hosig",
hosig,
"hosig[9]/F");
527 T1->Branch(
"hocro",&
hocro,
"hocro/F");
528 T1->Branch(
"hocorsig",
hocorsig,
"hocorsig[18]/F");
529 T1->Branch(
"caloen",
caloen,
"caloen[3]/F");
532 T1->Branch(
"hbhesig",
hbhesig,
"hbhesig[9]/F");
535 muonnm = fs->
make<TH1F>(
"muonnm",
"No of muon", 10, -0.5, 9.5);
536 muonmm = fs->
make<TH1F>(
"muonmm",
"P_{mu}", 200, -100., 100.);
537 muonth = fs->
make<TH1F>(
"muonth",
"{Theta}_{mu}", 180, 0., 180.);
538 muonph = fs->
make<TH1F>(
"muonph",
"{Phi}_{mu}", 180, -180., 180.);
539 muonch = fs->
make<TH1F>(
"muonch",
"{chi^2}/ndf", 100, 0., 1000.);
541 sel_muonnm = fs->
make<TH1F>(
"sel_muonnm",
"No of muon(sel)", 10, -0.5, 9.5);
542 sel_muonmm = fs->
make<TH1F>(
"sel_muonmm",
"P_{mu}(sel)", 200, -100., 100.);
543 sel_muonth = fs->
make<TH1F>(
"sel_muonth",
"{Theta}_{mu}(sel)", 180, 0., 180.);
544 sel_muonph = fs->
make<TH1F>(
"sel_muonph",
"{Phi}_{mu}(sel)", 180, -180., 180.);
545 sel_muonch = fs->
make<TH1F>(
"sel_muonch",
"{chi^2}/ndf(sel)", 100, 0., 1000.);
552 if (m_digiInput) {
alow = -10.0;
ahigh = 40.;}
564 for (
int i=0;
i<15;
i++) {
566 sprintf(title,
"sigvsndof_ring%i",
i+1);
569 sprintf(title,
"sigvschisq_ring%i",
i+1);
572 sprintf(title,
"sigvsth_ring%i",
i+1);
575 sprintf(title,
"sigvsph_ring%i",
i+1);
578 sprintf(title,
"sigvstherr_ring%i",
i+1);
581 sprintf(title,
"sigvspherr_ring%i",
i+1);
584 sprintf(title,
"sigvsdircos_ring%i",
i+1);
587 sprintf(title,
"sigvstrkmm_ring%i",
i+1);
590 sprintf(title,
"sigvsnmuon_ring%i",
i+1);
593 sprintf(title,
"sigvserr_ring%i",
i+1);
596 sprintf(title,
"sigvsaccx_ring%i",
i+1);
599 sprintf(title,
"sigvsaccy_ring%i",
i+1);
602 sprintf(title,
"sigvscalo_ring%i",
i+1);
607 int ieta = (
j<15) ?
j+1 : 14-
j;
610 sprintf(title,
"sig_eta%i_allphi", ieta);
612 sprintf(title,
"sig_eta%i_phi%i", ieta,
i+1);
616 sprintf(title,
"ped_eta%i_allphi", ieta);
618 sprintf(title,
"ped_eta%i_phi%i", ieta,
i+1);
625 sprintf(title,
"hotime_eta%i_phi%i", (
j<=14) ?
j+1 : 14-
j,
i+1);
628 sprintf(title,
"hopedtime_eta%i_phi%i", (
j<=14) ?
j+1 : 14-
j,
i+1);
633 sprintf(title,
"hbtime_eta%i_phi%i", (
j<=15) ?
j+1 : 15-
j,
i+1);
638 sprintf(title,
"corrsg_eta%i_phi%i_leftbottom", ieta,
i+1);
641 sprintf(title,
"corrsg_eta%i_phi%i_rightbottom", ieta,
i+1);
644 sprintf(title,
"corrsg_eta%i_phi%i_leftup", ieta,
i+1);
647 sprintf(title,
"corrsg_eta%i_phi%i_rightup", ieta,
i+1);
650 sprintf(title,
"corrsg_eta%i_phi%i_all", ieta,
i+1);
653 sprintf(title,
"corrsg_eta%i_phi%i_left", ieta,
i+1);
656 sprintf(title,
"corrsg_eta%i_phi%i_right", ieta,
i+1);
660 sprintf(title,
"corrsg_eta%i_phi%i_centrl", ieta,
i+1);
677 sprintf(title,
"Total projected muon in tower");
678 sprintf(name,
"total_evt");
680 sprintf(title,
"Efficiency with sig >%i #sigma",
i);
681 sprintf(name,
"Effi_with_gt%i_sig",
i);
686 sprintf(title,
"Mean Energy of all towers");
687 sprintf(name,
"mean_energy");
691 mncorrsglb = fs->
make<TH1F>(
"mncorrsglb",
"mncorrsglb", netamx*
nphimx+60, -0.5, netamx*nphimx+59.5);
692 rmscorrsglb = fs->
make<TH1F>(
"rmscorrsglb",
"rmscorrsglb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
693 nevcorrsglb = fs->
make<TH1F>(
"nevcorrsglb",
"nevcorrsglb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
695 mncorrsgrb = fs->
make<TH1F>(
"mncorrsgrb",
"mncorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
696 rmscorrsgrb = fs->
make<TH1F>(
"rmscorrsgrb",
"rmscorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
697 nevcorrsgrb = fs->
make<TH1F>(
"nevcorrsgrb",
"nevcorrsgrb", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
699 mncorrsglu = fs->
make<TH1F>(
"mncorrsglu",
"mncorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
700 rmscorrsglu = fs->
make<TH1F>(
"rmscorrsglu",
"rmscorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
701 nevcorrsglu = fs->
make<TH1F>(
"nevcorrsglu",
"nevcorrsglu", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
703 mncorrsgru = fs->
make<TH1F>(
"mncorrsgru",
"mncorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
704 rmscorrsgru = fs->
make<TH1F>(
"rmscorrsgru",
"rmscorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
705 nevcorrsgru = fs->
make<TH1F>(
"nevcorrsgru",
"nevcorrsgru", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
707 mncorrsgall = fs->
make<TH1F>(
"mncorrsgall",
"mncorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
708 rmscorrsgall = fs->
make<TH1F>(
"rmscorrsgall",
"rmscorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
709 nevcorrsgall = fs->
make<TH1F>(
"nevcorrsgall",
"nevcorrsgall", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
711 mncorrsgl = fs->
make<TH1F>(
"mncorrsgl",
"mncorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
712 rmscorrsgl = fs->
make<TH1F>(
"rmscorrsgl",
"rmscorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
713 nevcorrsgl = fs->
make<TH1F>(
"nevcorrsgl",
"nevcorrsgl", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
715 mncorrsgr = fs->
make<TH1F>(
"mncorrsgr",
"mncorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
716 rmscorrsgr = fs->
make<TH1F>(
"rmscorrsgr",
"rmscorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
717 nevcorrsgr = fs->
make<TH1F>(
"nevcorrsgr",
"nevcorrsgr", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
721 mncorrsgc = fs->
make<TH1F>(
"mncorrsgc",
"mncorrsgc", netamx*
nphimx+60, -0.5, netamx*nphimx+59.5);
722 rmscorrsgc = fs->
make<TH1F>(
"rmscorrsgc",
"rmscorrsgc", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
723 nevcorrsgc = fs->
make<TH1F>(
"nevcorrsgc",
"nevcorrsgc", netamx*nphimx+60, -0.5, netamx*nphimx+59.5);
729 for (
int i=0;
i<routmx+1;
i++) {
733 if (
j==2) {phmn = 2*
i-1; phmx=2*
i;}
734 if (phmn <=0) phmn =
nphimx+phmn;
735 if (phmx <=0) phmx =
nphimx+phmx;
738 sprintf(title,
"sig_ring%i_allrm",
j-2);
739 sprintf(name,
"sig_ring%i_allrm",
j-2);
741 sprintf(title,
"sig_ring%i_phi%i-%i",
j-2,phmn,phmx);
742 sprintf(name,
"sig_ring%i_rout%i",
j-2,
i+1);
746 sprintf(title,
"ped_ring%i_allrm",
j-2);
747 sprintf(name,
"ped_ring%i_allrm",
j-2);
749 sprintf(title,
"ped_ring%i_phi%i-%i",
j-2,phmn, phmx);
750 sprintf(name,
"ped_ring%i_rout%i",
j-2,
i+1);
757 sprintf(title,
"com_hotime_ring%i_sect%i",
j-2,
i+1);
760 sprintf(title,
"com_hopedtime_ring%i_sect%i",
j-2,
i+1);
764 sprintf(title,
"_com_hbtime_ring%i_serrct%i",
j-2,
i+1);
769 sprintf(title,
"com_corrsg_ring%i_sect%i_leftbottom",
j-2,
i+1);
772 sprintf(title,
"com_corrsg_ring%i_sect%i_rightbottom",
j-2,
i+1);
775 sprintf(title,
"com_corrsg_ring%i_sect%i_leftup",
j-2,
i+1);
778 sprintf(title,
"com_corrsg_ring%i_sect%i_rightup",
j-2,
i+1);
781 sprintf(title,
"com_corrsg_ring%i_sect%i_all",
j-2,
i+1);
784 sprintf(title,
"com_corrsg_ring%i_sect%i_left",
j-2,
i+1);
787 sprintf(title,
"com_corrsg_ring%i_sect%i_right",
j-2,
i+1);
792 sprintf(title,
"com_corrsg_ring%i_sect%i_centrl",
j-2,
i+1);
799 for (
int i=-1;
i<=1;
i++) {
800 for (
int j=-1;
j<=1;
j++) {
803 sprintf(title,
"hosct2p_eta%i_phi%i",
i,
j);
806 sprintf(title,
"hosct1p_eta%i_phi%i",
i,
j);
809 sprintf(title,
"hosct00_eta%i_phi%i",
i,
j);
812 sprintf(title,
"hosct1m_eta%i_phi%i",
i,
j);
815 sprintf(title,
"hosct2m_eta%i_phi%i",
i,
j);
819 sprintf(title,
"hbhesig_eta%i_phi%i",
i,
j);
826 ped_evt = fs->
make<TH1F>(
"ped_evt",
"ped_evt", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
827 ped_mean = fs->
make<TH1F>(
"ped_mean",
"ped_mean", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
828 ped_width = fs->
make<TH1F>(
"ped_width",
"ped_width", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
830 fit_chi = fs->
make<TH1F>(
"fit_chi",
"fit_chi", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
831 sig_evt = fs->
make<TH1F>(
"sig_evt",
"sig_evt", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
832 fit_sigevt = fs->
make<TH1F>(
"fit_sigevt",
"fit_sigevt", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
833 fit_bkgevt = fs->
make<TH1F>(
"fit_bkgevt",
"fit_bkgevt", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
834 sig_mean = fs->
make<TH1F>(
"sig_mean",
"sig_mean", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
835 sig_diff = fs->
make<TH1F>(
"sig_diff",
"sig_diff", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
836 sig_width = fs->
make<TH1F>(
"sig_width",
"sig_width", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
837 sig_sigma = fs->
make<TH1F>(
"sig_sigma",
"sig_sigma", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
840 sig_signf = fs->
make<TH1F>(
"sig_signf",
"sig_signf", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
844 ped_rms = fs->
make<TH1F>(
"ped_rms",
"ped_rms", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
845 sig_rms = fs->
make<TH1F>(
"sig_rms",
"sig_rms", netamx*
nphimx, -0.5, netamx*nphimx-0.5);
847 const_eta_phi = fs->
make<TH2F>(
"const_eta_phi",
"const_eta_phi", netamx+1, -(netamx+1)/2., (netamx+1)/2.,
nphimx, 0.5, nphimx+0.5);
849 for (
int ij=0; ij<
netamx; ij++) {
850 int ieta = (ij<15) ? ij+1 : 14-ij;
851 sprintf(title,
"Cont_Eta_%i", ieta);
854 sprintf(title,
"Peak_Eta_%i", ieta);
858 for (
int ij=0; ij<
ringmx; ij++) {
860 int iread = (ij==2) ? routmx :
rout12mx;
861 sprintf(title,
"Cont_hpdrm_%i", iring);
864 sprintf(title,
"Peak_hpdrm_%i", iring);
868 mean_phi_hst = fs->
make<TH1F>(
"mean_phi_hst",
"mean_phi_hst", netamx+1, -(netamx+1)/2., (netamx+1)/2.);
869 mean_phi_ave = fs->
make<TH1F>(
"mean_phi_ave",
"mean_phi_ave", netamx+1, -(netamx+1)/2., (netamx+1)/2.);
875 for (
int ij=0; ij<
netamx; ij++) {
876 int ieta = (ij<15) ? ij+1 : 14-ij;
878 sprintf(title,
"Stat_Eta_%i", ieta);
881 sprintf(title,
"#mu(stat)_Eta_%i", ieta);
891 for (
int i=0;
i<routmx+1;
i++) {
908 cout <<
" Selected events # is "<<
ipass<<endl;
933 int mypow_2_10 = 1024;
934 int mypow_2_11 = 2048;
935 int mypow_2_12 = 4096;
996 float pival = acos(-1.);
1003 bool isCosMu =
true;
1010 if (isCosMu && (*HOCalib).size() >0 ) {
1011 nmuon = (*HOCalib).size();
1012 if (
Nevents%5000==1)
cout <<
"nmuon event # "<<
Nevents<<
" Run # "<<iEvent.id().run()<<
" Evt # "<<iEvent.id().event()<<
" "<<
nmuon<<endl;
1014 for (HOCalibVariableCollection::const_iterator hoC=(*HOCalib).begin(); hoC!=(*HOCalib).end(); hoC++){
1015 itrg1 = (*hoC).trig1;
1016 itrg2 = (*hoC).trig2;
1018 trkdr = (*hoC).trkdr;
1019 trkdz = (*hoC).trkdz;
1021 trkvx = (*hoC).trkvx;
1022 trkvy = (*hoC).trkvy;
1023 trkvz = (*hoC).trkvz;
1025 trkmm = (*hoC).trkmm;
1026 trkth = (*hoC).trkth;
1027 trkph = (*hoC).trkph;
1029 ndof = (int)(*hoC).ndof;
1031 chisq = (*hoC).chisq;
1033 therr = (*hoC).therr;
1034 pherr = (*hoC).pherr;
1035 trkph = (*hoC).trkph;
1037 isect = (*hoC).isect;
1040 hoang = (*hoC).hoang;
1041 htime = (*hoC).htime;
1042 for (
int i=0;
i<9;
i++) {
hosig[
i] = (*hoC).hosig[
i];}
1043 for (
int i=0;
i<18;
i++) {
hocorsig[
i] = (*hoC).hocorsig[
i];}
1044 hocro = (*hoC).hocro;
1045 for (
int i=0;
i<3;
i++) {
caloen[
i] = (*hoC).caloen[
i];}
1066 if (
ndof >=15 &&
chisq <30) iselect3 = 1;
1068 if (
isect <0)
continue;
1069 if (fabs(
trkth-pival/2)<0.000001)
continue;
1071 int ieta = int((
abs(
isect)%10000)/100.)-30;
1072 if (
abs(ieta)>=16)
continue;
1075 int tmpsect = int((iphi + 1)/6.) + 1;
1076 if (tmpsect >12) tmpsect = 1;
1079 int tmpeta = ieta + 4;
1080 if (ieta >=-15 && ieta <=-11) {iring = -2; tmpeta =-11-ieta; }
1081 if (ieta >=-10 && ieta <=-5) {iring = -1; tmpeta =-5-ieta; }
1082 if (ieta >= 5 && ieta <= 10) {iring = 1; tmpeta =ieta-5; }
1083 if (ieta >= 11 && ieta <= 15) {iring = 2; tmpeta =ieta-11;}
1085 int iring2 = iring + 2;
1087 int tmprout = int((iphi + 1)/3.) + 1;
1090 tmprout = int((iphi + 1)/2.) + 1;
1091 if (tmprout >
routmx) tmprout = 1;
1093 if (tmprout >
rout12mx) tmprout = 1;
1100 if (
abs(
ndof) >=20 &&
abs(
ndof) <40) {ips0 = (int)mypow_2_0; ipsall += ips0;}
1101 if (
chisq >0 &&
chisq<15) {ips1 = (int)mypow_2_1; ipsall +=ips1;}
1102 if (fabs(
trkth-pival/2) <21.5) {ips2 = (int)mypow_2_2; ipsall +=ips2;}
1103 if (fabs(
trkph+pival/2) <21.5) {ips3 = (int)mypow_2_3; ipsall +=ips3;}
1105 if (
therr <0.02) {ips4 = (int)mypow_2_4; ipsall +=ips4;}
1106 if (
pherr <0.0002) {ips5 = (int)mypow_2_5; ipsall +=ips5;}
1107 if (fabs(
hoang) >0.30) {ips6 = (int)mypow_2_6; ipsall +=ips6;}
1108 if (fabs(
trkmm) >0.100) {ips7 = (int)mypow_2_7; ipsall +=ips7;}
1110 if (
nmuon >=1 &&
nmuon <=4) {ips8 = (int)mypow_2_8; ipsall +=ips8;}
1114 {ips10=(int)mypow_2_10;ipsall +=ips10;}
1117 {ips11=(int)mypow_2_11;ipsall +=ips11;}
1120 if (fabs(
hodx)<100 && fabs(
hodx)>2 )
1121 {ips10=(int)mypow_2_10;ipsall +=ips10;}
1123 if (fabs(
hody)<100 && fabs(
hody)>2)
1124 {ips11=(int)mypow_2_11;ipsall +=ips11;}
1126 if (
caloen[0] ==0) { ips12=(int)mypow_2_12;ipsall +=ips12;}
1129 if (
abs(
ndof) >=20 &&
abs(
ndof) <40) {ips0 = (int)mypow_2_0; ipsall += ips0;}
1130 if (
chisq >0 &&
chisq<15) {ips1 = (int)mypow_2_1; ipsall +=ips1;}
1131 if (fabs(
trkth-pival/2) <21.5) {ips2 = (int)mypow_2_2; ipsall +=ips2;}
1132 if (fabs(
trkph+pival/2) <21.5) {ips3 = (int)mypow_2_3; ipsall +=ips3;}
1134 if (
therr <0.02) {ips4 = (int)mypow_2_4; ipsall +=ips4;}
1135 if (
pherr <0.0002) {ips5 = (int)mypow_2_5; ipsall +=ips5;}
1136 if (fabs(
hoang) >0.30) {ips6 = (int)mypow_2_6; ipsall +=ips6;}
1137 if (fabs(
trkmm) >4.0) {ips7 = (int)mypow_2_7; ipsall +=ips7;}
1138 if (
nmuon >=1 &&
nmuon <=2) {ips8 = (int)mypow_2_8; ipsall +=ips8;}
1142 {ips10=(int)mypow_2_10;ipsall +=ips10;}
1145 {ips11=(int)mypow_2_11;ipsall +=ips11;}
1148 if (fabs(
hodx)<100 && fabs(
hodx)>2 )
1149 {ips10=(int)mypow_2_10;ipsall +=ips10;}
1151 if (fabs(
hody)<100 && fabs(
hody)>2)
1152 {ips11=(int)mypow_2_11;ipsall +=ips11;}
1155 if (
ndof >0 &&
caloen[0]<5.0) {ips12=(int)mypow_2_12;ipsall +=ips12;}
1160 if (
htime >2.5 &&
htime <6.5) {ips9=(int)mypow_2_9;ipsall +=ips9;}
1162 if (
htime >-40 &&
htime <60) {ips9=(int)mypow_2_9;ipsall +=ips9;}
1252 if (iselect3)
T1->Fill();
1254 int tmpphi = (iphi + 1)%3;
1261 tmpphi = (iphi+1)%2;
1262 if (tmpsect==2 || tmpsect==3 || tmpsect==6 || tmpsect==7 || tmpsect==10 || tmpsect==11) {
1263 npixel =
mapx0p[tmpeta][tmpphi];
1266 npixel =
mapx0m[tmpeta][tmpphi];
1271 if (tmpsect%2==1) iflip =1;
1272 if (
abs(iring)==1) {
1273 npixel =
mapx1[tmpeta][(iflip==0) ? tmpphi :
abs(tmpphi-2)];
1276 npixel =
mapx2[tmpeta][(iflip==0) ? tmpphi :
abs(tmpphi-2)];
1281 int tmpeta1 = (ieta>0) ? ieta -1 : -ieta +14;
1284 int tmpphi1 = iphi -1 ;
1287 if (
hosig[4]!=-100) {
1289 if (
caloen[2]<=0.0) iselect2=1;
1291 if (
caloen[2]<=3.0) iselect2=1;
1299 int tmpphi2 = iphi - 1;
1302 int tmpsect2 = int((tmpphi2 + 2)/6.) + 1;
1303 if (tmpsect2 >12) tmpsect2 = 1;
1305 int tmprout2 = int((tmpphi2 + 2)/3.) + 1;
1307 tmprout2 = int((tmpphi2 + 2)/2.) + 1;
1308 if (tmprout2 >
routmx) tmprout2 = 1;
1310 if (tmprout2 >
rout12mx) tmprout2 = 1;
1320 if (tmpphi2 >=0 && tmpphi2 <
nphimx) {
1330 for (
int ij=0; ij<
neffip; ij++) {
1332 sig_effi[ij]->Fill(ieta, iphi, 1.);
1335 sig_effi[ij]->Fill(ieta, iphi, 1.);
1350 if (tmpphi1 >=0 && tmpphi1 <
nphimx) {
1364 tmpeta =
etamap[itag][npixel];
1365 tmpphi =
phimap[itag][npixel];
1366 if (tmpeta>=0 && tmpphi >=0) {
1367 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1368 if (
int((
hocorsig[fact*tmpeta+tmpphi]-
hosig[4])*10000)/10000.!=0) {
1370 cout<<
"iring2xxx "<<
irun<<
" "<<
ievt<<
" "<<
isect<<
" "<<iring<<
" "<<tmpsect<<
" "<<ieta<<
" "<<iphi<<
" "<<npixel<<
" "<<tmpeta<<
" "<<tmpphi<<
" "<<tmpeta1<<
" "<<tmpphi1<<
" itag "<<itag<<
" "<<iflip<<
" "<<fact<<
" "<<
hocorsig[fact*tmpeta+tmpphi]<<
" "<<fact*tmpeta+tmpphi<<
" "<<
hosig[4]<<
" "<<
hodx<<
" "<<
hody<<endl;
1373 cout<<
" ix "<<iaxxx<<
" "<<ibxxx<<endl;
1384 float allcorsig = 0.0;
1387 tmpphi =
phimap[itag][npixleft[npixel]];
1389 if (tmpeta>=0 && tmpphi >=0) {
1390 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1392 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1399 tmpphi =
phimap[itag][npixrigh[npixel]];
1400 if (tmpeta>=0 && tmpphi >=0) {
1401 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1403 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1410 tmpphi =
phimap[itag][npixlebt[npixel]];
1411 if (tmpeta>=0 && tmpphi >=0) {
1412 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1414 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1421 tmpphi =
phimap[itag][npixribt[npixel]];
1422 if (tmpeta>=0 && tmpphi >=0) {
1423 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1425 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1432 tmpphi =
phimap[itag][npixleup[npixel]];
1433 if (tmpeta>=0 && tmpphi >=0) {
1434 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1436 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1443 tmpphi =
phimap[itag][npixriup[npixel]];
1444 if (tmpeta>=0 && tmpphi >=0) {
1445 if (iflip !=0) tmpphi =
abs(tmpphi-2);
1447 allcorsig +=
hocorsig[fact*tmpeta+tmpphi];
1452 corrsgall[tmpeta1][tmpphi1]->Fill(allcorsig);
1459 for (
int k=0;
k<9;
k++) {
1478 #ifdef THIS_IS_AN_EVENT_EXAMPLE
1480 iEvent.getByLabel(
"example",pIn);
1483 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
1485 iSetup.
get<SetupRecord>().
get(pSetup);
1609 for (
int ij=0; ij<
netamx; ij++) {
1610 for (
int jk = 0; jk <
nphimx; jk++) {
1611 int ieta = (ij<15) ? ij+1 : 14-ij;
1613 double signal =
sigrsg[ij][jk]->GetMean();
1621 gStyle->SetOptLogy(0);
1622 gStyle->SetTitleFillColor(10);
1623 gStyle->SetStatColor(10);
1625 gStyle->SetCanvasColor(10);
1626 gStyle->SetOptStat(0);
1627 gStyle->SetOptTitle(1);
1629 gStyle->SetTitleColor(10);
1630 gStyle->SetTitleFontSize(0.09);
1631 gStyle->SetTitleOffset(-0.05);
1632 gStyle->SetTitleBorderSize(1);
1634 gStyle->SetPadColor(10);
1635 gStyle->SetPadBorderMode(0);
1636 gStyle->SetStatColor(10);
1637 gStyle->SetPadBorderMode(0);
1638 gStyle->SetStatBorderSize(1);
1639 gStyle->SetStatFontSize(.07);
1641 gStyle->SetStatStyle(1001);
1642 gStyle->SetOptFit(101);
1643 gStyle->SetCanvasColor(10);
1644 gStyle->SetCanvasBorderMode(0);
1646 gStyle->SetStatX(.99);
1647 gStyle->SetStatY(.99);
1648 gStyle->SetStatW(.45);
1649 gStyle->SetStatH(.16);
1650 gStyle->SetLabelSize(0.075,
"XY");
1651 gStyle->SetLabelOffset(0.21,
"XYZ");
1652 gStyle->SetTitleSize(0.065,
"XY");
1653 gStyle->SetTitleOffset(0.06,
"XYZ");
1654 gStyle->SetPadTopMargin(.09);
1655 gStyle->SetPadBottomMargin(0.11);
1656 gStyle->SetPadLeftMargin(0.12);
1657 gStyle->SetPadRightMargin(0.15);
1658 gStyle->SetPadGridX(3);
1659 gStyle->SetPadGridY(3);
1660 gStyle->SetGridStyle(2);
1661 gStyle->SetNdivisions(303,
"XY");
1663 gStyle->SetMarkerSize(0.60);
1664 gStyle->SetMarkerColor(2);
1665 gStyle->SetMarkerStyle(20);
1666 gStyle->SetTitleFontSize(0.07);
1672 TCanvas *c2 =
new TCanvas(
"c2",
"Statistics and efficiency", xsiz, ysiz);
1674 for (
int ij=0; ij<
neffip; ij=ij+3) {
1675 sig_effi[ij]->GetXaxis()->SetTitle(
"#eta");
1676 sig_effi[ij]->GetXaxis()->SetTitleSize(0.075);
1677 sig_effi[ij]->GetXaxis()->SetTitleOffset(0.65);
1678 sig_effi[ij]->GetXaxis()->CenterTitle();
1679 sig_effi[ij]->GetXaxis()->SetLabelSize(0.055);
1680 sig_effi[ij]->GetXaxis()->SetLabelOffset(0.001);
1682 sig_effi[ij]->GetYaxis()->SetTitle(
"#phi");
1683 sig_effi[ij]->GetYaxis()->SetTitleSize(0.075);
1684 sig_effi[ij]->GetYaxis()->SetTitleOffset(0.9);
1685 sig_effi[ij]->GetYaxis()->CenterTitle();
1686 sig_effi[ij]->GetYaxis()->SetLabelSize(0.055);
1687 sig_effi[ij]->GetYaxis()->SetLabelOffset(0.01);
1689 c2->cd(
int(ij/3.)+1);
sig_effi[ij]->Draw(
"colz");
1691 sprintf(out_file,
"comb_hosig_evt_%i.jpg",irunold);
1692 c2->SaveAs(out_file);
1694 gStyle->SetTitleFontSize(0.045);
1695 gStyle->SetPadRightMargin(0.1);
1696 gStyle->SetPadLeftMargin(0.1);
1697 gStyle->SetPadBottomMargin(0.12);
1699 TCanvas *
c1 =
new TCanvas(
"c1",
"Mean signal in each tower", xsiz, ysiz);
1716 sprintf(out_file,
"homean_energy_%i.jpg",irunold);
1717 c1->SaveAs(out_file);
1722 gStyle->SetPadBottomMargin(0.14);
1723 gStyle->SetPadLeftMargin(0.17);
1724 gStyle->SetPadRightMargin(0.03);
1726 gStyle->SetOptStat(1110);
1728 const int nsample =8;
1729 TF1* gx0[nsample]={0};
1730 TF1* ped0fun[nsample]={0};
1731 TF1* signal[nsample]={0};
1732 TF1* pedfun[nsample]={0};
1733 TF1* sigfun[nsample]={0};
1734 TF1* signalx[nsample]={0};
1736 TH1F* signall[nsample]={0};
1737 TH1F* pedstll[nsample]={0};
1741 gStyle->SetOptFit(101);
1742 gStyle->SetCanvasBorderMode(0);
1743 gStyle->SetPadBorderMode(0);
1744 gStyle->SetStatBorderSize(1);
1745 gStyle->SetStatStyle(1001);
1746 gStyle->SetTitleColor(10);
1747 gStyle->SetTitleFontSize(0.09);
1748 gStyle->SetTitleOffset(-0.05);
1749 gStyle->SetTitleBorderSize(1);
1751 gStyle->SetCanvasColor(10);
1752 gStyle->SetPadColor(10);
1753 gStyle->SetStatColor(10);
1754 gStyle->SetStatFontSize(.07);
1755 gStyle->SetStatX(0.99);
1756 gStyle->SetStatY(0.99);
1757 gStyle->SetStatW(0.30);
1758 gStyle->SetStatH(0.10);
1759 gStyle->SetTitleSize(0.065,
"XYZ");
1760 gStyle->SetLabelSize(0.075,
"XYZ");
1761 gStyle->SetLabelOffset(0.012,
"XYZ");
1762 gStyle->SetPadGridX(1);
1763 gStyle->SetPadGridY(1);
1764 gStyle->SetGridStyle(3);
1765 gStyle->SetNdivisions(101,
"XY");
1766 gStyle->SetOptLogy(0);
1778 TCanvas *c0 =
new TCanvas(
"c0",
" Pedestal vs signal", xsiz, ysiz);
1785 for (
int ij=0; ij<
nphimx; ij++) {mean_phi[ij] = rms_phi[ij] =0;}
1786 for (
int ij=0; ij<
netamx; ij++) {mean_eta[ij] = rms_eta[ij] =0;}
1798 for (
int iijj = 0; iijj <4; iijj++) {
1801 mxeta =
ringmx; mxphi = 1; mneta = 0; mnphi = 0;
1802 }
else if (iijj==1) {
1804 mneta = 0; mnphi = 0;
1805 }
else if (iijj==2) {
1806 mxeta =
netamx; mxphi = 1; mneta = 0; mnphi = 0;
1807 }
else if (iijj==3) {
1809 mneta = 0; mnphi = 0;
1812 for (
int jk=mneta; jk<mxeta; jk++) {
1813 for (
int ij=mnphi; ij<mxphi; ij++) {
1814 if (iijj==1)
continue;
1815 if ((iijj==0 || iijj==1) && jk !=2 && ij >=
rout12mx)
continue;
1816 int izone = iiter%nsample;
1820 signall[izone] = (TH1F*)
com_sigrsg[jk][iread]->Clone(
"hnew");
1821 pedstll[izone] = (TH1F*)
com_crossg[jk][iread]->Clone(
"hnew");
1822 }
else if (iijj==1) {
1823 signall[izone] = (TH1F*)
com_sigrsg[jk][ij]->Clone(
"hnew");
1824 pedstll[izone] = (TH1F*)
com_crossg[jk][ij]->Clone(
"hnew");
1825 }
else if (iijj==2) {
1826 signall[izone] = (TH1F*)
sigrsg[jk][nphimx]->Clone(
"hnew");
1827 pedstll[izone] = (TH1F*)
crossg[jk][nphimx]->Clone(
"hnew");
1828 }
else if (iijj==3) {
1829 signall[izone] = (TH1F*)
sigrsg[jk][ij]->Clone(
"hnew");
1830 pedstll[izone] = (TH1F*)
crossg[jk][ij]->Clone(
"hnew");
1833 pedstll[izone]->SetLineWidth(2);
1834 signall[izone]->SetLineWidth(2);
1835 pedstll[izone]->SetLineColor(2);
1836 signall[izone]->SetLineColor(4);
1837 pedstll[izone]->SetNdivisions(506,
"XY");
1838 signall[izone]->SetNdivisions(506,
"XY");
1840 signall[izone]->GetXaxis()->SetLabelSize(.065);
1841 signall[izone]->GetYaxis()->SetLabelSize(.06);
1843 signall[izone]->GetXaxis()->SetTitle(
"Signal (fC)");
1845 signall[izone]->GetXaxis()->SetTitle(
"Signal (GeV)");
1847 signall[izone]->GetXaxis()->SetTitleSize(.065);
1848 signall[izone]->GetXaxis()->CenterTitle();
1885 float mean = pedstll[izone]->GetMean();
1886 float rms = pedstll[izone]->GetRMS();
1888 if (rms <0.6) rms = 0.6;
1889 if (rms >1.2) rms = 1.2;
1890 if (mean >1.2) mean = 1.2;
1891 if (mean <-1.2) mean = -1.2;
1893 if (rms <0.10) rms = 0.10;
1894 if (rms >0.15) rms=0.15;
1895 if (mean >0.20) mean = 0.20;
1896 if (mean <-0.20) mean = -0.20;
1898 float xmn = mean-6.*
rms;
1899 float xmx = mean+6.*
rms;
1901 binwid = pedstll[izone]->GetBinWidth(1);
1902 if (xmx > pedstll[izone]->GetXaxis()->GetXmax()) xmx = pedstll[izone]->GetXaxis()->GetXmax()-0.5*
binwid;
1903 if (xmn < pedstll[izone]->GetXaxis()->GetXmin()) xmn = pedstll[izone]->GetXaxis()->GetXmin()+0.5*
binwid;
1905 float height = pedstll[izone]->GetEntries();
1907 double par[
nbgpr] ={height,
mean, 0.75*rms};
1909 double gaupr[
nbgpr];
1910 double parer[
nbgpr];
1914 pedstll[izone]->GetXaxis()->SetLabelSize(.065);
1915 pedstll[izone]->GetYaxis()->SetLabelSize(.06);
1920 pedstll[izone]->GetXaxis()->SetRangeUser(xmn, xmx);
1925 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal/Signal (fC)");
1927 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal (fC)");
1931 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal/Signal (GeV)");
1933 pedstll[izone]->GetXaxis()->SetTitle(
"Pedestal (GeV)");
1936 pedstll[izone]->GetXaxis()->SetTitleSize(.065);
1937 pedstll[izone]->GetXaxis()->CenterTitle();
1940 pedstll[izone]->Draw();
1949 parer[0] = parer[1] = parer[2] = 0;
1952 if (pedstll[izone]->GetEntries() >5) {
1956 sprintf(temp,
"gx0_%i",izone);
1957 gx0[izone] =
new TF1(temp,
gausX, xmn, xmx,
nbgpr);
1958 gx0[izone]->SetParameters(par);
1959 gx0[izone]->SetLineWidth(1);
1960 pedstll[izone]->Fit(gx0[izone],
"R+");
1963 parer[
k] = gx0[izone]->GetParError(
k);
1964 gaupr[
k] = gx0[izone]->GetParameter(
k);
1967 double strt[
nbgpr] = {height,
mean, 0.75*rms};
1968 double step[
nbgpr] = {1.0, 0.001, 0.001};
1969 double alowmn[
nbgpr] = {0.5*height, mean-
rms, 0.3*rms};
1970 double ahighmn[
nbgpr] ={1.5*height, mean+
rms, 1.5*rms};
1973 gMinuit->SetFCN(
fcnbg);
1978 gMinuit->mnexcm(
"SET ERR", arglist, 1, ierflg);
1981 sprintf(name,
"pedpar%i",
k);
1982 gMinuit->mnparm(
k, name, strt[
k], step[k], alowmn[k], ahighmn[k],ierflg);
1986 gMinuit->mnexcm(
"SIMPLEX", arglist, 0, ierflg);
1989 gMinuit->mnexcm(
"IMPROVE", arglist, 0, ierflg);
1992 double parv,err,xlo,xup, plerr, mierr, eparab, gcc;
1997 gMinuit->mnpout(
k, chnam, parv, err, xlo, xup, iuit);
1998 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2013 sprintf(temp,
"ped0fun_%i",izone);
2014 ped0fun[izone] =
new TF1(temp,
gausX, xmn, xmx, nbgpr);
2015 ped0fun[izone]->SetParameters(gaupr);
2016 ped0fun[izone]->SetLineColor(3);
2017 ped0fun[izone]->SetLineWidth(1);
2018 ped0fun[izone]->Draw(
"same");
2023 for (
int k=0;
k<
nbgpr;
k++) {gaupr[
k] = par[
k]; }
2024 if (
m_digiInput) { gaupr[2] = 0.90; }
else { gaupr[2] = 0.15;}
2029 if (signall[izone]->GetEntries() >5) {
2030 Double_t parall[
nsgpr];
2031 double parserr[
nsgpr];
2032 double fitres[
nsgpr];
2036 sprintf(temp,
"signal_%i",izone);
2037 xmn = signall[izone]->GetXaxis()->GetXmin();
2038 xmx = 0.5*signall[izone]->GetXaxis()->GetXmax();
2042 pedht = (signall[izone]->GetBinContent(
nbn-1)+
2043 signall[izone]->GetBinContent(
nbn)+
2044 signall[izone]->GetBinContent(
nbn+1))/3.;
2048 if (
m_digiInput) { parall[2] = 0.90; }
else { parall[2] = 0.15;}
2050 for (
int i=0;
i<
nbgpr;
i++) {parall[
i] = gaupr[
i];}
2056 parall[0] = 0.9*pedht;
2058 double area =
binwid*signall[izone]->GetEntries();
2062 parall[4] =
fitprm[4][jk];
2063 parall[6] =
fitprm[6][jk];
2065 parall[4] = signall[izone]->GetMean();
2066 parall[6]=parall[2];
2069 signal[izone]->SetParameters(parall);
2070 signal[izone]->FixParameter(1, parall[1]);
2071 signal[izone]->FixParameter(2, parall[2]);
2072 signal[izone]->SetParLimits(0, 0.00, 2.0*pedht+0.1);
2073 signal[izone]->FixParameter(3, 0.14);
2075 signal[izone]->SetParLimits(5, 0.40*area, 1.15*area);
2078 signal[izone]->SetParLimits(4, 0.2*
fitprm[4][jk], 2.0*
fitprm[4][jk]);
2079 signal[izone]->SetParLimits(6, 0.2*
fitprm[6][jk], 2.0*
fitprm[6][jk]);
2082 signal[izone]->SetParLimits(4, 0.6, 6.0);
2083 signal[izone]->SetParLimits(6, 0.60, 3.0);
2085 signal[izone]->SetParLimits(4, 0.1, 1.0);
2086 signal[izone]->SetParLimits(6, 0.035, 0.3);
2089 signal[izone]->SetParNames(
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma");
2090 signall[izone]->Fit(signal[izone],
"0R+");
2092 signall[izone]->GetXaxis()->SetRangeUser(xmn,xmx);
2094 fitres[
k] =
fitprm[
k][jk] = signal[izone]->GetParameter(
k);
2095 parserr[
k] = signal[izone]->GetParError(
k);
2107 TString
name[
nsgpr] = {
"const",
"mean",
"sigma",
"Width",
"MP",
"Area",
"GSigma"};
2108 double strt[
nsgpr] = {0.9*pedhtx, gaupr[1], gaupr[2],
fitprm[3][jk], fitprm[4][jk], signall[izone]->GetEntries(), fitprm[6][jk]};
2109 double alowmn[
nsgpr] = {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]};
2110 double ahighmn[
nsgpr] ={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]};
2111 double step[
nsgpr] = {1.0, 0.0, 0.0, 0.0, 0.001, 1.0, 0.002};
2114 gMinuit->SetFCN(
fcnsg);
2119 gMinuit->mnexcm(
"SET ERR", arglist, 1, ierflg);
2122 gMinuit->mnparm(
k, name[
k], strt[k], step[k], alowmn[k], ahighmn[k],ierflg);
2126 gMinuit->mnexcm(
"SIMPLEX", arglist, 0, ierflg);
2129 gMinuit->mnexcm(
"IMPROVE", arglist, 0, ierflg);
2132 double parv,err,xlo,xup, plerr, mierr, eparab, gcc;
2137 gMinuit->mnpout(
k, chnam, parv, err, xlo, xup, iuit);
2138 gMinuit->mnerrs(
k, plerr, mierr, eparab, gcc);
2156 signall[izone]->Draw();
2159 sprintf(temp,
"pedfun_%i",izone);
2160 pedfun[izone] =
new TF1(temp,
gausX, xmn, xmx,
nbgpr);
2161 pedfun[izone]->SetParameters(fitres);
2162 pedfun[izone]->SetLineColor(3);
2163 pedfun[izone]->SetLineWidth(1);
2164 pedfun[izone]->Draw(
"same");
2166 sprintf(temp,
"signalfun_%i",izone);
2168 sigfun[izone]->SetParameters(&fitres[3]);
2169 sigfun[izone]->SetLineWidth(1);
2170 sigfun[izone]->SetLineColor(4);
2171 sigfun[izone]->Draw(
"same");
2173 sprintf(temp,
"total_%i",izone);
2175 signalx[izone]->SetParameters(fitres);
2176 signalx[izone]->SetLineWidth(1);
2177 signalx[izone]->Draw(
"same");
2179 int kl = (jk<15) ? jk+1 : 14-jk;
2181 cout<<
"histinfo"<<iijj<<
" fit "
2182 <<std::setw(3)<< kl<<
" "
2183 <<std::setw(3)<< ij+1<<
" "
2184 <<std::setw(5)<<pedstll[izone]->GetEntries()<<
" "
2185 <<std::setw(6)<<pedstll[izone]->GetMean()<<
" "
2186 <<std::setw(6)<<pedstll[izone]->GetRMS()<<
" "
2187 <<std::setw(5)<<signall[izone]->GetEntries()<<
" "
2188 <<std::setw(6)<<signall[izone]->GetMean()<<
" "
2189 <<std::setw(6)<<signall[izone]->GetRMS()<<
" "
2190 <<std::setw(6)<< signal[izone]->GetChisquare()<<
" "
2191 <<std::setw(3)<< signal[izone]->GetNDF()<<endl;
2193 file_out<<
"histinfo"<<iijj<<
" fit "
2194 <<std::setw(3)<< kl<<
" "
2195 <<std::setw(3)<< ij+1<<
" "
2196 <<std::setw(5)<<pedstll[izone]->GetEntries()<<
" "
2197 <<std::setw(6)<<pedstll[izone]->GetMean()<<
" "
2198 <<std::setw(6)<<pedstll[izone]->GetRMS()<<
" "
2199 <<std::setw(5)<<signall[izone]->GetEntries()<<
" "
2200 <<std::setw(6)<<signall[izone]->GetMean()<<
" "
2201 <<std::setw(6)<<signall[izone]->GetRMS()<<
" "
2202 <<std::setw(6)<< signal[izone]->GetChisquare()<<
" "
2203 <<std::setw(3)<< signal[izone]->GetNDF()<<endl;
2205 file_out <<
"fitres x"<<iijj<<
" "<<kl<<
" "<<ij+1<<
" "<< fitres[0]<<
" "<< fitres[1]<<
" "<< fitres[2]<<
" "<< fitres[3]<<
" "<< fitres[4]<<
" "<< fitres[5]<<
" "<< fitres[6]<<endl;
2206 file_out <<
"parserr"<<iijj<<
" "<<kl<<
" "<<ij+1<<
" "<< parserr[0]<<
" "<< parserr[1]<<
" "<< parserr[2]<<
" "<< parserr[3]<<
" "<< parserr[4]<<
" "<< parserr[5]<<
" "<< parserr[6]<<endl;
2208 double diff=fitres[4]-fitres[1];
2209 if (diff <=0) diff = 0.000001;
2210 double error=parserr[4]*parserr[4]+parer[2]*parer[2];
2211 error =
pow(error,0.5);
2213 int ieta = (jk<15) ? (15+jk) : (29-jk);
2214 int ifl = nphimx*ieta + ij;
2217 ped_evt->Fill(ifl,pedstll[izone]->GetEntries());
2220 fit_chi->Fill(ifl,signal[izone]->GetChisquare());
2221 sig_evt->Fill(ifl, signall[izone]->GetEntries());
2225 sig_diff->Fill(ifl, fitres[4]-fitres[1]);
2229 if (fitres[4]-fitres[1] !=0)
sig_meanerrp->Fill(ifl, 100*parserr[4]/(fitres[4]-fitres[1]));
2230 if (gaupr[2]!=0)
sig_signf->Fill(ifl,(fitres[4]-fitres[1])/gaupr[2]);
2234 ped_rms->Fill(ifl,pedstll[izone]->GetRMS());
2235 sig_rms->Fill(ifl,signall[izone]->GetRMS());
2238 if ((iijj==2) || (iijj==3) || (iijj==1)) {
2239 if (signall[izone]->GetEntries() >5 && fitres[4]>0.1) {
2242 if (
abs(kl)<=4) fact=0.895;
2247 if (iijj==3) fact2 =
invang[jk][ij];
2250 float calibc = fact*fact2/(fitres[4]*signall[izone]->GetEntries());
2251 float caliberr= TMath::Abs(calibc*parserr[4]/
max(0.001,fitres[4]));
2254 int ieta = (jk<15) ? jk+1 : 14-jk;
2257 file_out<<
"intieta "<<jk<<
" "<<ij<<
" "<<ieta<<
" "<<
mean_phi_hst->FindBin(
double(ieta))<<
" "<<calibc<<
" "<<caliberr<<endl;
2258 }
else if (iijj==3) {
2262 peak_eta[jk]->Fill(ij+1,fitres[4]);
2265 int ieta = (jk<15) ? jk+1 : 14-jk;
2267 file_out<<
"intietax "<<jk<<
" "<<ij<<
" "<<ieta<<
" "<<
const_eta_phi->FindBin(ieta, ij+1)<<endl;
2271 mean_eta[ij] +=calibc/(caliberr*caliberr);
2272 mean_phi[jk] +=calibc/(caliberr*caliberr);
2274 rms_eta[ij] +=1./(caliberr*caliberr);
2275 rms_phi[jk] +=1./(caliberr*caliberr);
2280 }
else if (iijj==1) {
2288 file_out<<
"HO 4 "<<iijj<<
" "<< std::setw(3)<<kl<<
" "<<std::setw(3)<<ij+1<<
" "
2289 <<std::setw(7)<<calibc<<
" "<<std::setw(7)<<caliberr<<endl;
2294 signall[izone]->Draw();
2296 int kl = (jk<15) ? jk+1 : 14-jk;
2297 file_out<<
"histinfo"<<iijj<<
" nof "
2298 <<std::setw(3)<< kl<<
" "
2299 <<std::setw(3)<< ij+1<<
" "
2300 <<std::setw(5)<<pedstll[izone]->GetEntries()<<
" "
2301 <<std::setw(6)<<pedstll[izone]->GetMean()<<
" "
2302 <<std::setw(6)<<pedstll[izone]->GetRMS()<<
" "
2303 <<std::setw(5)<<signall[izone]->GetEntries()<<
" "
2304 <<std::setw(6)<<signall[izone]->GetMean()<<
" "
2305 <<std::setw(6)<<signall[izone]->GetRMS()<<
" "
2306 <<std::setw(6)<< varx<<
" "
2307 <<std::setw(3)<< varx<<endl;
2309 file_out <<
"fitres x"<<iijj<<
" "<<kl<<
" "<<ij+1<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<endl;
2310 file_out <<
"parserr"<<iijj<<
" "<<kl<<
" "<<ij+1<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<
" "<< varx<<endl;
2314 if (iiter%nsample==0) {
2317 for (
int kl=0; kl<nsample; kl++) {
2318 if (gx0[kl]) {
delete gx0[kl];gx0[kl] = 0;}
2319 if (ped0fun[kl]) {
delete ped0fun[kl];ped0fun[kl] = 0;}
2320 if (signal[kl]) {
delete signal[kl];signal[kl] = 0;}
2321 if (pedfun[kl]) {
delete pedfun[kl];pedfun[kl] = 0;}
2322 if (sigfun[kl]) {
delete sigfun[kl];sigfun[kl] = 0;}
2323 if (signalx[kl]) {
delete signalx[kl];signalx[kl] = 0;}
2324 if (signall[kl]) {
delete signall[kl];signall[kl] = 0;}
2325 if (pedstll[kl]) {
delete pedstll[kl];pedstll[kl] = 0;}
2342 if (iiter%nsample!=0) {
2344 for (
int kl=0; kl<nsample; kl++) {
2345 if (gx0[kl]) {
delete gx0[kl];gx0[kl] = 0;}
2346 if (ped0fun[kl]) {
delete ped0fun[kl];ped0fun[kl] = 0;}
2347 if (signal[kl]) {
delete signal[kl];signal[kl] = 0;}
2348 if (pedfun[kl]) {
delete pedfun[kl];pedfun[kl] = 0;}
2349 if (sigfun[kl]) {
delete sigfun[kl];sigfun[kl] = 0;}
2350 if (signalx[kl]) {
delete signalx[kl];signalx[kl] = 0;}
2351 if (signall[kl]) {
delete signall[kl];signall[kl] = 0;}
2352 if (pedstll[kl]) {
delete pedstll[kl];pedstll[kl] = 0;}
2361 gStyle->SetTitleFontSize(0.05);
2362 gStyle->SetTitleSize(0.025,
"XYZ");
2363 gStyle->SetLabelSize(0.025,
"XYZ");
2364 gStyle->SetStatFontSize(.045);
2366 gStyle->SetOptStat(0);
2367 ps.NewPage(); TCanvas *c1 =
new TCanvas(
"c1",
" Pedestal vs signal", xsiz, ysiz);
2368 ped_evt->Draw(); c1->Update();
2374 ped_rms->Draw(); c1->Update();
2383 sig_evt->Draw(); c1->Update();
2389 sig_rms->Draw(); c1->Update();
2392 fit_chi->Draw(); c1->Update();
2427 gStyle->SetTitleFontSize(0.09);
2428 gStyle->SetPadBottomMargin(0.17);
2429 gStyle->SetPadLeftMargin(0.18);
2430 gStyle->SetPadRightMargin(0.01);
2431 gStyle->SetOptLogy(0);
2432 gStyle->SetOptStat(0);
2434 TCanvas *c2 =
new TCanvas(
"c2",
"runfile", xsiz, ysiz);
2437 for (
int side=0; side <2; side++) {
2438 gStyle->SetNdivisions(303,
"XY");
2439 gStyle->SetPadRightMargin(0.01);
2449 for (
int ij=nmn; ij<nmx; ij++) {
2452 const_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2453 const_eta[ij]->GetXaxis()->SetTitleSize(.08);
2454 const_eta[ij]->GetXaxis()->CenterTitle();
2455 const_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2456 const_eta[ij]->GetXaxis()->SetLabelSize(.085);
2457 const_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2459 const_eta[ij]->GetYaxis()->SetLabelSize(.08);
2460 const_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2462 const_eta[ij]->GetYaxis()->SetTitle(
"GeV/fC");
2464 const_eta[ij]->GetYaxis()->SetTitle(
"GeV/MIP-GeV!!");
2467 const_eta[ij]->GetYaxis()->SetTitleSize(.085);
2468 const_eta[ij]->GetYaxis()->CenterTitle();
2469 const_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2479 sprintf(out_file,
"calibho_%i_side%i.eps", irunold, side);
2480 c2->SaveAs(out_file);
2482 sprintf(out_file,
"calibho_%i_side%i.jpg", irunold, side);
2483 c2->SaveAs(out_file);
2486 for (
int ij=nmn; ij<nmx; ij++) {
2488 peak_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2489 peak_eta[ij]->GetXaxis()->SetTitleSize(.08);
2490 peak_eta[ij]->GetXaxis()->CenterTitle();
2491 peak_eta[ij]->GetXaxis()->SetTitleOffset(0.90);
2492 peak_eta[ij]->GetXaxis()->SetLabelSize(.08);
2493 peak_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2495 peak_eta[ij]->GetYaxis()->SetLabelSize(.08);
2496 peak_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2498 peak_eta[ij]->GetYaxis()->SetTitle(
"fC");
2500 peak_eta[ij]->GetYaxis()->SetTitle(
"GeV");
2503 peak_eta[ij]->GetYaxis()->SetTitleSize(.085);
2504 peak_eta[ij]->GetYaxis()->CenterTitle();
2505 peak_eta[ij]->GetYaxis()->SetTitleOffset(1.3);
2515 sprintf(out_file,
"peakho_%i_side%i.eps", irunold, side);
2516 c2->SaveAs(out_file);
2518 sprintf(out_file,
"peakho_%i_side%i.jpg", irunold, side);
2519 c2->SaveAs(out_file);
2524 gStyle->SetTitleFontSize(0.045);
2525 gStyle->SetPadRightMargin(0.13);
2526 gStyle->SetPadBottomMargin(0.15);
2527 gStyle->SetPadLeftMargin(0.1);
2528 gStyle->SetOptStat(0);
2531 TCanvas *c1 =
new TCanvas(
"c1",
"Fitted const in each tower", xsiz, ysiz);
2547 sprintf(out_file,
"high_hoconst_eta_phi_%i.jpg",irunold);
2548 c1->SaveAs(out_file);
2552 for (
int jk=0; jk<
netamx; jk++) {
2553 int ieta = (jk<15) ? jk+1 : 14-jk;
2554 if (rms_phi[jk]>0) {
2560 for (
int ij=0; ij<
nphimx; ij++) {
2561 if (rms_eta[ij] >0) {
2568 gStyle->SetPadLeftMargin(0.13);
2569 gStyle->SetPadRightMargin(0.03);
2572 TCanvas *c2y =
new TCanvas(
"c2",
"Avearge signal in eta and phi", xsiz, ysiz);
2581 mean_eta_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2600 mean_phi_ave->GetYaxis()->SetTitle(
"Signal (GeV)/MIP");
2612 sprintf(out_file,
"high_hoaverage_eta_phi_%i.jpg",irunold);
2613 c2y->SaveAs(out_file);
2620 TCanvas *c3 =
new TCanvas(
"c3",
"Avearge signal in eta and phi", xsiz, ysiz);
2641 sprintf(out_file,
"low_mean_phi_hst_%i.jpg",irunold);
2642 c3->SaveAs(out_file);
2649 gStyle->SetOptLogy(1);
2650 gStyle->SetPadTopMargin(.1);
2651 gStyle->SetPadLeftMargin(.15);
2654 TCanvas *c0x =
new TCanvas(
"c0x",
"Signal in each ring", xsiz, ysiz);
2657 for (
int ij=0; ij<
ringmx; ij++) {
2660 com_sigrsg[ij][iread]->GetXaxis()->SetTitle(
"Signal/ped (fC)");
2662 com_sigrsg[ij][iread]->GetXaxis()->SetTitle(
"Signal/ped (GeV)");
2664 com_sigrsg[ij][iread]->GetXaxis()->SetTitleSize(0.060);
2665 com_sigrsg[ij][iread]->GetXaxis()->SetTitleOffset(1.05);
2666 com_sigrsg[ij][iread]->GetXaxis()->CenterTitle();
2667 com_sigrsg[ij][iread]->GetXaxis()->SetLabelSize(0.065);
2668 com_sigrsg[ij][iread]->GetXaxis()->SetLabelOffset(0.01);
2670 com_sigrsg[ij][iread]->GetYaxis()->SetLabelSize(0.065);
2671 com_sigrsg[ij][iread]->GetYaxis()->SetLabelOffset(0.01);
2677 c0x->cd(ij+1);
com_sigrsg[ij][iread]->Draw();
2683 sprintf(out_file,
"hosig_ring_%i.jpg",irunold);
2684 c0x->SaveAs(out_file);
2687 gStyle->SetTitleFontSize(0.06);
2688 gStyle->SetOptStat(0);
2689 gStyle->SetOptLogy(0);
2691 TCanvas *c0 =
new TCanvas(
"c0",
"Signal in each ring", xsiz, ysiz);
2694 for (
int jk=0; jk<
ringmx; jk++) {
2695 peak_hpdrm[jk]->GetXaxis()->SetTitle(
"RM #");
2696 peak_hpdrm[jk]->GetXaxis()->SetTitleSize(0.070);
2697 peak_hpdrm[jk]->GetXaxis()->SetTitleOffset(1.0);
2699 peak_hpdrm[jk]->GetXaxis()->SetLabelSize(0.065);
2700 peak_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2702 peak_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)/MIP");
2704 peak_hpdrm[jk]->GetYaxis()->SetTitleSize(0.07);
2705 peak_hpdrm[jk]->GetYaxis()->SetTitleOffset(1.3);
2707 peak_hpdrm[jk]->GetYaxis()->SetLabelSize(0.065);
2708 peak_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2718 sprintf(out_file,
"comb_peak_hpdrm_%i.jpg",irunold);
2719 c0->SaveAs(out_file);
2723 TCanvas *c1y =
new TCanvas(
"c1y",
"Signal in each ring", xsiz, ysiz);
2726 for (
int jk=0; jk<
ringmx; jk++) {
2732 const_hpdrm[jk]->GetXaxis()->SetLabelOffset(0.01);
2735 const_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(fC)");
2737 const_hpdrm[jk]->GetYaxis()->SetTitle(
"Peak(GeV)");
2743 const_hpdrm[jk]->GetYaxis()->SetLabelOffset(0.01);
2753 sprintf(out_file,
"comb_const_hpdrm_%i.jpg",irunold);
2754 c1y->SaveAs(out_file);
2767 for (
int ij=0; ij<
nphimx; ij++) {
2768 for (
int jk=0; jk<
netamx; jk++) {
2776 gStyle->SetTitleFontSize(0.09);
2777 gStyle->SetPadBottomMargin(0.14);
2778 gStyle->SetPadLeftMargin(0.17);
2779 gStyle->SetPadRightMargin(0.01);
2780 gStyle->SetNdivisions(303,
"XY");
2781 gStyle->SetOptLogy(1);
2783 TCanvas *c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
2785 for (
int side=0; side <2; side++) {
2795 for (
int ij=nmn; ij<nmx; ij++) {
2796 int ieta = (ij<15) ? ij+1 : 14-ij;
2799 sprintf(name,
"fC(#eta=%i)",ieta);
2801 sprintf(name,
"GeV(#eta=%i)",ieta);
2821 sprintf(out_file,
"sig_ho_%i_side%i.eps", irunold, side);
2822 c2x->SaveAs(out_file);
2824 sprintf(out_file,
"sig_ho_%i_side%i.jpg", irunold, side);
2825 c2x->SaveAs(out_file);
2828 gStyle->SetOptLogy(0);
2829 c2x =
new TCanvas(
"c2x",
"runfile", xsiz, ysiz);
2831 for (
int side=0; side <2; side++) {
2841 for (
int ij=nmn; ij<nmx; ij++) {
2845 statmn_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2846 statmn_eta[ij]->GetXaxis()->SetTitleSize(.08);
2848 statmn_eta[ij]->GetXaxis()->SetTitleOffset(0.9);
2849 statmn_eta[ij]->GetYaxis()->SetLabelSize(.08);
2850 statmn_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2851 statmn_eta[ij]->GetXaxis()->SetLabelSize(.08);
2852 statmn_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2858 statmn_eta[ij]->GetYaxis()->SetTitleSize(.075);
2860 statmn_eta[ij]->GetYaxis()->SetTitleOffset(1.30);
2866 sprintf(out_file,
"statmnho_%i_side%i.eps", irunold, side);
2867 c2x->SaveAs(out_file);
2869 sprintf(out_file,
"statmnho_%i_side%i.jpg", irunold, side);
2870 c2x->SaveAs(out_file);
2872 gStyle->SetOptLogy(1);
2873 gStyle->SetNdivisions(203,
"XY");
2876 for (
int ij=nmn; ij<nmx; ij++) {
2880 stat_eta[ij]->GetXaxis()->SetTitle(
"#phi index");
2881 stat_eta[ij]->GetXaxis()->SetTitleSize(.08);
2882 stat_eta[ij]->GetXaxis()->CenterTitle();
2883 stat_eta[ij]->GetXaxis()->SetTitleOffset(0.80);
2884 stat_eta[ij]->GetXaxis()->SetLabelSize(.08);
2885 stat_eta[ij]->GetXaxis()->SetLabelOffset(.01);
2886 stat_eta[ij]->GetYaxis()->SetLabelSize(.08);
2887 stat_eta[ij]->GetYaxis()->SetLabelOffset(.01);
2893 sprintf(out_file,
"statho_%i_side%i.eps", irunold, side);
2894 c2x->SaveAs(out_file);
2896 sprintf(out_file,
"statho_%i_side%i.jpg", irunold, side);
2897 c2x->SaveAs(out_file);
TH1F * corrsgrb[netamx][nphimx]
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]
#define DEFINE_FWK_MODULE(type)
HOCalibAnalyzer(const edm::ParameterSet &)
static const int rout12mx
TH1F * crossg[netamx][nphimx+1]
static const int phimap[4][21]
TH1F * com_corrsgall[ringmx][sectmx]
float invang[netamx][nphimx+1]
TH1F * corrsgc[netamx][nphimx]
TH1F * peak_hpdrm[ringmx]
static const int mapx1[6][3]
TH1F * corrsglb[netamx][nphimx]
TH1F * sigrsg[netamx][nphimx+1]
TH1F * com_corrsglu[ringmx][sectmx]
static const int npixriup[21]
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]
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const T & max(const T &a, const T &b)
Double_t totalfunc(Double_t *x, Double_t *par)
vector< float > sig_reg[netamx][nphimx+1]
std::string theoutputpsFile
static const int npixribt[21]
TH1F * corrsgl[netamx][nphimx]
TH1F * com_corrsgc[ringmx][sectmx]
TH1F * com_corrsgrb[ringmx][sectmx]
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]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TProfile * hotime[netamx][nphimx]
static const int npixleup[21]
Double_t gausX(Double_t *x, Double_t *par)
TH1F * corrsgru[netamx][nphimx]
TH1F * com_corrsgl[ringmx][sectmx]
static const int mapx0m[9][2]
TH1F * com_corrsglb[ringmx][sectmx]
void set_mean(double &x, bool mdigi)
TProfile * com_hopedtime[ringmx][sectmx]
vector< float > cro_ssg[netamx][nphimx+1]
static const int mapx0p[9][2]
T * make() const
make new ROOT object
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]
tuple size
Write out results.
Power< A, B >::type pow(const A &a, const B &b)
TProfile * sigvsevt[15][ncut]
TH1F * corrsgall[netamx][nphimx]