]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwardMCCorrectionsTask.h
Added central dN/deta task based on tracks
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardMCCorrectionsTask.h
1 // 
2 // Calculate the corrections in the forward regions
3 // 
4 #ifndef ALIFORWARDMCCORRECTIONS_H
5 #define ALIFORWARDMCCORRECTIONS_H
6 #include <AliAnalysisTaskSE.h>
7 #include "AliForwardUtil.h"
8 #include "AliFMDSharingFilter.h"
9 #include "AliFMDDensityCalculator.h"
10 #include "AliFMDCorrector.h"
11 #include "AliFMDHistCollector.h"
12 #include "AliAODForwardMult.h"
13 #include <AliESDFMD.h>
14 #include <TH1I.h>
15 class AliFMDAnaParameters;
16 class AliESDEvent;
17 class TH2D;
18 class TH3D;
19 class TList;
20 class TTree;
21
22
23 /** 
24  * Calculate the corrections in the forward regions
25  * 
26  * @par Inputs: 
27  *   - AliESDEvent 
28  *
29  * @par Outputs: 
30  *   - AliAODForwardMult 
31  * 
32  * @par Histograms 
33  *   
34  * @par Corrections used 
35  * 
36  * @ingroup pwg2_forward_tasks
37  * @ingroup pwg2_forward_mc
38  * 
39  */
40 class AliForwardMCCorrectionsTask : public AliAnalysisTaskSE
41 {
42 public:
43   /** 
44    * Constructor 
45    * 
46    * @param name Name of task 
47    */
48   AliForwardMCCorrectionsTask(const char* name);
49   /** 
50    * Constructor
51    */
52   AliForwardMCCorrectionsTask();
53   /** 
54    * Copy constructor 
55    * 
56    * @param o Object to copy from 
57    */
58   AliForwardMCCorrectionsTask(const AliForwardMCCorrectionsTask& o);
59   /** 
60    * Assignment operator 
61    * 
62    * @param o Object to assign from 
63    * 
64    * @return Reference to this object 
65    */
66   AliForwardMCCorrectionsTask& operator=(const AliForwardMCCorrectionsTask& o);
67   /** 
68    * @{ 
69    * @name Interface methods 
70    */
71   /** 
72    * Initialize the task 
73    * 
74    */
75   virtual void Init();
76   /** 
77    * Create output objects 
78    * 
79    */
80   virtual void UserCreateOutputObjects();
81   /** 
82    * Process each event 
83    *
84    * @param option Not used
85    */  
86   virtual void UserExec(Option_t* option);
87   /** 
88    * End of job
89    * 
90    * @param option Not used 
91    */
92   virtual void Terminate(Option_t* option);
93   /** 
94    * @} 
95    */
96   /** 
97    * Print this object 
98    * 
99    * @param option   Not used
100    */
101   void         Print(Option_t* option="") const;
102
103   /** 
104    * Set the vertex axis to use
105    * 
106    * @param nBins Number of bins
107    * @param vzMin Least @f$z@f$ coordinate of interation point
108    * @param vzMax Largest @f$z@f$ coordinate of interation point
109    */
110   void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000);
111   /** 
112    * Set the vertex axis to use
113    * 
114    * @param axis Axis
115    */
116   void SetVertexAxis(const TAxis& axis);
117   /** 
118    * Set the eta axis to use
119    * 
120    * @param nBins Number of bins
121    * @param vzMin Least @f$\eta@f$ 
122    * @param vzMax Largest @f$\eta@f$ 
123    */
124   void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000);
125   /** 
126    * Set the eta axis to use
127    * 
128    * @param axis Axis
129    */
130   void SetEtaAxis(const TAxis& axis);
131 protected: 
132   /** 
133    * Get vertex project
134    * 
135    * @param v   Vertex bin 
136    * @param src Source 3D histogram 
137    * 
138    * @return 2D projection of the V'th bin
139    */
140   TH2D*  GetVertexProj(Int_t v, TH3D* src) const;
141   /** 
142    * Make a 3D histogram
143    * 
144    * @param name   Name 
145    * @param title  Title 
146    * @param nPhi   Number of phi bins
147    * 
148    * @return Histogram
149    */
150   TH3D* Make3D(const char* name, const char* title, Int_t nPhi) const;
151   /** 
152    * Make 1D histogram
153    * 
154    * @param name   Name 
155    * @param title  Title
156    * 
157    * @return Histogram
158    */
159   TH1D* Make1D(const char* name, const char* title) const;
160   /** 
161    * Fill in primary information
162    * 
163    * @param gotInel   Got INEL trigger from ESD
164    * @param gotVtx    Got vertex Z from ESD 
165    * @param vz        @f$z@f$ coordinate of interation point
166    * @param eta       Pseudo rapidity 
167    * @param phi       Azimuthal angle
168    */
169   void  FillPrimary(Bool_t gotInel, Bool_t gotVtx, 
170                     Double_t vz, Double_t eta, Double_t phi);
171   /** 
172    * Fill in per-strip information
173    * 
174    * @param d         Detector
175    * @param r         Ring
176    * @param vz        @f$z@f$ coordinate of interation point
177    * @param eta       Pseudo rapidity 
178    * @param phi       Azimuthal angle
179    * @param first     First fill in this event
180    */
181   void FillStrip(UShort_t d, Char_t r, 
182                  Double_t vz, Double_t eta, Double_t phi,
183                  Bool_t first);
184   TH1I*  fHEvents;           // All Events
185   TH1I*  fHEventsTr;         // Histogram of events w/trigger
186   TH1I*  fHEventsTrVtx;      // Events w/trigger and vertex 
187   TH1I*  fHEventsVtx;        // Events w/vertex 
188   TH1I*  fHTriggers;         // Triggers
189   TH3D*  fPrimaryInnerAll;   // Distribution of primaries - all events
190   TH3D*  fPrimaryOuterAll;   // Distribution of primaries - all events
191   TH3D*  fPrimaryInnerTrVtx; // Distribution of primaries - trg+vtx events
192   TH3D*  fPrimaryOuterTrVtx; // Distribution of primaries - trg+vtx events
193   TH3D*  fHitsFMD1i;         // Distribution of FMD1i hits 
194   TH3D*  fHitsFMD2i;         // Distribution of FMD2i hits 
195   TH3D*  fHitsFMD2o;         // Distribution of FMD2o hits 
196   TH3D*  fHitsFMD3i;         // Distribution of FMD3i hits 
197   TH3D*  fHitsFMD3o;         // Distribution of FMD3o hits 
198   TH1D*  fStripsFMD1i;       // Distribution of FMD1i # strips hit
199   TH1D*  fStripsFMD2i;       // Distribution of FMD2i # strips hit 
200   TH1D*  fStripsFMD2o;       // Distribution of FMD2o # strips hit 
201   TH1D*  fStripsFMD3i;       // Distribution of FMD3i # strips hit 
202   TH1D*  fStripsFMD3o;       // Distribution of FMD3o # strips hit 
203   TAxis  fVtxAxis;           // Vertex axis 
204   TAxis  fEtaAxis;           // Eta axis 
205
206   TList* fList; // Output list 
207
208   ClassDef(AliForwardMCCorrectionsTask,1) // Forward corrections class
209 };
210
211 #endif
212 // Local Variables:
213 //  mode: C++
214 // End:
215