00001 #include <TH2.h>
00002 #include <TList.h>
00003 #include <TLine.h>
00004 #include <TMath.h>
00005
00006 #include "St2009WMaker.h"
00007
00008 #include "St2009ZMaker.h"
00009
00010
00011
00012 void
00013 St2009ZMaker::initHistos(){
00014 const float PI=TMath::Pi();
00015 TString core="_Z_";
00016
00017
00018
00019 memset(hA,0,sizeof(hA));
00020 TList *Lx; TLine *ln;
00021 TH1 *h; float yMax=1e3;
00022 char txt[1000], txt0[100];;
00023 int nCase=16;
00024
00025 hA[0]=h=new TH1F(core+"EventType",core+" event type",nCase,0,nCase);
00026 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
00027 h->SetLineColor(kBlue);h->SetLineWidth(2);
00028 const char *key[]={"inp","vert","TT","tr1","et1","con1","tr2","et2","con2","phi12","m2","QQ","Zlow","Zhigh"};
00029 for(int i=0;i<14;i++) h->Fill(key[i],0.);
00030
00031
00032
00033
00034 hA[1]=h=new TH1F(core+"Zmass"," Final Z selection; Invariant Mass (GeV)", 100,0,200);
00035 sprintf(txt,"Reconstructed Charge of each track in candidate ;First Charge;Second Charge");
00036 hA[2]=h=new TH2F(core+"charge_v_charge", txt,3,-1.5,1.5,3,-1.5,1.5);
00037 sprintf(txt,"Product of Reconstructed Charges of each track in candidate");
00038 hA[3]=h=new TH1F(core+"charge_product", txt,3,-1.5,1.5);
00039 hA[4]=h=new TH2F(core+"phi1_v_phi2","Comparison of azimuthal position of first and second track;Phi 1;Phi 2",100,-PI,PI,100,-PI,PI);
00040 sprintf(txt,"Relative phi between two tracks in Z candidate");
00041 hA[5]=h=new TH1F(core+"relative_phi", txt,100,0,PI*2.02);
00042 hA[6]=h=new TH2F(core+"track_mom_v_mass","Q1/pT1*Q2/pT2 versus Invariant Mass;Mass (GeV);Q1/pT1*Q2/pT2",100,0,200,200,-0.1,0.1);
00043 sprintf(txt,"Product of Electron Charges vs Reconstructed Mass;mass (GeV);Q1*Q2");
00044 hA[7]=h=new TH2F(core+"charge_product_v_mass",txt,50,0,200,3,-1.5,1.5);
00045 hA[8]=h=new TH1F(core+"et1","ET of first cluster (after cuts)",100,0,100);
00046 hA[9]=h=new TH2F(core+"positron_pos","Location of e+ from Z;eta;phi",10,-1,1,10,-PI,PI);
00047 hA[10]=h=new TH2F(core+"electron_pos","Location of e- from Z;eta;phi",10,-1,1,10,-PI,PI);
00048 hA[11]=h=new TH2F(core+"fmax_v_fmax","Final Z Selection, Fmax v Fmax;fmax1;fmax2",100,0,1,100,0,1);
00049 hA[12]=h=new TH2F(core+"et_v_et","Transverse Energies of the two Clusters;Et1;Et2",100,0,100,100,0,100);
00050 hA[13]=h=new TH2F(core+"rel_phi_v_mass","Relative Phi vs Invariant Mass;mass;phi",50,0,200,100,0,PI*2.02);
00051 hA[14]=h=new TH1F(core+"ZmassLike"," Final Z selection with Like Charges on both tracks; Invariant Mass (GeV)", 100,0,200);
00052
00053
00054 hA[15]=h=new TH1F(core+"ZmassUnlike"," Final Zs, Unlike Charge pairs; Invariant Mass (GeV)", 100,0,200); h->SetFillColor(kYellow);
00055
00056 Lx=h->GetListOfFunctions();
00057 ln=new TLine(par_minMassZ,0,par_minMassZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00058 ln=new TLine(par_maxMassZ,0,par_maxMassZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00059 ln=new TLine(91.2,-.2,91.2,10.); ln->SetLineColor(kGreen); ln->SetLineWidth(3); ln->SetLineStyle(1); Lx->Add(ln);
00060
00061 hA[21]=h=new TH2F(core+"fmax_v_fmaxbefore","Final Z Selection, Fmax v Fmax;fmax1;fmax2",100,0,1,100,0,1);
00062 hA[22]=h=new TH2F(core+"et_v_etbefore","Transverse Energies of the two Clusters;Et1;Et2",100,0,100,100,0,100);
00063
00064
00065 hA[23]=h=new TH1F(core+"et1val","Track-1 ET before cuts; 2x2ET (GeV)",100,0,100);
00066 Lx=h->GetListOfFunctions();
00067 ln=new TLine(par_clusterEtZ,0,par_clusterEtZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00068
00069 hA[24]=h=new TH1F(core+"et1frac","Track-1 cone ET fraction; 2x2ET/nearET",105,0,1.05);
00070 Lx=h->GetListOfFunctions();
00071 ln=new TLine(par_nearTotEtFracZ,0,par_nearTotEtFracZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00072
00073 hA[25]=h=new TH1F(core+"et2val","Track-2 ET before cuts; 2x2ET (GeV)",100,0,100);
00074 Lx=h->GetListOfFunctions();
00075 ln=new TLine(par_clusterEtZ,0,par_clusterEtZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00076
00077 hA[26]=h=new TH1F(core+"et2frac","Track-2 cone ET fraction; 2x2ET/nearET",105,0,1.05);
00078 Lx=h->GetListOfFunctions();
00079 ln=new TLine(par_nearTotEtFracZ,0,par_nearTotEtFracZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00080
00081 hA[27]=h=new TH1F(core+"phi12","delta phi tr1-tr2; delPhi12(rad)", 100 ,-PI+1.,PI+1.);
00082 h->SetFillColor(kBlue);
00083 Lx=h->GetListOfFunctions();
00084 ln=new TLine(par_delPhi12,0,par_delPhi12,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00085 ln=new TLine(-par_delPhi12,0,-par_delPhi12,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00086
00087
00088 hA[29]=h=new TH1F(core+"et1iso","Track-1 4x4 ET fract; 2x2ET / 4x4 ET",105,0,1.05);
00089 Lx=h->GetListOfFunctions();
00090 ln=new TLine(wMK->par_clustFrac24,0,wMK->par_clustFrac24,yMax); ln->SetLineColor(kMagenta); ln->SetLineStyle(2); Lx->Add(ln);
00091
00092 hA[30]=h=new TH1F(core+"et2iso","Track-2 4x4 ET fract; 2x2ET / 4x4 ET",105,0,1.05);
00093 Lx=h->GetListOfFunctions();
00094 ln=new TLine(wMK->par_clustFrac24,0,wMK->par_clustFrac24,yMax); ln->SetLineColor(kMagenta); ln->SetLineStyle(2); Lx->Add(ln);
00095
00096
00097
00098 hA[31]=h=new TH1F(core+"nVertices","Number of vertices per event",10,0,10);
00099 hA[32]=h=new TH1F(core+"nTracks","Number of tracks per vertex",20,0,20);
00100
00101 hA[33]=h=new TH2F(core+"chRecPNp","TPC PRIM Q/PT , black=pairs of unlike charges; 2x2 cluster ET (GeV); Q/PT",100,0.,100.,100,-0.1,0.1);
00102 Lx=h->GetListOfFunctions();
00103 ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
00104
00105 hA[34]=h=new TH2F(core+"Ene_Deta","final Z: cluster energy vs. detector eta; barrel eta bin; 2x2 Energy (GeV)",40,0,40,50,0,100);
00106
00107
00108 char tt2[][200]={"max 2x2","track matched","2x2 / 4x4","no near ET","no away ET"};
00109 for(int i=0;i<5;i++){
00110
00111 sprintf(txt,"Unlike Charge pairs, cut=%s; Invariant Mass (GeV/c^2)",tt2[i]);
00112 sprintf(txt0,"%sZmassUnlike%d",core.Data(),i);
00113 hA[40+i]=h=new TH1F(txt0,txt, 100,0,200); h->SetFillColor(kYellow);
00114
00115 sprintf(txt,"Like Charge pairs, cut=%s; Invariant Mass (GeV/c^{2})",tt2[i]);
00116 sprintf(txt0,"%sZmassLike%d",core.Data(),i);
00117 hA[50+i]=h=new TH1F(txt0,txt, 100,0,200); h->SetFillColor(kYellow);
00118 }
00119
00120 hA[60]=h=new TH2F(core+"ZmassUnlike_zdc","Unlike Charge pairs vs ZDC coinc. rate; ZDC coincidence rate; Invariant Mass (GeV/c^2)",100,0,200000,100,0,200);
00121 hA[61]=h=new TH2F(core+"ZmassLike_zdc","Like Charge pairs vs ZDC coinc. rate; ZDC coincidence rate; Invariant Mass (GeV/c^2)",100,0,200000,100,0,200);
00122
00123
00124 for(int i=0;i<mxHA;i++) {
00125 if( hA[i]==0) continue;
00126 HList->Add( hA[i]);
00127 }
00128
00129 LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
00130
00131 }