11 #include "St2009pubSpinMaker.h"
16 St2009pubSpinMaker::initHistos(){
20 memset(hA,0,
sizeof(hA));
23 char txt[1000], txt0[100];
26 hA[0]=h=
new TH1F(core+
"StatEve",core+
" event count",nCase,0,nCase);
27 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
28 h->SetLineColor(kBlue);h->SetLineWidth(2);
31 const char *key[]={
"inp",
"badBx48",
"noZ",
"BG1",
"BG2",
"Wcut",
"eta",
"W25",
"Qlow",
"Qhigh",
"Q +",
"Q -"};
32 for(
int i=0;i<12;i++) h->Fill(key[i],0.);
35 hA[1]=
new TH1F(core+
"bX48",
"Rate vs. raw bx48; bXing= raw bx48",128,-0.5,127.5);
36 hA[2]=
new TH1F(core+
"bX7",
"Rate vs. raw bx7; bXing= raw bx7",128,-0.5,127.5);
38 hA[3]=
new TH1F(core+
"bX48c",
"Rate vs. STAR IP bXing(bx48); bXing= bx48+offset",128,-0.5,127.5);
39 hA[4]=
new TH1F(core+
"bX7c",
"Rate vs. STAR IP bXing(bx7); bXing= bx7+offset",128,-0.5,127.5);
41 hA[5]=
new TH2F(core+
"s4mon",
"all L2W & vertex ; bXing at STAR (7bit); spin4 from DB",128,-0.5,127.5,32,-0.5,15.5);
44 hA[6]=
new TH1F(core+
"Y0",
"BG1: L2W-BHT3-rnd & vertex OK & low ET; spin4 ",16,-0.5,15.5);
45 hA[7]=
new TH1F(core+
"Y1",
"BG2: vertex & ET<20 & ET 2x2 << 4x4 ; spin4 ",16,-0.5,15.5);
47 hA[8]=h=
new TH1F(core+
"QpT",
"reco Q/PT,W ET>25 GeV; reco Q/PT (1/GeV)",100,-0.099,0.099);
48 float highCut=par_QPThighA - (par_QPThighET1-par_QPThighET0)*par_QPThighB;
51 Lx=h->GetListOfFunctions();
52 ln=
new TLine(par_QPTlow,0,par_QPTlow,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
53 ln=
new TLine(-par_QPTlow,0,-par_QPTlow,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
54 float avrC=(par_QPThighA+highCut)/2.;
55 ln=
new TLine(-avrC,0,-avrC,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
56 ln=
new TLine(avrC,0,avrC,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
59 hA[9]=h=
new TH2F(core+
"QpT2",
"TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT (1/GeV)",100,0.,100.,100,-0.1,0.1);
60 Lx=h->GetListOfFunctions();
61 ln=
new TLine(0,0,100,0); ln->SetLineColor(kBlue); Lx->Add(ln);
64 ln=
new TLine(0,par_QPTlow,100,par_QPTlow); ln->SetLineColor(kRed); Lx->Add(ln);
65 ln=
new TLine(0,-par_QPTlow,100,-par_QPTlow); ln->SetLineColor(kRed); Lx->Add(ln);
66 ln=
new TLine(25,-0.1, 25,0.1); ln->SetLineColor(kRed); Lx->Add(ln);
67 ln=
new TLine(par_QPThighET0,par_QPThighA,par_QPThighET1,highCut); ln->SetLineColor(kRed); Lx->Add(ln);
68 ln=
new TLine(par_QPThighET0,-par_QPThighA,par_QPThighET1,-highCut); ln->SetLineColor(kRed); Lx->Add(ln);
72 char cPM[2]={
'P',
'N'};
74 for(
int ipn=0;ipn<2;ipn++){
78 sprintf(txt0,
"ET_%c",cPM[ipn]);
79 sprintf(txt,
"Final W, charge=%c ; 2x2 ET (GeV) ",cPM[ipn]);
80 hA[10+ipn]=h=
new TH1F(core+txt0,txt, 100,1,101);
81 h->SetFillColor(iCol[ipn]);
84 sprintf(txt0,
"Y2_%c",cPM[ipn]);
85 sprintf(txt,
"Final W Q=%c, 2x2 ET=[25,50]GeV ; spin4 ",cPM[ipn]);
86 hA[12+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
87 h->SetFillColor(iCol[ipn]);
89 sprintf(txt0,
"Y3_%c",cPM[ipn]);
90 sprintf(txt,
"Final W Q=%c, 2x2 ET=[32,44]GeV ; spin4 ",cPM[ipn]);
91 hA[14+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
92 h->SetFillColor(iCol[ipn]);
94 sprintf(txt0,
"Y4_%c",cPM[ipn]);
95 sprintf(txt,
"Final QCD Q=%c, 2x2 ET=[15,20]GeV ; spin4 ",cPM[ipn]);
96 hA[16+ipn]=h=
new TH1F(core+txt0,txt,16,-0.5,15.5);
97 h->SetFillColor(iCol[ipn]);
99 sprintf(txt0,
"Y5_%c",cPM[ipn]);
100 sprintf(txt,
"Final 2x2 ET Q=%c; spin4 ; 2x2 cluster ET (GeV) ",cPM[ipn]);
101 hA[18+ipn]=h=
new TH2F(core+txt0,txt,16,-0.5,15.5,10,0,100);
102 h->SetFillColor(iCol[ipn]);
106 hA[30]=h=
new TH1F(core+
"LepEta",
"selecting Ws ; lepton LAB eta",100, -1.5,1.5);
107 Lx=h->GetListOfFunctions();
108 ln=
new TLine(par_leptonEta1,0,par_leptonEta1,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
109 ln=
new TLine(par_leptonEta2,0,par_leptonEta2,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
111 hA[31]=h=
new TH1F(core+
"LumET",
"Lumi monitor; 2x2 ET (GeV)",100,0.,100.);
116 for(
int i=0;i<mxHA;i++) {
117 if( hA[i]==0)
continue;
121 LOG_INFO<<Form(
"%s::initHistos done1",
GetName())<<endm;
virtual const char * GetName() const
special overload