Dependence on AliPHOSRecoParam removed.
[u/mrichter/AliRoot.git] / FMD / analysis / AliFMDAnalysisTaskSE.cxx
CommitLineData
7c3e5162 1#include "AliFMDAnalysisTaskSE.h"
2#include "AliESDEvent.h"
3#include "iostream"
4#include "AliESDFMD.h"
5
6ClassImp(AliFMDAnalysisTaskSE)
7
8//_____________________________________________________________________
9AliFMDAnalysisTaskSE::AliFMDAnalysisTaskSE():
10AliAnalysisTaskSE(),
11 fListOfHistos(0),
12 fSharing("Sharing",kFALSE),
13 fDensity("Density",kFALSE),
14 fBackground("BackgroundCorrected",kFALSE),
15 fDndeta("dNdeta",kFALSE)
16{
17 // Default constructor
18}
19//_____________________________________________________________________
20AliFMDAnalysisTaskSE::AliFMDAnalysisTaskSE(const char* name):
21 AliAnalysisTaskSE(name),
22 fListOfHistos(0),
23 fSharing("Sharing",kFALSE),
24 fDensity("Density",kFALSE),
25 fBackground("BackgroundCorrected",kFALSE),
26 fDndeta("dNdeta",kFALSE)
27{
1282ce49 28
7c3e5162 29 DefineOutput(1, TList::Class());
30}
31//_____________________________________________________________________
32void AliFMDAnalysisTaskSE::UserCreateOutputObjects()
33{
1282ce49 34// Create the output containers
7c3e5162 35//
36 fListOfHistos = new TList();
37
38 AliESDFMD* fmd = new AliESDFMD();
39 AliESDVertex* vertex = new AliESDVertex();
40
41 TObjString* vtxString1 = new TObjString();
42
43 TList* densitylist = new TList();
44
45 TList* bgcorlist = new TList();
46
47 fSharing.SetFMDData(fmd);
48 fSharing.SetVertex(vertex);
49
50 fDensity.SetOutputList(densitylist);
51 fDensity.SetInputESDFMD(fmd) ;
52 fDensity.SetInputVertex(vertex);
53
54 fBackground.SetInputList(densitylist);
55 fBackground.SetOutputList(bgcorlist);
56 fBackground.SetOutputVertex(vtxString1);
57
58 fDndeta.SetInputVertex(vtxString1);
59 fDndeta.SetInputList(bgcorlist);
60 fDndeta.SetOutputList(fListOfHistos);
61
62 fSharing.CreateOutputObjects();
63 fDensity.CreateOutputObjects();
64 fBackground.CreateOutputObjects();
65 fDndeta.CreateOutputObjects();
66
67
68
69}
70//_____________________________________________________________________
71void AliFMDAnalysisTaskSE::Init()
72{
73 std::cout<<"Init"<<std::endl;
74}
75//_____________________________________________________________________
76void AliFMDAnalysisTaskSE::UserExec(Option_t */*option*/)
77{
78 // Execute analysis for current event
79 //
80 AliESDEvent* fESD = (AliESDEvent*)InputEvent();
81 fSharing.SetInputESD(fESD);
82
83 fSharing.Exec("");
84 fDensity.Exec("");
85 fBackground.Exec("");
86 fDndeta.Exec("");
87 //fListOfHistos = fBackground.GetOutputList();
88
89 PostData(1, fListOfHistos);
90}
1282ce49 91//_____________________________________________________________________
92void AliFMDAnalysisTaskSE::Terminate(Option_t */*option*/)
93{
94 fDndeta.Terminate("");
7c3e5162 95
1282ce49 96}
7c3e5162 97//_____________________________________________________________________
98//
99// EOF
100//