PWGUD/dNdPt -> PWGLF/SPECTRA/ChargedHadrons/dNdPt
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / AlidNdPt.h
CommitLineData
0aaa8b91 1#ifndef ALIDNDPT_H
2#define ALIDNDPT_H
3
4//------------------------------------------------------------------------------
5// Abstract class for dNdPt analysis. All dNdPt components should derive from it.
6//
7// Author: J.Otwinowski 03/11/2008
68f10917 8// last change: 2011-04-04 by M.Knichel
0aaa8b91 9//------------------------------------------------------------------------------
10
11class AliESDEvent;
12class AliMCEvent;
13class AliESDtrackCuts;
14class AlidNdPtEventCuts;
15class AlidNdPtAcceptanceCuts;
d269b0e6 16class AliPhysicsSelection;
7f7dd416 17class AlidNdPtBackgroundCuts;
0aaa8b91 18
19#include "TNamed.h"
20#include "TFolder.h"
70fdd197 21#include "AliTriggerAnalysis.h"
0aaa8b91 22#include "AlidNdPtHelper.h"
23
24class AlidNdPt : public TNamed {
25public:
26 AlidNdPt();
27 AlidNdPt(Char_t* name, Char_t* title);
28 ~AlidNdPt();
29
30 // Init data members
31 virtual void Init() = 0;
32
33 // Process events
34 virtual void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0) = 0;
35
36 // Merge output objects (needed by PROOF)
c931948b 37 virtual Long64_t Merge(TCollection* const list=0) = 0;
0aaa8b91 38
39 // Analyse output histograms
40 virtual void Analyse() = 0;
41
42 // Export analysed output objects to folder
c931948b 43 virtual TFolder *ExportToFolder(TObjArray * const array=0) = 0;
0aaa8b91 44
45 //
0aaa8b91 46
47 //
bad4ba69 48 void SetEventCuts(AlidNdPtEventCuts* const cuts) { fdNdPtEventCuts = cuts; }
49 void SetAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtAcceptanceCuts = cuts; }
68f10917 50 void SetRecAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtRecAcceptanceCuts = cuts; }
bad4ba69 51 void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
52 void SetUseMCInfo(const Bool_t info) { fUseMCInfo = info; }
53 void SetAnalysisMode(const AlidNdPtHelper::AnalysisMode mode) { fAnalysisMode = mode; }
70fdd197 54 void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
985bdfd5 55 void SetTriggerClass(const Char_t *triggerClass) { fTriggerClass = triggerClass; }
847e74b2 56 void SetParticleMode(const AlidNdPtHelper::ParticleMode mode) { fParticleMode = mode; }
d269b0e6 57 void SetPhysicsTriggerSelection(AliPhysicsSelection* const selection) { fPhysicsSelection = selection; }
7f7dd416 58 void SetBackgroundCuts(AlidNdPtBackgroundCuts* const cuts) { fdNdPtBackgroundCuts = cuts; }
bad4ba69 59
60 AlidNdPtEventCuts* GetEventCuts() const { return fdNdPtEventCuts; }
61 AlidNdPtAcceptanceCuts* GetAcceptanceCuts() const { return fdNdPtAcceptanceCuts; }
68f10917 62 AlidNdPtAcceptanceCuts* GetRecAcceptanceCuts() const { return fdNdPtRecAcceptanceCuts; }
bad4ba69 63 AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
64 Bool_t IsUseMCInfo() const { return fUseMCInfo; }
65 AlidNdPtHelper::AnalysisMode GetAnalysisMode() const { return fAnalysisMode; }
70fdd197 66 AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
985bdfd5 67 const Char_t* GetTriggerClass() const { return fTriggerClass; }
847e74b2 68 AlidNdPtHelper::ParticleMode GetParticleMode() const { return fParticleMode; }
d269b0e6 69 AliPhysicsSelection* GetPhysicsTriggerSelection() const { return fPhysicsSelection; }
7f7dd416 70 AlidNdPtBackgroundCuts* GetBackgroundCuts() const { return fdNdPtBackgroundCuts; }
10360c58 71 Double_t* CreateLogAxis(Int_t nbins, Double_t xmin, Double_t xmax);
0aaa8b91 72
a26e43aa 73 void SetAnalyseOutput(Bool_t analyseoutput) { fAnalyseOutput = analyseoutput; }
74 Bool_t GetAnalyseOutput() const { return fAnalyseOutput; }
75
76 void SetMergeTHnSparse(Bool_t mergethnsparse) { fMergeTHnSparse = mergethnsparse; }
77 Bool_t GetMergeTHnSparse() const { return fMergeTHnSparse; }
78
b2c68775 79 void SetTriggerMask(UInt_t triggermask) { fTriggerMask = triggermask; }
80 UInt_t GetTriggerMask() { return fTriggerMask; }
81
82
fc98fbb5 83protected:
84 static Double_t* CloneArray(Int_t n, Double_t* source);
85
0aaa8b91 86private:
87
154caed0 88 AlidNdPt(const AlidNdPt&); // not implemented
89 AlidNdPt& operator=(const AlidNdPt&); // not implemented
90
0aaa8b91 91 AlidNdPtEventCuts *fdNdPtEventCuts; // event cuts
68f10917 92 AlidNdPtAcceptanceCuts *fdNdPtAcceptanceCuts; // acceptance cuts
93 AlidNdPtAcceptanceCuts *fdNdPtRecAcceptanceCuts; // additional recontruction acceptance cuts (not used for MC truth)
0aaa8b91 94 AliESDtrackCuts *fEsdTrackCuts; // esd track cuts
95
96 Bool_t fUseMCInfo; // use MC information
97 AlidNdPtHelper::AnalysisMode fAnalysisMode; // analysis mode TPC only, TPC + ITS
70fdd197 98 AliTriggerAnalysis::Trigger fTrigger; // trigger definition MB1, MB2 ...
985bdfd5 99 const Char_t * fTriggerClass; // trigger class
847e74b2 100 AlidNdPtHelper::ParticleMode fParticleMode; // selected particle (pion, kaon, ...)
0aaa8b91 101
d269b0e6 102 AliPhysicsSelection* fPhysicsSelection; // physics trigger selection class
7f7dd416 103 AlidNdPtBackgroundCuts *fdNdPtBackgroundCuts; // background cuts (cosmics and splitted tracks)
a26e43aa 104
b2c68775 105 Bool_t fAnalyseOutput; // call Analyse() function in the FinishTaskOutput
a26e43aa 106 Bool_t fMergeTHnSparse; // merge THnSparse histograms in Merge() function
d269b0e6 107
b2c68775 108 UInt_t fTriggerMask; // trigger mask
109
110 ClassDef(AlidNdPt,5);
0aaa8b91 111};
112
113#endif