Part of Reset() moved to base class.
[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 #include "AliJetReader.h"
17
18 class TFile;
19 class TTree;
20 class AliJet;
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 AliJetReader *GetReader() {return fReader;}
35   virtual AliJet *GetJets() {return fJets;}
36   virtual Bool_t GetPlotMode() const {return fPlotMode;}
37   virtual TFile* GetOutputFile() {return fOut;}
38   // setters
39   virtual void SetPlotMode(Bool_t b);
40   virtual void SetOutputFile(const char *name="jets.root");
41   virtual void SetJetReader(AliJetReader* r) {fReader=r;}
42   virtual void SetJetHeader(AliJetHeader* h) {fHeader=h;}
43   // others
44   virtual void   AddJet(AliAODJet jet);
45   virtual void   PrintJets();
46   virtual void   Run();
47   virtual void   WriteRHeaderToFile();  
48   // the following have to be implemented for each specific finder
49   virtual void Init() {}
50   virtual void Reset() {fNAODjets = 0;}
51   virtual void FindJets() {}
52   virtual void FindJetsTPC(){}
53   virtual void WriteJHeaderToFile() { }
54   // some methods to allow steering from the outside
55   virtual Bool_t ProcessEvent(Long64_t entry);
56   virtual void   FinishRun();
57   virtual void   ConnectTree(TTree* tree, TObject* data);
58   virtual void   ConnectAOD(AliAODEvent* aod);
59   virtual TTree* MakeTreeJ(char* name);
60   virtual void   WriteHeaders();
61   virtual void   WriteJetsToFile() {;}
62   virtual void   TestJet() {;}
63  protected:
64   AliJetFinder(const AliJetFinder& rJetFinder);
65   AliJetFinder& operator = (const AliJetFinder& rhsf);
66   TTree* fTreeJ;                 //! pointer to jet tree
67   Bool_t fPlotMode;              //! do you want control plots?
68   AliJet* fJets;                 //! pointer to jet class
69   AliJet* fGenJets;              //! pointer to generated jets
70   AliLeading*   fLeading;        //! pointer to leading particle data 
71   AliJetReader* fReader;         //  pointer to reader
72   AliJetHeader* fHeader;         //  pointer to header
73   TClonesArray* fAODjets;        //! reconstructed jets
74   Int_t         fNAODjets;       //! number of reconstructed jets
75   AliJetControlPlots* fPlots;    //! pointer to control plots
76   TFile* fOut;                   //! output file
77   ClassDef(AliJetFinder,2)
78 };
79
80 #endif