]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliFMDCorrections.h
First go of energy loss spectrum algorithm.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDCorrections.h
1 #ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDCORRECTIONS_H
2 #define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDCORRECTIONS_H
3 #include <TNamed.h>
4 #include <TList.h>
5 #include "AliForwardUtil.h"
6 class AliESDFMD;
7 class TH2D;
8
9 /** 
10  * This class calculates the inclusive charged particle density
11  * in each for the 5 FMD rings. 
12  *
13  * @par Input:
14  *   - AliESDFMD object possibly corrected for sharing
15  *
16  * @par Output:
17  *   - 5 RingHistos objects - each with a number of vertex dependent 
18  *     2D histograms of the inclusive charge particle density 
19  * 
20  * @par Corrections used: 
21  *   - AliFMDAnaCalibBackgroundCorrection
22  *   - AliFMDAnaCalibEventSelectionEfficiency
23  *   - AliFMDAnaCalibSharingEfficiency
24  *
25  * @ingroup pwg2_forward_analysis 
26  */
27 class AliFMDCorrections : public TNamed
28 {
29 public:
30   /** 
31    * Constructor 
32    */
33   AliFMDCorrections();
34   /** 
35    * Constructor 
36    * 
37    * @param name Name of object
38    */
39   AliFMDCorrections(const char* name);
40   /** 
41    * Copy constructor 
42    * 
43    * @param o Object to copy from 
44    */
45   AliFMDCorrections(const AliFMDCorrections& o);
46   /** 
47    * Destructor 
48    */
49   virtual ~AliFMDCorrections();
50   /** 
51    * Assignement operator
52    * 
53    * @param o Object to assign from 
54    * 
55    * @return Reference to this object
56    */
57   AliFMDCorrections& operator=(const AliFMDCorrections&);
58   /** 
59    * Do the calculations 
60    * 
61    * @param hists    Cache of histograms 
62    * @param vtxBin   Vertex bin 
63    * 
64    * @return true on successs 
65    */
66   virtual Bool_t Correct(AliForwardUtil::Histos& hists, Int_t vtxBin);
67   /** 
68    * Scale the histograms to the total number of events 
69    * 
70    * @param nEvents Number of events 
71    */
72   void ScaleHistograms(TList* dir, Int_t nEvents);
73   /** 
74    * Output diagnostic histograms to directory 
75    * 
76    * @param dir List to write in
77    */  
78   void DefineOutput(TList* dir);
79 protected:
80   /** 
81    * Internal data structure to keep track of the histograms
82    */
83   struct RingHistos : public AliForwardUtil::RingHistos 
84   { 
85     /** 
86      * Default CTOR
87      */
88     RingHistos();
89     /** 
90      * Constructor
91      * 
92      * @param d detector
93      * @param r ring 
94      */
95     RingHistos(UShort_t d, Char_t r);
96     /** 
97      * Copy constructor 
98      * 
99      * @param o Object to copy from 
100      */
101     RingHistos(const RingHistos& o);
102     /** 
103      * Assignment operator 
104      * 
105      * @param o Object to assign from 
106      * 
107      * @return Reference to this 
108      */
109     RingHistos& operator=(const RingHistos& o);
110     /** 
111      * Destructor 
112      */
113     ~RingHistos();
114     void Output(TList* dir);
115     /** 
116      * Scale the histograms to the total number of events 
117      * 
118      * @param nEvents Number of events 
119      */
120     void ScaleHistograms(TList* dir, Int_t nEvents);
121     TH2D*     fDensity;      // Distribution primary Nch
122     ClassDef(RingHistos,1);
123   };
124   /** 
125    * Get the ring histogram container 
126    * 
127    * @param d Detector
128    * @param r Ring 
129    * 
130    * @return Ring histogram container 
131    */
132   RingHistos* GetRingHistos(UShort_t d, Char_t r) const;
133
134   TList    fRingHistos;    // List of histogram containers
135   Double_t fMultCut;       // Low cut on scaled energy loss
136
137   ClassDef(AliFMDCorrections,1); // Calculate Nch density 
138 };
139
140 #endif
141 // Local Variables:
142 //   mode: C++
143 // End:
144