StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2011W_histo.cxx
1 // $Id: St2011W_histo.cxx,v 1.18 2016/01/08 02:08:49 jlzhang Exp $
2 //
3 //*-- Author : Jan Balewski, MIT
4 
5 #include <TH2.h>
6 #include <TList.h>
7 #include <TLine.h>
8 #include <TMath.h>
9 
10 #include "St2011WMaker.h"
11 
12 //________________________________________________
13 //________________________________________________
14 void
15 St2011WMaker::initHistos(){
16  const float PI=TMath::Pi();
17 
18  //...... data histograms
19  memset(hA,0,sizeof(hA));
20  TList *Lx; TLine *ln;TH1 *h;
21  char txt[1000], txt0[100];
22  int nCase=20;
23  hA[0]=h=new TH1F("muStatEve",Form("Barrel W-algo: event count : %s",coreTitle.Data()),nCase,0,nCase);
24  h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
25  h->SetLineColor(kBlue);h->SetLineWidth(2);
26  h->SetMarkerSize(2);//<-- large text
27 
28  char key[][200]={"inp","L2bwId","L2bwBits","L2bwET","L2bwRnd","tpcOn","primVert","vertZ","Pt10",
29  "B-in","B200","TrB","Tr2Cl","eta1","noNear","noAway","goldW","goldW+","goldW-"};
30  for(int i=0;i<19;i++) h->Fill(key[i],0.); // preset the order of keys
31 
32  hA[1]=h=new TH1F("muInTrg","mu Barrel W input triggers, WARN: scrambled if manyruns are combined by hadd.C; trigID (random order)",nCase,0,nCase);
33  h->GetXaxis()->SetLabelSize(0.06);
34 
35  hA[2]=h=new TH1F("mubX48","L2WB-ET events vs. bXing; bXing= raw bx48",128,-0.5,127.5);
36  h->SetFillColor(kGreen);
37 
38  hA[3]=h=new TH1F("mubX7","L2WB-ET events vs. bXing; bXing= raw bx7",128,-0.5,127.5);
39  h->SetFillColor(kBlue);
40 
41  hA[4]=new TH1F("mubX48v","L2WB-ET & primVertex vs. bXing; bXing= raw bx48",128,-0.5,127.5);
42  hA[5]=h=new TH1F("mubX7v","L2WB-ET & primVertex; bXing= raw bx7",128,-0.5,127.5);
43  h->SetFillColor(kBlue);
44 
45  //... DMS data
46  hA[6]=h=new TH1F("muDsm1","L2WB-ET events DMS spectrum; DSM value",64,-0.5,63.5);
47  h->SetMinimum(0.8);
48  hA[7]=h=new TH1F("muDsm2","L2WB-Rnd events DMS spectrum; DSM value",64,-0.5,63.5);
49  h->SetMinimum(0.8);
50  sprintf(txt,"L2WB-ET events w/ DMS>%d vs.BTOW TP ID bXing; Hanks' TP ID",par_DsmThres);
51  hA[8]=new TH1F("muDsm3",txt,300,-0.5,299.5);
52  sprintf(txt,"L2WB-ET events w/ DMS>%d & primVertexvs.BTOW TP ID bXing; Hanks' TP ID",par_DsmThres);
53  hA[9]=h=new TH1F("muDsm4",txt,300,-0.5,299.5);
54  h->SetFillColor(kBlue); h->SetLineColor(kBlue);
55 
56 
57  //.... vertex histograms .....
58  hA[10]=h=new TH1F("muVRf","L2WB: PPV Vertex rank, funny X-axis; X=Log(rank)+offset", 150, -9,25);
59  Lx=h->GetListOfFunctions();
60  ln=new TLine(0,0,0,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
61 
62 
63  hA[11]=h=new TH1F("muZv","L2WB: Z of any vertex w/ rank>0;Z-vertex (cm)",100,-200,200);
64  Lx=h->GetListOfFunctions();
65  ln=new TLine(par_vertexZ,0,par_vertexZ,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
66  ln=new TLine(-par_vertexZ,0,-par_vertexZ,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
67 
68  hA[12]=new TH1F("muNV","L2WB: # vertices per event, rank>0 & Z in range; # of vertices",10,0,10);
69  hA[13]=h=new TH1F("muZdcx","zdcx rate; zdcx rate (kHz)",500,0.,5e5);
70 
71  //..... Tracks....
72  hA[20]=h=new TH1F("muStatTrk","Barrel W-algo: track count; cases",nCase,0,nCase);
73  h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
74  h->SetLineColor(kGreen); h->SetLineWidth(2);
75  char keyT[][200]={"flag","pt1","nHit","Hfrac","Rin","Rout","ptOK","@B","CL","fr24",
76  "#Delta R","eta1","noNear","noAway","goldW"};
77 
78  for(int i=0;i<15;i++) h->Fill(keyT[i],0.); // preset the order of keys
79 
80 
81  hA[21]=h=new TH1F("muTrNfit","Barrel: primary track in-selection & vertexZ; nFitPoints",50,0,50);
82  Lx=h->GetListOfFunctions();
83  ln=new TLine(par_nFitPts,0,par_nFitPts,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
84 
85  hA[22]=h=new TH1F("muTrFitFrac","Barrel: primary track in-selection & vertexZ; nFit/nPoss ",50,0,1.1);
86  Lx=h->GetListOfFunctions();
87  ln=new TLine(par_nHitFrac,0,par_nHitFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
88 
89  hA[23]=h=new TH1F("muTrRxyIn","Barrel: primary track first hit in-selection & vertexZ; Rxy (cm)",60,50,170.);
90  Lx=h->GetListOfFunctions();
91  ln=new TLine(par_trackRin,0,par_trackRin,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
92 
93  hA[24]=h=new TH1F("muTrRxyOut","Barrel: primary track last hit in-selection & vertexZ; Rxy (cm)",60,100,220.);
94  Lx=h->GetListOfFunctions();
95  ln=new TLine(par_trackRout,0,par_trackRout,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
96 
97  hA[25]=h=new TH1F("muTrPt1","Barrel: global track PT ; track PT (GeV/c)",160,0,80);
98  Lx=h->GetListOfFunctions();
99  ln=new TLine(par_trackPt,0,par_trackPt,1.e6); ln->SetLineColor(kRed); Lx->Add(ln); h->SetFillColor(kYellow);
100 
101 
102  hA[26]=h=new TH2F("muTr2D1","Barrel: lastHit on track; detector eta ; detector phi (rad)",100,-1.1,1.1,200,-3.2,3.2);
103 
104  hA[27]=h=new TH1F("muTrPt1N","Barrel: global NEGATIVE track PT; track PT (GeV/c)",160,0,80);
105  h->SetFillColor(7);
106 
107  hA[28]=h=new TH2F("muTrdEdX","Barrel: dEdX vs. momentum; track P (GeV); dE/dx (keV)",20,0,10,100,0,10);
108 
109 
110  hA[29]=h=new TH1F("muTrPt1Pr","Barrel: primary track PT; track PT (GeV/c)",160,0,80);
111  hA[30]=h=new TH1F("muTrPt1NPr","Barrel: primary NEGATIVE track PT; track PT (GeV/c)",160,0,80);
112 
113 
114  //..... BTOW .....
115 
116  hA[31]=h=new TH1F("muBmaxAdc","Barrel: BTOW maxADC in event, in-selection; max tower ADC",200,0,4500);
117  hA[32]=h=new TH1F("muBtotAdc","Barrel: BTOW sum of ADC>thres , in-selection;ADC sum/event", 120,0,12000.);
118 
119  hA[33]=h=new TH1F("muBclET","matched BTOW 2x2 cluster ET ;cluster ET (GeV)",100,0,100);
120  Lx=h->GetListOfFunctions();
121  ln=new TLine(par_clustET,0,par_clustET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
122 
123  hA[34]=h=new TH2F("muBclAdcPt","Barrel: matched TPC PT vs. 2x2 cluster ADC sum ; cluster (ADC sum); TPC PT (GeV)",50,0,5000,75,0,150);
124 
125  hA[35]=new TH1F("muTrch2","Barrel: track glob chi2/dof X-Y",100,0,5);
126  hA[36]=new TH2F("muTrch2b","Barrel: track glob chi2/dof; chi2/dof X-Y; last hit eta",30,0,5.,30,-1,1);
127 
128 
129  //.... 4x4 cluster
130  hA[37]=h=new TH1F("muBclET24","matched BTOW 4x4 cluster ET ;cluster 4x4 ET (GeV)",100,0,100);
131  hA[38]=h=new TH2F("muBclE242D","Barrel: Excess energy in 4x4 cluster vs. 2x2 E;2x2 cluster E (GeV); E(4x4)-E(2x2) E (GeV)",50,0,80,50,0,60);
132 
133  hA[39]=h=new TH1F("muBclET24R","Barrel: ratio (2x2/4x4) cluster ET ; fraction: cluster ET 2x2/ 4x4 ET",100,0,1.2);
134  Lx=h->GetListOfFunctions();
135  ln=new TLine(par_clustFrac24,0,par_clustFrac24,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
136 
137  //..... jet energy , fraction
138 
139  hA[40]=h=new TH1F("muBjetET","Barrel: near 'EM jet' ET ; 'EM jet' ET (GeV)",100,0,100);
140 
141  hA[41]=h=new TH2F("muBclEjetE2D","Barrel: Excess nearCone ET vs. 2x2 E;2x2 cluster ET (GeV); ET(cone-2x2) (GeV)",50,0,80,50,0,60);
142 
143  hA[42]=h=new TH1F("muBjetETR","Barrel: ratio (2x2/nearCone) ET ; cluster ET/ near cone ET",100,0,1.2);
144  Lx=h->GetListOfFunctions();
145  ln=new TLine(par_nearTotEtFrac,0,par_nearTotEtFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
146 
147 
148  // .... track-EMC distance cuts
149  hA[43]=h=new TH2F("muBdist1","Barrel: 3D Distance(track-cluster) vs. 2x2 E;2x2 cluster E (GeV); | distance | (cm)",50,0,80,50,0,25);
150  hA[44]=h=new TH2F("muBdist2","Barrel: #Delta Z (track-cluster) vs.Z-clust; Z-cluster (cm); #Delta Z (cm)",100,-300,300,40,-20,20);
151  hA[45]=h=new TH2F("muBdist3","Barrel: R#Delta #phi (track-cluster) vs. 2x2 E;2x2 cluster E (GeV); R#Delta #phi (cm)",50,0,80,80,-20,20);
152  hA[46]=h=new TH1F("muBdist4","Barrel: 3D Distance(track-cluster) vs. 2x2 E;| 3D distance | (cm)",100,0,50);
153  Lx=h->GetListOfFunctions();
154  ln=new TLine(par_delR3D,0,par_delR3D,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
155 
156  //.. continue same side jet veto
157  hA[47]=h=new TH1F("muTjetET","Barrel: quenched near 'TPC jet' PT ; 'TPC jet' PT (GeV)",100,0,100);
158  hA[48]=h=new TH2F("muTjetBjet2D","Barrel: quenched near 'TPC jet' vs. near 'EMC jet' ; EMC jet ET (GeV); TPC PT (GeV/c)",50,0,80,50,0,60);
159  hA[49]=h=new TH1F("muTBjetET","Barrel: near 'TPC+EMC jet' ET ; jet ET (GeV), no double counting",100,0,100);
160 
161  //.. away-side jet veto
162  hA[50]=h=new TH1F("muTwayET","Barrel: TPC away-cone PT sum; PT (GeV)",100,0,100);
163  hA[51]=h=new TH1F("muBwayET","Barrel: BTOW away-cone ET sum; ET (GeV)",100,0,100);
164  hA[52]=h=new TH2F("muTotwayET2D","Barrel: away TPC+EMC ET sum vs. 2x2 cluster ET; 2x2 ET (GeV); away ET (GeV)",50,0,100,150,0,100);
165 
166 
167  hA[53]=h=new TH2F("muAwayET2Db","Barrel: away EMC ET sum vs. 2x2 cluster ET; 2x2 ET (GeV); away EMC ET (GeV)",50,0,100,80,0,80);
168 
169 
170  hA[54]=h=new TH1F("muAwayTotEt","Barrel: away-cone TPC+EMC ET sum ; away ET (GeV)",200,0,100);
171  Lx=h->GetListOfFunctions();
172  ln=new TLine(par_awayET,0,par_awayET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
173 
174  hA[55]=h=new TH1F("muEwayET","Barrel: ETOW away-cone ET sum; ET (GeV)",100,0,100); // away side energy
175 
176  hA[57]=h=new TH2F("muTr2D1pt5","Barrel: lastHit on track (pt > 5); detector eta ; detector phi (rad)",100,-1.1,1.1,240,-PI,PI);
177 
178 
179  hA[58]=new TH1F("muTrch2West","Barrel: track glob chi2/dof West TPC ; chi2/dof",100,0,5);
180  hA[59]=new TH1F("muTrch2East","Barrel: track glob chi2/dof East TPC ; chi2/dof",100,0,5);
181 
182  //... final golden plots ....
183 
184  hA[60]=h=new TH2F("muBclETPt","Barrel: Awayside TPC PT vs. isolated cluster 2x2 ET, matched;2x2 cluster ET (GeV) ; Awayside TPC PT (GeV)",50,0,100,75,0,150);
185 
186  hA[61]=new TH1F("mubX7bht","L2BW-BHT-rnd events vs. bXing; bXing= raw bx7",128,-0.5,127.5); // filled on input
187  hA[62]=h=new TH2F("muEne_Deta","Barrel W: cluster energy vs. detector eta, final selection; barrel eta bin; 2x2 Energy (GeV)",40,0,40,50,0,100);
188 
189 
190  // track matched to cluster plots
191  hA[63]=h=new TH1F("muTrNfitTr2Cl","Barrel: primary track in-muTr2Cl; nFitPoints",50,0,50);
192  Lx=h->GetListOfFunctions();
193  ln=new TLine(par_nFitPts,0,par_nFitPts,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
194 
195  hA[64]=h=new TH1F("muTrFitFracTr2Cl","Barrel: primary track in-muTr2Cl; nFit/nPoss ",50,0,1.1);
196  Lx=h->GetListOfFunctions();
197  ln=new TLine(par_nHitFrac,0,par_nHitFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
198 
199  hA[65]=h=new TH1F("muTrRxyInTr2Cl","Barrel: primary track first hit in-muTr2Cl; Rxy (cm)",60,50,170.);
200  Lx=h->GetListOfFunctions();
201  ln=new TLine(par_trackRin,0,par_trackRin,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
202 
203  // free 63-69
204 
205  //..... BSMD ......reserve 2x10= [70:e.... 80:p.... 89]
206  const char cPlane[ mxBSmd]={'E','P'};
207  for(int iep=0;iep<mxBSmd;iep++){
208  sprintf(txt0,"muS%cadc1",cPlane[iep]);
209  sprintf(txt,"BSMD-%c whole plane ADC; ADC",cPlane[iep]);
210  hA[70+10*iep]=h=new TH1F(txt0,txt,275,0,1100);
211  }// end of E-,P-planes
212 
213  //.... final Ws
214  hA[90]=h=new TH1F("muWET",Form("Barrel W: Final Selection : %s; 2x2 cluster ET (GeV)",coreTitle.Data()), 100,0,100);
215  Lx=h->GetListOfFunctions();
216  ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
217 
218  sprintf(txt,"Barrel W: Final selection, ET>%.0f GeV 'goldenW'; detector eta ; detector phi (rad)",par_highET);
219  hA[91]=new TH2F("muW2D1",txt,10,-1.0,1.0,24,-PI,PI);
220 
221  hA[92]=new TH2F("muWdedx","Barrel W: Track dEdx, final selection; 2x2 ET (GeV); dEdx (keV)",100,0,100,100,0,20);
222  hA[93]=new TH2F("muWglDca","Barrel W: Track glob vertex abs(DCA), final selection ; 2x2 ET (GeV); |DCA| (cm)",100,0,100,100,0,5);
223  hA[94]=new TH2F("muWglDcaSP","Barrel W: Track prim POSITIVE glob signed DCA, final selection; 2x2 ET (GeV); sDCA (cm)",100,0,100,100,-5,5);
224  hA[95]=new TH2F("muWglDcaSN","Barrel W: Track prim NEGATIVE glob signed DCA, final selection ; 2x2 ET (GeV); sDCA (cm)",100,0,100,100,-5,5);
225 
226  sprintf(txt,"Barrel W: Vertex ID, final selection, 2x2 ET>%.0f GeV; vertex ID",par_highET);
227  hA[96]=h=new TH1F("muWcar1",txt,10,-0.5,9.5);
228  h->SetLineColor(kBlue);h->SetLineWidth(3);
229 
230  sprintf(txt,"Barrel W: Vertex 'funny' rank, final W selection, 2x2 ET>%.0f GeV; X=Log(rank)+offset",par_highET);
231  hA[97]=new TH1F("muWcar2",txt, 150, -9,25);
232 
233  sprintf(txt,"Barrel W: Vertex Z, final selection, 2x2 ET>%.0f GeV; Z(cm)",par_highET);
234  hA[98]=new TH1F("muWcar3",txt, 100, -200,200);
235  hA[99]=h=new TH1F("muWeta",Form("Barrel W: lepton eta final selection %s ; lepton eta",coreTitle.Data()),400,-2.0,2.0);
236 
237  //Q/pt plots
238  sprintf(txt,"TPC GLOB Q/PT ; 2x2 cluster ET (GeV); Q/PT");
239  hA[100]=h=new TH2F("muChRecPNg", txt,100,0.,100.,100,-0.1,0.1);
240  Lx=h->GetListOfFunctions();
241  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
242 
243  sprintf(txt,"TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT");
244  hA[101]=h=new TH2F("muChRecPNp", txt,100,0.,100.,100,-0.1,0.1);
245  Lx=h->GetListOfFunctions();
246  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
247 
248  // "straightened" charge separation plots
249  sprintf(txt,"TPC GLOB Charge Separation Hyperbola Corrected ; 2x2 cluster ET (GeV); Q*ET/PT");
250  hA[102]=h=new TH2F("muChRecHypCorrPNg", txt,100,0.,100.,100,-4,4);
251  Lx=h->GetListOfFunctions();
252  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
253 
254  sprintf(txt,"TPC PRIM Charge Separation Hyperbola Corrected ; 2x2 cluster ET (GeV); Q*ET/PT");
255  hA[103]=h=new TH2F("muChRecHypCorrPNp", txt,100,0.,100.,100,-4,4);
256  Lx=h->GetListOfFunctions();
257  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
258 
259  hA[104]=h=new TH1F("muWtime",Form("Barrel Golden W: unix time final selection %s 3/17/12 - 4/20/12; unixtime (bin = 10 min)",coreTitle.Data()),4896,1331942400,1334880000);
260 
261  hA[105]=h=new TH2F("muWfreeQ","reco charge vs. TPC dedx, golden W+; Q *ET/PT; dEdx (keV)",200,-5,5,100,0,20);
262 
263  hA[106]=h=new TH1F("muWzdcx","Barrel Golden W: zdcx rate, final selection ; zdcx rate (kHz)",500,0.,5e5);
264 
265 
266  //..... series of electron ET plots after succesive cuts
267  char tt2[][200]={"max 2x2","track matched","no near ET","no away ET"};
268  for(int i=0;i<4;i++){
269  sprintf(txt,"Barrel electron candidate, cut=%s; 2x2 ET (GeV)",tt2[i]);
270  sprintf(txt0,"muETlive%d",i);
271  hA[110+i]=h=new TH1F(txt0,txt, 100,0,100);
272  }
273 
274  //free 114-131
275 
276  hA[114]=h=new TH2F("musptBalance_Eta","sptBalance vs cluster Eta; eta; sptBalance",50,-3,3,100,-100,100);
277  hA[115]=h=new TH2F("musptBalance_Phi","sptBalance vs cluster Phi; phi; sptBalance",63,-PI,PI,100,-100,100);
278 
279  hA[117]=h=new TH2F("mujetQAeta_phi","Input Jet phi vs eta ; eta ; phi ",50,-3,3,63,-PI,PI);
280  hA[118]=h=new TH1F("mujetQApt","Input Jet pt; pt;",100,0,100);
281 
282  // add 119-122 for jet counts and correlation, jinlong, 12/19/2014
283  hA[119]=h=new TH1F("mujetQAno","Number of Jets per event; ; counts", 10, 0,10);
284  hA[120]=h=new TH2F("mujetCorrEta","Eta Correlation: candidates vs jet; candidate #eta ; jet #eta", 50, -2.5,2.5, 50, -2.5,2.5);
285  hA[121]=h=new TH2F("mujetCorrPhi","Phi Correlation: candidates vs jet; candidate #phi; jet #phi", 63, -PI,PI, 63, -PI, PI);
286  hA[122]=h=new TH1F("mujetQApt_out","Jet pt outside nearCone; jet pt;",100, 0, 100);
287  hA[123]=h=new TH2F("mujetQApt_DeltaPhi","Jet pt outside nearCone vs #Delta#phi;jet pt; #Delta#phi ",100, 0, 100, 63, -PI, PI);
288  hA[124]=h=new TH2F("mujetQApt_Eta","Jet pt outside nearCone vs #eta;jet pt; #eta ",100, 0, 100, 50, -2.5, 2.5);
289 
290  //jet check after all the cuts
291  hA[125]=h=new TH1F("muWjetQAno","Number of Jets per event, final selection; ; counts", 10, 0,10);
292  hA[126]=h=new TH2F("muWjetCorrEta","Eta Correlation: candidates vs jet, final selection; candidate #eta ; jet #eta", 50, -2.5,2.5, 50, -2.5,2.5);
293  hA[127]=h=new TH2F("muWjetCorrPhi","Phi Correlation: candidates vs jet, final selection; candidate #phi; jet #phi", 63, -PI,PI, 63, -PI, PI);
294  hA[128]=h=new TH1F("muWjetQApt_out","Jet pt outside nearCone, final selection; jet pt;",100, 0, 100);
295  hA[129]=h=new TH2F("muWjetQApt_DeltaPhi","Jet pt outside nearCone vs #Delta#phi, final selection;jet pt; #Delta#phi ",100, 0, 100, 63, -PI, PI);
296  hA[130]=h=new TH2F("muWjetQApt_Eta","Jet pt outside nearCone vs #eta, final selection;jet pt; #eta ",100, 0, 100, 50, -2.5, 2.5);
297 
298  //add to see impact on totnearCone ET fraction from the eemc
299  hA[131]=h=new TH1F("muBjetETR_noEEMC","Barrel: ratio (2x2/nearCone) ET w/o EEMC ; cluster ET/ near cone ET w/o eemc",100,0,1.2);
300  Lx=h->GetListOfFunctions();
301  ln=new TLine(par_nearTotEtFrac,0,par_nearTotEtFrac,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
302 
303 
304  hA[132]=h=new TH2F("muptBalance_clust","ptBalance vs cluster ET; 2x2 Cluster ET; ptBalance",100,0,100,100,0,100);
305  hA[133]=h=new TH2F("muptBalance_awayTot","ptBalance vs awayside PT; awayside PT; ptBalance",100,0,100,100,0,100);
306 
307  hA[134]=h=new TH2F("musPtBalance_clust","Barrel: sPtBalance vs cluster ET; 2x2 Cluster ET (GeV); signed Pt balance (GeV)",100,0,100,200,-100,100);
308  Lx=h->GetListOfFunctions();
309  ln=new TLine(0,par_ptBalance,100,par_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
310 
311  //add 138,139, for charge separated 2D sptbalance. Jinlong, 12/09/2014
312  hA[138]=h=new TH2F("musPtBalance2_clust_pos","Barrel W+: sPtBalance vs cluster ET; 2x2 Cluster ET (GeV); signed Pt balance (GeV)",100,0,100,200,-100,100);
313  Lx=h->GetListOfFunctions();
314  ln=new TLine(0,par_ptBalance,100,par_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
315  hA[139]=h=new TH2F("musPtBalance2_clust_neg","Barrel W-: sPtBalance vs cluster ET; 2x2 Cluster ET (GeV); signed Pt balance (GeV)",100,0,100,200,-100,100);
316  Lx=h->GetListOfFunctions();
317  ln=new TLine(0,par_ptBalance,100,par_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
318 
319  hA[135]=h=new TH2F("musPtBalance_awayTot","Barrel: sPtBalance vs awayside PT; awayside PT; sPtBalance",100,0,100,100,-100,100);
320  Lx=h->GetListOfFunctions();
321  ln=new TLine(0,par_ptBalance,100,par_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
322 
323  int nETbins = 200;
324  hA[136]=h=new TH1F("muclustPtBal",Form("Barrel: PT Balance > %.1f ; 2x2 Cluster ET",par_ptBalance),nETbins,0,100);
325  hA[137]=h=new TH1F("muclustPtBal_bckgrd",Form("Barrel: PT Balance < %.1f ; 2x2 Cluster ET",par_ptBalance),nETbins,0,100);
326  hA[140]=h=new TH1F("muclustPtBalnoE",Form("Barrel: sPT Balance > %.1f (EEMC not included); 2x2 Cluster ET",par_ptBalance),nETbins,0,100);
327 
328  // Histograms added for background subtraction and systematic
329  char str[200];
330  for (int i=0; i<=20; i++) {
331  sprintf(str,"neg_failAwaySide_Awayside_pt_bin_%d",i);
332  hA[142+i] = new TH2F(str,str,nETbins,0,100,81,0,81);
333  }
334 
335  for (int i=0; i<=20; i++) {
336  sprintf(str,"pos_failAwaySide_Awayside_pt_bin_%d",i);
337  hA[163+i] = new TH2F(str,str,nETbins,0,100,81,0,81);
338  }
339 
340  hA[184+2] = new TH1F("pos_muclustpTbal_wE","Barrel: pos_muclustpTbal_wE",nETbins,0,100);
341  hA[184+1] = new TH1F("neg_muclustpTbal_wE","Barrel: neg_muclustpTbal_wE",nETbins,0,100);
342  hA[184+4] = new TH1F("pos_muclustpTbal_noE","Barrel: pos_muclustpTbal_noE",nETbins,0,100);
343  hA[184+3] = new TH1F("neg_muclustpTbal_noE","Barrel: neg_muclustpTbal_noE",nETbins,0,100);
344  hA[184+6] = new TH1F("pos_muclustpTbal_back","Barrel: pos_muclustpTbal_back",nETbins,0,100);
345  hA[184+5] = new TH1F("neg_muclustpTbal_back","Barrel: neg_muclustpTbal_back",nETbins,0,100);
346 
347 
348  hA[191]=h=new TH2F("muclustEt_etaWp","Barrel W+: 2x2 Cluster ET vs. lepton eta, final selection; lepton eta in LAB; lepton 2x2 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
349  hA[192]=h=new TH2F("muclustEt_etaWm","Barrel W-: 2x2 Cluster ET vs. lepton eta, final selection; lepton eta in LAB; lepton 2x2 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
350 
351 
352  hA[195]=h=new TH1F("muEtaLT0_maxTowADC","max tower ADC for eta < 0",4096,0,4096);
353  hA[196]=h=new TH1F("muEtaGT0_maxTowADC","max tower ADC for eta > 0",4096,0,4096);
354  hA[197]=h=new TH2F("muTr2D1pt10","lastHit on track (pt > 10); detector eta ; detector phi (rad)",100,-1.1,1.1,240,-PI,PI);
355  hA[198]=h=new TH2F("muTrPt_eta","Track PT vs lastHit eta; detector eta ; prim track pt (GeV)",100,-1.1,1.1,100,0,100);
356  hA[199]=h=new TH2F("muBdist5","Barrel: 3D Distance(track-cluster) vs. cluster eta; cluster eta; | distance | (cm)",100,-1.,1.,50,0,25);
357  hA[200]=h=new TH2F("muWClustET_eta","W: 2x2 cluster ET vs. cluster eta; cluster detector eta; 2x2 cluster ET",100,-1.,1.,60,0,60);
358  hA[201]=h=new TH2F("muWTrPT_eta","W: Track PT vs. cluster eta; cluster detector eta; Track PT",100,-1.,1.,100,0,100);
359  hA[202]=h=new TH2F("muBTrPT_eta","Background: Track PT vs. cluster eta; cluster detector eta; Track PT",100,-1.,1.,100,0,100);
360  hA[203]=h=new TH2F("muWE2P_eta","W: E/P vs. cluster eta; cluster detector eta; E/P",100,-1.,1.,15,0,3);
361  hA[204]=h=new TH2F("muBE2P_eta","Background: E/P vs. cluster eta; cluster detector eta; E/P",100,-1.,1.,15,0,3);
362  hA[205]=h=new TH2F("muWTr2D1","lastHit on track (W candidate); detector eta ; detector phi (rad)",100,-1.1,1.1,240,-PI,PI);
363  hA[206]=h=new TH2F("muWClustET_eta_clgt14","2x2 cluster ET vs. cluster eta (Cluster ET > 14); cluster detector eta; 2x2 cluster ET",100,-1.,1.,60,0,60);
364  hA[207]=h=new TH2F("muWClustET_eta_towerIso","2x2 cluster ET vs. cluster eta (2x2/4x4 frac); cluster detector eta; 2x2 cluster ET",100,-1.,1.,60,0,60);
365  hA[208]=h=new TH2F("muWClustET_eta_delR","2x2 cluster ET vs. cluster eta (track-clust match); cluster detector eta; 2x2 cluster ET",100,-1.,1.,60,0,60);
366  hA[209]=h=new TH2F("muWClustET_eta_nearIso","2x2 cluster ET vs. cluster eta (2x2/near frac); cluster detector eta; 2x2 cluster ET",100,-1.,1.,60,0,60);
367 
368  //check ETOW near cone sum
369  hA[210]=h=new TH2F("muETOWnearET_eta_tr2cl","ETOW near cone ET vs. cluster eta; cluster detector eta; ETOW near ET",100,-1.,1.,20,0,20);
370  hA[211]=h=new TH2F("muETOWnearET_phi_etaGT0_tr2cl","ETOW near cone ET vs. cluster phi (cluster eta > 0); cluster detector phi; ETOW near ET",240,-PI,PI,20,0,20);
371  hA[212]=h=new TH2F("muETOWnearET_phi_etaLT0_tr2cl","ETOW near cone ET vs. cluster phi (cluster eta < 0); cluster detector phi; ETOW near ET",240,-PI,PI,20,0,20);
372 
373  hA[240]=h=new TH2F("muclustEt_etaFinal_noE","Barrel: 2x2 Cluster ET vs. lepton eta, final selection (no EEMC in veto); lepton eta in LAB; lepton 2x2 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
374  hA[241]=h=new TH2F("muclustEt_etaFinal","Barrel: 2x2 Cluster ET vs. lepton eta, final selection; lepton eta in LAB; lepton 2x2 Cluster ET (GeV)",32,-2.,2.,60,0.,60.);
375 
376  hA[250]=h=new TH2F("muBclEjetE2D_ET","ratio (2x2/nearCone) ET vs. 2x2 cluster ET; 2x2 cluster ET (GeV); ET(cone-2x2) (GeV)",100,0,100,100,0,1.2);
377  Lx=h->GetListOfFunctions();
378  ln=new TLine(0,par_nearTotEtFrac,1.e6,par_nearTotEtFrac); ln->SetLineColor(kRed); Lx->Add(ln);
379 
380  hA[251]=h=new TH2F("muSpTbal_isoConePos","Q+ Signed p_{T} Balance vs. 2x2/nearCone; 2x2/nearCone; Signed p_{T} Balance (GeV)",110,0,1.1,100,-100,100);
381  hA[252]=h=new TH2F("muSpTbal_isoConeNeg","Q- Signed p_{T} Balance vs. 2x2/nearCone; 2x2/nearCone; Signed p_{T} Balance (GeV)",110,0,1.1,100,-100,100);
382 
383  hA[253]=h=new TH2F("musPtBalance_awayTot_highEt","Barrel (ET > 25): sPtBalance vs awayside PT; awayside PT; sPtBalance",100,0,100,100,-100,100);
384  Lx=h->GetListOfFunctions();
385  ln=new TLine(0,par_ptBalance,100,par_ptBalance); ln->SetLineColor(kRed); Lx->Add(ln);
386 
387  //Q/pt plots for each sector
388  for(int isec=0; isec<24; isec++){
389  sprintf(txt,"TPC Sector %d : GLOB Q/PT ; 2x2 cluster ET (GeV); Q/PT",isec+1);
390  hA[260+isec]=h=new TH2F(Form("muChRecPNgSec%d",isec+1), txt,100,0.,100.,100,-0.1,0.1);
391  Lx=h->GetListOfFunctions();
392  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
393 
394  sprintf(txt,"TPC Sector %d : PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT",isec+1);
395  hA[284+isec]=h=new TH2F(Form("muChRecPNpSec%d",isec+1), txt,100,0.,100.,100,-0.1,0.1);
396  Lx=h->GetListOfFunctions();
397  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
398 
399  sprintf(txt,"Barrel W: TPC Sector %d Track prim POSITIVE glob signed DCA, final selection; 2x2 ET (GeV); sDCA (cm)",isec+1);
400  hA[308+isec]=h=new TH2F(Form("muWglDcaSP_Sec%d",isec+1), txt,100,0.,100.,100,-5,5);
401  sprintf(txt,"Barrel W: TPC Sector %d Track prim NEGATIVE glob signed DCA, final selection; 2x2 ET (GeV); sDCA (cm)",isec+1);
402  hA[332+isec]=h=new TH2F(Form("muWglDcaSN_Sec%d",isec+1), txt,100,0.,100.,100,-5,5);
403 
404  sprintf(txt,"TPC Sector %d : PRIM Charge Separation Hyperbola Corrected ; 2x2 cluster ET (GeV); Q*ET/PT",isec+1);
405  hA[356+isec]=h=new TH2F(Form("muChRecHypCorrPNpSec%d",isec+1), txt,100,0.,100.,100,-4,4);
406  Lx=h->GetListOfFunctions();
407  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
408  }
409 
410  hA[390]=h=new TH1F("adcB_dist","btow ADC distribution; btow softID; ;",4800,0,4800);
411  hA[391]=h=new TH2F("adcB2D_dist","btow ADC 2D distibution; iphi; ieta;",120,0,120,40,0,40);
412 
413 
414  // add histos to the list (if provided)
415  for(int i=0;i<mxHA;i++) {
416  if( hA[i]==0) continue;
417  HList->Add( hA[i]);
418  }
419 
420  // HList->ls();
421  LOG_INFO<<Form("%s::initHistos done",GetName())<<endm;
422 
423 }
424 
425 // $Log: St2011W_histo.cxx,v $
426 // Revision 1.18 2016/01/08 02:08:49 jlzhang
427 // added couples histograms and fixed a small bug
428 //
429 // Revision 1.17 2013/09/13 19:33:13 stevens4
430 // Updates to code for combined 2011+2012 result presented to spin PWG 9.12.13
431 //
432 // Revision 1.16 2013/06/14 21:08:51 jlzhang
433 // add histo Q/pT vs. nHitsFit and Q/pT vs. nHitsPos
434 //
435 // Revision 1.15 2012/10/05 17:53:53 balewski
436 // added correlation plots for reco Q in Z, W algos
437 //
438 // Revision 1.14 2012/09/26 14:20:59 stevens4
439 // use PtBal cos(phi) for WB and WE algos and use Q*ET/PT for barrel charge sign
440 //
441 // Revision 1.13 2012/09/18 21:10:08 stevens4
442 // Include all rank>0 vertex again (new jet format coming next), and remove rank<0 endcap vertices.
443 //
444 // Revision 1.12 2012/09/17 03:29:30 stevens4
445 // Updates to Endcap algo and Q*ET/PT charge separation
446 //
447 // Revision 1.11 2012/08/31 20:10:52 stevens4
448 // switch to second EEMC background using both isolation and sPt-Bal (for mirror symmetry (also adjust eta binning)
449 //
450 // Revision 1.10 2012/08/28 14:28:27 stevens4
451 // add histos for barrel and endcap algos
452 //
453 // Revision 1.9 2012/08/07 21:06:38 stevens4
454 // update to tree analysis to produce independent histos in a TDirectory for each eta-bin
455 //
456 // Revision 1.8 2012/07/13 20:53:16 stevens4
457 // Add filling of empty events in W tree
458 // Minor modifications to histograms
459 //
460 // Revision 1.7 2012/07/13 16:11:44 balewski
461 // minor clenup, prevent crash in Finish if zero input events, now it runs on M-C events as well
462 //
463 // Revision 1.6 2012/07/05 19:03:54 stevens4
464 // preset bin labels for TPC histos to preven merge warning
465 //
466 // Revision 1.5 2012/06/29 21:20:08 stevens4
467 // *** empty log message ***
468 //
469 // Revision 1.4 2012/06/25 20:53:26 stevens4
470 // algo and histo cleanup
471 //
472 // Revision 1.3 2012/06/18 18:28:01 stevens4
473 // Updates for Run 9+11+12 AL analysis
474 //
475 // Revision 1.2 2011/02/25 06:03:50 stevens4
476 // addes some histos and enabled running on MC
477 //
478 // Revision 1.1 2011/02/10 20:33:23 balewski
479 // start
480 //
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237