Ref storage set in initialisation
[u/mrichter/AliRoot.git] / PWG2 / AliAnalysisTaskProtons.h
CommitLineData
734d2c12 1#ifndef AliAnalysisTaskProtons_cxx
2#define AliAnalysisTaskProtons_cxx
3
4// Analysis task creating a the 2d y-p_t spectrum of p and antip
5// Author: Panos Cristakoglou
b620b667 6class TString;
734d2c12 7class TList;
8class AliESDEvent;
b620b667 9class AliAODEvent;
e4358d7f 10class AliMCEvent;
c5ba3680 11class AliProtonAnalysis;
12class TF1;
734d2c12 13
734d2c12 14#include "AliAnalysisTask.h"
15
16class AliAnalysisTaskProtons : public AliAnalysisTask {
17 public:
6667f3a7 18 enum TriggerMode { kMB1 = 0, kMB2, kSPDFASTOR };
19 enum AnalysisMode { kInvalid = -1, kTPC = 0, kHybrid, kGlobal };
20
db10bcb0 21 AliAnalysisTaskProtons();
22 AliAnalysisTaskProtons(const char *name);
734d2c12 23 virtual ~AliAnalysisTaskProtons() {}
24
25 virtual void ConnectInputData(Option_t *);
26 virtual void CreateOutputObjects();
27 virtual void Exec(Option_t *option);
28 virtual void Terminate(Option_t *);
aafecd8b 29
b620b667 30 void SetType(const char* type) {fAnalysisType = type;}
df01f00b 31 void SetPriorProbabilityFunctions(TF1 *felectrons,
32 TF1 *fmuons,
33 TF1 *fpions,
34 TF1 *fkaons,
35 TF1 *fprotons) {
aafecd8b 36 fFunctionUsed = kTRUE;
37 fElectronFunction = felectrons;
38 fMuonFunction = fmuons;
39 fPionFunction = fpions;
40 fKaonFunction = fkaons;
41 fProtonFunction = fprotons;
42 }
6667f3a7 43
44 void SetTriggerMode(TriggerMode triggermode) {fTriggerMode = triggermode;}
45 void SetAnalysisMode(AnalysisMode analysismode) {fProtonAnalysisMode = analysismode;}
46 void SetAcceptedVertexDiamond(Double_t gVx, Double_t gVy, Double_t gVz) {
47 fVxMax = gVx; fVyMax = gVy; fVzMax = gVz;}
48
49 static Bool_t IsEventTriggered(const AliESDEvent *esd,
50 TriggerMode trigger = kMB2);
51 static const AliESDVertex *GetVertex(AliESDEvent *esd,
52 AnalysisMode mode = kTPC,
53 Double_t gVx = 100.,
54 Double_t gVy = 100.,
55 Double_t gVz = 100.);
734d2c12 56
57 private:
6667f3a7 58 AliESDEvent *fESD; //ESD object
59 AliAODEvent *fAOD; //AOD object
60 AliMCEvent *fMC; //MC object
df01f00b 61
6667f3a7 62 TString fAnalysisType;//"ESD", "AOD" or "MC"
aafecd8b 63
6667f3a7 64 TList *fList; //TList output object
df01f00b 65
6667f3a7 66 AliProtonAnalysis *fProtonAnalysis; //analysis object
df01f00b 67
6667f3a7 68 TF1 *fElectronFunction; //TF1 for e
69 TF1 *fMuonFunction; //TF1 for mu
70 TF1 *fPionFunction; //TF1 for pi
71 TF1 *fKaonFunction; //TF1 for K
72 TF1 *fProtonFunction; //TF1 for p
df01f00b 73
6667f3a7 74 Bool_t fFunctionUsed; //kTRUE if Functions are used
df01f00b 75
6667f3a7 76 TriggerMode fTriggerMode; //Trigger mode
77 AnalysisMode fProtonAnalysisMode; //Analysis mode
78 Double_t fVxMax, fVyMax, fVzMax; //vertex diamond constrain
79
80 AliAnalysisTaskProtons(const AliAnalysisTaskProtons&); // not implemented
81 AliAnalysisTaskProtons& operator=(const AliAnalysisTaskProtons&); // not implemented
734d2c12 82
83 ClassDef(AliAnalysisTaskProtons, 1); // example of analysis
84};
85
86#endif