2 // Task to analyse the AOD for for dN/deta in the forward regions
4 #ifndef ALIFORWARDDNDETATASK_H
5 #define ALIFORWARDDNDETATASK_H
6 #include <AliAnalysisTaskSE.h>
7 #include <AliAODForwardMult.h>
13 * Task to determine the
15 class AliForwarddNdetaTask : public AliAnalysisTaskSE
22 AliForwarddNdetaTask();
26 * @param name Name of task
27 * @param maxVtx Set @f$v_z@f$ range
29 AliForwarddNdetaTask(const char* name);
31 void SetVertexRange(Double_t min, Double_t max) { fVtxMin=min; fVtxMax=max; }
32 void SetRebinning(Int_t rebin) { fRebin = rebin; }
33 void SetTriggerMask(UShort_t mask) { fTriggerMask = mask; }
34 void SetTriggerMask(const char* mask);
39 virtual ~AliForwarddNdetaTask();
41 * Initialise on master - does nothing
44 virtual void Init() {}
46 * Create output objects.
48 * This is called once per slave process
50 virtual void UserCreateOutputObjects();
52 * Process a single event
54 * @param option Not used
56 virtual void UserExec(Option_t* option);
58 * Called at end of event processing..
60 * This is called once in the master
62 * @param option Not used
64 virtual void Terminate(Option_t* option);
66 AliForwarddNdetaTask(const AliForwarddNdetaTask&);
67 AliForwarddNdetaTask& operator=(const AliForwarddNdetaTask&) { return *this; }
69 * Clone a 2D histogram
71 * @param in Histogram to clone.
72 * @param name New name of clone.
76 TH2D* CloneHist(TH2D* in, const char* name);
78 * Make a copy of the input histogram and rebin that histogram
80 * @param h Histogram to rebin
82 * @return New (rebinned) histogram
84 TH1D* Rebin(const TH1D* h) const;
86 * Set histogram graphical options, etc.
88 * @param h Histogram to modify
89 * @param colour Marker color
90 * @param marker Marker style
91 * @param title Title of histogram
92 * @param ytitle Title on y-axis.
94 void SetHistogramAttributes(TH1D* h, Int_t colour, Int_t marker, const char* title,
95 const char* ytitle="#frac{1}{N} #frac{dN_{ch}}{d#eta}");
97 * Trigger histogram bins
111 TH2D* fSumForward; // Sum of histograms
112 TH2D* fSumForwardMC; // Sum of MC histograms (if any)
113 TH2D* fSumPrimary; // Sum of primary histograms
114 TH2D* fSumCentral; // Sum of central histograms
115 TH2D* fCentral; //! Cache of central histogram
116 TH2D* fPrimary; //! Cache of primary histogram
118 TList* fSums; // Container of sums
119 TList* fOutput; // Container of outputs
121 TH1D* fTriggers; // Histogram of triggers
123 Double_t fVtxMin; // Minimum v_z
124 Double_t fVtxMax; // Maximum v_z
125 Int_t fTriggerMask; // Trigger mask
126 Int_t fRebin; // Rebinning factor
127 Bool_t fCutEdges; // Whether to cut edges when rebinning
128 TNamed* fSNNString; //
129 TNamed* fSysString; //
131 ClassDef(AliForwarddNdetaTask,1); // Determine multiplicity in central area