]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliFMDMCSharingFilter.h
Added central dN/deta task based on tracks
[u/mrichter/AliRoot.git] / PWG2 / 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 #include "AliFMDSharingFilter.h"
7 class AliMCEvent;
8
9 /**
10  * Class to do the sharing correction for MC data.
11  *
12  * @par Input: 
13  *    - AliESDFMD object  - from reconstruction
14  *    - Kinematics
15  *    - Track-References
16  *
17  * @par Output: 
18  *    - AliESDFMD object  - copy of input, but with signals merged 
19  *
20  * @par Corrections used: 
21  *    - None
22  *
23  * @par Histograms: 
24  *    - For each ring (FMD1i, FMD2i, FMD2o, FMD3i, FMD3o) the distribution of 
25  *      signals before and after the filter.  
26  *    - For each ring (see above), an array of distributions of number of 
27  *      hit strips for each vertex bin (if enabled - see Init method)
28  * 
29  *
30  * @ingroup pwg2_forward_algo
31  * @ingroup pwg2_forward_mc
32  */
33 class AliFMDMCSharingFilter : public AliFMDSharingFilter
34 {
35 public: 
36   /** 
37    * Destructor
38    */
39   virtual ~AliFMDMCSharingFilter();
40   /** 
41    * Default Constructor - do not use 
42    */
43   AliFMDMCSharingFilter()
44   : AliFMDSharingFilter(), 
45     fFMD1i(0),
46     fFMD2i(0),
47     fFMD2o(0),
48     fFMD3i(0),
49     fFMD3o(0), 
50     fSumEta(0)
51   {}
52   /** 
53    * Constructor 
54    * 
55    * @param title Title of object  - not significant 
56    */
57   AliFMDMCSharingFilter(const char* title);
58   /** 
59    * Copy constructor 
60    * 
61    * @param o Object to copy from 
62    */
63   AliFMDMCSharingFilter(const AliFMDMCSharingFilter& o);
64   /** 
65    * Assignment operator 
66    * 
67    * @param o Object to assign from 
68    * 
69    * @return Reference to this 
70    */
71   AliFMDMCSharingFilter& operator=(const AliFMDMCSharingFilter& o);
72   /** 
73    * Filter the input kinematics and track references, using 
74    * some of the ESD information
75    * 
76    * @param input   Input ESD event
77    * @param event   Input MC event
78    * @param vz      Vertex position 
79    * @param output  Output ESD-like object
80    * @param primary Per-event histogram of primaries 
81    *
82    * @return True on succes, false otherwise 
83    */
84   Bool_t FilterMC(const AliESDFMD&  input, 
85                   const AliMCEvent& event,
86                   Double_t          vz,
87                   AliESDFMD&        output,
88                   TH2D*             primary);
89   /** 
90    * Compare the result of merging to the monte-carlo truth.  This
91    * fills the correlation histograms
92    * 
93    * @param esd  ESD after sharing correction
94    * @param mc   MC ESD 
95    */
96   void CompareResults(const AliESDFMD&  esd, const AliESDFMD&  mc);
97                   
98   /** 
99    * Define the output histograms.  These are put in a sub list of the
100    * passed list.   The histograms are merged before the parent task calls 
101    * AliAnalysisTaskSE::Terminate 
102    * 
103    * @param dir Directory to add to 
104    */
105   void DefineOutput(TList* dir);
106   /** 
107    * Scale the histograms to the total number of events 
108    * 
109    * @param dir     Where the output is 
110    * @param nEvents Number of events 
111    */
112   void ScaleHistograms(TList* dir, Int_t nEvents);
113   /** 
114    * Print information
115    * 
116    * @param option Not used 
117    */
118   void Print(Option_t* option="") const;
119 protected:
120   /** 
121    * Store a particle hit in FMD<i>dr</i>[<i>s,t</i>] in @a output
122    * 
123    * @param d       Detector
124    * @param r       Ring
125    * @param s       Sector
126    * @param t       Strip
127    * @param output  Output ESD object
128    */
129   void StoreParticle(UShort_t d, Char_t r, UShort_t s, UShort_t t, 
130                      AliESDFMD& output) const;
131   TH2D* fFMD1i;  // ESD-MC correlation 
132   TH2D* fFMD2i;  // ESD-MC correlation 
133   TH2D* fFMD2o;  // ESD-MC correlation 
134   TH2D* fFMD3i;  // ESD-MC correlation 
135   TH2D* fFMD3o;  // ESD-MC correlation 
136   TH1D* fSumEta; // MC dN/deta 
137
138   ClassDef(AliFMDMCSharingFilter,1); //
139 };
140
141 #endif
142 // Local Variables:
143 //  mode: C++ 
144 // End: