]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrBase/AliAnaPartCorrMaker.h
Code clean-up in dN/deta calculation.
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAnaPartCorrMaker.h
1 #ifndef ALIANAPARTCORRMAKER_H
2 #define ALIANAPARTCORRMAKER_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 //_________________________________________________________________________
8 // Steering class for particle (gamma, hadron) identification and correlation analysis
9 // It is called by the task class AliAnalysisTaskParticleCorrelation and it connects the input 
10 // (ESD/AOD/MonteCarlo) got with AliCaloTrackReader (produces TObjArrays of AODs 
11 // (TParticles in MC case if requested)), with the 
12 // analysis classes that derive from AliAnaPartCorrBaseClass
13 //
14 // -- Author: Gustavo Conesa (INFN-LNF)
15
16 // --- ROOT system ---
17 class TList; 
18 class TClonesArray;
19 #include<TObject.h>
20 class TH1I;
21
22 // --- Analysis system ---
23 #include "AliCaloTrackReader.h" 
24 #include "AliCalorimeterUtils.h"
25
26 class AliAnaPartCorrMaker : public TObject {
27
28  public: 
29   AliAnaPartCorrMaker() ; // default ctor
30   virtual ~AliAnaPartCorrMaker() ; //virtual dtor
31   AliAnaPartCorrMaker(const AliAnaPartCorrMaker & maker) ; // cpy ctor
32
33  private:
34   AliAnaPartCorrMaker & operator = (const AliAnaPartCorrMaker & ) ;//cpy assignment
35
36  public:
37         
38   //Setter and getters
39   TList * GetListOfAnalysisCuts();
40   TList * GetOutputContainer() ;
41
42   TList * FillAndGetAODBranchList();
43   
44   Int_t GetAnaDebug() const  { return fAnaDebug ; }
45   void SetAnaDebug(Int_t d)  { fAnaDebug = d ; }
46         
47   Bool_t AreHistogramsMade() const { return fMakeHisto ; }
48   void SwitchOnHistogramsMaker()   { fMakeHisto = kTRUE ; }
49   void SwitchOffHistogramsMaker()  { fMakeHisto = kFALSE ; }
50  
51   Bool_t AreAODsMade() const { return fMakeAOD ; }
52   void SwitchOnAODsMaker()   { fMakeAOD = kTRUE ; }
53   void SwitchOffAODsMaker()  { fMakeAOD = kFALSE ; }
54         
55   void Terminate(TList * outputList);
56
57   void AddAnalysis(TObject* ana, Int_t n) {
58     if ( fAnalysisContainer) fAnalysisContainer->AddAt(ana,n); 
59     else { printf("AliAnaPartCorrMaker::AddAnalysis() - AnalysisContainer not initialized\n");
60       abort();}
61   }
62   
63   AliCaloTrackReader * GetReader() {if(!fReader) fReader = new AliCaloTrackReader ();return fReader ; }
64   void SetReader(AliCaloTrackReader * reader) { fReader = reader ; }
65         
66   AliCalorimeterUtils * GetCaloUtils() {if(!fCaloUtils) fCaloUtils = new AliCalorimeterUtils(); return fCaloUtils ; }
67   void SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
68         
69   //Others
70   void Init();
71   void InitParameters();
72   
73   void Print(const Option_t * opt) const;
74   
75   void ProcessEvent(const Int_t iEntry, const char * currentFileName) ;
76   
77  private:
78   
79   //General Data members
80   
81   TList * fOutputContainer ;   //! Output histograms container
82   TList * fAnalysisContainer ; // List with analysis pointers
83   Bool_t  fMakeHisto ;         // If true makes final analysis with histograms as output
84   Bool_t  fMakeAOD ;           // If true makes analysis generating AODs
85   Int_t   fAnaDebug;           // Debugging info.
86         
87   AliCaloTrackReader  *  fReader ;     //  Pointer to reader 
88   AliCalorimeterUtils *  fCaloUtils ;  //  Pointer to CalorimeterUtils
89
90   TList * fCuts ;                  //! List with analysis cuts
91
92   TH1I  * fhNEvents;         //! Number of events counter histogram
93   TH1I  * fhTrackMult;       //! Number of tracks per event histogram
94
95   ClassDef(AliAnaPartCorrMaker,8)
96 } ;
97  
98
99 #endif //ALIANAPARTCORRMAKER_H
100
101
102