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