2 // This class inspects the event
4 #ifndef ALIFMDEVENTINSPECTOR_H
5 #define ALIFMDEVENTINSPECTOR_H
16 * This class inspects the event
19 * - AliESDFMD object possibly corrected for sharing
22 * - A histogram of v_z of events with triggers.
23 * - A histogram of v_z of events with vertex and triggers
24 * - A histogram of trigger counters
26 * Note, that these are added to the master output list
28 * @par Corrections used:
31 * @ingroup pwg2_forward_algo
33 class AliFMDEventInspector : public TNamed
44 /** No triggers found */
50 /** No vertex found */
52 /** Vertex out of range */
54 /** Suspected pileup */
56 /** Suspected pileup */
75 enum ECollisionSystem {
83 AliFMDEventInspector();
87 * @param name Name of object
89 AliFMDEventInspector(const char* name);
93 * @param o Object to copy from
95 AliFMDEventInspector(const AliFMDEventInspector& o);
99 virtual ~AliFMDEventInspector();
101 * Assignement operator
103 * @param o Object to assign from
105 * @return Reference to this object
107 AliFMDEventInspector& operator=(const AliFMDEventInspector&);
110 * Initialize the object
112 * @param vtxAxis Vertex axis in use
114 void Init(const TAxis& vtxAxis);
118 * @param event Input event
119 * @param triggers On return, the triggers fired
120 * @param lowFlux On return, true if the event is considered a low-flux
121 * event (according to the setting of fLowFluxCut)
122 * @param ivz On return, the found vertex bin (1-based). A zero
123 * means outside of the defined vertex range
124 * @param vz On return, the z position of the interaction
125 * @param cent On return, the centrality (in percent) or < 0
128 * @return 0 (or kOk) on success, otherwise a bit mask of error codes
130 UInt_t Process(const AliESDEvent* event,
137 * Define the output histograms. These are put in a sub list of the
138 * passed list. The histograms are merged before the parent task calls
139 * AliAnalysisTaskSE::Terminate
141 * @param dir Directory to add to
143 void DefineOutput(TList* dir);
145 * Set the number of SPD tracklets for which we consider the event a
146 * low-flux event or not .
148 * @param c Cut (default 1000)
150 void SetLowFluxCut(Int_t c) { fLowFluxCut = c; }
152 * Set the maximum error on @f$ v_z@f$
154 * @param c Maximum error (in centimeters)
156 void SetMaxVzErr(Double_t c=0.1) { fMaxVzErr = c; }
158 * Set the debug level. The higher the value the more output
160 * @param dbg Debug level
162 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
164 * Fetch our histograms from the passed list
167 * @param hEventsTr On return, pointer to histogram, or null
168 * @param hEventsTrVtx On return, pointer to histogram, or null
169 * @param hTriggers On return, pointer to histogram, or null
171 * @return true on success, false otherwise
173 Bool_t FetchHistograms(TList* d,
176 TH1I*& hTriggers) const;
178 * Read the collision system, collision energy, and L3 field setting
181 * @param esd ESD to get information from
183 * @return true on success, false
185 Bool_t ReadRunDetails(const AliESDEvent* esd);
187 * Get the collision system (one of the value in ECollisionSystem)
189 * @return Collision system
191 UShort_t GetCollisionSystem() const { return fCollisionSystem; }
193 * Get the center of mass energy (per nucleon pair) in GeV
195 * @return center of mass energy (per nucleon pair) in GeV
197 UShort_t GetEnergy() const { return fEnergy; }
199 * Get the magnetic field setting of the L3 magnet in kilo Gauss.
201 * @return The magnetic field setting
203 Short_t GetField() const { return fField; }
207 * @param option Not used
209 void Print(Option_t* option="") const;
212 * Read the trigger information from the ESD event
214 * @param esd ESD event
215 * @param triggers On return, contains the trigger bits
217 * @return @c true on success, @c false otherwise
219 Bool_t ReadTriggers(const AliESDEvent* esd, UInt_t& triggers);
221 * Read the vertex information from the ESD event
223 * @param esd ESD event
224 * @param vz On return, the vertex Z position
226 * @return @c true on success, @c false otherwise
228 Bool_t ReadVertex(const AliESDEvent* esd, Double_t& vz);
230 TH1I* fHEventsTr; //! Histogram of events w/trigger
231 TH1I* fHEventsTrVtx; //! Events w/trigger and vertex
232 TH1I* fHTriggers; //! Triggers
233 TH1I* fHType; //! Type (low/high flux) of event
234 TH1I* fHWords; //! Trigger words
235 TH1F* fHCent; //! Centrality
236 Int_t fLowFluxCut; // Low flux cut
237 Double_t fMaxVzErr; // Maximum error on v_z
238 TList* fList; //! Histogram container
239 UShort_t fEnergy; // CMS energy (per nucleon pair) [GeV]
240 Short_t fField; // L3 magnetic field [kG]
241 UShort_t fCollisionSystem; //
242 Int_t fDebug; // Debug level
243 ClassDef(AliFMDEventInspector,2); // Inspect the event