]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrMaker.h
AddTask added
[u/mrichter/AliRoot.git] / PWG / CaloTrackCorrBase / AliAnaCaloTrackCorrMaker.h
1 #ifndef ALIANACALOTRACKCORRMAKER_H
2 #define ALIANACALOTRACKCORRMAKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 //_____________________________________________________________________________
7 // Steering class for particle (gamma, hadron) identification and correlation 
8 // analysis. It is called by the task class AliAnalysisTaskCaloTrackCorrelation 
9 // and it connects the input (ESD/AOD/MonteCarlo) got with AliCaloTrackReader 
10 // (produces TClonesArrays of AODs (TParticles in MC case if requested)), with 
11 // the analysis classes that derive from AliAnaCaloTrackCorrBaseClass
12 //
13 // -- Author: Gustavo Conesa (INFN-LNF, LPSC-Grenoble)
14
15 // --- ROOT system ---
16 class TList; 
17 class TClonesArray;
18 #include<TObject.h>
19 class TH1I;
20
21 // --- Analysis system ---
22 #include "AliCaloTrackReader.h" 
23 #include "AliCalorimeterUtils.h"
24
25 class AliAnaCaloTrackCorrMaker : public TObject {
26
27  public: 
28   
29   AliAnaCaloTrackCorrMaker() ;          // default ctor
30   virtual ~AliAnaCaloTrackCorrMaker() ; // virtual dtor
31   AliAnaCaloTrackCorrMaker(const AliAnaCaloTrackCorrMaker & maker) ; // cpy ctor
32         
33   // Setters and Getters
34   
35   void    AddAnalysis(TObject* ana, Int_t n) ;
36
37   TList * GetListOfAnalysisCuts();
38   TList * GetOutputContainer() ;
39
40   TList * FillAndGetAODBranchList();
41   
42   Int_t   GetAnaDebug()        const  { return fAnaDebug    ; }
43   void    SetAnaDebug(Int_t d)        { fAnaDebug = d       ; }
44         
45   Bool_t  AreHistogramsMade()   const { return fMakeHisto   ; }
46   void    SwitchOnHistogramsMaker()   { fMakeHisto = kTRUE  ; }
47   void    SwitchOffHistogramsMaker()  { fMakeHisto = kFALSE ; }
48  
49   Bool_t  AreAODsMade()         const { return fMakeAOD     ; }
50   void    SwitchOnAODsMaker()         { fMakeAOD = kTRUE    ; }
51   void    SwitchOffAODsMaker()        { fMakeAOD = kFALSE   ; }
52         
53
54   AliCaloTrackReader  * GetReader()                                   { if(!fReader) fReader = new AliCaloTrackReader ();
55                                                                         return fReader    ; }
56   void                  SetReader(AliCaloTrackReader * reader)        { fReader = reader  ; }
57         
58   AliCalorimeterUtils * GetCaloUtils()                                { if(!fCaloUtils) fCaloUtils = new AliCalorimeterUtils(); 
59                                                                         return fCaloUtils      ; }
60   void                  SetCaloUtils(AliCalorimeterUtils * caloutils) { fCaloUtils = caloutils ; }
61         
62   void                  SetScaleFactor(Double_t scale)                { fScaleFactor = scale   ; } 
63
64   
65   // Main general methods
66   
67   void    Init();
68   
69   void    InitParameters();
70   
71   void    Print(const Option_t * opt) const;
72   
73   void    ProcessEvent(const Int_t iEntry, const char * currentFileName) ;
74   
75   void    Terminate(TList * outputList);
76
77   
78  private:
79   
80   //General Data members
81   
82   AliCaloTrackReader  *  fReader ;    //  Pointer to reader 
83   AliCalorimeterUtils *  fCaloUtils ; //  Pointer to CalorimeterUtils
84   
85   TList *  fOutputContainer ;   //! Output histograms container
86   TList *  fAnalysisContainer ; //  List with analysis pointers
87   Bool_t   fMakeHisto ;         //  If true makes final analysis with histograms as output
88   Bool_t   fMakeAOD ;           //  If true makes analysis generating AODs
89   Int_t    fAnaDebug;           //  Debugging info.
90   TList *  fCuts ;                  //! List with analysis cuts
91   Double_t fScaleFactor ;       //  Scaling factor needed for normalization
92
93   // Control histograms
94   TH1I *   fhNEvents;           //! Number of events counter histogram
95   TH1F *   fhZVertex;           //! Vertex of accepted event
96   TH1I *   fhTrackMult;         //! Number of tracks per event histogram
97   TH1F *   fhCentrality;        //! Histogram with centrality bins
98   TH1F *   fhEventPlaneAngle;   //! Histogram with Event plane angle
99   TH1I *   fhNMergedFiles;      //! Number of files merged
100   TH1F *   fhScaleFactor;       //! Factor to scale histograms
101
102   AliAnaCaloTrackCorrMaker & operator = (const AliAnaCaloTrackCorrMaker & ) ; // cpy assignment
103   
104   ClassDef(AliAnaCaloTrackCorrMaker,12)
105 } ;
106  
107
108 #endif //ALIANACALOTRACKCORRMAKER_H
109
110
111