]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliFMDMCEventInspector.h
Code update for handling centrality in the dN/deta analysis.
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDMCEventInspector.h
1 // 
2 // This class inspects the event 
3 //
4 #ifndef ALIFMDMCEVENTINSPECTOR_H
5 #define ALIFMDMCEVENTINSPECTOR_H
6 #include "AliFMDEventInspector.h"
7 class AliMCEvent;
8
9 /** 
10  * This class inspects the event 
11  *
12  * @par Input:
13  *   - AliESDFMD object possibly corrected for sharing
14  *
15  * @par Output:
16  *   - A histogram of v_z of events with triggers. 
17  *   - A histogram of v_z of events with vertex and triggers 
18  *   - A histogram of trigger counters 
19  * 
20  * Note, that these are added to the master output list 
21  *
22  * @par Corrections used: 
23  *   - None
24  *
25  * @ingroup pwg2_forward_algo 
26  */
27 class AliFMDMCEventInspector : public AliFMDEventInspector
28 {
29 public:
30   /** 
31    * Constructor 
32    */
33   AliFMDMCEventInspector();
34   /** 
35    * Constructor 
36    * 
37    * @param name Name of object
38    */
39   AliFMDMCEventInspector(const char* name);
40   /** 
41    * Copy constructor 
42    * 
43    * @param o Object to copy from 
44    */
45   AliFMDMCEventInspector(const AliFMDMCEventInspector& o);
46   /** 
47    * Destructor 
48    */
49   virtual ~AliFMDMCEventInspector();
50   /** 
51    * Assignement operator
52    * 
53    * @param o Object to assign from 
54    * 
55    * @return Reference to this object
56    */
57   AliFMDMCEventInspector& operator=(const AliFMDMCEventInspector&);
58
59   /** 
60    * Initialize the object 
61    * 
62    * @param vtxAxis Vertex axis in use 
63    */
64   void Init(const TAxis& vtxAxis);
65   /** 
66    * Process MC truth event.  Note, returned values are the MC truth
67    * values
68    * 
69    * @param event     Input event 
70    * @param triggers  On return, the triggers fired 
71    * @param lowFlux   On return, true if the event is considered a low-flux 
72    *                  event (according to the setting of fLowFluxCut) 
73    * @param ivz       On return, the found vertex bin (1-based).  A zero
74    *                  means outside of the defined vertex range
75    * @param vz        On return, the z position of the interaction
76    * @param cent      On return, the centrality (in percent) or < 0 
77    *                  if not found
78    * 
79    * @return 0 (or kOk) on success, otherwise a bit mask of error codes 
80    */
81   UInt_t ProcessMC(AliMCEvent*       event, 
82                    UInt_t&           triggers,
83                    UShort_t&         ivz, 
84                    Double_t&         vz,
85                    Double_t&         b,
86                    Double_t&         phiR);
87 protected:
88   /** 
89    * Read centrality from event 
90    * 
91    * @param esd  Event 
92    * @param cent On return, the centrality or negative if not found
93    * 
94    * @return False on error, true otherwise 
95    */
96   virtual Bool_t ReadCentrality(const AliESDEvent* esd, Double_t& cent);
97
98   TH1F* fHVertex; // Histogram of vertex 
99   TH1F* fHPhiR;   // Histogram of event plane 
100   TH1F* fHB;      // Histogram of impact parameter 
101   ClassDef(AliFMDMCEventInspector,1); // Inspect the event 
102 };
103
104 #endif
105 // Local Variables:
106 //   mode: C++
107 // End:
108
109
110