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