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