]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/base/AliAnalysisTaskPtMothFromPtDaugh.h
Updating the functionality of AliAnalysisHadEtCorrections to accomodate centrality...
[u/mrichter/AliRoot.git] / PWG3 / base / AliAnalysisTaskPtMothFromPtDaugh.h
1 #ifndef ALIANALYSISTASKPTMOTHFROMPTDAUGH_H
2 #define ALIANALYSISTASKPTMOTHFROMPTDAUGH_H
3 /* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */ 
7
8 ///////////////////////////////////////////////////////////////////////////
9 //                                                                       //
10 //             Class AnalysisTaskAliPtMothFromPtDaugh                    //
11 //   AnalysisTaskSE used for the reconstruction of mothers particles     //
12 //   spectra (pT and pTMin) starting from the pT-spectra of              //
13 //   daughters particles.                                                //
14 //                                                                       //
15 //   Contact: Giuseppe.Bruno@ba.infn.it & Fiorella.Fionda@ba.infn.it     //
16 //                                                                       //
17 ///////////////////////////////////////////////////////////////////////////
18
19 #include "AliAnalysisTaskSE.h"
20
21 class AliPtMothFromPtDaugh;
22 class TNtuple;
23 class TH1F;
24 class TList;
25
26 class AliAnalysisTaskPtMothFromPtDaugh : public AliAnalysisTaskSE {
27   
28 public:
29   AliAnalysisTaskPtMothFromPtDaugh();
30   AliAnalysisTaskPtMothFromPtDaugh(Bool_t IsNtuplaCreated);
31   virtual ~AliAnalysisTaskPtMothFromPtDaugh();
32
33   virtual void  UserExec(Option_t *option);
34   virtual void  UserCreateOutputObjects();
35   virtual void  Terminate(Option_t *option); 
36  
37   void SetPtMothFromPtDaugh(AliPtMothFromPtDaugh * const ptExtr)
38               { fPtMothDaugh = ptExtr; }             // set AliPtMothFromPtDaugh object
39   void SetReadKineFromNtupla(Bool_t ReadKinematic)
40               {fReadKineFromNtupla = ReadKinematic;} // set flag to read kinematics from Ntupla  
41   void SetNtuplaFileName(char *fileNtuplaName)
42               {fFileNtuplaName=fileNtuplaName;}      // set file name from which Ntupla is read
43   TNtuple *ReadNtuplaFromFile(char * inFileName);    // get the Ntupla from the file 
44   AliPtMothFromPtDaugh *GetPtMothFromPtDaugh(){return fPtMothDaugh;}   
45
46 private:
47   
48   AliPtMothFromPtDaugh    *fPtMothDaugh;        //Pointer to AliPtMothFromPtDaugh object   
49   TNtuple                 *fDecayKine;          //Ntupla to store kinematic information of Decay (optional output)
50   Bool_t                   fReadKineFromNtupla; //kTRUE: read kinematics from Ntupla
51                                                 //kFALSE: loops on events to evaluate Ntupla
52   char                    *fFileNtuplaName;     //file name from which Ntupla is read 
53   TList                   *fList;               //List of mothers histograms (standard output)
54
55   AliAnalysisTaskPtMothFromPtDaugh(const AliAnalysisTaskPtMothFromPtDaugh &c);
56   AliAnalysisTaskPtMothFromPtDaugh& operator= (const AliAnalysisTaskPtMothFromPtDaugh &c);
57   
58   ClassDef(AliAnalysisTaskPtMothFromPtDaugh,1);  // task for analysis of mother pt spectrum from daughter pt spectrum
59 };
60 #endif