]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALJetMicroDst.h
Size of data member arrays corrected
[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   public:
27   AliEMCALJetMicroDst(const char *name="jetMicroDst",
28   const char *tit="jet Micro Dst for preparation of proposal");
29   AliEMCALJetMicroDst(const  AliEMCALJetMicroDst &) : TNamed("", ""){
30     Fatal("cpy ctor", "not implemented") ; }
31   virtual ~AliEMCALJetMicroDst();
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
44
45   Bool_t  Open(Int_t mode=1) {return Open(DefineName(mode));}  // *MENU* 
46   Bool_t  Open(const char  *fname);                                  // *MENU* 
47   const Char_t* DefineName(Int_t mode=1);                      // *MENU*
48   Bool_t  Initialize(TFile *file);
49   void    Print(Option_t* option="") const;                          // *MENU* 
50   Int_t   GetEntry(Int_t entry);
51   void    Test();
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 ;
58   static  void FillVector(Float_t pt, Float_t eta, Float_t phi, TVector3& vec);
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 ;
62   // 13-apr-2003
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) ;
65   Double_t GetTpcPtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5) ;
66   Double_t GetSum(Int_t n, Float_t *ar, Double_t cut=0.0) const ;
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);}
69
70   void    SetDebug(Int_t flag) {fDebug = flag;}
71   Float_t GetDebug() const  {return fDebug;}
72
73   TTree* GetTree() const {return fTree;}
74   TFile* GetFile() const {return fFile;}
75   void   Close();
76
77   Bool_t  IsPythiaDst() const ;
78   virtual Bool_t  IsFolder() const;
79   virtual void Browse(TBrowser* b) const ;
80
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.);
84   static void FillH2(TList *l=0, Int_t ind=0, Double_t x=-99999., Double_t y=-99999., Double_t w=1.);
85   static int  SaveListOfHists(TList *list=0, const char* name="test", Bool_t kSingleKey=kFALSE,
86   const char* opt="RECREATE");
87   static void Sgpdge(Int_t pdgId, Int_t &gId); 
88
89   AliEMCALJetMicroDst & operator = (const AliEMCALJetMicroDst &) {
90     Fatal("operator =", "not implemented") ; return *this ; }
91   
92   private:
93   
94   Float_t fpphi[20000]; //[nchp]
95   Int_t   fDebug;       // debug flag
96   TFile*  fFile;        // filename
97   TTree*  fTree;        // Tree pointer
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]
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
137         
138   TH1F*  fhSumEt;       //hist
139   TH1F*  fhNgrid;       //hist
140   TH1F*  fhGridId;      //hist
141   TH1F*  fhGridEt;      //hist
142   TH1F*  fhSumEtGrForJF;        //hist
143
144
145   ClassDef(AliEMCALJetMicroDst,3) // Micro Dst for jet analysis
146 };
147
148 #endif // AliEMCALJETMICRODST_H
149
150 typedef AliEMCALJetMicroDst sv; // for convinience
151
152 /*
153 What to do
154 1. Common info about event
155  */