11 #include "St2011pubSpinMaker.h"
16 St2011pubSpinMaker::initHistos(){
20 memset(hA,0,
sizeof(hA));
21 memset(hE,0,
sizeof(hE));
24 char txt[1000], txt0[100];
29 hA[0]=h=
new TH1F(core+
"StatEve",core+
"Barrel event count",nCase,0,nCase);
30 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
31 h->SetLineColor(kBlue);h->SetLineWidth(2);
34 const char *key[]={
"inp",
"badBx48",
"noZ",
"BG1",
"BG2",
"Wcut",
"eta",
"W25",
"Qlow",
"Qhigh",
"Q +",
"Q -"};
35 for(
int i=0;i<12;i++) h->Fill(key[i],0.);
38 hA[1]=
new TH1F(core+
"bX48",
"Barrel Rate vs. raw bx48; bXing= raw bx48",128,-0.5,127.5);
39 hA[2]=
new TH1F(core+
"bX7",
"Barrel Rate vs. raw bx7; bXing= raw bx7",128,-0.5,127.5);
41 hA[3]=
new TH1F(core+
"bX48c",
"Barrel Rate vs. STAR IP bXing(bx48); bXing= bx48+offset",128,-0.5,127.5);
42 hA[4]=
new TH1F(core+
"bX7c",
"Barrel Rate vs. STAR IP bXing(bx7); bXing= bx7+offset",128,-0.5,127.5);
44 hA[5]=
new TH2F(core+
"s4mon",
"Barrel all L2W & vertex ; bXing at STAR (7bit); spin4 from DB",128,-0.5,127.5,32,-0.5,15.5);
47 hA[6]=
new TH1F(core+
"Y0",
"Barrel BG1: L2W-BHT3-rnd & vertex OK & low ET; spin4 ",16,-0.5,15.5);
48 hA[7]=
new TH1F(core+
"Y1",Form(
"Barrel BG2: vertex & ET<20 & ET 2x2 << 4x4 : %s; spin4 ",coreTitle.Data()),16,-0.5,15.5);
50 hA[8]=h=
new TH1F(core+
"QpT",
"Barrel W ET>25 GeV; reco Q/PT (1/GeV)",100,-0.099,0.099);
51 hA[9]=h=
new TH2F(core+
"QpT2",
"Barrel TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT (1/GeV)",100,0.,100.,100,-0.1,0.1);
54 char cPM[2]={
'P',
'N'};
56 for(
int ipn=0;ipn<2;ipn++){
60 sprintf(txt0,
"ET_%c",cPM[ipn]);
61 sprintf(txt,
"Final Barrel W, charge=%c : %s; 2x2 ET (GeV) ",cPM[ipn],coreTitle.Data());
62 hA[10+ipn]=h=
new TH1F(core+txt0,txt, 100,1,101);
63 h->SetFillColor(iCol[ipn]);
66 sprintf(txt0,
"Y2_%c",cPM[ipn]);
67 sprintf(txt,
"Final Barrel W Q=%c, 2x2 ET=[25,50]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
68 hA[12+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
69 h->SetFillColor(iCol[ipn]);
71 sprintf(txt0,
"Y3_%c",cPM[ipn]);
72 sprintf(txt,
"Final Barrel W Q=%c, 2x2 ET=[32,44]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
73 hA[14+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
74 h->SetFillColor(iCol[ipn]);
76 sprintf(txt0,
"Y4_%c",cPM[ipn]);
77 sprintf(txt,
"Final Barrel QCD Q=%c, 2x2 ET=[15,20]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
78 hA[16+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
79 h->SetFillColor(iCol[ipn]);
81 sprintf(txt0,
"Y5_%c",cPM[ipn]);
82 sprintf(txt,
"Final Barrel 2x2 ET Q=%c; spin4 : %s; 2x2 cluster ET (GeV) ",cPM[ipn],coreTitle.Data());
83 hA[18+ipn]=h=
new TH2F(core+txt0,txt,16,-0.5,15.5,10,0,100);
84 h->SetFillColor(iCol[ipn]);
86 sprintf(txt0,
"Y6_%c",cPM[ipn]);
87 sprintf(txt,
"High pT Barrel QCD Q=%c, 2x2 ET=[25,50]GeV: %s; spin4 ",cPM[ipn],coreTitle.Data());
88 hA[20+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
89 h->SetFillColor(iCol[ipn]);
91 sprintf(txt0,
"Y7_%c",cPM[ipn]);
92 sprintf(txt,
"High pT Barrel QCD 2x2 ET Q=%c; spin4 : %s; 2x2 cluster ET (GeV) ",cPM[ipn],coreTitle.Data());
93 hA[22+ipn]=h=
new TH2F(core+txt0,txt,16,-0.5,15.5,100,0,100);
94 h->SetFillColor(iCol[ipn]);
96 sprintf(txt0,
"LepEta_%c",cPM[ipn]);
97 sprintf(txt,
"selecting Barrel Ws Q=%c : %s ; lepton LAB eta",cPM[ipn],coreTitle.Data());
98 hA[29+ipn]=h=
new TH1F(core+txt0,txt,400, -2.0,2.0);
99 Lx=h->GetListOfFunctions();
100 ln=
new TLine(par_leptonEta1,0,par_leptonEta1,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
101 ln=
new TLine(par_leptonEta2,0,par_leptonEta2,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
105 hA[31]=h=
new TH1F(core+
"LumET",
"Lumi monitor; 2x2 ET (GeV)",100,0.,100.);
106 hA[32]=h=
new TH2F(core+
"QpT_hits",
"nHitsFit vs Q/PT,Barrel W ET>25 GeV; reco Q/PT (1/GeV); nFitPoints",100,-0.099,0.099,50,0,50);
107 hA[33]=h=
new TH2F(core+
"QpT_hitF",
"nHitsFrac vs Q/PT,Barrel W ET>25 GeV; reco Q/PT (1/GeV); nHitsFrac",100,-0.099,0.099,50,0,1.1);
108 hA[34]=h=
new TH2F(core+
"HitsFit_Frac",
"Barrel nHitsFit vs nHitsFrac; nHitsFit; nHitsFrac",50,0,50,50,0,1.1);
113 hE[0]=h=
new TH1F(core+
"EStatEve",core+
" Endcap event count",nCase,0,nCase);
114 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
115 h->SetLineColor(kBlue);h->SetLineWidth(2);
118 const char *keyE[]={
"inp",
"badBx48",
"noZ",
"BG1",
"BG2",
"Wcut",
"eta",
"W25",
"Qlow",
"Qhigh",
"Q +",
"Q -"};
119 for(
int i=0;i<12;i++) h->Fill(keyE[i],0.);
122 hE[1]=
new TH1F(core+
"EbX48",
"Endcap Rate vs. raw bx48; bXing= raw bx48",128,-0.5,127.5);
123 hE[2]=
new TH1F(core+
"EbX7",
"Endcap Rate vs. raw bx7; bXing= raw bx7",128,-0.5,127.5);
125 hE[3]=
new TH1F(core+
"EbX48c",
"Endcap Rate vs. STAR IP bXing(bx48); bXing= bx48+offset",128,-0.5,127.5);
126 hE[4]=
new TH1F(core+
"EbX7c",
"Endcap Rate vs. STAR IP bXing(bx7); bXing= bx7+offset",128,-0.5,127.5);
128 hE[5]=
new TH2F(core+
"Es4mon",
"Endcap all L2W & vertex ; bXing at STAR (7bit); spin4 from DB",128,-0.5,127.5,32,-0.5,15.5);
131 hE[6]=
new TH1F(core+
"EY0",
"Endcap BG1: L2W-BHT3-rnd & vertex OK & low ET; spin4 ",16,-0.5,15.5);
132 hE[7]=
new TH1F(core+
"EY1",Form(
"Endcap BG2: vertex & ET<20 & ET 2x2 << 4x4 : %s; spin4 ",coreTitle.Data()),16,-0.5,15.5);
134 hE[8]=h=
new TH1F(core+
"EQpT",
"Endcap reco Q/PT,W ET>25 GeV; reco Q/PT (1/GeV)",100,-0.099,0.099);
135 hE[9]=h=
new TH2F(core+
"EQpT2",
"Endcap TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT (1/GeV)",100,0.,100.,100,-0.1,0.1);
138 for(
int ipn=0;ipn<2;ipn++){
142 sprintf(txt0,
"E_ET_%c",cPM[ipn]);
143 sprintf(txt,
"Final Endcap W, charge=%c : %s; 2x2 ET (GeV) ",cPM[ipn],coreTitle.Data());
144 hE[10+ipn]=h=
new TH1F(core+txt0,txt, 100,1,101);
145 h->SetFillColor(iCol[ipn]);
148 sprintf(txt0,
"EY2_%c",cPM[ipn]);
149 sprintf(txt,
"Final Endcap W Q=%c, 2x2 ET=[25,50]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
150 hE[12+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
151 h->SetFillColor(iCol[ipn]);
153 sprintf(txt0,
"EY3_%c",cPM[ipn]);
154 sprintf(txt,
"Final Endcap W Q=%c, 2x2 ET=[32,44]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
155 hE[14+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
156 h->SetFillColor(iCol[ipn]);
158 sprintf(txt0,
"EY4_%c",cPM[ipn]);
159 sprintf(txt,
"Final Endcap (not all QCD!) Q=%c, 2x2 ET=[15,20]GeV : %s; spin4 ",cPM[ipn],coreTitle.Data());
160 hE[16+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
161 h->SetFillColor(iCol[ipn]);
163 sprintf(txt0,
"EY5_%c",cPM[ipn]);
164 sprintf(txt,
"Final Endcap 2x2 ET Q=%c; spin4 : %s; 2x2 cluster ET (GeV) ",cPM[ipn],coreTitle.Data());
165 hE[18+ipn]=h=
new TH2F(core+txt0,txt,16,-0.5,15.5,10,0,100);
166 h->SetFillColor(iCol[ipn]);
168 sprintf(txt0,
"ELepEta_%c",cPM[ipn]);
169 sprintf(txt,
"selecting Endcap Ws Q=%c : %s ; lepton LAB eta",cPM[ipn],coreTitle.Data());
170 hE[29+ipn]=h=
new TH1F(core+txt0,txt,400, -2.0,2.0);
171 Lx=h->GetListOfFunctions();
172 ln=
new TLine(parE_leptonEta1,0,parE_leptonEta1,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
173 ln=
new TLine(parE_leptonEta2,0,parE_leptonEta2,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
177 hE[31]=h=
new TH1F(core+
"ELumET",
"Lumi monitor; 2x2 ET (GeV)",100,0.,100.);
178 hE[32]=h=
new TH2F(core+
"EQpT_hits",
"nHitsFit vs Q/PT,Endcap W ET>25 GeV; reco Q/PT (1/GeV); nFitPoints",100,-0.099,0.099,50,0,50);
179 hE[33]=h=
new TH2F(core+
"EQpT_hitF",
"nHitsFrac vs Q/PT,Endcap W ET>25 GeV; reco Q/PT (1/GeV); nHitsFrac",100,-0.099,0.099,50,0,1.1);
180 hE[34]=h=
new TH2F(core+
"EHitsFit_Frac",
"Endcap nHitsFit vs nHitsFrac; nHitsFit; nHitsFrac",50,0,50,50,0,1.1);
183 for(
int i=0;i<mxHA;i++) {
184 if( hA[i]==0)
continue;
187 for(
int i=0;i<mxHE;i++) {
188 if( hE[i]==0)
continue;
192 LOG_INFO<<Form(
"%s::initHistos done1",
GetName())<<endm;
virtual const char * GetName() const
special overload