importaant fix for PbPb
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliBasedNdetaTask.h
CommitLineData
ce85db45 1//
2// Task to analyse the AOD for for dN/deta in the base regions
3//
4#ifndef ALIBASEDNDETATASK_H
5#define ALIBASEDNDETATASK_H
ffca499d 6/**
7 * @file AliBasedNdetaTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 13:58:12 2011
10 *
11 * @brief
12 *
13 * @ingroup pwg2_forward_dndeta
14 *
15 */
ce85db45 16#include <AliAnalysisTaskSE.h>
e308a636 17class TAxis;
ce85db45 18class TList;
19class TH2D;
20class TH1D;
ffca499d 21class TH1I;
ce85db45 22class AliAODEvent;
e1f47419 23class AliAODForwardMult;
e308a636 24class TObjArray;
ce85db45 25
ffca499d 26/**
27 * @defgroup pwg2_forward_tasks_dndeta dN/deta tasks
28 * @ingroup pwg2_forward_tasks
29 */
30/**
31 * @defgroup pwg2_forward_dndeta dN/deta
32 *
33 * @f$ dN/d\eta@f$ code
34 *
35 * @ingroup pwg2_forward_topical
36 */
ce85db45 37/**
ffca499d 38 * Base class for tasks to determine @f$ dN/d\eta@f$
39 *
40 * @ingroup pwg2_forward_tasks_dndeta
41 * @ingroup pwg2_forward_dndeta
ce85db45 42 */
43class AliBasedNdetaTask : public AliAnalysisTaskSE
44{
45public:
46 /**
ffca499d 47 * Bit mask values of the normalisation scheme
48 */
49 enum {
50 /** Only normalize to accepted events */
51 kNone = 0,
52 /**
53 * Do the full normalisation
54 * @f[
55 * N = \frac{1}{\epsilon_X}(N_A-N_A/N_V(N_T-N_V)) =
56 * \frac{1}{\epsilon_X}\frac{1}{\epsilon_V}N_A
57 * @f]
58 */
59 kEventLevel = 0x1,
60 /**
ffca499d 61 * Do the shape correction
62 */
0be6c8cd 63 kShape = 0x2,
ffca499d 64 /**
65 * Correct for background events (A+C-E). Not implemented yet
66 */
0be6c8cd 67 kBackground = 0x4,
ffca499d 68 /**
0be6c8cd 69 * Correct for the trigger efficiency from MC
ffca499d 70 */
0be6c8cd 71 kTriggerEfficiency = 0x8,
4fa8d795 72 /**
73 * Correct using zero-bin efficiency only
74 */
75 kZeroBin = 0x10,
0be6c8cd 76 /**
77 * Do the full correction
ffca499d 78 */
0be6c8cd 79 kFull = kEventLevel | kShape | kBackground | kTriggerEfficiency,
ffca499d 80 };
81 /**
ce85db45 82 * Constructor
83 *
84 */
85 AliBasedNdetaTask();
86 /**
87 * Constructor
88 *
89 * @param name Name of task
ce85db45 90 */
91 AliBasedNdetaTask(const char* name);
e1f47419 92 /**
93 * Destructor
94 *
95 */
96 virtual ~AliBasedNdetaTask();
ce85db45 97
98 /**
e1f47419 99 * @{
100 * @name Task configuration
101 */
102 /**
ce85db45 103 * Set the vertex range to use
104 *
105 * @param min Minimum (in centermeter)
106 * @param max Maximum (in centermeter)
107 */
108 void SetVertexRange(Double_t min, Double_t max) { fVtxMin=min; fVtxMax=max; }
109 /**
110 * Set the rebinning factor
111 *
112 * @param rebin Rebinning factor
113 */
114 void SetRebinning(Int_t rebin) { fRebin = rebin; }
115 /**
116 * Set the trigger maskl
117 *
118 * @param mask Trigger mask
119 */
0be6c8cd 120 void SetTriggerMask(UShort_t mask);
ce85db45 121 /**
122 * Set the trigger mask
123 *
124 * @param mask trigger mask
125 */
126 void SetTriggerMask(const char* mask);
e58000b7 127 /**
e308a636 128 * Set the centrality bins to use.
129 *
130 * @code
131 * UShort_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
132 * task->SetCentralityBins(11, bins);
133 * @endcode
134 *
135 * @param n Number of bins (elements in @a bins minus 1)
136 * @param bins Bin limits
137 */
138 void SetCentralityAxis(UShort_t n, Short_t* bins);
139 /**
ffca499d 140 * Whether to cut edges when merging
e58000b7 141 *
ffca499d 142 * @param cut If true, cut edges
e58000b7 143 */
3846ec25 144 void SetCutEdges(Bool_t cut) {fCutEdges = cut;}
145 /**
c25b5e1b 146 * Set whether to correct for empty bins when projecting on the X axis.
147 *
148 * @param use Whether to correct for empty bins
149 */
150 void SetCorrEmpty(Bool_t use) { fCorrEmpty = use; }
151 /**
152 * Set whether to use the ROOT TH2::ProjectionX method when
153 * projecting on the X axis.
154 *
155 * @param use Whether to use TH2::ProjectionX
156 */
157 void SetUseROOTProjectX(Bool_t use) { fUseROOTProj = use; }
158 /**
3846ec25 159 * Trigger efficiency for selected trigger(s)
160 *
161 * @param e Trigger efficiency
162 */
e58000b7 163 void SetTriggerEff(Double_t e) { fTriggerEff = e; }
164 /**
165 * Set the shape correction (a.k.a., track correction) for selected
166 * trigger(s)
167 *
168 * @param h Correction
169 */
678a4979 170 void SetShapeCorrection(const TH1* h);
171 /**
ffca499d 172 * Setthe normalisation scheme to use
173 *
174 * @param scheme Normalisation scheme
175 */
0be6c8cd 176 void SetNormalizationScheme(UShort_t scheme);
ffca499d 177 /**
178 * Space, pipe, or comma separated list of options
179 *
180 * @param what List of options
678a4979 181 */
ffca499d 182 void SetNormalizationScheme(const char* what);
678a4979 183 /**
c89b9ac1 184 * Filename of final MC correction
185 *
186 * @param filename filename
187 */
188 void SetMCFinalCorrFilename(const char* filename) {
189 fFinalMCCorrFile.Clear();
190 fFinalMCCorrFile.Append(filename);
191 }
192 /**
678a4979 193 * Load the normalization data - done automatically if not set from outside
194 *
e1f47419 195 * @param sys system
196 * @param energy energy
678a4979 197 */
e1f47419 198 void LoadNormalizationData(UShort_t sys, UShort_t energy);
199 /** @} */
0be6c8cd 200 /**
201 * Print information
202 *
203 * @param option Not used
204 */
205 void Print(Option_t* option="") const;
e1f47419 206 /** @{
207 * @name Task interface
ce85db45 208 */
ce85db45 209 /**
210 * Initialise on master - does nothing
211 *
212 */
213 virtual void Init() {}
214 /**
215 * Create output objects.
216 *
217 * This is called once per slave process
218 */
219 virtual void UserCreateOutputObjects();
220 /**
221 * Process a single event
222 *
223 * @param option Not used
224 */
225 virtual void UserExec(Option_t* option);
226 /**
ffca499d 227 * Called at end of event processing.
ce85db45 228 *
229 * This is called once in the master
230 *
231 * @param option Not used
232 */
233 virtual void Terminate(Option_t* option);
ffca499d 234 /* @} */
ce85db45 235
236 /**
e1f47419 237 * @{
238 * @name Services member functions
ce85db45 239 */
ce85db45 240 /**
241 * Make a copy of the input histogram and rebin that histogram
242 *
ffca499d 243 * @param h Histogram to rebin
244 * @param rebin Rebinning factor
245 * @param cutEdges Whether to cut edges when rebinning
ce85db45 246 *
247 * @return New (rebinned) histogram
248 */
e1f47419 249 static TH1D* Rebin(const TH1D* h, Int_t rebin, Bool_t cutEdges=false);
ce85db45 250 /**
251 * Make an extension of @a h to make it symmetric about 0
252 *
253 * @param h Histogram to symmertrice
254 *
255 * @return Symmetric extension of @a h
256 */
e1f47419 257 static TH1* Symmetrice(const TH1* h);
ce85db45 258 /**
259 * Project onto the X axis
260 *
261 * @param h 2D histogram
262 * @param name New name
263 * @param firstbin First bin to use
264 * @param lastbin Last bin to use
9f773c15 265 * @param useROOT Use TH2::ProjectionX instead of custom code
ffca499d 266 * @param corr Whether to do corrections or not
ce85db45 267 * @param error Whether to calculate errors
268 *
269 * @return Newly created histogram or null
270 */
e1f47419 271 static TH1D* ProjectX(const TH2D* h,
272 const char* name,
273 Int_t firstbin,
274 Int_t lastbin,
c25b5e1b 275 bool useROOT=false,
e1f47419 276 bool corr=true,
277 bool error=true);
ce85db45 278 /**
4fa8d795 279 * Scale the copy of the 2D histogram by coverage in supplied 1D histogram
280 *
281 * @param copy Data to scale
282 * @param norm Coverage histogram
283 */
284 static void ScaleToCoverage(TH2D* copy, const TH1D* norm);
285 /**
ce85db45 286 * Set histogram graphical options, etc.
287 *
288 * @param h Histogram to modify
289 * @param colour Marker color
290 * @param marker Marker style
291 * @param title Title of histogram
292 * @param ytitle Title on y-axis.
293 */
e1f47419 294 static void SetHistogramAttributes(TH1D* h, Int_t colour, Int_t marker,
295 const char* title,
296 const char* ytitle="#frac{1}{N} #frac{dN_{ch}}{d#eta}");
297 /** @} */
9ecab72f 298
299 /**
300 * Marker styles
301 */
302 enum {
303 kSolid = 0x000,
304 kHollow = 0x001,
305 kCircle = 0x002,
306 kSquare = 0x004,
307 kUpTriangle = 0x006,
308 kDownTriangle = 0x008,
309 kDiamond = 0x00a,
310 kCross = 0x00c,
311 kStar = 0x00e
312 };
313 static Int_t GetMarkerStyle(UShort_t bits);
314 static UShort_t GetMarkerBits(Int_t style);
315 static Int_t FlipHollowStyle(Int_t style);
e1f47419 316protected:
9ecab72f 317 /**
318 * Copy contructor
319 */
e1f47419 320 AliBasedNdetaTask(const AliBasedNdetaTask&);
9ecab72f 321 /**
322 * Assignment operator
323 *
324 *
325 * @return
326 */
e1f47419 327 AliBasedNdetaTask& operator=(const AliBasedNdetaTask&) { return *this; }
9ecab72f 328 // Forward declaration
e1f47419 329 class CentralityBin;
330
331 /**
332 * Retrieve the histogram
333 *
334 * @param aod AOD event
335 * @param mc Whether to get the MC histogram or not
336 *
337 * @return Retrieved histogram or null
338 */
339 virtual TH2D* GetHistogram(const AliAODEvent* aod, Bool_t mc=false) = 0;
340 /**
9ecab72f 341 * Get the colour to use for markers (only pp - in PbPb we use a rainbow)
ffca499d 342 *
343 * @return Marker colour
344 */
9ecab72f 345 virtual Int_t GetColor() const { return kBlack; }
ffca499d 346 /**
347 * Get the marker style
348 *
349 * @return Marker style
350 */
9ecab72f 351 virtual Int_t GetMarker() const { return GetMarkerStyle(kCircle); }
ffca499d 352 /**
e308a636 353 * Add a centrality bin
354 *
ffca499d 355 * @param at Where in the list to add this bin
e308a636 356 * @param low Low cut
357 * @param high High cut
358 */
359 void AddCentralityBin(UShort_t at, Short_t low, Short_t high);
360 /**
e1f47419 361 * Make a centrality bin
362 *
363 * @param name Name used for histograms
364 * @param low Low cut in percent
365 * @param high High cut in percent
366 *
367 * @return A newly created centrality bin
368 */
369 virtual CentralityBin* MakeCentralityBin(const char* name, Short_t low,
370 Short_t high) const;
4fa8d795 371
372 //==================================================================
9ecab72f 373 /**
374 * Class that holds the sum of the data - possibly split into 0 or
375 * non-zero bins
376 *
377 */
4fa8d795 378 struct Sum : public TNamed
379 {
380 TH2D* fSum; // Sum of non-zero events
381 TH2D* fSum0; // Sum of zero events
382 TH1I* fEvents; // Distribution of events
9ecab72f 383 /**
384 * I/O Constructor - do not use
385 */
4fa8d795 386 Sum() : fSum(0), fSum0(0), fEvents(0) {}
9ecab72f 387 /**
388 * Constructor
389 *
390 * @param name Name
391 * @param postfix Possible post-fix
392 */
4fa8d795 393 Sum(const char* name, const char* postfix)
394 : TNamed(name,postfix),
395 fSum(0),
396 fSum0(0),
397 fEvents(0)
398 {}
9ecab72f 399 /**
400 * Copy constructor
401 *
402 * @param o Object to copy from
403 */
4fa8d795 404 Sum(const Sum& o)
405 : TNamed(o),
406 fSum(o.fSum),
407 fSum0(o.fSum0),
408 fEvents(o.fEvents)
409 {}
9ecab72f 410 /**
411 * Assignment operator
412 *
413 * @param o Object to assign from
414 *
415 * @return Reference to this object
416 */
4fa8d795 417 Sum& operator=(const Sum& o) {
418 SetName(o.GetName()); fSum = o.fSum; fSum0 = o.fSum0; fEvents=o.fEvents;
419 return *this;
420 }
9ecab72f 421 /**
422 * Destructor
423 */
4fa8d795 424 ~Sum() {}
9ecab72f 425 /**
426 * Initialise this object.
427 *
428 * @param list List to add histograms to
429 * @param data Format of data to be cloned here
430 * @param col Color
431 */
4fa8d795 432 void Init(TList* list, const TH2D* data, Int_t col);
9ecab72f 433 /**
434 * Add an event
435 *
436 * @param data Data to add
437 * @param isZero If this is zero event
438 */
4fa8d795 439 void Add(const TH2D* data, Bool_t isZero=false);
9ecab72f 440 /**
441 * Get the histogram name
442 *
443 * @param what Which one
444 *
445 * @return Name
446 */
4fa8d795 447 TString GetHistName(Int_t what=0) const;
9ecab72f 448 /**
449 * Get the sum
450 *
451 * @param l List to get histograms from
452 * @param o Output list
453 * @param ntotal On return, the total number of events
454 * @param zeroEff Zero-bin efficiency
455 * @param otherEff Non-zero-bin efficiency
456 * @param marker Marker to use
457 * @param rootXproj Whether to use TH2::ProjectionX
458 * @param corrEmpty Correct for empty bins
459 *
460 * @return The total sum histogram
461 */
4fa8d795 462 TH2D* GetSum(const TList* l, TList* o, Double_t& ntotal,
463 Double_t zeroEff, Double_t otherEff=1, Int_t marker=20,
464 Bool_t rootXproj=false, Bool_t corrEmpty=true) const;
465 };
4fa8d795 466
467 //==================================================================
e1f47419 468 /**
469 * Calculations done per centrality
470 *
471 */
472 struct CentralityBin : public TNamed
473 {
ffca499d 474 /** dN
e1f47419 475 * Constructor
476 */
477 CentralityBin();
478 /**
479 * Constructor
480 *
481 * @param name Name used for histograms (e.g., Forward)
482 * @param low Lower centrality cut in percent
483 * @param high Upper centrality cut in percent
484 */
485 CentralityBin(const char* name, Short_t low, Short_t high);
486 /**
487 * Copy constructor
488 *
489 * @param other Object to copy from
490 */
491 CentralityBin(const CentralityBin& other);
492 /**
493 * Destructor
494 */
495 virtual ~CentralityBin();
496 /**
497 * Assignment operator
498 *
499 * @param other Object to assign from
500 *
501 * @return Reference to this
502 */
503 CentralityBin& operator=(const CentralityBin& other);
504 /**
505 * Check if this is the 'all' bin
506 *
507 * @return true if low and high cuts are both zero
508 */
509 Bool_t IsAllBin() const { return fLow == 0 && fHigh == 0; }
510 /**
511 * Get the list name
512 *
513 * @return List Name
514 */
515 const char* GetListName() const;
516 /**
517 * Create output objects
518 *
519 * @param dir Parent list
520 */
521 virtual void CreateOutputObjects(TList* dir);
522 /**
523 * Process an event
524 *
525 * @param forward Forward data (for trigger, vertex, & centrality)
526 * @param triggerMask Trigger mask
9ecab72f 527 * @param isZero True if this is a zero bin event
e1f47419 528 * @param vzMin Minimum IP z coordinate
529 * @param vzMax Maximum IP z coordinate
530 * @param data Data histogram
531 * @param mc MC histogram
532 */
533 virtual void ProcessEvent(const AliAODForwardMult* forward,
ffca499d 534 Int_t triggerMask,
4fa8d795 535 Bool_t isZero,
ffca499d 536 Double_t vzMin,
537 Double_t vzMax,
538 const TH2D* data,
539 const TH2D* mc);
e1f47419 540 /**
b30dee70 541 * Calculate the Event-Level normalization.
542 *
543 * The full event level normalization for trigger @f$X@f$ is given by
544 * @f{eqnarray*}{
545 * N &=& \frac{1}{\epsilon_X}
546 * \left(N_A+\frac{N_A}{N_V}(N_{-V}-\beta)\right)\\
547 * &=& \frac{1}{\epsilon_X}N_A
548 * \left(1+\frac{1}{N_V}(N_T-N_V-\beta)\right)\\
549 * &=& \frac{1}{\epsilon_X}N_A
550 * \left(1+\frac{N_T}{N_V}-1-\frac{\beta}{N_V}\right)\\
551 * &=& \frac{1}{\epsilon_X}N_A
552 * \left(\frac{1}{\epsilon_V}-\frac{\beta}{N_V}\right)
553 * @f}
554 * where
555 *
556 * - @f$\epsilon_X=\frac{N_{T,X}}{N_X}@f$ is the trigger
557 * efficiency evaluated in simulation.
558 * - @f$\epsilon_V=\frac{N_V}{N_T}@f$ is the vertex efficiency
559 * evaluated from the data
560 * - @f$N_X@f$ is the Monte-Carlo truth number of events of type
561 * @f$X@f$.
562 * - @f$N_{T,X}@f$ is the Monte-Carlo truth number of events of type
563 * @f$X@f$ which was also triggered as such.
564 * - @f$N_T@f$ is the number of data events that where triggered
565 * as type @f$X@f$ and had a collision trigger (CINT1B)
566 * - @f$N_V@f$ is the number of data events that where triggered
567 * as type @f$X@f$, had a collision trigger (CINT1B), and had
568 * a vertex.
569 * - @f$N_{-V}@f$ is the number of data events that where triggered
570 * as type @f$X@f$, had a collision trigger (CINT1B), but no
571 * vertex.
572 * - @f$N_A@f$ is the number of data events that where triggered
573 * as type @f$X@f$, had a collision trigger (CINT1B), and had
574 * a vertex in the selected range.
575 * - @f$\beta=N_a+N_c-N_e@f$ is the number of control triggers that
576 * were also triggered as type @f$X@f$.
577 * - @f$N_a@f$ Number of beam-empty events also triggered as type
578 * @f$X@f$ events (CINT1-A or CINT1-AC).
579 * - @f$N_c@f$ Number of empty-beam events also triggered as type
580 * @f$X@f$ events (CINT1-C).
581 * - @f$N_e@f$ Number of empty-empty events also triggered as type
582 * @f$X@f$ events (CINT1-E).
583 *
584 * Note, that if @f$ \beta \ll N_A@f$ the last term can be ignored, and
585 * the expression simplyfies to
586 * @f[
587 * N = \frac{1}{\epsilon_X}\frac{1}{\epsilon_V}N_A
588 * @f]
589 *
590 * @param t Histogram of triggers
591 * @param scheme Normalisation scheme
592 * @param trgEff Trigger efficiency
593 * @param ntotal On return, the total number of events to normalise to.
594 *
595 * @return @f$N_A/N@f$ or negative number in case of errors.
596 */
597 virtual Double_t Normalization(const TH1I& t,
598 UShort_t scheme,
599 Double_t trgEff,
600 Double_t& ntotal) const;
601 /**
c25b5e1b 602 * Generate the dN/deta result from input
603 *
604 * @param sum Sum of 2D hists
605 * @param postfix Post fix on names
606 * @param rootProj Whether to use ROOT TH2::ProjectionX
607 * @param corrEmpty Correct for empty bins
608 * @param shapeCorr Shape correction to use
609 * @param scaler Event-level normalization scaler
610 * @param symmetrice Whether to make symmetric extensions
611 * @param rebin Whether to rebin
612 * @param cutEdges Whether to cut edges when rebinning
9f773c15 613 * @param marker Marker style
c6115ede 614 * @param color Color of markers
615 * @param mclist List of MC data
616 * @param truthlist List of MC truth data
c25b5e1b 617 */
618 virtual void MakeResult(const TH2D* sum,
619 const char* postfix,
620 bool rootProj,
621 bool corrEmpty,
622 const TH1* shapeCorr,
623 Double_t scaler,
624 bool symmetrice,
625 Int_t rebin,
626 bool cutEdges,
9ecab72f 627 Int_t marker,
c89b9ac1 628 Int_t color,
629 TList* mclist,
630 TList* truthlist);
c25b5e1b 631 /**
e1f47419 632 * End of processing
633 *
634 * @param sums List of sums
635 * @param results Output list of results
ffca499d 636 * @param scheme Normalisation scheme options
e1f47419 637 * @param shapeCorr Shape correction or nil
638 * @param trigEff Trigger efficiency
639 * @param symmetrice Whether to symmetrice the results
640 * @param rebin Whether to rebin the results
c25b5e1b 641 * @param rootProj If true, use TH2::ProjectionX
e1f47419 642 * @param corrEmpty Whether to correct for empty bins
643 * @param cutEdges Whether to cut edges when rebinning
e1f47419 644 * @param triggerMask Trigger mask
ffca499d 645 * @param marker Marker style
c6115ede 646 * @param color Color of markers
647 * @param mclist List of MC data
648 * @param truthlist List of MC truth data
e1f47419 649 */
650 virtual void End(TList* sums,
651 TList* results,
ffca499d 652 UShort_t scheme,
e1f47419 653 const TH1* shapeCorr,
654 Double_t trigEff,
655 Bool_t symmetrice,
656 Int_t rebin,
c25b5e1b 657 Bool_t rootProj,
e1f47419 658 Bool_t corrEmpty,
659 Bool_t cutEdges,
ffca499d 660 Int_t triggerMask,
9ecab72f 661 Int_t marker,
c89b9ac1 662 Int_t color,
663 TList* mclist,
664 TList* truthlist);
e1f47419 665 /**
666 * @{
667 * @name Access histograms
668 */
669 /**
670 * Get sum histogram
671 *
672 * @param mc If true, return MC histogram
673 *
674 * @return Sum histogram
675 */
4fa8d795 676 const Sum* GetSum(Bool_t mc=false) const { return mc ? fSumMC : fSum; }
e1f47419 677 /**
678 * Get sum histogram
679 *
680 * @param mc If true, return MC histogram
681 *
682 * @return Sum histogram
683 */
4fa8d795 684 Sum* GetSum(Bool_t mc=false) { return mc ? fSumMC : fSum; }
e1f47419 685 /**
686 * Get trigger histogram
687 *
688 * @return Trigger histogram
689 */
ffca499d 690 const TH1I* GetTriggers() const { return fTriggers; }
e1f47419 691 /**
692 * Get trigger histogram
693 *
694 * @return Trigger histogram
695 */
ffca499d 696 TH1I* GetTrigggers() { return fTriggers; }
e1f47419 697 /** @} */
5bb5d1f6 698
9ecab72f 699 /**
700 * Get the color of the markers
701 *
702 * @return
703 */
704 Int_t GetColor(Int_t fallback=kRed+2) const;
705 /**
706 * Get list of results
707 *
708 *
709 * @return
710 */
5bb5d1f6 711 TList* GetResults() const { return fOutput; }
9ecab72f 712 /**
713 * Get name of result histogram
714 *
715 * @param rebin
716 * @param sym
717 * @param postfix
718 *
719 * @return
720 */
5bb5d1f6 721 const char* GetResultName(Int_t rebin, Bool_t sym,
722 const char* postfix="") const;
9ecab72f 723 /**
724 * Get a result
725 *
726 * @param rebin
727 * @param sym
728 * @param postfix
729 *
730 * @return
731 */
5bb5d1f6 732 TH1* GetResult(Int_t rebin, Bool_t sym,
733 const char* postfix="") const;
734
e1f47419 735 protected:
736 /**
737 * Create sum histogram
738 *
739 * @param data Data histogram to clone
740 * @param mc (optional) MC histogram to clone
741 */
742 virtual void CreateSums(const TH2D* data, const TH2D* mc);
743 /**
744 * Check the trigger, vertex, and centrality
745 *
ffca499d 746 * @param forward Event input
747 * @param triggerMask The used trigger mask
748 * @param vzMin Least @f$ v_z@f$
749 * @param vzMax Largest @f$ v_z@f$
e1f47419 750 *
751 * @return true if the event is to be used
752 */
753 virtual Bool_t CheckEvent(const AliAODForwardMult* forward,
ffca499d 754 Int_t triggerMask,
755 Double_t vzMin,
756 Double_t vzMax);
e1f47419 757 TList* fSums; // Output list
758 TList* fOutput; // Output list
4fa8d795 759 Sum* fSum; // Sum histogram
760 Sum* fSumMC; // MC sum histogram
ffca499d 761 TH1I* fTriggers; // Trigger histogram
e1f47419 762 UShort_t fLow; // Lower limit (inclusive)
763 UShort_t fHigh; // Upper limit (exclusive)
c89b9ac1 764 Bool_t fDoFinalMCCorrection; //Do final MC correction
765
e1f47419 766 ClassDef(CentralityBin,1); // A centrality bin
767 };
ce85db45 768 TList* fSums; // Container of sums
769 TList* fOutput; // Container of outputs
ce85db45 770 Double_t fVtxMin; // Minimum v_z
771 Double_t fVtxMax; // Maximum v_z
772 Int_t fTriggerMask; // Trigger mask
773 Int_t fRebin; // Rebinning factor
774 Bool_t fCutEdges; // Whether to cut edges when rebinning
775 Bool_t fSymmetrice; // Whether to symmetrice data
776 Bool_t fCorrEmpty; // Correct for empty bins
c25b5e1b 777 Bool_t fUseROOTProj; // Whether to use ROOT's ProjectionX
e58000b7 778 Double_t fTriggerEff; // Trigger efficiency for selected trigger(s)
779 TH1* fShapeCorr; // Shape correction
e308a636 780 TObjArray* fListOfCentralities; // Centrality bins
e1f47419 781 TNamed* fSNNString; // sqrt(s_NN) string
782 TNamed* fSysString; // Collision system string
783 TH1D* fCent; // Centrality distribution
e308a636 784 TAxis* fCentAxis; // Centrality axis
ffca499d 785 UShort_t fNormalizationScheme; // Normalization scheme
0be6c8cd 786 TNamed* fSchemeString;
787 TNamed* fTriggerString;
c89b9ac1 788 TString fFinalMCCorrFile; //Filename for final MC corr
789
0be6c8cd 790 ClassDef(AliBasedNdetaTask,4); // Determine multiplicity in base area
ce85db45 791};
792
793#endif
794//
795// Local Variables:
796// mode: C++
797// End:
798//