]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/AliProtonCorrectionTask.h
Added the include to cstdlib in several places to avoid compilation problems with...
[u/mrichter/AliRoot.git] / PWG2 / AliProtonCorrectionTask.h
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 //-----------------------------------------------------------------------
17 // Author : R. Vernet, Consorzio Cometa - Catania (it)
18 //-----------------------------------------------------------------------
19
20 #ifndef ALIPROTONCORRECTIONTASK_H
21 #define ALIPROTONCORRECTIONTASK_H
22
23 #include "AliAnalysisTaskSE.h"
24
25 class TH1I;
26 class TParticle ;
27 class TFile ;
28 class AliStack ;
29 class AliCFManager;
30 class AliESDtrack;
31 class AliVParticle;
32
33 class AliProtonCorrectionTask : public AliAnalysisTaskSE {
34   public:
35
36   enum {
37     kStepGenerated       = 0,
38     kStepReconstructible = 1,
39     kStepReconstructed   = 2,
40     kStepSelected        = 3
41   };
42
43   AliProtonCorrectionTask();
44   AliProtonCorrectionTask(const Char_t* name);
45   AliProtonCorrectionTask& operator= (const AliProtonCorrectionTask& c);
46   AliProtonCorrectionTask(const AliProtonCorrectionTask& c);
47   virtual ~AliProtonCorrectionTask();
48
49   // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
50   void     UserCreateOutputObjects();
51   void     UserExec(Option_t *option);
52   void     Terminate(Option_t *);
53   
54   // CORRECTION FRAMEWORK RELATED FUNCTIONS
55   void  SetCFManagerProtons(AliCFManager* io) {fCFManagerProtons = io;}  
56   // global correction manager
57   AliCFManager * GetCFManagerProtons() const {return fCFManagerProtons;}
58   // get corr manager
59   void SetCFManagerAntiProtons(AliCFManager* io) {fCFManagerAntiProtons = io;} // global correction manager
60   AliCFManager * GetCFManagerAntiProtons() const {return fCFManagerAntiProtons;}// get corr manager
61   void           SetQAList(TList* list) {fQAHistList = list;}
62
63   // Data types
64   Bool_t IsReadTPCTracks() const {return fReadTPCTracks;}
65   Bool_t IsReadAODData()   const {return fReadAODData;}
66   void   SetReadTPCTracks (Bool_t flag=kTRUE) {fReadTPCTracks=flag;}
67   void   SetReadAODData   (Bool_t flag=kTRUE) {fReadAODData=flag;}
68
69  protected:
70   Double_t Rapidity(Double_t px, Double_t py, Double_t pz);
71
72   Bool_t          fReadTPCTracks;         // flag to loop on TPC tracks only
73   Bool_t          fReadAODData;           // flag for AOD/ESD input files
74   AliCFManager   *fCFManagerProtons;      // pointer to the CF manager
75   AliCFManager   *fCFManagerAntiProtons;  // pointer to the CF manager
76   TList          *fQAHistList;            // list of QA histograms
77
78   // Histograms
79   //Number of events
80   TH1I  *fHistEventsProcessed; // simple histo for monitoring the number of events processed
81   
82   ClassDef(AliProtonCorrectionTask,1);
83 };
84
85 #endif