StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2009Wjj_histo.cxx
1 // $Id: St2009Wjj_histo.cxx,v 1.4 2011/06/17 17:36:12 smirnovd Exp $
2 //
3 //*-- Author : Jan Balewski, MIT
4 
5 
6 #include <TH2.h>
7 #include <TList.h>
8 #include <TLine.h>
9 #include <TMath.h>
10 
11 #include "St2009WjjMaker.h"
12 
13 //________________________________________________
14 //________________________________________________
15 void
16 St2009WjjMaker::initHistos(){
17  // const float PI=TMath::Pi();
18 
19  //...... data histograms
20  memset(hA,0,sizeof(hA));
21  // TList *Lx; TLine *ln;
22  TH1 *h;
23  // char txt[1000], txt0[100];
24  int nCase=13;
25 
26  hA[0]=h=new TH1F(core+"StatEve",core+" event count",nCase,0,nCase);
27  h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
28  h->SetLineColor(kBlue);h->SetLineWidth(2);
29  h->SetMarkerSize(2);//<-- large text
30 
31  const char *key[]={"inp","trig","vert","anyJ","mulJ","J1","J2","J3","DjPt","DjEta", "DjPz","eta1+2","badBx48"};
32  for(int i=0;i<13;i++) h->Fill(key[i],0.); // preset the order of keys
33 
34 
35  hA[1]=0;// free
36  hA[2]=new TH1F(core+"bX7","Rate vs. raw bx7; bXing= raw bx7",128,-0.5,127.5);
37 
38  hA[3]=0;//free
39  hA[4]=new TH1F(core+"bX7c","Rate vs. STAR IP bXing(bx7); bXing= bx7+offset",128,-0.5,127.5);
40 
41  hA[5]=new TH2F(core+"s4mon","all L2W & vertex ; bXing at STAR (7bit); spin4 from DB",128,-0.5,127.5,32,-0.5,15.5);
42 
43  hA[6]=new TH2F(core+"_3J","3 jet events (PT>5Gev); |phi1-phi3| (rad); |phi2-phi3| (rad)",50,0,3.15,50,0,3.15);
44 
45  // float etaX=2.5;
46  for(int j=1;j<=2;j++) { // use h10+h11
47  hA[10+j-1]=h=new TH2F(core+Form("_J%d",j),Form("jet%d ; PT_%d (GeV); #eta_%d ",j,j,j),50,0,100,20,-2.5,2.5);
48  }
49 
50 
51  // 12 free
52  hA[13]=new TH1F(core+"phi12","di-jet opening angle; phi(1-2) (deg)",120,-90,270.);
53  hA[14]=new TH1F(core+"_K1","di-jet ; invM (GeV)",70,0,210);
54  hA[15]=new TH2F(core+"_K2","di-jet ; PZ GeV/c; pT GeV/c ",30,-120,120,20,0,40);
55  hA[16]=new TH2F(core+"_K3","di-jet ; invM (GeV); pT GeV/c",60,0,180,50,0,50);
56  hA[17]=new TH2F(core+"_K4","di-jet E vs. E; jet-1 E (GeV); jet-2 E (GeV)",25,0,100,25,0,100);
57  hA[18]=new TH2F(core+"_K5","di-jet PT vs. PT; jet-1 PT (GeV/c); jet-2 PT (GeV/c)",50,0,100,50,0,100);
58  hA[19]=new TH2F(core+"_K6","di-jet eta vs. eta; #eta_1 ; #eta_2 " ,30,-3.,3.,30,-3.,3.);
59 
60 
61  hA[20]=h=new TH2F(core+"_spinM","di-jet spin sorting; invM (GeV); spin4;",42,0,210,16,-0.5,15.5);
62 
63 
64  // add histos to the list (if provided)
65  for(int i=0;i<mxHA;i++) {
66  if( hA[i]==0) continue;
67  HList->Add( hA[i]);
68  }
69  // HList->ls();
70  LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
71 
72 }
73 
74 
75 // $Log: St2009Wjj_histo.cxx,v $
76 // Revision 1.4 2011/06/17 17:36:12 smirnovd
77 // *** empty log message ***
78 //
79 // Revision 1.3 2010/05/03 17:24:37 balewski
80 // added spin sorting of di-jets
81 //
82 // Revision 1.2 2010/05/01 01:31:44 balewski
83 // added W->JJ code & JES calibration
84 //
85 // Revision 1.1 2010/04/16 01:04:43 balewski
86 // start
87 //
88 
89 #if 0 // trash
90 
91  Lx=h->GetListOfFunctions();
92  ln=new TLine(par_jetPtLow,-etaX,par_jetPtLow,etaX); ln->SetLineColor(kRed); Lx->Add(ln);
93  ln=new TLine(par_jetPtHigh,-etaX,par_jetPtHigh,etaX); ln->SetLineColor(kRed); Lx->Add(ln);
94  ln=new TLine(0,par_jetEtaLow,100,par_jetEtaLow); ln->SetLineColor(kRed); Lx->Add(ln);
95  ln=new TLine(0,par_jetEtaHigh,100,par_jetEtaHigh); ln->SetLineColor(kRed); Lx->Add(ln);
96 
97 
98  hA[12]=h=new TH2F(core+"_DJ","di-jet ; PT (GeV); eta ",25,0,50,20,-4.,4.);
99  Lx=h->GetListOfFunctions();
100  ln=new TLine(par_djPtLow,-etaX*2,par_djPtLow,etaX*2); ln->SetLineColor(kRed); Lx->Add(ln);
101  ln=new TLine(par_djPtHigh,-etaX*2,par_djPtHigh,etaX*2); ln->SetLineColor(kRed); Lx->Add(ln);
102  ln=new TLine(0,par_djEtaMin,100,par_djEtaMin); ln->SetLineColor(kRed); Lx->Add(ln);
103  ln=new TLine(0,-par_djEtaMin,100,-par_djEtaMin); ln->SetLineColor(kRed); Lx->Add(ln);
104 
105 
106  hA[13]=h=new TH2F(core+"_K2","di-jet ; invM ( GeV); |eta1+eta2| ",50,0,150,20,0,3);
107  Lx=h->GetListOfFunctions();
108  ln=new TLine(0,par_etaSumLow,150,par_etaSumLow); ln->SetLineColor(kRed); Lx->Add(ln);
109  ln=new TLine(0,par_etaSumHigh,150,par_etaSumHigh); ln->SetLineColor(kRed); Lx->Add(ln);
110 
111  hA[20]=h=new TH2F(core+"_C0","di-jet ; PZ GeV/c; eta1+eta2 ",30,-120,120,20,-3,3);
112 
113 
114  hA[21]=new TH2F(core+"_C1","di-jet vs. all jets (nJ=3...); PZ all jets GeV/c; di-jet eta ",30,-100,100,20,-3,3);
115 
116  hA[23]=0;//new TH2F(core+"_C3","Jet 1; ET_1 (GeV); #eta_1",30,0,100,30,-3,3);
117 
118  Lx=h->GetListOfFunctions();
119  ln=new TLine(0,par_djPzLow,150,par_djPzLow); ln->SetLineColor(kRed); Lx->Add(ln);
120  ln=new TLine(0,par_djPzHigh,150,par_djPzHigh); ln->SetLineColor(kRed); Lx->Add(ln);
121 
122 #endif
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237