1 #ifndef ALIANALYSISTASKLEADINGTRACKUE_H
2 #define ALIANALYSISTASKLEADINGTRACKUE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////
9 // Analysis class for Underlying Event studies w.r.t. leading track
11 // Look for correlations on the tranverse regions w.r.t
12 // the leading track in the event
14 // This class needs input AODs.
15 // The output is a list of analysis-specific containers.
17 // The AOD can be either connected to the InputEventHandler
18 // for a chain of AOD files
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
25 // Arian Abrahantes Quintana
26 // Jan Fiete Grosse-Oetringhaus
27 // Ernesto Lopez Torres
30 ////////////////////////////////////////////////////////////////////////
32 #include "AliAnalysisTask.h"
33 #include "AliUEHist.h"
36 class AliAnalyseLeadingTrackUE;
37 class AliInputEventHandler;
39 class AliMCEventHandler;
40 class AliUEHistograms;
45 class AliAnalysisTaskLeadingTrackUE : public AliAnalysisTask
48 AliAnalysisTaskLeadingTrackUE(const char* name="AliAnalysisTaskLeadingTrackUE");
49 virtual ~AliAnalysisTaskLeadingTrackUE();
52 // Implementation of interace methods
53 virtual Bool_t Notify();
54 virtual void ConnectInputData(Option_t *);
55 virtual void CreateOutputObjects();
56 virtual void Exec(Option_t *option);
57 virtual void Terminate(Option_t *);
59 void FillReducedEfficiency(Int_t eventId, AliUEHist::CFStep step,const TObjArray* ltRECO, Bool_t twoStep);
62 // general configuration
63 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
64 virtual void SetMode(Int_t mode) { fMode = mode; }
65 virtual void SetReduceMemoryFootprint(Bool_t flag) { fReduceMemoryFootprint = flag; }
68 void SetPtRangeInHist( Int_t bin, Double_t min, Double_t max ) {
70 fMinJetPtInHist = min;
71 fMaxJetPtInHist = max;
73 void SetTrackingEfficiency( const TH1D* hist) { fkTrackingEfficiency = hist; }
76 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
77 void SetZVertex( Double_t val ) { fZVertex = val; }
80 void SetTrackEtaCut(Double_t val) { fTrackEtaCut = val; }
81 void SetLeadingTrackEtaCut( Double_t val ) { fLeadingTrackEtaCut = val; }
82 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
83 void SetEventSelectionBit( UInt_t val ) { fSelectBit = val; }
84 void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
87 static AliAnalysisTaskLeadingTrackUE* fgTaskLeadingTrackUE; // Pointer to single instance
90 AliAnalysisTaskLeadingTrackUE(const AliAnalysisTaskLeadingTrackUE &det);
91 AliAnalysisTaskLeadingTrackUE& operator=(const AliAnalysisTaskLeadingTrackUE &det);
92 void AddSettingsTree(); // add list of settings to output list
94 void AnalyseCorrectionMode(); // main algorithm to get correction maps
95 void AnalyseDataMode(); // main algorithm to get raw distributions
96 void Initialize(); // initialize some common pointer
100 // General configuration
101 Int_t fDebug; // Debug flag
102 Int_t fMode; // fMode = 0: data-like analysis
103 // fMode = 1: corrections analysis
104 Bool_t fReduceMemoryFootprint; // reduce memory consumption by writing less debug histograms
106 // Pointers to external UE classes
107 AliAnalyseLeadingTrackUE* fAnalyseUE; //! points to class containing common analysis algorithms
108 AliUEHistograms* fHistosUE; //! points to class to handle histograms/containers
110 const TH1D* fkTrackingEfficiency; // used for study of bias by tracking
112 // Handlers and events
113 AliAODEvent* fAOD; //! AOD Event
114 TClonesArray* fArrayMC; //! Array of MC particles
115 AliInputEventHandler* fInputHandler; //! Generic InputEventHandler
116 AliMCEvent* fMcEvent; //! MC event
117 AliMCEventHandler* fMcHandler; //! MCEventHandler
119 // Histogram settings
120 TList* fListOfHistos; // Output list of containers
121 Int_t fBinsPtInHist; // # bins for pT histos
122 Double_t fMinJetPtInHist; // min Jet Pt value for histo range
123 Double_t fMaxJetPtInHist; // max Jet Pt value for histo range
127 Int_t fnTracksVertex; // QA tracks pointing to principal vertex (= 3 default)
128 Double_t fZVertex; // Position of Vertex in Z direction
131 Double_t fTrackEtaCut; // Eta cut on inclusive tracks
132 Double_t fLeadingTrackEtaCut; // Eta cut on leading track
133 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
134 UInt_t fSelectBit; // Select events according to AliAnalysisTaskJetServices bit maps
135 Bool_t fUseChargeHadrons; // Only use charge hadrons
138 Double_t fAvgTrials; // average trials used to fill the fh1Trials histogram in case we do not have trials on a event by event basis
140 ClassDef( AliAnalysisTaskLeadingTrackUE, 1); // Analysis task for Underlying Event analysis w.r.t. leading track