00001
00002
00003
00004
00005
00006 #include <TH2.h>
00007 #include <TList.h>
00008 #include <TLine.h>
00009 #include <TMath.h>
00010
00011 #include "St2009pubSpinMaker.h"
00012
00013
00014
00015 void
00016 St2009pubSpinMaker::initHistos(){
00017
00018
00019
00020 memset(hA,0,sizeof(hA));
00021 TList *Lx; TLine *ln;
00022 TH1 *h;
00023 char txt[1000], txt0[100];
00024 int nCase=12;
00025
00026 hA[0]=h=new TH1F(core+"StatEve",core+" event count",nCase,0,nCase);
00027 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
00028 h->SetLineColor(kBlue);h->SetLineWidth(2);
00029 h->SetMarkerSize(2);
00030
00031 const char *key[]={"inp","badBx48","noZ","BG1","BG2","Wcut","eta","W25","Qlow","Qhigh","Q +","Q -"};
00032 for(int i=0;i<12;i++) h->Fill(key[i],0.);
00033
00034
00035 hA[1]=new TH1F(core+"bX48","Rate vs. raw bx48; bXing= raw bx48",128,-0.5,127.5);
00036 hA[2]=new TH1F(core+"bX7","Rate vs. raw bx7; bXing= raw bx7",128,-0.5,127.5);
00037
00038 hA[3]=new TH1F(core+"bX48c","Rate vs. STAR IP bXing(bx48); bXing= bx48+offset",128,-0.5,127.5);
00039 hA[4]=new TH1F(core+"bX7c","Rate vs. STAR IP bXing(bx7); bXing= bx7+offset",128,-0.5,127.5);
00040
00041 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);
00042
00043
00044 hA[6]=new TH1F(core+"Y0","BG1: L2W-BHT3-rnd & vertex OK & low ET; spin4 ",16,-0.5,15.5);
00045 hA[7]=new TH1F(core+"Y1","BG2: vertex & ET<20 & ET 2x2 << 4x4 ; spin4 ",16,-0.5,15.5);
00046
00047 hA[8]=h=new TH1F(core+"QpT","reco Q/PT,W ET>25 GeV; reco Q/PT (1/GeV)",100,-0.099,0.099);
00048 float highCut=par_QPThighA - (par_QPThighET1-par_QPThighET0)*par_QPThighB;
00049
00050 if(par_QPTlow>0) {
00051 Lx=h->GetListOfFunctions();
00052 ln=new TLine(par_QPTlow,0,par_QPTlow,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00053 ln=new TLine(-par_QPTlow,0,-par_QPTlow,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00054 float avrC=(par_QPThighA+highCut)/2.;
00055 ln=new TLine(-avrC,0,-avrC,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00056 ln=new TLine(avrC,0,avrC,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00057 }
00058
00059 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);
00060 Lx=h->GetListOfFunctions();
00061 ln=new TLine(0,0,100,0); ln->SetLineColor(kBlue); Lx->Add(ln);
00062
00063 if(par_QPTlow>0) {
00064 ln=new TLine(0,par_QPTlow,100,par_QPTlow); ln->SetLineColor(kRed); Lx->Add(ln);
00065 ln=new TLine(0,-par_QPTlow,100,-par_QPTlow); ln->SetLineColor(kRed); Lx->Add(ln);
00066 ln=new TLine(25,-0.1, 25,0.1); ln->SetLineColor(kRed); Lx->Add(ln);
00067 ln=new TLine(par_QPThighET0,par_QPThighA,par_QPThighET1,highCut); ln->SetLineColor(kRed); Lx->Add(ln);
00068 ln=new TLine(par_QPThighET0,-par_QPThighA,par_QPThighET1,-highCut); ln->SetLineColor(kRed); Lx->Add(ln);
00069 }
00070
00071
00072 char cPM[2]={'P','N'};
00073 char iCol[2]={46,9};
00074 for(int ipn=0;ipn<2;ipn++){
00075 TH1 *h;
00076
00077
00078 sprintf(txt0,"ET_%c",cPM[ipn]);
00079 sprintf(txt,"Final W, charge=%c ; 2x2 ET (GeV) ",cPM[ipn]);
00080 hA[10+ipn]=h=new TH1F(core+txt0,txt, 100,1,101);
00081 h->SetFillColor(iCol[ipn]);
00082
00083
00084 sprintf(txt0,"Y2_%c",cPM[ipn]);
00085 sprintf(txt,"Final W Q=%c, 2x2 ET=[25,50]GeV ; spin4 ",cPM[ipn]);
00086 hA[12+ipn]=h=new TH1F(core+txt0,txt,16,-0.5,15.5);
00087 h->SetFillColor(iCol[ipn]);
00088
00089 sprintf(txt0,"Y3_%c",cPM[ipn]);
00090 sprintf(txt,"Final W Q=%c, 2x2 ET=[32,44]GeV ; spin4 ",cPM[ipn]);
00091 hA[14+ipn]=h=new TH1F(core+txt0,txt,16,-0.5,15.5);
00092 h->SetFillColor(iCol[ipn]);
00093
00094 sprintf(txt0,"Y4_%c",cPM[ipn]);
00095 sprintf(txt,"Final QCD Q=%c, 2x2 ET=[15,20]GeV ; spin4 ",cPM[ipn]);
00096 hA[16+ipn]=h=new TH1F(core+txt0,txt,16,-0.5,15.5);
00097 h->SetFillColor(iCol[ipn]);
00098
00099 sprintf(txt0,"Y5_%c",cPM[ipn]);
00100 sprintf(txt,"Final 2x2 ET Q=%c; spin4 ; 2x2 cluster ET (GeV) ",cPM[ipn]);
00101 hA[18+ipn]=h=new TH2F(core+txt0,txt,16,-0.5,15.5,10,0,100);
00102 h->SetFillColor(iCol[ipn]);
00103 }
00104
00105
00106 hA[30]=h=new TH1F(core+"LepEta","selecting Ws ; lepton LAB eta",100, -1.5,1.5);
00107 Lx=h->GetListOfFunctions();
00108 ln=new TLine(par_leptonEta1,0,par_leptonEta1,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00109 ln=new TLine(par_leptonEta2,0,par_leptonEta2,1e6); ln->SetLineColor(kRed); Lx->Add(ln);
00110
00111 hA[31]=h=new TH1F(core+"LumET","Lumi monitor; 2x2 ET (GeV)",100,0.,100.);
00112
00113
00114
00115
00116 for(int i=0;i<mxHA;i++) {
00117 if( hA[i]==0) continue;
00118 HList->Add( hA[i]);
00119 }
00120
00121 LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
00122
00123 }
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159