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
29 class AliFMDEventInspector : public TNamed
40 /** No triggers found */
46 /** No vertex found */
48 /** Vertex out of range */
67 enum ECollisionSystem {
75 AliFMDEventInspector();
79 * @param name Name of object
81 AliFMDEventInspector(const char* name);
85 * @param o Object to copy from
87 AliFMDEventInspector(const AliFMDEventInspector& o);
91 virtual ~AliFMDEventInspector();
93 * Assignement operator
95 * @param o Object to assign from
97 * @return Reference to this object
99 AliFMDEventInspector& operator=(const AliFMDEventInspector&);
102 * Initialize the object
104 * @param vtxAxis Vertex axis in use
106 void Init(const TAxis& vtxAxis);
110 * @param event Input event
111 * @param triggers On return, the triggers fired
112 * @param lowFlux On return, true if the event is considered a low-flux
113 * event (according to the setting of fLowFluxCut)
114 * @param ivz On return, the found vertex bin (1-based). A zero
115 * means outside of the defined vertex range
116 * @param vz On return, the z position of the interaction
118 * @return 0 (or kOk) on success, otherwise a bit mask of error codes
120 UInt_t Process(const AliESDEvent* event,
126 * Define the output histograms. These are put in a sub list of the
127 * passed list. The histograms are merged before the parent task calls
128 * AliAnalysisTaskSE::Terminate
130 * @param dir Directory to add to
132 void DefineOutput(TList* dir);
134 * Set the number of SPD tracklets for which we consider the event a
135 * low-flux event or not .
137 * @param c Cut (default 1000)
139 void SetLowFluxCut(Int_t c) { fLowFluxCut = c; }
141 * Set the maximum error on @f$ v_z@f$
143 * @param c Maximum error (in centimeters)
145 void SetMaxVzErr(Double_t c=0.1) { fMaxVzErr = c; }
147 * Set the debug level. The higher the value the more output
149 * @param dbg Debug level
151 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
153 * Fetch our histograms from the passed list
156 * @param hEventsTr On return, pointer to histogram, or null
157 * @param hEventsTrVtx On return, pointer to histogram, or null
158 * @param hTriggers On return, pointer to histogram, or null
160 * @return true on success, false otherwise
162 Bool_t FetchHistograms(TList* d,
165 TH1I*& hTriggers) const;
167 * Read the collision system, collision energy, and L3 field setting
170 * @param esd ESD to get information from
172 * @return true on success, false
174 Bool_t ReadRunDetails(const AliESDEvent* esd);
176 * Get the collision system (one of the value in ECollisionSystem)
178 * @return Collision system
180 UShort_t GetCollisionSystem() const { return fCollisionSystem; }
182 * Get the center of mass energy (per nucleon pair) in GeV
184 * @return center of mass energy (per nucleon pair) in GeV
186 UShort_t GetEnergy() const { return fEnergy; }
188 * Get the magnetic field setting of the L3 magnet in kilo Gauss.
190 * @return The magnetic field setting
192 Short_t GetField() const { return fField; }
196 * @param option Not used
198 void Print(Option_t* option="") const;
201 * Read the trigger information from the ESD event
203 * @param esd ESD event
204 * @param triggers On return, contains the trigger bits
206 * @return @c true on success, @c false otherwise
208 Bool_t ReadTriggers(const AliESDEvent* esd, UInt_t& triggers);
210 * Read the vertex information from the ESD event
212 * @param esd ESD event
213 * @param vz On return, the vertex Z position
215 * @return @c true on success, @c false otherwise
217 Bool_t ReadVertex(const AliESDEvent* esd, Double_t& vz);
219 TH1I* fHEventsTr; //! Histogram of events w/trigger
220 TH1I* fHEventsTrVtx; //! Events w/trigger and vertex
221 TH1I* fHTriggers; //! Triggers
222 TH1I* fHType; //! Type (low/high flux) of event
223 Int_t fLowFluxCut; // Low flux cut
224 Double_t fMaxVzErr; // Maximum error on v_z
225 TList* fList; //! Histogram container
226 UShort_t fEnergy; // CMS energy (per nucleon pair) [GeV]
227 Short_t fField; // L3 magnetic field [kG]
228 UShort_t fCollisionSystem; //
229 Int_t fDebug; // Debug level
230 ClassDef(AliFMDEventInspector,1); // Inspect the event