00001
00002
00003
00004
00005 #include <TH2.h>
00006 #include <TList.h>
00007 #include <TLine.h>
00008 #include <TMath.h>
00009
00010 #include "St2009WlumiMaker.h"
00011
00012
00013
00014 void
00015 St2009WlumiMaker::initHistos(){
00016
00017 TString core="lumi_";
00018
00019
00020
00021 memset(hA,0,sizeof(hA));
00022 TList *Lx; TLine *ln;TH1 *h;
00023 char txt[1000], txt0[100];
00024 int nCase=2;
00025
00026 hA[0]=h=new TH1F(core+"EventType",core+" event type",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
00030 char key[][200]={"L2W","L2Wnormal","L2Wrandom"};
00031 for(int i=0;i<3;i++) h->Fill(key[i],0.);
00032
00033
00034 hA[5]=h=new TH1F(core+"WET"," Final W selection; 2x2 cluster ET (GeV), scaled by fdet", 100,0,100);
00035 Lx=h->GetListOfFunctions();
00036 ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00037
00038 sprintf(txt,"TPC GLOB Q/PT ; 2x2 cluster ET (GeV); Q/PT");
00039 hA[6]=h=new TH2F(core+"chRecPNg", txt,100,0.,100.,100,-0.1,0.1);
00040 Lx=h->GetListOfFunctions();
00041 ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
00042
00043 sprintf(txt,"TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT");
00044 hA[7]=h=new TH2F(core+"chRecPNp", txt,100,0.,100.,100,-0.1,0.1);
00045 Lx=h->GetListOfFunctions();
00046 ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
00047
00048
00049
00050
00051 char cPM[2]={'P','N'};
00052 for(int ipn=0;ipn<2;ipn++){
00053 sprintf(txt0,"chWET%cg",cPM[ipn]);
00054 sprintf(txt,"Final W glob sign=%c; 2x2 cluster ET ",cPM[ipn]);
00055 hA[10+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
00056 Lx=h->GetListOfFunctions();
00057 ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00058
00059 sprintf(txt0,"chWET%cp",cPM[ipn]);
00060 sprintf(txt,"Final W prim sign=%c; 2x2 cluster ET ",cPM[ipn]);
00061 hA[12+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
00062 Lx=h->GetListOfFunctions();
00063 ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00064
00065
00066 sprintf(txt0,"chCF%c0",cPM[ipn]);
00067 sprintf(txt,"prim sign=%c flip after V-refit; 2x2 cluster ET ",cPM[ipn]);
00068 hA[14+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
00069 }
00070
00071
00072 sprintf(txt,"Integrated (per run) Lumi vs Time; run number;Luminosity (pb^-1)");
00073 hA[16]=h=new TH1F(core+"LvsT", txt,200000,10000000,10200000);
00074
00075 sprintf(txt,"Live fraction of BEMC vs Time; run number;Fraction of towers with good status");
00076 hA[17]=h=new TH1F(core+"GoodvsT", txt,200000,10000000,10200000);
00077
00078 sprintf(txt,"Single Beam Background Counts vs Time;run number;Background BHT3 counts");
00079 hA[18]=h=new TH1F(core+"SBBvsT",txt,200000,10000000,10200000);
00080
00081 sprintf(txt,"blah");
00082 hA[19]=h=new TH1F(core+"SoftBHT3",txt,200000,10000000,10200000);
00083 hA[20]=h=new TH1F(core+"HardBHT3",txt,200000,10000000,10200000);
00084 hA[21]=h=new TH1F(core+"AbortGap1",txt,200000,10000000,10200000);
00085 hA[22]=h=new TH1F(core+"AbortGap2",txt,200000,10000000,10200000);
00086 hA[23]=h=new TH1F(core+"ScaledBHT3",txt,200000,10000000,10200000);
00087 hA[24]=h=new TH1F(core+"effLumi",txt,200000,10000000,10200000);
00088 hA[25]=h=new TH1F(core+"nBHT3coin_coinBin",txt,16,0,16);
00089
00090 for (int i=0;i<16;i++) {
00091 hA[30+i]=h=new TH1F(core+Form("nBTH3coin_coinBin%d",i),txt,200000,10000000,10200000);
00092 hA[50+i]=h=new TH1F(core+Form("AbortGap1_coinBin%d",i),txt,200000,10000000,10200000);
00093 hA[70+i]=h=new TH1F(core+Form("AbortGap2_coinBin%d",i),txt,200000,10000000,10200000);
00094 hA[90+i]=h=new TH1F(core+Form("awaySum_coinBin%d",i),txt,400,0.,400.);
00095
00096 }
00097
00098
00099 for(int i=0;i<mxHA;i++) {
00100 if( hA[i]==0) continue;
00101 HList->Add( hA[i]);
00102 }
00103
00104 LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
00105
00106 }
00107
00108
00109
00110
00111
00112
00113
00114
00115