d04ba286609549fdfe4341b5e5bb7c3a270c79c4
[u/mrichter/AliRoot.git] / JETAN / AliJetFinder.h
1 #ifndef ALIJETFINDER_H
2 #define ALIJETFINDER_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 finder base class
9 // manages the search for jets 
10 // Authors: jgcn@mda.cinvestav.mx
11 //          andreas.morsch@cern.ch
12 //---------------------------------------------------------------------
13
14 #include <TObject.h>
15 #include "AliAODJet.h"
16
17 class TFile;
18 class TTree;
19 class AliJet;
20 class AliJetReader;
21 class AliJetHeader;
22 class AliJetControlPlots;
23 class AliLeading;
24 class AliAODJet;
25 class AliAODEvent;
26
27 class AliJetFinder : public TObject 
28 {
29  public:
30   AliJetFinder();
31   virtual ~AliJetFinder();
32
33   // getters
34   virtual AliJet *GetJets() {return fJets;}
35   virtual Bool_t GetPlotMode() const {return fPlotMode;}
36   virtual TFile* GetOutputFile() {return fOut;}
37   // setters
38   virtual void SetPlotMode(Bool_t b);
39   virtual void SetOutputFile(const char *name="jets.root");
40   virtual void SetJetReader(AliJetReader* r) {fReader=r;}
41   virtual void SetJetHeader(AliJetHeader* h) {fHeader=h;}
42   // others
43   virtual void   AddJet(AliAODJet jet);
44   virtual void   PrintJets();
45   virtual void   Run();
46   virtual void   WriteRHeaderToFile();  
47   // the following have to be implemented for each specific finder
48   virtual void Init() {}
49   virtual void Reset() {}
50   virtual void FindJets() {}
51   virtual void FindJetsTPC(){}
52   virtual void WriteJHeaderToFile() { }
53   // some methods to allow steering from the outside
54   virtual Bool_t ProcessEvent(Long64_t entry);
55   virtual void   FinishRun();
56   virtual void   ConnectTree(TTree* tree, TObject* data);
57   virtual void   ConnectAOD(AliAODEvent* aod);
58   virtual TTree* MakeTreeJ(char* name);
59   virtual void   WriteHeaders();
60   virtual void   WriteJetsToFile() {;}
61   virtual void   TestJet() {;}
62  protected:
63   AliJetFinder(const AliJetFinder& rJetFinder);
64   AliJetFinder& operator = (const AliJetFinder& rhsf);
65   TTree* fTreeJ;                 //! pointer to jet tree
66   Bool_t fPlotMode;              //! do you want control plots?
67   AliJet* fJets;                 //! pointer to jet class
68   AliJet* fGenJets;              //! pointer to generated jets
69   AliLeading*   fLeading;        //! pointer to leading particle data 
70   AliJetReader* fReader;         //  pointer to reader
71   AliJetHeader* fHeader;         //  pointer to header
72   TClonesArray* fAODjets;        //! reconstructed jets
73   Int_t         fNAODjets;       //! number of reconstructed jets
74   AliJetControlPlots* fPlots;    //! pointer to control plots
75   TFile* fOut;                   //! output file
76   ClassDef(AliJetFinder,2)
77 };
78
79 #endif