]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliFMDCorrector.h
Fixes, renames, etc.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDCorrector.h
1 // This class calculates the exclusive charged particle density
2 // in each for the 5 FMD rings. 
3 //
4 #ifndef ALIFMDCORRECTOR_H
5 #define ALIFMDCORRECTOR_H
6 #include <TNamed.h>
7 #include <TList.h>
8 #include "AliForwardUtil.h"
9 class TH2D;
10
11 /** 
12  * @defgroup pwg2_forward_algo Algorithms 
13  *
14  * @ingroup pwg2_forward 
15  */
16 /** 
17  * This class calculates the exclusive charged particle density
18  * in each for the 5 FMD rings. 
19  *
20  * @par Input:
21  *   - 5 RingHistos objects - each with a number of vertex dependent 
22  *     2D histograms of the inclusive charge particle density 
23  *
24  * @par Output:
25  *   - 5 RingHistos objects - each with a number of vertex dependent 
26  *     2D histograms of the exclusive charge particle density 
27  * 
28  * @par Corrections used: 
29  *   - AliFMDCorrSecondaryMap;
30  *   - AliFMDCorrVertexBias
31  *   - AliFMDCorrMergingEfficiency
32  *
33  * @ingroup pwg2_forward_algo 
34  */
35 class AliFMDCorrector : public TNamed
36 {
37 public:
38   /** 
39    * Constructor 
40    */
41   AliFMDCorrector();
42   /** 
43    * Constructor 
44    * 
45    * @param name Name of object
46    */
47   AliFMDCorrector(const char* name);
48   /** 
49    * Copy constructor 
50    * 
51    * @param o Object to copy from 
52    */
53   AliFMDCorrector(const AliFMDCorrector& o);
54   /** 
55    * Destructor 
56    */
57   virtual ~AliFMDCorrector();
58   /** 
59    * Assignement operator
60    * 
61    * @param o Object to assign from 
62    * 
63    * @return Reference to this object
64    */
65   AliFMDCorrector& operator=(const AliFMDCorrector&);
66   /** 
67    * Do the calculations 
68    * 
69    * @param hists    Cache of histograms 
70    * @param vtxBin   Vertex bin 
71    * 
72    * @return true on successs 
73    */
74   virtual Bool_t Correct(AliForwardUtil::Histos& hists, UShort_t vtxBin);
75   /** 
76    * Scale the histograms to the total number of events 
77    * 
78    * @param dir     Where the output is stored
79    * @param nEvents Number of events 
80    */
81   virtual void ScaleHistograms(TList* dir, Int_t nEvents);
82   /** 
83    * Output diagnostic histograms to directory 
84    * 
85    * @param dir List to write in
86    */  
87   virtual void DefineOutput(TList* dir);
88   /** 
89    * Set the debug level.  The higher the value the more output 
90    * 
91    * @param dbg Debug level 
92    */
93   void SetDebug(Int_t dbg=1) { fDebug = dbg; }
94   /** 
95    * Whether to use the merging efficiency correction
96    * 
97    * @param use If true, use the merging efficiency correction
98    */
99   void SetUseMergingEfficiency(Bool_t use=true) { fUseMergingEfficiency = use; }
100   /** 
101    * Check 
102    * 
103    * @return true if the merging efficiency correction is used.
104    */
105   Bool_t IsUseMergingEfficiency() const { return fUseMergingEfficiency; }
106   /** 
107    * Print information
108    * 
109    * @param option Not used 
110    */
111   void Print(Option_t* option="") const;
112 protected:
113   /** 
114    * Internal data structure to keep track of the histograms
115    */
116   struct RingHistos : public AliForwardUtil::RingHistos 
117   { 
118     /** 
119      * Default CTOR
120      */
121     RingHistos();
122     /** 
123      * Constructor
124      * 
125      * @param d detector
126      * @param r ring 
127      */
128     RingHistos(UShort_t d, Char_t r);
129     /** 
130      * Copy constructor 
131      * 
132      * @param o Object to copy from 
133      */
134     RingHistos(const RingHistos& o);
135     /** 
136      * Assignment operator 
137      * 
138      * @param o Object to assign from 
139      * 
140      * @return Reference to this 
141      */
142     RingHistos& operator=(const RingHistos& o);
143     /** 
144      * Destructor 
145      */
146     ~RingHistos();
147     /** 
148      * Make output 
149      * 
150      * @param dir Where to put it 
151      */
152     void Output(TList* dir);
153     /** 
154      * Scale the histograms to the total number of events 
155      * 
156      * @param dir     where the output is stored
157      * @param nEvents Number of events 
158      */
159     void ScaleHistograms(TList* dir, Int_t nEvents);
160     TH2D*     fDensity;      // Distribution primary Nch
161     ClassDef(RingHistos,1);
162   };
163   /** 
164    * Get the ring histogram container 
165    * 
166    * @param d Detector
167    * @param r Ring 
168    * 
169    * @return Ring histogram container 
170    */
171   RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
172
173   TList    fRingHistos;           // List of histogram containers
174   Bool_t   fUseMergingEfficiency; // Whether to use the merging efficiency
175   Int_t    fDebug;                //  Debug level 
176
177   ClassDef(AliFMDCorrector,2); // Calculate Nch density 
178 };
179
180 #endif
181 // Local Variables:
182 //   mode: C++
183 // End:
184