StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Pi0Analysis.h
1 #ifndef PI0ANALYSIS_H
2 #define PI0ANALYSIS_H
3 
4 #include <Riostream.h>
5 
6 #include <TObject.h>
7 #include <TClonesArray.h>
8 #include <TPostScript.h>
9 #include <TH1F.h>
10 #include <TH2F.h>
11 #include <TGraphErrors.h>
12 #include <TFile.h>
13 #include <TTree.h>
14 
15 class MyEvent;
16 
17 class AnaCuts;
18 class EventMixer;
19 
20 class Pi0Analysis : public TObject{
21  protected:
22  TFile *mFile;
23  TFile *mFileOut;
24 
25  std::ofstream fout_mb;
26  std::ofstream fout_ht1;
27  std::ofstream fout_ht2;
28 
29  TTree *myEventTree;
30  AnaCuts *cuts;
31  EventMixer *mixer;
32  TArrayI isHot;
33 
34  MyEvent *ev;
35  TPostScript *ps;
36  TPostScript *ps2;
37 
38  Bool_t isMC;
39  Bool_t isPythia;
40  Bool_t isDAU;
41  Bool_t isPP05;
42  Bool_t isAUAU200;
43  Bool_t isHIJING;
44 
45  Bool_t noMINBIAS;
46 
47  Float_t WEIGHT;
48  Int_t iev_0;
49  Int_t iev_1;
50  Int_t iev_2;
51 
52 
53  Int_t runPrev;
54  Int_t startdatePrev;
55  Int_t starttimePrev;
56 
57  Int_t numberOfMB;
58  Int_t numberOfHT1;
59  Int_t numberOfHT2;
60  Int_t nMBinRun;
61  Int_t nHT1inRun;
62  Int_t nHT2inRun;
63 
64  Float_t psMB;
65  Float_t psHT1;
66  Float_t psHT2;
67 
68  Float_t psHT1_eff;
69  Float_t psHT1_eff2;
70  Float_t nMB_eff;
71 
72  //event histos
73  TH1F *h_vzMB;
74  TH1F *h_vzHT1;
75  TH1F *h_vzHT2;
76  TH1F *h_ratioMB;
77  TH1F *h_ratioHT1;
78  TH1F *h_ratioHT2;
79  TH1F *h_nrefmult;
80  TH1F *h_trigidHT1;
81  TH1F *h_trigidHT2;
82  TH1F *h_trigidHT1aftercut;
83  TH1F *h_trigidHT2aftercut;
84  TH1F *h_events;
85 
86  TH2F *h_bbcVsTpc;
87  TH2F *h_bbcVsTpcCorr;
88  TH1F *h_bbcRes;
89 
90  TH2F *h_HT1adc_id;
91  TH2F *h_HT2adc_id;
92 
93  //point
94  TH2F *h_etaphi;
95  TH2F *h_rapphi;
96  TH1F *h_dist;
97  TH2F *h_dist2DMB;
98  TH2F *h_dist2DHT1;
99  TH2F *h_dist2DHT2;
100  TH2F *h_dist2DMBpions;
101  TH2F *h_dist2DHT1pions;
102  TH2F *h_dist2DHT2pions;
103 
104  TH2F *h_nstripsETA;
105  TH2F *h_nstripsPHI;
106 
107  TH2F *h_clusterWidth;
108  TH2F *h_energyRatio;
109 
110  TH2F *h_smdeta1;
111  TH2F *h_smdphi1;
112  TH2F *h_smdeta2;
113  TH2F *h_smdphi2;
114 
115  //pi0
116  TH2F *h_asymmMB;
117  TH2F *h_asymmHT1;
118  TH2F *h_asymmHT2;
119  TH2F *h_asymmMBbg;
120  TH2F *h_asymmHT1bg;
121  TH2F *h_asymmHT2bg;
122 
123  TH2F *h_minvMB;
124  TH2F *h_minvHT1;
125  TH2F *h_minvHT2;
126  TH2F *h_minvMB_mixed;
127  TH1F *h_yieldMB;
128  TH1F *h_yieldHT1;
129  TH1F *h_yieldHT2;
130 
131  TH1F *h_pionsVsEtaMB;
132 
133  //gamma
134  TH1F *h_gammaMB;
135  TH1F *h_gammaHT1;
136  TH1F *h_gammaHT2;
137 
138  //pythia
139  TH1F *h_pythiaPartonPt;
140  TH1F *h_pythiaPions;
141  TH1F *h_pythiaPionsMB;
142  TH1F *h_pythiaPionsHT1;
143  TH1F *h_pythiaPionsHT2;
144 
145  TH1F *h_adcHT1;
146  TH1F *h_adcHT2;
147 
148  TH2F *h_EvsE;
149 
150 
151  TObjArray *c_array;
152 
153 
154  public:
155 
156  TH1F *h_neutronsMB;
157  TH1F *h_mcneutronsMB;
158  TH1F *h_mcneutronsWeightMB;
159  TH1F *h_neutronsHT1;
160  TH1F *h_mcneutronsHT1;
161  TH1F *h_mcneutronsWeightHT1;
162  TH1F *h_neutronsHT2;
163  TH1F *h_mcneutronsHT2;
164  TH1F *h_mcneutronsWeightHT2;
165  Pi0Analysis(const Char_t *, const Char_t *, const Char_t*);
166  ~Pi0Analysis();
167  Int_t init(const Char_t *);
168  Int_t make(Int_t evmax=0, const Char_t* d="default");
169  Int_t finish();
170  void getYield();
171 
172  TH1F *getYield(TH2F *h,const Char_t *opt="none");
173 
174  Float_t getWeight(Float_t val=0.);
175 
176  inline void setMC(Bool_t val) {isMC=val;}
177  inline void setPythia(Bool_t val) {isPythia=val;}
178  inline void setHijing(Bool_t val) {isHIJING=val;}
179  inline Int_t getNmb(){return numberOfMB;}
180  inline Int_t getNht1(){return numberOfHT1;}
181  inline Int_t getNht2(){return numberOfHT2;}
182 
183  inline void setNoMINBIAS(Bool_t val) {noMINBIAS=val;}
184 
185  void printPrescales();
186  void storeCanvases(const Char_t *val="bla.root");
187 
188  ClassDef(Pi0Analysis,1)
189 };
190 #endif