]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AddTaskMCTruthdNdeta.C
Doxygen updates
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AddTaskMCTruthdNdeta.C
CommitLineData
9ecab72f 1/**
2 * @file AddTaskForwarddNdeta.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 *
bd6f5206 10 * @ingroup pwglf_forward_scripts_tasks
9ecab72f 11 */
12/**
13 * Create the MCTruth @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
33438b4c 21 * @param trigEff Trigger efficiency
22 * @param trigEff0 Trigger efficiency for 0-bin
23 * @param corrEmpty Correct for empty bins
9ecab72f 24 *
25 * @return Newly created and configured task
26 *
bd6f5206 27 * @ingroup pwglf_forward_dndeta
9ecab72f 28 */
29AliAnalysisTask*
93df36ef 30AddTaskMCTruthdNdeta(const char* trig = "INEL",
31 Double_t vzMin = -10,
32 Double_t vzMax = +10,
33 Bool_t useCent = false,
34 const char* scheme = 0,
35 Bool_t cutEdges = false,
36 Double_t trigEff = 1,
37 Double_t trigEff0 = 1,
38 Bool_t corrEmpty = false)
9ecab72f 39{
56236b95 40 // --- Load libraries ----------------------------------------------
bd6f5206 41 gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
56236b95 42
43 // --- Get analysis manager ----------------------------------------
9ecab72f 44 AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
45
46 // --- Make our object ---------------------------------------------
47 AliMCTruthdNdetaTask* task = new AliMCTruthdNdetaTask("MCTruth");
48 // Set the vertex range to use
49 task->SetVertexRange(vzMin, vzMax);
50 // Set the trigger mask to use (INEL,INEL>0,NSD)
51 task->SetTriggerMask(trig);
52 // Set the trigger efficiency
66cf95f2 53 task->SetTriggerEff(trigEff); // 0.997535);
54 task->SetTriggerEff0(trigEff0);
9ecab72f 55 // Whether to cut edges when re-binning
56 task->SetCutEdges(cutEdges);
57 // Whether to correct for empty bins when projecting
93df36ef 58 task->SetCorrEmpty(corrEmpty);
9ecab72f 59 // Whether to use TH2::ProjectionX
60 task->SetUseROOTProjectX(false);
61 // Bit mask of
62 //
63 // kNone Normalise to accepted events
64 // kEventLevel Normalise to all events in selected range
65 // kAltEventLevel Normalise to all events in selected range
66 // kBackground Also correct for background triggers
67 // kShape Correct shape
68 //
69 // kNone, kEventLevel, and kAltEventLevel are mutually exclusive.
70 // If neither kEventLevel, nor kAltEventLevel is specified, then
71 // kNone is assumed. kBackground (when implemented) only makes
72 // sense with kEventLevel and kAltEventLevel. Furthermore, there
73 // are some constants that encode the common cases
74 //
75 // kFull = kEventLevel | kBackground | kShape
76 // kAltFull = kAltEventLevel | kBackground | kShape
77 //
78 // Default is kFull
79 task->SetNormalizationScheme(AliBasedNdetaTask::kFull);
80 if (scheme) task->SetNormalizationScheme(scheme);
81 // Set the centrality bins to use. These are mutually exclusive.
82 // Note, that a bin specified as a-b, covers the interval from a,
83 // inclusive to b exclusive. An upper bound of 100 is treated
84 // especially, and the upper bound is inclusive in that case .
85 if (useCent) {
86 Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
87 task->SetCentralityAxis(11, bins);
88 }
89 mgr->AddTask(task);
90
91 // --- create containers for input/output --------------------------
92 AliAnalysisDataContainer *sums =
93 mgr->CreateContainer("MCTruthSums", TList::Class(),
94 AliAnalysisManager::kOutputContainer,
95 AliAnalysisManager::GetCommonFileName());
96 AliAnalysisDataContainer *output =
97 mgr->CreateContainer("MCTruthResults", TList::Class(),
98 AliAnalysisManager::kParamContainer,
99 AliAnalysisManager::GetCommonFileName());
100
101 // --- connect input/output ----------------------------------------
102 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
103 mgr->ConnectOutput(task, 1, sums);
104 mgr->ConnectOutput(task, 2, output);
105
106 return task;
107}
108
109
110//________________________________________________________________________
111//
112// EOF
113//