00001 #include <TH2.h>
00002 #include <TList.h>
00003 #include <TLine.h>
00004 #include <TMath.h>
00005
00006 #include "St2011WMaker.h"
00007
00008 #include "St2011ZMaker.h"
00009
00010
00011
00012 void
00013 St2011ZMaker::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];
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 hA[50]=h=new TH1F(core+"Endcap_EventType",core+" event type",nCase,0,nCase);
00109 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
00110 h->SetLineColor(kBlue);h->SetLineWidth(2);
00111 const char *keyE[]={"inp","vert","tr1","et1","con1","tr2","et2","con2","phi12","m2"};
00112 for(int i=0;i<10;i++) h->Fill(keyE[i],0.);
00113
00114 hA[51]=h=new TH1F(core+"Eet1iso","Track-1 4x4 ET fract; 2x2ET / 4x4 ET",105,0,1.05);
00115 Lx=h->GetListOfFunctions();
00116 ln=new TLine(wMK->par_clustFrac24,0,wMK->par_clustFrac24,yMax); ln->SetLineColor(kMagenta); ln->SetLineStyle(2); Lx->Add(ln);
00117 hA[52]=h=new TH1F(core+"Eet1val","Track-1 ET before cuts; 2x2ET (GeV)",100,0,100);
00118 Lx=h->GetListOfFunctions();
00119 ln=new TLine(par_clusterEtZ,0,par_clusterEtZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00120 hA[53]=h=new TH1F(core+"Eet1frac","Track-1 cone ET fraction; 2x2ET/nearET",105,0,1.05);
00121 Lx=h->GetListOfFunctions();
00122 ln=new TLine(par_nearTotEtFracZ,0,par_nearTotEtFracZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00123
00124 hA[54]=h=new TH1F(core+"Eet2iso","Track-2 4x4 ET fract; 2x2ET / 4x4 ET",105,0,1.05);
00125 Lx=h->GetListOfFunctions();
00126 ln=new TLine(wMK->parE_clustFrac24,0,wMK->parE_clustFrac24,yMax); ln->SetLineColor(kMagenta); ln->SetLineStyle(2); Lx->Add(ln);
00127 hA[55]=h=new TH1F(core+"Eet2val","Cluster-2 ET before cuts; 2x2ET (GeV)",100,0,100);
00128 Lx=h->GetListOfFunctions();
00129 ln=new TLine(par_clusterEtZ,0,par_clusterEtZ,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00130 hA[56]=h=new TH1F(core+"Eet2frac","Cluset-2 cone ET fraction; 2x2ET/nearET",105,0,1.05);
00131 Lx=h->GetListOfFunctions();
00132 ln=new TLine(wMK->parE_nearTotEtFrac,0,wMK->parE_nearTotEtFrac,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00133
00134 hA[57]=h=new TH1F(core+"Ephi12","delta phi tr1-tr2; delPhi12(rad)", 100 ,-PI+1.,PI+1.);
00135 h->SetFillColor(kBlue);
00136 Lx=h->GetListOfFunctions();
00137 ln=new TLine(par_delPhi12,0,par_delPhi12,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00138 ln=new TLine(-par_delPhi12,0,-par_delPhi12,yMax); ln->SetLineColor(kMagenta); Lx->Add(ln);
00139 hA[58]=h=new TH1F(core+"E_Zmass"," Final Z selection with one track and one Endcap cluster; Invariant Mass (GeV)", 100,0,200);
00140 h->SetFillColor(kYellow);
00141 ln=new TLine(91.2,-.2,91.2,10.); ln->SetLineColor(kGreen); ln->SetLineWidth(3); ln->SetLineStyle(1); Lx->Add(ln);
00142
00143
00144
00145 for(int i=0;i<mxHA;i++) {
00146 if( hA[i]==0) continue;
00147 HList->Add( hA[i]);
00148 }
00149
00150 LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
00151
00152 }