]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliPWG4HighPtSpectra.h
samll fixes (Marta)
[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;
34fc6450 36class AliESDVertex;
b4691ee7 37class AliMCEvent;
cce400da 38class AliStack;
b4691ee7 39class AliGenPythiaEventHeader;
fdceab34 40
41class AliPWG4HighPtSpectra : public AliAnalysisTask {
b5cc0c6d 42 public:
fdceab34 43
44 enum {
ec555a3c 45 kStepReconstructed = 0,
2b553e6f 46 kStepSecondaries = 1,
47 kStepReconstructedMC = 2,
48 kStepMCAcceptance = 3
fdceab34 49 };
50
51 AliPWG4HighPtSpectra();
52 AliPWG4HighPtSpectra(const Char_t* name);
67ebd013 53 // AliPWG4HighPtSpectra& operator= (const AliPWG4HighPtSpectra& c);
54 // AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra& c);
55 ~AliPWG4HighPtSpectra() {;};
fdceab34 56
57 // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
e5abcde9 58 virtual void LocalInit();
fdceab34 59 virtual void ConnectInputData(Option_t *);
60 virtual void CreateOutputObjects();
61 virtual void Exec(Option_t *option);
62 virtual void Terminate(Option_t *);
b4691ee7 63 virtual Bool_t Notify(); //Copied from AliAnalysisTaskJetSpectrum2
fdceab34 64
2b553e6f 65 Bool_t IsPbPb() {return fIsPbPb;} //is PbPb data?
cce400da 66 Bool_t SelectEvent(); //decides if event is used for analysis
2b553e6f 67 Int_t CalculateCentrality(AliESDEvent *esd);
cce400da 68
2b553e6f 69 //Setters
70 void SetIsPbPb(Bool_t cs) {fIsPbPb = cs;}
71 void SetCentralityClass(int cent) {fCentClass=cent;}
72
fdceab34 73 // CORRECTION FRAMEWORK RELATED FUNCTIONS
67ebd013 74 void SetCFManagerPos(const AliCFManager* io1) {fCFManagerPos = io1;} // global correction manager
75 const AliCFManager * GetCFManagerPos() const {return fCFManagerPos;} // get corr manager
76 void SetCFManagerNeg(const AliCFManager* io2) {fCFManagerNeg = io2;} // global correction manager
77 const AliCFManager * GetCFManagerNeg() const {return fCFManagerNeg;} // get corr manager
2b553e6f 78
79 //if fTrackType=0 (Global)
80 //if fTrackType=1 (TPConly)
81 //if fTrackType=2 (TPConly constrained)
34fc6450 82 void SetTrackType(Int_t trackType) {fTrackType = trackType;}
fdceab34 83 //AliESDtrackCuts setters
84 void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
2b553e6f 85
86 void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
fdceab34 87
88 // Data types
89 Bool_t IsReadAODData() const {return fReadAODData;}
b5cc0c6d 90 void SetReadAODData(Bool_t flag=kTRUE) {fReadAODData=flag;}
b4691ee7 91
92 static AliGenPythiaEventHeader* GetPythiaEventHeader(AliMCEvent *mcEvent);
93 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 94
fdceab34 95 protected:
67ebd013 96 Bool_t fReadAODData ; // flag for AOD/ESD input files
97 const AliCFManager *fCFManagerPos ; // pointer to the CF manager for positive charged particles
98 const AliCFManager *fCFManagerNeg ; // pointer to the CF manager for negative charged particles
99
cce400da 100 AliESDEvent *fESD; //! ESD object
101 AliMCEvent *fMC; //! MC event object
102 AliStack *fStack; //! stack object
103
34fc6450 104 const AliESDVertex *fVtx; //! vertex object
105
2b553e6f 106 Bool_t fIsPbPb; // kTRUE if PbPb
107 Int_t fCentClass; // Select only events from predefined centrality class
34fc6450 108
109 Int_t fTrackType; // Type of track to be used in analysis
1f329128 110 //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
111 AliESDtrackCuts *fTrackCuts; // trackCuts applied to global tracks
2b553e6f 112
113 Double_t fSigmaConstrainedMax; // max sigma on constrained fit
fdceab34 114
115 private:
1f329128 116 AliPWG4HighPtSpectra(const AliPWG4HighPtSpectra&);
117 AliPWG4HighPtSpectra& operator=(const AliPWG4HighPtSpectra&);
fdceab34 118
b4691ee7 119 Float_t fAvgTrials; // Average number of trials
120
fdceab34 121 // Histograms
122 //Number of events
b4691ee7 123 TList *fHistList; //! List of output histograms
1f329128 124 TH1F *fNEventAll; //! Event counter
125 TH1F *fNEventSel; //! Event counter: Selected events for analysis
2b553e6f 126 TH1F *fNEventReject; //! Book keeping of reason of rejecting events
127
128 TH1F *fh1Centrality; //! Centrality
b5cc0c6d 129
b4691ee7 130 TProfile* fh1Xsec; //! pythia cross section and trials
131 TH1F* fh1Trials; //! trials which are added
132 TH1F* fh1PtHard; //! pt hard of the event
133 TH1F* fh1PtHardTrials; //! pt hard of the event
134
2b553e6f 135 ClassDef(AliPWG4HighPtSpectra,3);
fdceab34 136};
137
138#endif