]>
Commit | Line | Data |
---|---|---|
45a58699 | 1 | #ifndef ALIEMCALJETMICRODST_H |
2 | #define ALIEMCALJETMICRODST_H | |
3 | /* Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
806cd302 | 9 | // |
10 | // JetMicroDst to store information about | |
11 | // jetfinding for offline analysis | |
45a58699 | 12 | // |
13 | //*-- Author: Aleksei Pavlinov (WSU) | |
806cd302 | 14 | // |
15 | ||
45a58699 | 16 | #include <TNamed.h> |
17 | class TFile; | |
18 | class TTree; | |
19 | class TH1; | |
20 | class TH1F; | |
21 | class TH2F; | |
22 | class TH2; | |
23 | ||
24 | class AliGenHijingEventHeader; | |
25 | class AliRun; | |
26 | class AliEMCALJetFinder; | |
27 | class TVector3; | |
28 | class TBrowser; | |
29 | ||
30 | class AliEMCALJetMicroDst: public TNamed { | |
31 | public: | |
32 | AliEMCALJetMicroDst(const char *name="jetMicroDst", | |
33 | const char *tit="jet Micro Dst for preparation of proposal"); | |
18a21c7c | 34 | AliEMCALJetMicroDst(const AliEMCALJetMicroDst &); |
35 | ||
45a58699 | 36 | virtual ~AliEMCALJetMicroDst(); |
37 | Bool_t Create(TFile *file); | |
38 | Bool_t Create(const char *fname); | |
39 | void Fill(AliRun *run=0, AliEMCALJetFinder* jetFinder=0, Int_t modeFilling=0); | |
40 | void FillPartons(AliGenHijingEventHeader *header); | |
41 | void FillPartons(); | |
42 | void FillJets(AliEMCALJetFinder* jetFinder); | |
43 | void FillEtForEMCAL(AliEMCALJetFinder* jetFinder); | |
44 | void FillEtForGrid(AliEMCALJetFinder* jetFinder); | |
45 | void FillArrays(TH2* hid, Int_t &n, Int_t *id, Float_t *et); | |
46 | void FillChargeParticles(AliEMCALJetFinder* jetFinder); | |
47 | ||
48 | void FillJetsControl(); // 18-jan-2003 | |
49 | ||
50 | Bool_t Open(Int_t mode=1) {return Open(DefineName(mode));} // *MENU* | |
51 | Bool_t Open(const char *fname); // *MENU* | |
52 | const Char_t* DefineName(Int_t mode=1); // *MENU* | |
53 | Bool_t Initialize(TFile *file); | |
54 | void Print(Option_t* option="") const; // *MENU* | |
55 | Int_t GetEntry(Int_t entry); | |
56 | void Test(); | |
57 | Int_t GetNpart() const {return fnpart;} | |
58 | Bool_t GetParton(Int_t i, Float_t& pt, Float_t& eta, Float_t& phi) const ; | |
59 | Bool_t GetParton(Int_t i, TVector3& vec) const ; | |
60 | Int_t GetNjet() const {return fnjet;} | |
61 | Bool_t GetJet(Int_t i,Int_t mode, Float_t& pt,Float_t& eta,Float_t& phi) const ; | |
62 | Bool_t GetJet(Int_t i,Int_t mode, TVector3& vec) const ; | |
63 | static void FillVector(Float_t pt, Float_t eta, Float_t phi, TVector3& vec); | |
64 | void GetEtaPhi(Int_t id, Double_t &eta, Double_t &phi) const ; | |
65 | TVector3& GetCellVector(Int_t i) const ; | |
66 | TVector3& GetGridVector(Int_t i) const ; | |
67 | // 13-apr-2003 | |
68 | Double_t GetSumInCone(TVector3 &jet, Int_t nc, Float_t *et,Float_t *eta,Float_t *phi, Double_t cellEtCut, Double_t rJet) const ; | |
806cd302 | 69 | Double_t GetEmcalEtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5); |
70 | Double_t GetTpcPtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5); | |
45a58699 | 71 | Double_t GetSum(Int_t n, Float_t *ar, Double_t cut=0.0) const ; |
806cd302 | 72 | |
45a58699 | 73 | Double_t GetSumEmcal(Double_t cut=0.0) {return GetSum(fncell, fetcell, cut);} |
74 | Double_t GetSumTpc(Double_t cut=0.0) {return GetSum(fnchp, fppt, cut);} | |
75 | ||
76 | void SetDebug(Int_t flag) {fDebug = flag;} | |
77 | Float_t GetDebug() const {return fDebug;} | |
78 | ||
79 | TTree* GetTree() const {return fTree;} | |
80 | TFile* GetFile() const {return fFile;} | |
81 | void Close(); | |
82 | ||
83 | Bool_t IsPythiaDst() const ; | |
84 | virtual Bool_t IsFolder() const; | |
806cd302 | 85 | virtual void Browse(TBrowser* b) const; |
45a58699 | 86 | |
87 | // service routine | |
88 | static TList *MoveHistsToList(const char* name="ListOfHists", Bool_t putToBrowser=kTRUE); | |
89 | static void FillH1(TList *l=0, Int_t ind=0, Double_t x=-99999., Double_t w=1.); | |
90 | static void FillH2(TList *l=0, Int_t ind=0, Double_t x=-99999., Double_t y=-99999., Double_t w=1.); | |
91 | static int SaveListOfHists(TList *list=0, const char* name="test", Bool_t kSingleKey=kFALSE, | |
92 | const char* opt="RECREATE"); | |
93 | static void Sgpdge(Int_t pdgId, Int_t &gId); | |
94 | ||
95 | AliEMCALJetMicroDst & operator = (const AliEMCALJetMicroDst &) { | |
96 | Fatal("operator =", "not implemented") ; return *this ; } | |
97 | ||
98 | private: | |
99 | ||
100 | Float_t fpphi[20000]; //[nchp] | |
101 | Int_t fDebug; // debug flag | |
102 | TFile* fFile; // filename | |
103 | TTree* fTree; // Tree pointer | |
104 | TList* fListHist; //! | |
105 | TString fFileName; // for convenience | |
106 | ||
107 | Float_t fdecone; //! for EMCAL | |
108 | Float_t fptcone; //! for ch.particles | |
109 | // For partons after hard scattering | |
110 | Int_t fnpart; //npartons | |
111 | Float_t fxpt[4]; //[npart] | |
112 | Float_t fxeta[4]; //[npart] | |
113 | Float_t fxphi[4]; //[npart] | |
114 | // Jet | |
115 | Int_t fnjet; // number of jets | |
116 | Float_t fjet[10]; //[njet] | |
117 | Float_t fjetal[10]; //[njet] | |
118 | Float_t fjphil[10]; //[njet] | |
119 | Float_t fjetaw[10]; //[njet] | |
120 | Float_t fjphiw[10]; //[njet] | |
121 | // Charge particle in jet ?? | |
122 | // eT in EMCAL itself - 24-jan-2003 | |
123 | Int_t fncell; // 96*144 =13824 | |
124 | Int_t fidcell[13824]; //[ncell] | |
125 | Float_t fetcell[13824]; //[ncell] : de = det*sf | |
126 | // eT in EMCAL grid for jet finder | |
127 | Int_t fngrid; // 96*144 =13824 | |
128 | Int_t fidgrid[13824]; //[ngrid] | |
129 | Float_t fetgrid[13824]; //[ngrid] | |
130 | // charge particle which hit to EMCAL - 28-jan-2003 | |
131 | Int_t fnchp; //number of charged particles | |
132 | Int_t fpid[20000]; //[nchp] | |
133 | Float_t fppt[20000]; //[nchp] | |
134 | Float_t fpeta[20000]; //[nchp] | |
135 | TH1F* fhPtPart; //hist | |
136 | TH1F* fhNJet; //hist | |
137 | TH1F* fhPtJet; //hist | |
138 | TH2F* fhEtaPhiPart; //hist | |
139 | TH2F* fhEtaPhiJet; //hist | |
140 | TH1F* fhNcell; //hist | |
141 | TH1F* fhCellId; //hist | |
142 | TH1F* fhCellEt; //hist | |
143 | ||
144 | TH1F* fhSumEt; //hist | |
145 | TH1F* fhNgrid; //hist | |
146 | TH1F* fhGridId; //hist | |
147 | TH1F* fhGridEt; //hist | |
148 | TH1F* fhSumEtGrForJF; //hist | |
149 | ||
150 | ||
151 | ClassDef(AliEMCALJetMicroDst,3) // Micro Dst for jet analysis | |
152 | }; | |
153 | ||
154 | #endif // AliEMCALJETMICRODST_H | |
155 | ||
156 | typedef AliEMCALJetMicroDst sv; // for convinience | |
157 | ||
158 | /* | |
159 | What to do | |
160 | 1. Common info about event | |
161 | */ |