1 #ifndef ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDEVENTINSPECTOR_H
2 #define ALIROOT_PWG2_FORWARD_ANALYSIS2_ALIFMDEVENTINSPECTOR_H
12 * This class inspects the event
15 * - AliESDFMD object possibly corrected for sharing
18 * - A histogram of v_z of events with triggers.
19 * - A histogram of v_z of events with vertex and triggers
20 * - A histogram of trigger counters
22 * Note, that these are added to the master output list
24 * @par Corrections used:
27 * @ingroup pwg2_forward_analysis
29 class AliFMDEventInspector : public TNamed
40 /** No triggers found */
46 /** No vertex found */
48 /** Vertex out of range */
67 AliFMDEventInspector();
71 * @param name Name of object
73 AliFMDEventInspector(const char* name);
77 * @param o Object to copy from
79 AliFMDEventInspector(const AliFMDEventInspector& o);
83 virtual ~AliFMDEventInspector();
85 * Assignement operator
87 * @param o Object to assign from
89 * @return Reference to this object
91 AliFMDEventInspector& operator=(const AliFMDEventInspector&);
94 * Initialize the object
96 * @param vtxAxis Vertex axis in use
98 void Init(const TAxis& vtxAxis);
102 * @param event Input event
103 * @param triggers On return, the triggers fired
104 * @param lowFlux On return, true if the event is considered a low-flux
105 * event (according to the setting of fLowFluxCut)
106 * @param ivz On return, the found vertex bin (zero-based)
108 * @return 0 (or kOk) on success, otherwise a bit mask of error codes
110 UInt_t Process(const AliESDEvent* event,
116 * Define the output histograms. These are put in a sub list of the
117 * passed list. The histograms are merged before the parent task calls
118 * AliAnalysisTaskSE::Terminate
120 * @param dir Directory to add to
122 void DefineOutput(TList* dir);
124 * Set the number of SPD tracklets for which we consider the event a
125 * low-flux event or not .
127 * @param c Cut (default 1000)
129 void SetLowFluxCut(Int_t c) { fLowFluxCut = c; }
131 * Set the maximum error on @f$ v_z@f$
133 * @param c Maximum error (in centimeters)
135 void SetMaxVzErr(Double_t c=0.1) { fMaxVzErr = c; }
137 * Set the debug level. The higher the value the more output
139 * @param dbg Debug level
141 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
143 * Fetch our histograms from the passed list
146 * @param hEventsTr On return, pointer to histogram, or null
147 * @param hEventsTrVtx On return, pointer to histogram, or null
148 * @param hTriggers On return, pointer to histogram, or null
150 * @return true on success, false otherwise
152 Bool_t FetchHistograms(TList* d,
155 TH1I*& hTriggers) const;
158 * Read the trigger information from the ESD event
160 * @param esd ESD event
161 * @param triggers On return, contains the trigger bits
163 * @return @c true on success, @c false otherwise
165 Bool_t ReadTriggers(const AliESDEvent* esd, UInt_t& triggers);
167 * Read the vertex information from the ESD event
169 * @param esd ESD event
170 * @param vz On return, the vertex Z position
172 * @return @c true on success, @c false otherwise
174 Bool_t ReadVertex(const AliESDEvent* esd, Double_t& vz);
176 TH1I* fHEventsTr; //! Histogram of events w/trigger
177 TH1I* fHEventsTrVtx; //! Events w/trigger and vertex
178 TH1I* fHTriggers; //! Triggers
179 Int_t fLowFluxCut; // Low flux cut
180 Double_t fMaxVzErr; // Maximum error on v_z
181 TList* fList; //! Histogram container
182 Int_t fDebug; // Debug level
183 ClassDef(AliFMDEventInspector,1); // Inspect the event