1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 //-----------------------------------------------------------------------
17 // Author : Marta Verweij - UU
18 //-----------------------------------------------------------------------
20 #ifndef ALIPWG4HIGHPTSPECTRA_H
21 #define ALIPWG4HIGHPTSPECTRA_H
23 #include "AliAnalysisTask.h"
24 #include "AliCFManager.h"
34 class AliESDtrackCuts;
39 class AliGenPythiaEventHeader;
41 class AliPWG4HighPtSpectra : public AliAnalysisTask {
45 kStepReconstructed = 0,
46 kStepReconstructedTPCOnly = 1,
48 kStepReconstructedMC = 3,
49 kStepMCAcceptance = 4,
50 kStepReconstructedTPCOnlyMC = 5
53 AliPWG4HighPtSpectra();
54 AliPWG4HighPtSpectra(const Char_t* name);
55 // AliPWG4HighPtSpectra& operator= (const AliPWG4HighPtSpectra& c);
56 // AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra& c);
57 ~AliPWG4HighPtSpectra() {;};
59 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
60 virtual void LocalInit();
61 virtual void ConnectInputData(Option_t *);
62 virtual void CreateOutputObjects();
63 virtual void Exec(Option_t *option);
64 virtual void Terminate(Option_t *);
65 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
67 Bool_t SelectEvent(); //decides if event is used for analysis
69 // CORRECTION FRAMEWORK RELATED FUNCTIONS
70 void SetCFManagerPos(const AliCFManager* io1) {fCFManagerPos = io1;} // global correction manager
71 const AliCFManager * GetCFManagerPos() const {return fCFManagerPos;} // get corr manager
72 void SetCFManagerNeg(const AliCFManager* io2) {fCFManagerNeg = io2;} // global correction manager
73 const AliCFManager * GetCFManagerNeg() const {return fCFManagerNeg;} // get corr manager
75 //if fTrackType=0 (GlobalStandard and TPConly)
76 //if fTrackType=0 (GlobalITSrefit and TPConly constrained)
77 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
78 //AliESDtrackCuts setters
79 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
80 void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
83 Bool_t IsReadAODData() const {return fReadAODData;}
84 void SetReadAODData(Bool_t flag=kTRUE) {fReadAODData=flag;}
86 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
87 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
90 Bool_t fReadAODData ; // flag for AOD/ESD input files
91 const AliCFManager *fCFManagerPos ; // pointer to the CF manager for positive charged particles
92 const AliCFManager *fCFManagerNeg ; // pointer to the CF manager for negative charged particles
94 AliESDEvent *fESD; //! ESD object
95 AliMCEvent *fMC; //! MC event object
96 AliStack *fStack; //! stack object
98 const AliESDVertex *fVtx; //! vertex object
101 Int_t fTrackType; // Type of track to be used in analysis
102 //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
103 AliESDtrackCuts *fTrackCuts; // trackCuts applied to global tracks
104 AliESDtrackCuts *fTrackCutsTPConly; // trackCuts applied to TPConly tracks
107 AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra&);
108 AliPWG4HighPtSpectra& operator=(const AliPWG4HighPtSpectra&);
110 Float_t fAvgTrials; // Average number of trials
114 TList *fHistList; //! List of output histograms
115 TH1F *fNEventAll; //! Event counter
116 TH1F *fNEventSel; //! Event counter: Selected events for analysis
117 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
119 TProfile* fh1Xsec; //! pythia cross section and trials
120 TH1F* fh1Trials; //! trials which are added
121 TH1F* fh1PtHard; //! pt hard of the event
122 TH1F* fh1PtHardTrials; //! pt hard of the event
124 ClassDef(AliPWG4HighPtSpectra,2);