StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St2009pubWana_histo.cxx
1 // $Id: St2009pubWana_histo.cxx,v 1.3 2010/03/14 22:50:31 balewski 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 "St2009WMaker.h"
11 #include "St2009pubWanaMaker.h"
12 
13 //________________________________________________
14 //________________________________________________
15 void
16 St2009pubWanaMaker::initHistos(){
17  // const float PI=TMath::Pi();
18  TString core="pub"; // prefix added to every histo name, to allow for multipl maker saving histos in the same root file
19 
20 
21  //...... data histograms
22  memset(hA,0,sizeof(hA));
23  TList *Lx; TLine *ln;TH1 *h;
24  char txt[1000], txt0[100];
25  int nCase=5;
26 
27  hA[0]=h=new TH1F(core+"StatEve",core+" event count",nCase,0,nCase);
28  h->GetXaxis()->SetTitleOffset(0.4); h->GetXaxis()->SetLabelSize(0.06); h->GetXaxis()->SetTitleSize(0.05); h->SetMinimum(0.8);
29  h->SetLineColor(kBlue);h->SetLineWidth(2);
30 
31  char key[][200]={"inp","acc","W"};
32  for(int i=0;i<3;i++) h->Fill(key[i],0.); // preset the order of keys
33 
34  hA[1]=new TH2F(core+"CrR","ADC of track pointed tower, per carte; ADC-ped ; crate ID ",250,0.,4100.,30,0.5,30.5);
35 
36  // free 2-4, can be used
37 
38  hA[5]=h=new TH1F(core+"WET"," Final W selection; 2x2 cluster ET (GeV)", 100,0,100);
39  Lx=h->GetListOfFunctions();
40  ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
41 
42  sprintf(txt,"TPC GLOB Q/PT ; 2x2 cluster ET (GeV); Q/PT");
43  hA[6]=h=new TH2F(core+"chRecPNg", txt,100,0.,100.,100,-0.1,0.1);
44  Lx=h->GetListOfFunctions();
45  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
46 
47  sprintf(txt,"TPC PRIM Q/PT ; 2x2 cluster ET (GeV); Q/PT");
48  hA[7]=h=new TH2F(core+"chRecPNp", txt,100,0.,100.,100,-0.1,0.1);
49  Lx=h->GetListOfFunctions();
50  ln=new TLine(0,0,100,0); ln->SetLineColor(kMagenta); Lx->Add(ln);
51 
52  //free 8-9
53 
54  //use 10-19
55  char cPM[2]={'P','N'}; // Positive, Negative
56  for(int ipn=0;ipn<2;ipn++){
57  sprintf(txt0,"chWET%cg",cPM[ipn]);
58  sprintf(txt,"Final W glob Q=%c; 2x2 cluster ET ",cPM[ipn]);
59  hA[10+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
60  Lx=h->GetListOfFunctions();
61  ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
62 
63  sprintf(txt0,"chWET%cp",cPM[ipn]);
64  sprintf(txt,"Final W prim Q=%c; 2x2 cluster ET ",cPM[ipn]);
65  hA[12+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
66  Lx=h->GetListOfFunctions();
67  ln=new TLine(par_highET,0,par_highET,1.e6); ln->SetLineColor(kRed); Lx->Add(ln);
68 
69 
70  sprintf(txt0,"chCF%c0",cPM[ipn]);
71  sprintf(txt,"prim sign=%c flip after V-refit; 2x2 cluster ET ",cPM[ipn]);
72  hA[14+ipn]=h=new TH1F(core+txt0, txt, 100,0,100);
73 
74  sprintf(txt0,"chEtaC%c",cPM[ipn]);
75  sprintf(txt,"Final W sel. ET>%.1f GeV, prim Q=%c ; lepton eta ,event ref frame ",par_highET, cPM[ipn]);
76  hA[16+ipn]=h=new TH1F(core+txt0, txt, 40,-2,2);
77  }
78 
79 
80  //20-30 background study cuts
81  hA[20]=h=new TH1F(core+"Joe1","Final sel, awayET<8, nearRET>0.9; 2x2 cluster ET (GeV)", 100,0,100);
82  hA[21]=h=new TH1F(core+"Joe2","Final sel, awayET>8, nearRET>0.9; 2x2 cluster ET (GeV)", 100,0,100);
83 
84  hA[22]=h=new TH1F(core+"Joe3","Final sel, awayET<8, nearRET=[0.8,0.9]; 2x2 cluster ET (GeV)", 100,0,100);
85  hA[23]=h=new TH1F(core+"Joe4","Final sel, awayET>8, nearRET=[0.8,0.9]; 2x2 cluster ET (GeV)", 100,0,100);
86 
87  hA[24]=h=new TH1F(core+"Joe5","Final sel, awayET<8, nearRET=[0.,0.8]; 2x2 cluster ET (GeV)", 100,0,100);
88  hA[25]=h=new TH1F(core+"Joe6","Final sel, awayET>8, nearRET=[0.,0.8]; 2x2 cluster ET (GeV)", 100,0,100);
89 
90  hA[26]=h=new TH1F(core+"Joe7","Final sel, awayET<8 ; 2x2 ET/ nearET ", 110,0,1.1);
91  hA[27]=h=new TH2F(core+"Joe8","Final sel, nearR>0.9 ; 2x2 cluster ET (GeV); awayET 9GeV)", 100,0,100,100,0,100);
92 
93 
94  //Study global vs primary tracks //JS
95  hA[28]=h=new TH2F(core+"primPT_globPT","global vs primary pT;primary pT;global pT",100,0,100,100,0,100);
96  hA[29]=h=new TH1F(core+"diffprimPT_globPT","global - primary pT; global-primary pT",100,-50,50);
97  hA[30]=h=new TH1F(core+"diffGT1_clustET"," 2x2 cluster ET for global-primary > 1 GeV",100,0,100);
98  hA[31]=h=new TH1F(core+"diffprimPT_globPT_Qflip","global - primary pT when Q flipped; global-primary pT",100,-50,50);
99 
100 
101  //eta bins for X sec
102  hA[32]=h=new TH1F(core+"etaBin1sig","electron .6 < |#eta| < 1 ; 2x2 cluster ET",100,1,101);
103  hA[33]=h=new TH1F(core+"etaBin2sig","electron .3 < |#eta| < .6; 2x2 cluster ET",100,1,101);
104  hA[34]=h=new TH1F(core+"etaBin3sig","electron 0 < |#eta| < .3; 2x2 cluster ET",100,1,101);
105  hA[35]=h=new TH1F(core+"etaBin1back","electron .6 < |#eta| < 1; 2x2 cluster ET",100,1,101);
106  hA[36]=h=new TH1F(core+"etaBin2back","electron .3 < |#eta| < .6; 2x2 cluster ET",100,1,101);
107  hA[37]=h=new TH1F(core+"etaBin3back","electron 0 < |#eta| < .3; 2x2 cluster ET",100,1,101);
108  hA[38]=h=new TH1F(core+"etaBin1sigNoE","electron .6 < |#eta| < 1; 2x2 cluster ET",100,1,101);
109  hA[39]=h=new TH1F(core+"etaBin2sigNoE","electron .3 < |#eta| < .6; 2x2 cluster ET",100,1,101);
110  hA[40]=h=new TH1F(core+"etaBin3sigNoE","electron 0 < |#eta| < .3; 2x2 cluster ET",100,1,101);
111 
112  //charge sorted for X sec
113  hA[41]=h=new TH1F(core+"clustPtBalP",Form("PT Balance > %.1f Q=+; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
114  hA[42]=h=new TH1F(core+"clustPtBal_bckgrdP",Form("PT Balance < %.1f Q=+; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
115  hA[43]=h=new TH1F(core+"clustPtBalnoEP",Form("PT Balance > %.1f (EEMC not included) Q=+; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
116  hA[44]=h=new TH1F(core+"clustPtBalN",Form("PT Balance > %.1f Q=-; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
117  hA[45]=h=new TH1F(core+"clustPtBal_bckgrdN",Form("PT Balance < %.1f Q=-; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
118  hA[46]=h=new TH1F(core+"clustPtBalnoEN",Form("PT Balance > %.1f (EEMC not included) Q=-; 2x2 Cluster ET",wMK->par_ptBalance),100,0,100);
119 
120 
121 
122  // add histos to the list (if provided)
123  for(int i=0;i<mxHA;i++) {
124  if( hA[i]==0) continue;
125  HList->Add( hA[i]);
126  }
127  // HList->ls();
128  LOG_INFO<<Form("%s::initHistos done1",GetName())<<endm;
129 
130 }
131 
132 
133 // Log: $
virtual const char * GetName() const
special overload
Definition: StMaker.cxx:237