]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliPWG4HighPtSpectra.h
bugfix: implementing function SendMLFromDet added as pure virtual in r43691
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliPWG4HighPtSpectra.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 : Marta Verweij - UU
18 //-----------------------------------------------------------------------
19
20 #ifndef ALIPWG4HIGHPTSPECTRA_H
21 #define ALIPWG4HIGHPTSPECTRA_H
22
23 #include "AliAnalysisTask.h"
24 #include "AliCFManager.h"
25
26 class TH1I;
27 class TH1F;
28 class TH1D;
29 class TProfile;
30 class TFile;
31 class TList;
32
33 //class AliCFManager;
34 class AliESDtrackCuts;
35 class AliESDEvent;
36 class AliMCEvent;
37 class AliGenPythiaEventHeader;
38
39 class AliPWG4HighPtSpectra : public AliAnalysisTask {
40  public:
41
42   enum {
43     kStepReconstructed          = 0,
44     kStepReconstructedTPCOnly   = 1,
45     kStepSecondaries            = 2,
46     kStepReconstructedMC        = 3,
47     kStepMCAcceptance           = 4,
48     kStepReconstructedTPCOnlyMC = 5
49   };
50
51   AliPWG4HighPtSpectra();
52   AliPWG4HighPtSpectra(const Char_t* name);
53   // AliPWG4HighPtSpectra& operator= (const AliPWG4HighPtSpectra& c);
54   //  AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra& c);
55   ~AliPWG4HighPtSpectra() {;};
56
57   // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
58   virtual void   LocalInit();
59   virtual void   ConnectInputData(Option_t *);
60   virtual void   CreateOutputObjects();
61   virtual void   Exec(Option_t *option);
62   virtual void   Terminate(Option_t *);
63   virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
64
65   // CORRECTION FRAMEWORK RELATED FUNCTIONS
66   void     SetCFManagerPos(const AliCFManager* io1) {fCFManagerPos = io1;}   // global correction manager 
67   const AliCFManager * GetCFManagerPos() const {return fCFManagerPos;}           // get corr manager 
68   void     SetCFManagerNeg(const AliCFManager* io2) {fCFManagerNeg = io2;}   // global correction manager 
69   const AliCFManager * GetCFManagerNeg() const {return fCFManagerNeg;}            // get corr manager
70   
71   //AliESDtrackCuts setters
72   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
73   void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
74
75   // Data types
76   Bool_t IsReadAODData()   const {return fReadAODData;}
77   void   SetReadAODData(Bool_t flag=kTRUE) {fReadAODData=flag;}
78
79   static AliGenPythiaEventHeader*  GetPythiaEventHeader(AliMCEvent *mcEvent);
80   static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
81   
82  protected:
83   Bool_t              fReadAODData ;       // flag for AOD/ESD input files
84   const AliCFManager  *fCFManagerPos    ;  // pointer to the CF manager for positive charged particles
85   const AliCFManager  *fCFManagerNeg    ;  // pointer to the CF manager for negative charged particles
86  
87   AliESDEvent *fESD;                     //! ESD object
88   //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
89   AliESDtrackCuts *fTrackCuts;           // trackCuts applied to global tracks
90   AliESDtrackCuts *fTrackCutsTPConly;    // trackCuts applied to TPConly tracks
91
92  private:
93   AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra&);
94   AliPWG4HighPtSpectra& operator=(const AliPWG4HighPtSpectra&);
95
96   Float_t fAvgTrials;             // Average number of trials
97
98   // Histograms
99   //Number of events
100   TList *fHistList;             //! List of output histograms
101   TH1F  *fNEventAll;            //! Event counter
102   TH1F  *fNEventSel;            //! Event counter: Selected events for analysis
103
104   TProfile*     fh1Xsec;                       //! pythia cross section and trials
105   TH1F*         fh1Trials;                     //! trials which are added
106   TH1F*         fh1PtHard;                     //! pt hard of the event
107   TH1F*         fh1PtHardTrials;               //! pt hard of the event
108
109   ClassDef(AliPWG4HighPtSpectra,2);
110 };
111
112 #endif