]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/AliAnaMaker.h
New more general analysis implemention for particle identification and correlation...
[u/mrichter/AliRoot.git] / PWG4 / AliAnaMaker.h
CommitLineData
d92b41ad 1#ifndef ALIANAMAKER_H
2#define ALIANAMAKER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5/* $Id: $ */
6
7/* History of cvs commits:
8 *
9 * $Log$
10 *
11 */
12
13//_________________________________________________________________________
14// Base class for gamma and particle correlation analysis
15// It is called by the task class AliAnalysisGammaTask and it connects the input (ESD/AOD/MonteCarlo)
16// got with AliCaloTrackReader (produces TClonesArrays of TParticles), with the analysis classes
17// that derive from AliAnaBaseClass
18//
19//*-- Author: Gustavo Conesa (INFN-LNF)
20
21// --- ROOT system ---
22/* #include <TParticle.h> */
23#include <TList.h>
24#include <TClonesArray.h>
25/* #include <TH2F.h> */
26#include<TObject.h>
27/* #include <TTree.h> */
28#include <TString.h>
29
30// --- AliRoot system ---
31#include <AliLog.h>
32#include "AliAnaBaseClass.h"
33/* #include "AliAODCaloCluster.h" */
34/* #include "AliAODTrack.h" */
35/* #include "AliAODPhoton.h" */
36
37class AliCaloTrackReader ;
38
39// --- AliRoot
40class AliAnaMaker : public TObject {
41
42public:
43
44 AliAnaMaker() ; // default ctor
45 AliAnaMaker(const AliAnaMaker & g) ; // cpy ctor
46 AliAnaMaker & operator = (const AliAnaMaker & g) ;//cpy assignment
47 virtual ~AliAnaMaker() ; //virtual dtor
48
49 //Setter and getters
50 TList * GetOutputContainer() const {return fOutputContainer ; }
51
52 Int_t GetAnaDebug() const { return fAnaDebug ; }
53 void SetAnaDebug(Int_t d) { fAnaDebug = d ; }
54
55 Bool_t AreHistogramsMade() const { return fMakeHisto ; }
56 void SwitchOnHistogramsMaker() { fMakeHisto = kTRUE ; }
57 void SwitchOffHistogramsMaker() { fMakeHisto = kFALSE ; }
58
59 Bool_t AreAODsMade() const { return fMakeAOD ; }
60 void SwitchOnAODsMaker() { fMakeAOD = kTRUE ; }
61 void SwitchOffAODsMaker() { fMakeAOD = kFALSE ; }
62
63 void SetAODBranch(TClonesArray* aodbranch) {fAODBranch = aodbranch;}
64
65 void AddAnalysis(TObject* ana, Int_t n) {if ( fAnalysisContainer) fAnalysisContainer->AddAt(ana,n);
66 else AliFatal("AnalysisContainer not initialized");}
67
68 TString GetAODBranchName() const {return fAODBranchName;}
69 void SetAODBranchName(TString name) {fAODBranchName = name ;}
70
71 AliCaloTrackReader * GetReader() const {return fReader ; }
72 void SetReader(AliCaloTrackReader * reader) { fReader = reader ; }
73
74 //Others
75 void Init();
76 void InitParameters();
77
78 void Print(const Option_t * opt) const;
79
80 Bool_t ProcessEvent(Int_t iEntry) ;
81
82 private:
83
84 //General Data members
85
86 TList * fOutputContainer ; // output histograms container
87 TList * fAnalysisContainer ; // List with analysis pointers
88 Bool_t fMakeHisto ; // If true makes final analysis with histograms as output
89 Bool_t fMakeAOD ; // If true makes analysis generating AODs
90 Int_t fAnaDebug; // Debugging info.
91
92 AliCaloTrackReader * fReader ; // Pointer to reader
93 TClonesArray* fAODBranch ; //! selected particles branch
94 TString fAODBranchName; // New AOD branch name
95
96 ClassDef(AliAnaMaker,1)
97} ;
98
99
100#endif //ALIANAMAKER_H
101
102
103