Fix for coverity
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliPWG4HighPtSpectra.h
CommitLineData
fdceab34 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
26class TH1I;
b5cc0c6d 27class TH1F;
fdceab34 28class TH1D;
b4691ee7 29class TProfile;
30class TFile;
31class TList;
32
67ebd013 33//class AliCFManager;
fdceab34 34class AliESDtrackCuts;
35class AliESDEvent;
b4691ee7 36class AliMCEvent;
cce400da 37class AliStack;
b4691ee7 38class AliGenPythiaEventHeader;
fdceab34 39
40class AliPWG4HighPtSpectra : public AliAnalysisTask {
b5cc0c6d 41 public:
fdceab34 42
43 enum {
ec555a3c 44 kStepReconstructed = 0,
45 kStepReconstructedTPCOnly = 1,
46 kStepSecondaries = 2,
47 kStepReconstructedMC = 3,
48 kStepMCAcceptance = 4,
49 kStepReconstructedTPCOnlyMC = 5
fdceab34 50 };
51
52 AliPWG4HighPtSpectra();
53 AliPWG4HighPtSpectra(const Char_t* name);
67ebd013 54 // AliPWG4HighPtSpectra& operator= (const AliPWG4HighPtSpectra& c);
55 // AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra& c);
56 ~AliPWG4HighPtSpectra() {;};
fdceab34 57
58 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
e5abcde9 59 virtual void LocalInit();
fdceab34 60 virtual void ConnectInputData(Option_t *);
61 virtual void CreateOutputObjects();
62 virtual void Exec(Option_t *option);
63 virtual void Terminate(Option_t *);
b4691ee7 64 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
fdceab34 65
cce400da 66 Bool_t SelectEvent(); //decides if event is used for analysis
67
fdceab34 68 // CORRECTION FRAMEWORK RELATED FUNCTIONS
67ebd013 69 void SetCFManagerPos(const AliCFManager* io1) {fCFManagerPos = io1;} // global correction manager
70 const AliCFManager * GetCFManagerPos() const {return fCFManagerPos;} // get corr manager
71 void SetCFManagerNeg(const AliCFManager* io2) {fCFManagerNeg = io2;} // global correction manager
72 const AliCFManager * GetCFManagerNeg() const {return fCFManagerNeg;} // get corr manager
73
fdceab34 74 //AliESDtrackCuts setters
75 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
1f329128 76 void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
fdceab34 77
78 // Data types
79 Bool_t IsReadAODData() const {return fReadAODData;}
b5cc0c6d 80 void SetReadAODData(Bool_t flag=kTRUE) {fReadAODData=flag;}
b4691ee7 81
82 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
83 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
b5cc0c6d 84
fdceab34 85 protected:
67ebd013 86 Bool_t fReadAODData ; // flag for AOD/ESD input files
87 const AliCFManager *fCFManagerPos ; // pointer to the CF manager for positive charged particles
88 const AliCFManager *fCFManagerNeg ; // pointer to the CF manager for negative charged particles
89
cce400da 90 AliESDEvent *fESD; //! ESD object
91 AliMCEvent *fMC; //! MC event object
92 AliStack *fStack; //! stack object
93
1f329128 94 //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
95 AliESDtrackCuts *fTrackCuts; // trackCuts applied to global tracks
96 AliESDtrackCuts *fTrackCutsTPConly; // trackCuts applied to TPConly tracks
fdceab34 97
98 private:
1f329128 99 AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra&);
100 AliPWG4HighPtSpectra& operator=(const AliPWG4HighPtSpectra&);
fdceab34 101
b4691ee7 102 Float_t fAvgTrials; // Average number of trials
103
fdceab34 104 // Histograms
105 //Number of events
b4691ee7 106 TList *fHistList; //! List of output histograms
1f329128 107 TH1F *fNEventAll; //! Event counter
108 TH1F *fNEventSel; //! Event counter: Selected events for analysis
cb76764e 109 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
b5cc0c6d 110
b4691ee7 111 TProfile* fh1Xsec; //! pythia cross section and trials
112 TH1F* fh1Trials; //! trials which are added
113 TH1F* fh1PtHard; //! pt hard of the event
114 TH1F* fh1PtHardTrials; //! pt hard of the event
115
3eed7f8f 116 ClassDef(AliPWG4HighPtSpectra,2);
fdceab34 117};
118
119#endif