00001 #ifndef PI0ANALYSIS_H
00002 #define PI0ANALYSIS_H
00003
00004 #include <Riostream.h>
00005
00006 #include <TObject.h>
00007 #include <TClonesArray.h>
00008 #include <TPostScript.h>
00009 #include <TH1F.h>
00010 #include <TH2F.h>
00011 #include <TGraphErrors.h>
00012 #include <TFile.h>
00013 #include <TTree.h>
00014
00015 class MyEvent;
00016
00017 class AnaCuts;
00018 class EventMixer;
00019
00020 class Pi0Analysis : public TObject{
00021 protected:
00022 TFile *mFile;
00023 TFile *mFileOut;
00024
00025 ofstream fout_mb;
00026 ofstream fout_ht1;
00027 ofstream fout_ht2;
00028
00029 TTree *myEventTree;
00030 AnaCuts *cuts;
00031 EventMixer *mixer;
00032 TArrayI isHot;
00033
00034 MyEvent *ev;
00035 TPostScript *ps;
00036 TPostScript *ps2;
00037
00038 Bool_t isMC;
00039 Bool_t isPythia;
00040 Bool_t isDAU;
00041 Bool_t isPP05;
00042 Bool_t isAUAU200;
00043 Bool_t isHIJING;
00044
00045 Bool_t noMINBIAS;
00046
00047 Float_t WEIGHT;
00048 Int_t iev_0;
00049 Int_t iev_1;
00050 Int_t iev_2;
00051
00052
00053 Int_t runPrev;
00054 Int_t startdatePrev;
00055 Int_t starttimePrev;
00056
00057 Int_t numberOfMB;
00058 Int_t numberOfHT1;
00059 Int_t numberOfHT2;
00060 Int_t nMBinRun;
00061 Int_t nHT1inRun;
00062 Int_t nHT2inRun;
00063
00064 Float_t psMB;
00065 Float_t psHT1;
00066 Float_t psHT2;
00067
00068 Float_t psHT1_eff;
00069 Float_t psHT1_eff2;
00070 Float_t nMB_eff;
00071
00072
00073 TH1F *h_vzMB;
00074 TH1F *h_vzHT1;
00075 TH1F *h_vzHT2;
00076 TH1F *h_ratioMB;
00077 TH1F *h_ratioHT1;
00078 TH1F *h_ratioHT2;
00079 TH1F *h_nrefmult;
00080 TH1F *h_trigidHT1;
00081 TH1F *h_trigidHT2;
00082 TH1F *h_trigidHT1aftercut;
00083 TH1F *h_trigidHT2aftercut;
00084 TH1F *h_events;
00085
00086 TH2F *h_bbcVsTpc;
00087 TH2F *h_bbcVsTpcCorr;
00088 TH1F *h_bbcRes;
00089
00090 TH2F *h_HT1adc_id;
00091 TH2F *h_HT2adc_id;
00092
00093
00094 TH2F *h_etaphi;
00095 TH2F *h_rapphi;
00096 TH1F *h_dist;
00097 TH2F *h_dist2DMB;
00098 TH2F *h_dist2DHT1;
00099 TH2F *h_dist2DHT2;
00100 TH2F *h_dist2DMBpions;
00101 TH2F *h_dist2DHT1pions;
00102 TH2F *h_dist2DHT2pions;
00103
00104 TH2F *h_nstripsETA;
00105 TH2F *h_nstripsPHI;
00106
00107 TH2F *h_clusterWidth;
00108 TH2F *h_energyRatio;
00109
00110 TH2F *h_smdeta1;
00111 TH2F *h_smdphi1;
00112 TH2F *h_smdeta2;
00113 TH2F *h_smdphi2;
00114
00115
00116 TH2F *h_asymmMB;
00117 TH2F *h_asymmHT1;
00118 TH2F *h_asymmHT2;
00119 TH2F *h_asymmMBbg;
00120 TH2F *h_asymmHT1bg;
00121 TH2F *h_asymmHT2bg;
00122
00123 TH2F *h_minvMB;
00124 TH2F *h_minvHT1;
00125 TH2F *h_minvHT2;
00126 TH2F *h_minvMB_mixed;
00127 TH1F *h_yieldMB;
00128 TH1F *h_yieldHT1;
00129 TH1F *h_yieldHT2;
00130
00131 TH1F *h_pionsVsEtaMB;
00132
00133
00134 TH1F *h_gammaMB;
00135 TH1F *h_gammaHT1;
00136 TH1F *h_gammaHT2;
00137
00138
00139 TH1F *h_pythiaPartonPt;
00140 TH1F *h_pythiaPions;
00141 TH1F *h_pythiaPionsMB;
00142 TH1F *h_pythiaPionsHT1;
00143 TH1F *h_pythiaPionsHT2;
00144
00145 TH1F *h_adcHT1;
00146 TH1F *h_adcHT2;
00147
00148 TH2F *h_EvsE;
00149
00150
00151 TObjArray *c_array;
00152
00153
00154 public:
00155
00156 TH1F *h_neutronsMB;
00157 TH1F *h_mcneutronsMB;
00158 TH1F *h_mcneutronsWeightMB;
00159 TH1F *h_neutronsHT1;
00160 TH1F *h_mcneutronsHT1;
00161 TH1F *h_mcneutronsWeightHT1;
00162 TH1F *h_neutronsHT2;
00163 TH1F *h_mcneutronsHT2;
00164 TH1F *h_mcneutronsWeightHT2;
00165 Pi0Analysis(const Char_t *, const Char_t *, const Char_t*);
00166 ~Pi0Analysis();
00167 Int_t init(const Char_t *);
00168 Int_t make(Int_t evmax=0, const Char_t* d="default");
00169 Int_t finish();
00170 void getYield();
00171
00172 TH1F *getYield(TH2F *h,const Char_t *opt="none");
00173
00174 Float_t getWeight(Float_t val=0.);
00175
00176 inline void setMC(Bool_t val) {isMC=val;}
00177 inline void setPythia(Bool_t val) {isPythia=val;}
00178 inline void setHijing(Bool_t val) {isHIJING=val;}
00179 inline Int_t getNmb(){return numberOfMB;}
00180 inline Int_t getNht1(){return numberOfHT1;}
00181 inline Int_t getNht2(){return numberOfHT2;}
00182
00183 inline void setNoMINBIAS(Bool_t val) {noMINBIAS=val;}
00184
00185 void printPrescales();
00186 void storeCanvases(const Char_t *val="bla.root");
00187
00188 ClassDef(Pi0Analysis,1)
00189 };
00190 #endif