]> git.uio.no Git - u/mrichter/AliRoot.git/blob - JETAN/AliJetESDReader.h
Dixed a crash when no proper files/data to display (Mikolaj)
[u/mrichter/AliRoot.git] / JETAN / AliJetESDReader.h
1 #ifndef ALIJETESDREADER_H
2 #define ALIJETESDREADER_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6  
7 //---------------------------------------------------------------------
8 // Jet ESD Reader 
9 // ESD reader for jet analysis
10 // Author: Mercedes Lopez Noriega (mercedes.lopez.noriega@cern.ch)
11 //=========================================================================
12 // Modified in order to use a fUnitArray object instead of a fMomentumArray
13 // Includes EMCal Geometry, fUnitArray, grid objects and tools for Hadron correction
14 // Author : magali.estienne@ires.in2p3.fr
15 //---------------------------------------------------------------------
16
17 #include "AliJetReader.h"
18 #include "AliJetUnitArray.h"
19 #include "AliJetGrid.h"
20 class AliJetESDReaderHeader;
21 class AliJetDummyGeo;
22 class AliJetHadronCorrection;
23 class AliJetUnitArray;
24 class AliJetReaderHeader;
25 class AliESDEvent;
26
27 class AliJetESDReader : public AliJetReader
28 {
29  public: 
30   AliJetESDReader();
31   virtual ~AliJetESDReader();
32
33   // Getters
34   Float_t GetTrackMass() const {return fMass;}  // returns mass of the track
35   Int_t   GetTrackSign() const {return fSign;}  // returns sign of the track
36
37   // Setters
38   Bool_t FillMomentumArray(); 
39   void   OpenInputFiles();
40   void   InitUnitArray();
41   void   CreateTasks();
42   //  void   ExecTasks(Int_t event);
43   Bool_t   ExecTasks(Int_t event);
44   void   SetInputEvent(TObject* esd, TObject* aod, TObject* mc);
45   virtual void SetTPCGrid(AliJetGrid *grid)   {fTpcGrid = grid;}
46   virtual void SetEMCalGrid(AliJetGrid *grid) {fEmcalGrid = grid;}
47   // Correction of hadronic energy
48   virtual void SetHadronCorrection(Int_t flag = 1) {fHCorrection = flag;}
49   virtual void SetHadronCorrector(AliJetHadronCorrectionv1* corr) {fHadCorr = corr;}
50  private:
51   void SetEMCALGeometry();
52   void InitParameters();
53   AliJetESDReader(const AliJetESDReader &det);
54   AliJetESDReader &operator=(const AliJetESDReader &det);
55
56  protected:
57   AliJetDummyGeo             *fGeom;             //! EMCAL Geometry 
58   TChain                     *fChain;            //! chain for reconstructed tracks
59   AliESDEvent                *fESD;              //! pointer to esd
60   AliJetHadronCorrectionv1   *fHadCorr;          //! Pointer to Hadron Correction Object 
61   AliJetGrid                 *fTpcGrid;          //! Pointer to grid object
62   AliJetGrid                 *fEmcalGrid;        //! Pointer to grid object
63   AliJetGrid                 *fGrid0;            // Pointer to grid object
64   AliJetGrid                 *fGrid1;            // Pointer to grid object
65   AliJetGrid                 *fGrid2;            // Pointer to grid object
66   AliJetGrid                 *fGrid3;            // Pointer to grid object
67   AliJetGrid                 *fGrid4;            // Pointer to grid object
68   Float_t                     fPtCut;            // Pt cut for tracks to minimise background contribution
69   Int_t                       fHCorrection;      // Hadron correction flag
70   Int_t                       fNumUnits;         // Number of units in the unit object array
71                                                  // (same as num towers in EMCAL)
72   Int_t                       fDebug;            // Debug option
73   Float_t                     fMass;    // Particle mass
74   Int_t                       fSign;    // Particle sign
75   Int_t                       fNIn;              // Number of Array filled in UnitArray
76   Int_t                       fOpt;              // Detector to be used for jet reconstruction
77   Bool_t                      fDZ;               // Use or not dead zones
78   Int_t                       fNeta;             // Number of bins in eta of tpc grid
79   Int_t                       fNphi;             // Number of bins in phi of tpc grid
80   Bool_t                      fArrayInitialised; // To check that array of units is initialised
81   
82   ClassDef(AliJetESDReader,1)
83 };
84  
85 #endif