00001
00002
00003
00004
00005 #include <TH2.h>
00006 #include <TList.h>
00007 #include <TLine.h>
00008 #include <TMath.h>
00009
00010 #include "St2011WMaker.h"
00011
00012
00013
00014 void
00015 St2011WMaker::initEHistos(){
00016 const float PI=TMath::Pi();
00017
00018
00019 memset(hE,0,sizeof(hE));
00020 TList *Lx; TLine *ln;TH1 *h;
00021 char txt[1000], txt0[100];
00022 int nCase=16;
00023 hE[0]=h=new TH1F("muEStatEve","Endcap W-algo: event count",nCase,0,nCase);
00024 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
00025 h->SetLineColor(kBlue);h->SetLineWidth(2);
00026 h->SetMarkerSize(2);
00027
00028 char key[][200]={"inp","L2ewId","L2ewBits","L2ewET","L2ewRnd","tpcOn","primVert","vertZ","Pt10",
00029 "E-in","E200","TrE","Tr2Cl","eta1","goldW"};
00030 for(int i=0;i<15;i++) h->Fill(key[i],0.);
00031
00032 hE[1]=h=new TH1F("muEInTrg","mu Endcap W input triggers, WARN: scrambled if manyruns are combined by hadd.C; trigID (random order)",nCase,0,nCase);
00033 h->GetXaxis()->SetLabelSize(0.06);
00034
00035 hE[2]=h=new TH1F("muEbX48","L2WE-ET events vs. bXing; bXing= raw bx48",128,-0.5,127.5);
00036 h->SetFillColor(kGreen);
00037
00038 hE[3]=h=new TH1F("muEbX7","L2WE-ET events vs. bXing; bXing= raw bx7",128,-0.5,127.5);
00039 h->SetFillColor(kBlue);
00040
00041 hE[4]=new TH1F("muEbX48v","L2WE-ET & primVertex vs. bXing; bXing= raw bx48",128,-0.5,127.5);
00042 hE[5]=h=new TH1F("muEbX7v","L2WE-ET & primVertex; bXing= raw bx7",128,-0.5,127.5);
00043 h->SetFillColor(kBlue);
00044
00045
00046 hE[6]=h=new TH1F("muEDsm1","L2WE-ET events DMS spectrum; DSM value",64,-0.5,63.5);
00047 h->SetMinimum(0.8);
00048 hE[7]=h=new TH1F("muEDsm2","L2WE-Rnd events DMS spectrum; DSM value",64,-0.5,63.5);
00049 h->SetMinimum(0.8);
00050 sprintf(txt,"L2WE-ET events w/ DMS>%d vs.ETOW TP ID bXing; Hanks' TP ID",parE_DsmThres);
00051 hE[8]=new TH1F("muEDsm3",txt,90,-0.5,89.5);
00052 sprintf(txt,"L2WE-ET events w/ DMS>%d & primVertexvs.ETOW TP ID bXing; Hanks' TP ID",parE_DsmThres);
00053 hE[9]=h=new TH1F("muEDsm4",txt,90,-0.5,89.5);
00054 h->SetFillColor(kBlue); h->SetLineColor(kBlue);
00055
00056
00057
00058 hE[10]=h=new TH1F("muEVRf","L2WE: PPV Vertex rank, funny X-axis; X=Log10(rank)+offset", 150, -9,25);
00059 Lx=h->GetListOfFunctions();
00060 ln=new TLine(0,0,0,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00061
00062
00063 hE[11]=h=new TH1F("muEZv","L2WE: Z of any vertex w/ rank>0;Z-vertex (cm)",100,-200,200);
00064 Lx=h->GetListOfFunctions();
00065 ln=new TLine(par_vertexZ,0,par_vertexZ,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00066 ln=new TLine(-par_vertexZ,0,-par_vertexZ,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00067
00068 hE[12]=new TH1F("muENV","L2WE: # vertices per event, (rank>0 or matched track to ETOW) && Z in range; # of vertices",10,0,10);
00069
00070 hE[20]=h=new TH1F("muEStatTrk","Endcap W-algo: track count; cases",nCase,0,nCase);
00071 h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
00072 h->SetLineColor(kGreen); h->SetLineWidth(2);
00073 char keyT[][200]={"flag","pt1","#eta>0.7","nHit","Hfrac","Rin","Rout","ptOK","@E","CL","fr24",
00074 "#Delta R","noNear","noAway","goldW"};
00075
00076 for(int i=0;i<15;i++) h->Fill(keyT[i],0.);
00077
00078
00079 hE[21]=h=new TH1F("muETrNfit","Endcap: primary track in-selection & vertexZ; nFitPoints",50,0,50);
00080 Lx=h->GetListOfFunctions();
00081 ln=new TLine(parE_nFitPts,0,parE_nFitPts,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00082
00083 hE[22]=h=new TH1F("muETrFitFrac","Endcap: primary track in-selection & vertexZ; nFit/nPoss ",50,0,1.1);
00084 Lx=h->GetListOfFunctions();
00085 Lx=h->GetListOfFunctions();
00086 ln=new TLine(parE_nHitFrac,0,parE_nHitFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00087
00088 hE[23]=h=new TH1F("muETrRxyIn","Endcap: primary track first hit in-selection & vertexZ; Rxy (cm)",60,50,170.);
00089 Lx=h->GetListOfFunctions();
00090 ln=new TLine(parE_trackRin,0,parE_trackRin,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00091
00092 hE[24]=h=new TH1F("muETrRxyOut","Endcap: primary track last hit in-selection & vertexZ; Rxy (cm)",80,60,220.);
00093 Lx=h->GetListOfFunctions();
00094 ln=new TLine(parE_trackRout,0,parE_trackRout,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00095
00096 hE[25]=h=new TH1F("muETrPt1","Endcap: global track PT ; track PT (GeV/c)",80,0,80);
00097 Lx=h->GetListOfFunctions();
00098 ln=new TLine(parE_trackPt,0,parE_trackPt,1.e6); ln->SetLineColor(kRed); Lx->Add(ln); h->SetFillColor(kYellow);
00099
00100
00101 hE[26]=h=new TH2F("muETr2D1","Endcap: lastHit on track; detector eta ; detector phi (rad)",100,-0.2,1.8,200,-3.2,3.2);
00102
00103 hE[27]=h=new TH1F("muETrPt1N","Endcap: global NEGATIVE track PT; track PT (GeV/c)",80,0,80);
00104 h->SetFillColor(7);
00105
00106 hE[28]=h=new TH2F("muETrdEdX","Endcap: dEdX vs. momentum; track P (GeV); dE/dx (keV)",20,0,10,100,0,10);
00107
00108
00109 hE[29]=h=new TH1F("muETrPt1Pr","Endcap: primary track PT; track PT (GeV/c)",80,0,80);
00110 hE[30]=h=new TH1F("muETrPt1NPr","Endcap: primary NEGATIVE track PT; track PT (GeV/c)",80,0,80);
00111
00112
00113
00114
00115 hE[31]=h=new TH1F("muEmaxAdc","Endcap: ETOW maxADC in event, in-selection; max tower ADC",200,0,4200);
00116 hE[32]=h=new TH1F("muEtotAdc","Endcap: ETOW sum of ADC>thres , in-selection;ADC sum/event", 80,0,8000.);
00117
00118 hE[33]=h=new TH1F("muEclET","matched ETOW 2x1 cluster ET ;cluster ET (GeV)",100,0,100);
00119 Lx=h->GetListOfFunctions();
00120 ln=new TLine(parE_clustET,0,parE_clustET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00121
00122 hE[34]=h=new TH2F("muEclAdcPt","Endcap: matched TPC PT vs. ETOW 2x1 cluster ADC sum ; cluster (ADC sum);TPC PT (GeV)",50,0,5000,75,0,150);
00123 h->GetXaxis()->SetNdivisions(4);
00124
00125 hE[35]=new TH1F("muETrch2","Endcap: track glob chi2/dof X-Y",100,0,5);
00126 hE[36]=new TH2F("muETrch2b","Endcap: track glob chi2/dof; chi2/dof X-Y; last hit eta",30,0,5.,30,-0.2,1.8);
00127
00128
00129
00130 hE[37]=h=new TH1F("muEclET24","matched ETOW 4x4 cluster ET ;cluster 4x4 ET (GeV)",100,0,100);
00131 hE[38]=h=new TH2F("muEclE242D","Endcap: Excess energy in ETOW 4x4 cluster vs. 2x1 cluster E;2x1 cluster E (GeV); E(4x4)-E(2x1) E (GeV)",60,0,120,30,0,30);
00132
00133 hE[39]=h=new TH1F("muEclET24R","Endcap: ratio (2x1/4x4) cluster ET ; fraction: cluster ET 2x1/ 4x4 ET",100,0,1.2);
00134 Lx=h->GetListOfFunctions();
00135 ln=new TLine(parE_clustFrac24,0,parE_clustFrac24,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00136
00137
00138
00139 hE[40]=h=new TH1F("muEEMCjetET","Endcap: near 'EM jet' ET ; 'EM jet' ET (GeV)",100,0,100);
00140
00141 hE[41]=h=new TH2F("muEclEMCjetE2D","Endcap: Excess nearCone ET vs. 2x1 E;2x1 cluster ET (GeV); ET(cone-2x1) (GeV)",50,0,80,50,0,60);
00142
00143 hE[42]=h=new TH1F("muETEMCjetETR","Endcap: ratio (2x1/nearCone) ET ; cluster ET/ near cone ET",100,0,1.2);
00144 Lx=h->GetListOfFunctions();
00145 ln=new TLine(parE_nearTotEtFrac,0,parE_nearTotEtFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00146
00147
00148
00149 hE[43]=h=new TH2F("muEdist1","Endcap: X-Y Distance(track-ETOW cluster) vs. 2x1 E;2x1 cluster E (GeV); | distance | (cm)",40,0,120,40,0,25);
00150 hE[44]=h=new TH2F("muEdist2","Endcap: R#Delta #phi (track-ETOW cluster) vs.#phi-clust; .#phi-clust(rad) ;R#Delta #phi (cm)",100,-3.2,3.2,40,-20,20);
00151 hE[45]=h=new TH2F("muEdist3","Endcap: R#Delta #phi (track-ETOW cluster) vs. 2x1 E;2x1 cluster E (GeV); R#Delta #phi (cm)",40,0,120,40,-20,20);
00152 hE[46]=h=new TH1F("muEdist4","Endcap: X-Y Distance(track-ETOW cluster) for 2x1 E;| X-Y distance | (cm)",100,0,50);
00153 Lx=h->GetListOfFunctions();
00154 ln=new TLine(parE_delR3D,0,parE_delR3D,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00155
00156
00157 hE[47]=h=new TH1F("muETjetET","Endcap: quenched near 'TPC jet' PT ; 'TPC jet' PT (GeV)",100,0,100);
00158 hE[48]=h=new TH2F("muETjetEMCjet2D","Endcap: quenched near 'TPC jet' vs. near 'EMC jet' ; EMC jet ET (GeV); TPC PT (GeV/c)",50,0,80,50,0,60);
00159 hE[49]=h=new TH1F("muETEMCjetET","Endcap: near 'TPC+EMC jet' ET ; jet ET (GeV), no double counting",100,0,100);
00160
00161
00162 hE[50]=h=new TH1F("muETwayET","Endcap: TPC away-cone PT sum; PT (GeV)",100,0,100);
00163 hE[51]=h=new TH1F("muEBwayET","Endcap: BTOW away-cone ET sum; ET (GeV)",100,0,100);
00164 hE[52]=h=new TH2F("muETotwayET2D","Endcap: away TPC+EMC ET sum vs. 2x1 ETOW cluster ET; 2x1 ET (GeV); away ET (GeV)",50,0,100,150,0,100);
00165 hE[53]=h=new TH2F("muEAwayET2Db","Endcap: away EMC ET sum vs. 2x1 ETOW cluster ET; 2x1 ET (GeV); away EMC ET (GeV)",50,0,100,80,0,80);
00166 hE[54]=h=new TH1F("muEAwayTotEt","Endcap: away-cone TPC+EMC ET sum ; away ET (GeV)",200,0,100);
00167
00168 hE[55]=h=new TH1F("muEEwayET","Endcap: ETOW away-cone ET sum; ET (GeV)",100,0,100);
00169
00170 hE[57]=h=new TH2F("muETr2D1pt5","Endcap: lastHit on track (pt > 5); detector eta ; detector phi (rad)",100,-0.2,1.8,240,-PI,PI);
00171
00172
00173
00174 hE[60]=h=new TH2F("muEEclETPt","Endcap: Awayside TPC PT vs. isolated ETOW 2x1 cluster ET, matched;2x1 cluster ET (GeV) ; Awayside TPC PT (GeV)",50,0,100,75,0,150);
00175
00176 hE[61]=new TH1F("muEbX7eht","L2W-EHT-rnd events vs. bXing; bXing= raw bx7",128,-0.5,127.5);
00177 hE[62]=h=new TH2F("muEEne_Deta","Endcap W: ETOW 2x1 cluster energy vs. detector eta, final selection; endcap eta bin; 2x1 Energy (GeV)",12,0,12,50,0,100);
00178
00179 hE[69]=h=new TH2F("muEeXY","Endcap W: Projected track XY at SMD depth; X (cm); Y (cm)",100,-280,280,100,-280,280);
00180
00181
00182 hE[90]=h=new TH1F("muE_WET","Endcap W: Final selection; 2x1 ETOW cluster ET (GeV)", 100,0,100);
00183 Lx=h->GetListOfFunctions();
00184 ln=new TLine(parE_highET,0,parE_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
00185
00186 sprintf(txt,"Endcap W: Final selection, ET>%.0f GeV 'goldenW'; detector eta ; detector phi (rad)",parE_highET);
00187 hE[91]=new TH2F("muE_W2D1",txt,15,0.5,2.0,12,-PI,PI);
00188
00189 hE[92]=new TH2F("muE_Wdedx","Endcap W: Track dEdx, final W selection; 2x1 ET (GeV); dEdx (keV)",100,0,100,100,0,10);
00190 hE[93]=new TH2F("muE_WglDca","Endcap W: Track glob vertex abs(DCA), final selection ; 2x1 ET (GeV); |DCA| (cm)",100,0,100,100,0,5);
00191 hE[94]=new TH2F("muE_WglDcaSP","Endcap W: Track prim POSITIVE glob signed DCA, final selection; 2x1 ET (GeV); sDCA (cm)",100,0,100,100,-5,5);
00192 hE[95]=new TH2F("muE_WglDcaSN","Endcap W: Track prim NEGATIVE glob signed DCA, final selection ; 2x1 ET (GeV); sDCA (cm)",100,0,100,100,-5,5);
00193
00194 sprintf(txt,"Endcap W: Vertex ID, final selection, 2x1 ET>%.0f GeV; vertex ID",parE_highET);
00195 hE[96]=h=new TH1F("muE_Wcar1",txt,10,-0.5,9.5);
00196 h->SetLineColor(kBlue);h->SetLineWidth(3);
00197
00198 sprintf(txt,"Endcap W: Vertex 'funny' rank, final selection, 2x1 ET>%.0f GeV; X=Log10(rank)+offset",parE_highET);
00199 hE[97]=new TH1F("muE_Wcar2",txt, 150, -9,25);
00200
00201 sprintf(txt,"Vertex Z ,Endcap W: Vertex Z, final selection 2x1 ET>%.0f GeV; Z(cm)",parE_highET);
00202 hE[98]=new TH1F("muE_Wcar3",txt, 100, -200,200);
00203 hE[99]=h=new TH1F("muE_Weta","Endcap W: Lepton eta, final selection ; lepton eta",100, 0.5,2.0);
00204 hE[100]=h=new TH2F("muE_WXY","Endcap W: Projected track XY at SMD depth, final selection; X (cm); Y (cm)",100,-280,280,100,-280,280);
00205
00206
00207
00208 char tt2[][200]={"max 2x1","track matched","no near ET","no away ET"};
00209 for(int i=0;i<4;i++){
00210 sprintf(txt,"Endcap electron candidate, cut=%s; 2x1 ET (GeV)",tt2[i]);
00211 sprintf(txt0,"muE_ETlive%d",i);
00212 hE[110+i]=h=new TH1F(txt0,txt, 100,0,100);
00213 }
00214
00215 hE[132]=h=new TH2F("muEptBalance_clust","Endcap: ptBalance vs cluster ET; 2x1 Cluster ET; ptBalance",100,0,100,100,0,100);
00216 hE[133]=h=new TH2F("muEptBalance_awayTot","ptBalance vs awayside PT; awayside PT; ptBalance",100,0,100,100,0,100);
00217
00218 hE[134]=h=new TH2F("muEsPtBalance_clust","Endcap: sPtBalance vs cluster ET; 2x1 Cluster ET (GeV); signed Pt balance (GeV)",100,0,100,100,-100,100);
00219 Lx=h->GetListOfFunctions();
00220 ln=new TLine(0,parE_ptBalance,100,parE_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
00221
00222 hE[135]=h=new TH2F("muEsPtBalance_awayTot","Endcap: sPtBalance vs awayside PT; awayside PT; sPtBalance",100,0,100,100,-100,100);
00223 Lx=h->GetListOfFunctions();
00224 ln=new TLine(0,parE_ptBalance,100,parE_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
00225
00226
00227 hE[136]=h=new TH1F("muEclustPtBal",Form("Endcap: PT Balance > %.1f ; 2x1 Cluster ET",parE_ptBalance),100,0,100);
00228 hE[137]=h=new TH1F("muEclustPtBal_bckgrd",Form("Endcap: PT Balance < %.1f ; 2x1 Cluster ET",parE_ptBalance),100,0,100);
00229 hE[140]=h=new TH1F("muEclustPtBalnoE",Form("Endcap: sPT Balance > %.1f (EEMC not included); 2x1 Cluster ET",parE_ptBalance),100,0,100);
00230
00231 hE[184+2] = new TH1F("Epos_muEclustpTbal_wE","Endcap: pos_muEclustpTbal_wE",100,0,100);
00232 hE[184+1] = new TH1F("Eneg_muEclustpTbal_wE","Endcap: neg_muEclustpTbal_wE",100,0,100);
00233 hE[184+4] = new TH1F("Epos_muEclustpTbal_noE","Endcap: pos_muEclustpTbal_noE",100,0,100);
00234 hE[184+3] = new TH1F("neg_muEclustpTbal_noE","Endcap: neg_muEclustpTbal_noE",100,0,100);
00235 hE[184+6] = new TH1F("Epos_muEclustpTbal_back","Endcap: pos_muEclustpTbal_back",100,0,100);
00236 hE[184+5] = new TH1F("Eneg_muEclustpTbal_back","Endcap: neg_muEclustpTbal_back",100,0,100);
00237
00238 hE[190]=h=new TH2F("muEclustEt_etaWp","Endcap Wp: 2x1 Cluster ET vs. lepton eta, final selection; lepton eta in LAB; lepton 2x1 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
00239 hE[191]=h=new TH2F("muEclustEt_etaWm","Endcap Wm: 2x1 Cluster ET vs. lepton eta, final selection; lepton eta in LAB; lepton 2x1 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
00240
00241
00242 for(int i=0;i<mxHE;i++) {
00243 if( hE[i]==0) continue;
00244 HList->Add( hE[i]);
00245 }
00246
00247
00248 LOG_INFO<<Form("%s::initEHistos done",GetName())<<endm;
00249
00250 }