]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliAnalysisTaskPhiCorrelations.h
optimizations after profiling
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskPhiCorrelations.h
1 #ifndef AliAnalysisTaskPhiCorrelations_H
2 #define AliAnalysisTaskPhiCorrelations_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 //
9 // Analysis class for Underlying Event studies w.r.t. leading track
10 //
11 // Look for correlations on the tranverse regions w.r.t
12 // the leading track in the event
13 //
14 // This class needs input AODs.
15 // The output is a list of analysis-specific containers.
16 //
17 // The AOD can be either connected to the InputEventHandler  
18 // for a chain of AOD files 
19 // or 
20 // to the OutputEventHandler
21 // for a chain of ESD files,
22 // in this case the class should be in the train after the jet-finder
23 //
24 //    Authors:
25 //    Arian Abrahantes Quintana 
26 //    Jan Fiete Grosse-Oetringhaus
27 //    Ernesto Lopez Torres
28 //    Sara Vallero
29 // 
30 ////////////////////////////////////////////////////////////////////////
31
32 #include "AliAnalysisTask.h"
33 #include "AliUEHist.h"
34 #include "TString.h"
35
36 class AliAODEvent;
37 class AliAnalyseLeadingTrackUE;
38 class AliInputEventHandler;
39 class AliMCEvent;
40 class AliMCEventHandler;
41 class AliUEHistograms;
42 class AliVParticle;
43 class TH1D;
44 class TObjArray;
45 class AliEventPoolManager;
46 class AliESDEvent;
47
48 class  AliAnalysisTaskPhiCorrelations : public AliAnalysisTask
49   {
50   public:
51     AliAnalysisTaskPhiCorrelations(const char* name="AliAnalysisTaskPhiCorrelations");
52     virtual           ~AliAnalysisTaskPhiCorrelations();
53        
54       
55     // Implementation of interace methods
56     virtual     void   ConnectInputData(Option_t *);
57     virtual     void   CreateOutputObjects();
58     virtual     void   Exec(Option_t *option);
59
60     // Setters/Getters
61     // general configuration
62     virtual     void    SetDebugLevel( Int_t level )  { fDebug = level; }
63     virtual     void    SetMode(Int_t mode)           { fMode  = mode;  }
64     virtual     void    SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; }
65     virtual     void    SetEventMixing(Bool_t flag) { fFillMixed = flag; }
66     
67     // histogram settings
68     void SetTrackingEfficiency( const TH1D* hist) { fkTrackingEfficiency = hist; }
69
70     // for event QA
71     void   SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
72     void   SetZVertex( Double_t val )    { fZVertex = val; }
73     
74     // track cuts
75     void   SetTrackEtaCut( Double_t val )    { fTrackEtaCut = val; }
76     void   SetPtMin(Double_t val)            { fPtMin = val; }
77     void   SetFilterBit( UInt_t val )        { fFilterBit = val;  }
78     
79     void   SetEventSelectionBit( UInt_t val )        { fSelectBit = val;  }
80     void   SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
81     void   SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
82     void   SetCentralityMethod(const char* method) { fCentralityMethod = method; }
83
84     
85   private:
86     AliAnalysisTaskPhiCorrelations(const  AliAnalysisTaskPhiCorrelations &det);
87     AliAnalysisTaskPhiCorrelations&   operator=(const  AliAnalysisTaskPhiCorrelations &det);
88     void            AddSettingsTree();                                  // add list of settings to output list
89     // Analysis methods
90     void            AnalyseCorrectionMode();                            // main algorithm to get correction maps
91     void            AnalyseDataMode();                                  // main algorithm to get raw distributions
92     void            Initialize();                                       // initialize some common pointer
93
94
95
96     // General configuration
97     Int_t               fDebug;           //  Debug flag
98     Int_t               fMode;            //  fMode = 0: data-like analysis 
99                                           //  fMode = 1: corrections analysis   
100     Bool_t              fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
101     Bool_t              fFillMixed;             // enable event mixing (default: ON)
102     
103     // Pointers to external UE classes
104     AliAnalyseLeadingTrackUE*     fAnalyseUE;      //! points to class containing common analysis algorithms
105     AliUEHistograms*  fHistos;       //! points to class to handle histograms/containers  
106     AliUEHistograms*  fHistosMixed;       //! points to class to handle mixed histograms/containers  
107     
108     const TH1D* fkTrackingEfficiency;       // used for study of bias by tracking 
109
110     // Handlers and events
111     AliAODEvent*             fAOD;             //! AOD Event 
112     AliESDEvent*             fESD;             //! ESD Event 
113     TClonesArray*            fArrayMC;         //! Array of MC particles 
114     AliInputEventHandler*    fInputHandler;    //! Generic InputEventHandler 
115     AliMCEvent*              fMcEvent;         //! MC event
116     AliMCEventHandler*       fMcHandler;       //! MCEventHandler 
117     AliEventPoolManager*     fPoolMgr;         //! event pool manager
118     
119     // Histogram settings
120     TList*              fListOfHistos;    //  Output list of containers 
121     
122     // Event QA cuts
123     Int_t               fnTracksVertex;        // QA tracks pointing to principal vertex (= 3 default) 
124     Double_t            fZVertex;              // Position of Vertex in Z direction
125     TString             fCentralityMethod;     // Method to determine centrality
126     
127     // Track cuts
128     Double_t            fTrackEtaCut;          // Eta cut on particles
129     Double_t            fPtMin;                // Min pT to start correlations
130     UInt_t              fFilterBit;            // Select tracks from an specific track cut (default 0xFF all track selected)
131     UInt_t              fSelectBit;            // Select events according to AliAnalysisTaskJetServices bit maps 
132     Bool_t              fUseChargeHadrons;     // Only use charge hadrons
133     
134     Int_t fSelectCharge;           // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
135     
136     ClassDef( AliAnalysisTaskPhiCorrelations, 1); // Analysis task for Underlying Event analysis w.r.t. leading track
137   };
138
139 #endif
140
141