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