]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AddTaskCentraldNdeta.C
Minor things
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AddTaskCentraldNdeta.C
CommitLineData
b00b37ad 1/**
2 * @file AddTaskCentraldNdeta.C
3 * @author Christian Holm Christensen <cholm@nbi.dk>
4 * @date Fri Jan 28 10:22:26 2011
5 *
6 * @brief Script to add a multiplicity task for the central
7 * @f$\eta@f$ region
8 *
9 *
ffca499d 10 * @ingroup pwg2_forward_scripts_tasks
11 */
12/**
13 * Create the central @f$ dN/d\eta@f$ analysis task
14 *
15 * @param trig Trigger to use
16 * @param vzMin Smallest @f$ v_z@f$
17 * @param vzMax Biggest @f$ v_z@f$
18 * @param useCent Whether to use the centrality or not
19 * @param scheme Normalisation scheme
20 * @param cutEdges Whether to cut edges when rebinning
21 *
22 * @return Newly created and configured task
23 *
24 * @ingroup pwg2_forward_dndeta
b00b37ad 25 */
26AliAnalysisTask*
e308a636 27AddTaskCentraldNdeta(const char* trig = "INEL",
28 Double_t vzMin = -10,
29 Double_t vzMax = +10,
30 Bool_t useCent = false,
ffca499d 31 const char* scheme = 0,
e308a636 32 Bool_t cutEdges = false)
b00b37ad 33{
ffca499d 34 // --- Analysis manager --------------------------------------------
b00b37ad 35 AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
0be6c8cd 36
ffca499d 37 // --- Make our object ---------------------------------------------
b00b37ad 38 AliCentraldNdetaTask* task = new AliCentraldNdetaTask("Central");
ffca499d 39 // Set the vertex range to use
b00b37ad 40 task->SetVertexRange(vzMin, vzMax);
ffca499d 41 // Set the trigger mask to use (INEL,INEL>0,NSD)
f709afcf 42 task->SetTriggerEff(0.997535);
b00b37ad 43 task->SetTriggerMask(trig);
ffca499d 44 // Whether to cut edges when re-binning
e308a636 45 task->SetCutEdges(cutEdges);
c25b5e1b 46 // Whether to correct for empty bins when projecting
47 task->SetCorrEmpty(false);
48 // Whether to use TH2::ProjectionX
49 task->SetUseROOTProjectX(false);
ffca499d 50 // Bit mask of
51 //
0be6c8cd 52 // kNone Normalise to accepted events
53 // kEventLevel Normalise to all events in selected range
54 // kBackground Also correct for background triggers
55 // kTriggerEfficiency Correct for trigger efficiency
56 // kShape Correct shape
ffca499d 57 //
0be6c8cd 58 // kNone and kEventLevel are mutually exclusive. If kEventLevel is
59 // not specified, then kNone is assumed. kBackground only makes
60 // sense with kEventLevel. Furthermore, there
ffca499d 61 // are some constants that encode the common cases
62 //
0be6c8cd 63 // kFull = kEventLevel | kBackground | kShape | kTriggerEfficiency
ffca499d 64 //
65 // Default is kFull
66 task->SetNormalizationScheme(AliBasedNdetaTask::kFull);
67 if (scheme) task->SetNormalizationScheme(scheme);
68 // Set the centrality bins to use. These are mutually exclusive.
69 // Note, that a bin specified as a-b, covers the interval from a,
70 // inclusive to b exclusive. An upper bound of 100 is treated
71 // especially, and the upper bound is inclusive in that case .
e308a636 72 if (useCent) {
73 Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
74 task->SetCentralityAxis(11, bins);
75 }
b00b37ad 76 mgr->AddTask(task);
77
ffca499d 78 // --- create containers for input/output --------------------------
b00b37ad 79 AliAnalysisDataContainer *sums =
80 mgr->CreateContainer("CentralSums", TList::Class(),
81 AliAnalysisManager::kOutputContainer,
82 AliAnalysisManager::GetCommonFileName());
83 AliAnalysisDataContainer *output =
84 mgr->CreateContainer("CentralResults", TList::Class(),
85 AliAnalysisManager::kParamContainer,
86 AliAnalysisManager::GetCommonFileName());
87
ffca499d 88 // --- connect input/output ----------------------------------------
b00b37ad 89 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
90 mgr->ConnectOutput(task, 1, sums);
91 mgr->ConnectOutput(task, 2, output);
ffca499d 92
b00b37ad 93 return task;
94}
95
96
97//________________________________________________________________________
98//
99// EOF
100//