More code clean up.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardMultiplicityTask.h
CommitLineData
9d99b0dd 1#ifndef ALIROOT_PWG2_FORWARD_ALIFORWARDMULTIPLICITY_H
2#define ALIROOT_PWG2_FORWARD_ALIFORWARDMULTIPLICITY_H
7e4038b5 3#include <AliAnalysisTaskSE.h>
4#include "AliForwardUtil.h"
fffea31d 5#include "AliFMDEventInspector.h"
6#include "AliFMDEnergyFitter.h"
7e4038b5 7#include "AliFMDSharingFilter.h"
8#include "AliFMDDensityCalculator.h"
9#include "AliFMDCorrections.h"
10#include "AliFMDHistCollector.h"
11#include "AliAODForwardMult.h"
fffea31d 12#include "AliFMDEnergyFitter.h"
7e4038b5 13#include <AliESDFMD.h>
14#include <TH1I.h>
15class AliFMDAnaParameters;
16class AliESDEvent;
17class TH2D;
18class TList;
19class TTree;
20
21
22/**
23 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
24 */
25/**
26 * @defgroup pwg2_forward_analysis PWG2 Forward analysis
27 *
28 * Code to do the multiplicity analysis in the forward psuedo-rapidity
29 * regions
30 *
31 */
32/**
33 * Calculate the multiplicity in the forward regions event-by-event
34 *
35 * @par Inputs:
36 * - AliESDEvent
37 *
38 * @par Outputs:
39 * - AliAODForwardMult
40 *
41 * @par Histograms
42 *
43 * @par Corrections used
44 *
45 * @ingroup pwg2_forward_analysis
46 *
47 */
0bd4b00f 48class AliForwardMultiplicityTask : public AliAnalysisTaskSE
7e4038b5 49{
50public:
51 /**
52 * Constructor
53 *
54 * @param name Name of task
55 */
0bd4b00f 56 AliForwardMultiplicityTask(const char* name);
7e4038b5 57 /**
58 * Constructor
59 */
0bd4b00f 60 AliForwardMultiplicityTask();
7e4038b5 61 /**
62 * Copy constructor
63 *
64 * @param o Object to copy from
65 */
0bd4b00f 66 AliForwardMultiplicityTask(const AliForwardMultiplicityTask& o);
7e4038b5 67 /**
68 * Assignment operator
69 *
70 * @param o Object to assign from
71 *
72 * @return Reference to this object
73 */
0bd4b00f 74 AliForwardMultiplicityTask& operator=(const AliForwardMultiplicityTask& o);
7e4038b5 75 /**
76 * @{
77 * @name Interface methods
78 */
79 /**
80 * Initialize the task
81 *
82 */
83 virtual void Init();
84 /**
85 * Create output objects
86 *
87 */
88 virtual void UserCreateOutputObjects();
89 /**
90 * Process each event
91 *
92 * @param option Not used
93 */
94 virtual void UserExec(Option_t* option);
95 /**
96 * End of job
97 *
98 * @param option Not used
99 */
100 virtual void Terminate(Option_t* option);
101 /**
102 * @}
103 */
0bd4b00f 104 /**
105 * Print information
106 *
107 * @param option Not used
108 */
fffea31d 109 void Print(Option_t* option="") const;
0bd4b00f 110 /**
111 * Whether to enable low-flux code
112 *
113 * @param use IF true, enable low-flux code
114 */
115 void SetEnableLowFlux(Bool_t use=true) { fEnableLowFlux = use; }
fea27ee0 116 /**
fffea31d 117 * @{
118 * @name Access to sub-algorithms
119 */
120 /**
121 * Get reference to the EventInspector algorithm
fea27ee0 122 *
fffea31d 123 * @return Reference to AliFMDEventInspector object
fea27ee0 124 */
fffea31d 125 AliFMDEventInspector& GetEventInspector() { return fEventInspector; }
126 /**
127 * Get reference to the EnergyFitter algorithm
128 *
129 * @return Reference to AliFMDEnergyFitter object
130 */
131 AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; }
7e4038b5 132 /**
133 * Get reference to the SharingFilter algorithm
134 *
135 * @return Reference to AliFMDSharingFilter object
136 */
137 AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; }
138 /**
139 * Get reference to the DensityCalculator algorithm
140 *
141 * @return Reference to AliFMDDensityCalculator object
142 */
143 AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; }
144 /**
145 * Get reference to the Corrections algorithm
146 *
147 * @return Reference to AliFMDCorrections object
148 */
149 AliFMDCorrections& GetCorrections() { return fCorrections; }
150 /**
151 * Get reference to the HistCollector algorithm
152 *
153 * @return Reference to AliFMDHistCollector object
154 */
155 AliFMDHistCollector& GetHistCollector() { return fHistCollector; }
fffea31d 156 /**
157 * @}
158 */
159 void SetDebug(Int_t dbg);
7e4038b5 160protected:
161 /**
162 * Initialise the sub objects and stuff. Called on first event
163 *
164 */
165 virtual void InitializeSubs();
166 /**
167 * Mark this event as one to store in the AOD
168 *
169 */
170 virtual void MarkEventForStore() const;
7e4038b5 171
0bd4b00f 172 Bool_t fEnableLowFlux;// Whether to use low-flux specific code
7e4038b5 173 TH2D* fHData; // Summed 1/Nd^2N_{ch}/dphideta
174 Bool_t fFirstEvent; // Whether the event is the first seen
7e4038b5 175 AliESDFMD fESDFMD; // Sharing corrected ESD object
176 AliForwardUtil::Histos fHistos; // Cache histograms
177 AliAODForwardMult fAODFMD; // Output object
178
fffea31d 179 AliFMDEventInspector fEventInspector; // Algorithm
180 AliFMDEnergyFitter fEnergyFitter; // Algorithm
7e4038b5 181 AliFMDSharingFilter fSharingFilter; // Algorithm
182 AliFMDDensityCalculator fDensityCalculator; // Algorithm
183 AliFMDCorrections fCorrections; // Algorithm
184 AliFMDHistCollector fHistCollector; // Algorithm
185
186 TList* fList; // Output list
7e4038b5 187
0bd4b00f 188 ClassDef(AliForwardMultiplicityTask,1) // Forward multiplicity class
7e4038b5 189};
190
191#endif
192// Local Variables:
193// mode: C++
194// End:
195