]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/AliPWG4HighPtSpectra.h
fixed setters for external histos, added Clone (M. Zimmermann)
[u/mrichter/AliRoot.git] / PWGJE / 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;
a337a5a9 29class TH2F;
b4691ee7 30class TProfile;
31class TFile;
32class TList;
33
67ebd013 34//class AliCFManager;
fdceab34 35class AliESDtrackCuts;
36class AliESDEvent;
34fc6450 37class AliESDVertex;
b4691ee7 38class AliMCEvent;
cce400da 39class AliStack;
b4691ee7 40class AliGenPythiaEventHeader;
fdceab34 41
42class AliPWG4HighPtSpectra : public AliAnalysisTask {
b5cc0c6d 43 public:
fdceab34 44
45 enum {
ec555a3c 46 kStepReconstructed = 0,
2b553e6f 47 kStepSecondaries = 1,
48 kStepReconstructedMC = 2,
49 kStepMCAcceptance = 3
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
2b553e6f 66 Bool_t IsPbPb() {return fIsPbPb;} //is PbPb data?
cce400da 67 Bool_t SelectEvent(); //decides if event is used for analysis
2b553e6f 68 Int_t CalculateCentrality(AliESDEvent *esd);
cce400da 69
2b553e6f 70 //Setters
71 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
72 void SetCentralityClass(int cent) {fCentClass=cent;}
73
fdceab34 74 // CORRECTION FRAMEWORK RELATED FUNCTIONS
67ebd013 75 void SetCFManagerPos(const AliCFManager* io1) {fCFManagerPos = io1;} // global correction manager
76 const AliCFManager * GetCFManagerPos() const {return fCFManagerPos;} // get corr manager
77 void SetCFManagerNeg(const AliCFManager* io2) {fCFManagerNeg = io2;} // global correction manager
78 const AliCFManager * GetCFManagerNeg() const {return fCFManagerNeg;} // get corr manager
2b553e6f 79
80 //if fTrackType=0 (Global)
81 //if fTrackType=1 (TPConly)
82 //if fTrackType=2 (TPConly constrained)
34fc6450 83 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
fdceab34 84 //AliESDtrackCuts setters
85 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
327d12da 86 void SetCutsReject(AliESDtrackCuts* trackCuts) {fTrackCutsReject = trackCuts;}
2b553e6f 87
88 void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
fdceab34 89
90 // Data types
91 Bool_t IsReadAODData() const {return fReadAODData;}
b5cc0c6d 92 void SetReadAODData(Bool_t flag=kTRUE) {fReadAODData=flag;}
b4691ee7 93
94 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
95 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 96
fdceab34 97 protected:
67ebd013 98 Bool_t fReadAODData ; // flag for AOD/ESD input files
99 const AliCFManager *fCFManagerPos ; // pointer to the CF manager for positive charged particles
100 const AliCFManager *fCFManagerNeg ; // pointer to the CF manager for negative charged particles
101
cce400da 102 AliESDEvent *fESD; //! ESD object
103 AliMCEvent *fMC; //! MC event object
104 AliStack *fStack; //! stack object
105
34fc6450 106 const AliESDVertex *fVtx; //! vertex object
107
2b553e6f 108 Bool_t fIsPbPb; // kTRUE if PbPb
109 Int_t fCentClass; // Select only events from predefined centrality class
34fc6450 110
111 Int_t fTrackType; // Type of track to be used in analysis
1f329128 112 //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
113 AliESDtrackCuts *fTrackCuts; // trackCuts applied to global tracks
327d12da 114 AliESDtrackCuts *fTrackCutsReject; // trackCuts to reject tracks (hybrid case)
2b553e6f 115
116 Double_t fSigmaConstrainedMax; // max sigma on constrained fit
fdceab34 117
118 private:
1f329128 119 AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra&);
120 AliPWG4HighPtSpectra& operator=(const AliPWG4HighPtSpectra&);
fdceab34 121
b4691ee7 122 Float_t fAvgTrials; // Average number of trials
123
fdceab34 124 // Histograms
125 //Number of events
b4691ee7 126 TList *fHistList; //! List of output histograms
1f329128 127 TH1F *fNEventAll; //! Event counter
128 TH1F *fNEventSel; //! Event counter: Selected events for analysis
2b553e6f 129 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
130
131 TH1F *fh1Centrality; //! Centrality
b5cc0c6d 132
b4691ee7 133 TProfile* fh1Xsec; //! pythia cross section and trials
134 TH1F* fh1Trials; //! trials which are added
135 TH1F* fh1PtHard; //! pt hard of the event
136 TH1F* fh1PtHardTrials; //! pt hard of the event
137
a337a5a9 138 TH2F *fPtRelUncertainty1PtPrim; //! Pt vs relUncertainty1Pt for primary particles
139 TH2F *fPtRelUncertainty1PtSec; //! Pt vs relUncertainty1Pt for secondary particles
140
2b553e6f 141 ClassDef(AliPWG4HighPtSpectra,3);
fdceab34 142};
143
144#endif