]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliFMDMCSharingFilter.h
Renamed some member functions for more logical names
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDMCSharingFilter.h
1 //
2 // Class to do the sharing correction for MC data.
3 //
4 #ifndef ALIFMDMCSHARINGFILTER_H
5 #define ALIFMDMCSHARINGFILTER_H
6 /**
7  * @file   AliFMDMCSharingFilter.h
8  * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9  * @date   Wed Mar 23 14:03:47 2011
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwglf_forward_aod
15  */
16 #include "AliFMDSharingFilter.h"
17 #include "AliFMDMCTrackDensity.h"
18
19 /**
20  * Class to do the sharing correction for MC data.
21  *
22  * @par Input: 
23  *    - AliESDFMD object  - from reconstruction
24  *    - Kinematics
25  *    - Track-References
26  *
27  * @par Output: 
28  *    - AliESDFMD object  - copy of input, but with signals merged 
29  *
30  * @par Corrections used: 
31  *    - None
32  *
33  * @par Histograms: 
34  *    - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of 
35  *      signals before and after the filter.  
36  *    - For each ring (see above), an array of distributions of number of 
37  *      hit strips for each vertex bin (if enabled - see SetupForData method)
38  * 
39  *
40  * @ingroup pwglf_forward_algo
41  * @ingroup pwglf_forward_mc
42  * @ingroup pwglf_forward_aod
43  */
44 class AliFMDMCSharingFilter : public AliFMDSharingFilter
45 {
46 public: 
47   /** 
48    * Destructor
49    */
50   virtual ~AliFMDMCSharingFilter();
51   /** 
52    * Default Constructor - do not use 
53    */
54   AliFMDMCSharingFilter()
55   : AliFMDSharingFilter(), 
56     fTrackDensity(),
57     fFMD1i(0),
58     fFMD2i(0),
59     fFMD2o(0),
60     fFMD3i(0),
61     fFMD3o(0), 
62     fOperComp(0)
63   {}
64   /** 
65    * Constructor 
66    * 
67    * @param title Title of object  - not significant 
68    */
69   AliFMDMCSharingFilter(const char* title);
70   /** 
71    * Copy constructor 
72    * 
73    * @param o Object to copy from 
74    */
75   AliFMDMCSharingFilter(const AliFMDMCSharingFilter& o);
76   /** 
77    * Assignment operator 
78    * 
79    * @param o Object to assign from 
80    * 
81    * @return Reference to this 
82    */
83   AliFMDMCSharingFilter& operator=(const AliFMDMCSharingFilter& o);
84
85   /** 
86    * Return the track density calculator 
87    * 
88    * @return Track density calculator 
89    */
90   const AliFMDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
91   /** 
92    * Return the track density calculator 
93    * 
94    * @return Track density calculator 
95    */
96   AliFMDMCTrackDensity& GetTrackDensity() { return fTrackDensity; }
97
98   /** 
99    * Filter the input kinematics and track references, using 
100    * some of the ESD information
101    * 
102    * @param input   Input ESD event
103    * @param event   Input MC event
104    * @param vz      Vertex position 
105    * @param output  Output ESD-like object
106    * @param primary Per-event histogram of primaries 
107    *
108    * @return True on succes, false otherwise 
109    */
110   Bool_t FilterMC(const AliESDFMD&  input, 
111                   const AliMCEvent& event,
112                   Double_t          vz,
113                   AliESDFMD&        output,
114                   TH2D*             primary);
115   /** 
116    * Compare the result of merging to the monte-carlo truth.  This
117    * fills the correlation histograms
118    * 
119    * @param esd  ESD after sharing correction
120    * @param mc   MC ESD 
121    */
122   void CompareResults(const AliESDFMD&  esd, const AliESDFMD&  mc);
123                   
124   /** 
125    * Define the output histograms.  These are put in a sub list of the
126    * passed list.   The histograms are merged before the parent task calls 
127    * AliAnalysisTaskSE::Terminate 
128    * 
129    * @param dir Directory to add to 
130    */
131   void CreateOutputObjects(TList* dir);
132   /** 
133    * Scale the histograms to the total number of events 
134    * 
135    * @param dir     Where the output is 
136    * @param nEvents Number of events 
137    */
138   void Terminate(const TList* dir, TList* output, Int_t nEvents);
139   /** 
140    * Print information
141    * 
142    * @param option Not used 
143    */
144   void Print(Option_t* option="") const;
145
146   virtual void SetDebug(Int_t dbg=1);
147 protected:
148   AliFMDMCTrackDensity fTrackDensity;
149   TH2D* fFMD1i;      // ESD-MC correlation 
150   TH2D* fFMD2i;      // ESD-MC correlation 
151   TH2D* fFMD2o;      // ESD-MC correlation 
152   TH2D* fFMD3i;      // ESD-MC correlation 
153   TH2D* fFMD3o;      // ESD-MC correlation 
154   TH2I* fOperComp;   // Operation vs # trackrefs
155   ClassDef(AliFMDMCSharingFilter,2); //
156 };
157
158 #endif
159 // Local Variables:
160 //  mode: C++ 
161 // End: