2 * @file AddTaskForwarddNdeta.C
3 * @author Christian Holm Christensen <cholm@nbi.dk>
4 * @date Fri Jan 28 10:22:26 2011
6 * @brief Script to add a multiplicity task for the central
10 * @ingroup pwglf_forward_scripts_tasks
13 * Create the MCTruth @f$ dN/d\eta@f$ analysis task
15 * @param trig Trigger to use
16 * @param vzMin Smallest @f$ v_z@f$
17 * @param vzMax Biggest @f$ v_z@f$
18 * @param cent Whether to use the centrality or not
19 * @param scheme Normalisation scheme
20 * @param cutEdges Whether to cut edges when rebinning
21 * @param trigEff Trigger efficiency
22 * @param trigEff0 Trigger efficiency for 0-bin
23 * @param corrEmpty Correct for empty bins
25 * @return Newly created and configured task
27 * @ingroup pwglf_forward_dndeta
30 AddTaskMCTruthdNdeta(const char* config = "dNdetaConfig.C",
31 const char* trig = "INEL",
34 const char* cent = "",
35 const char* scheme = 0,
37 Double_t trigEff0 = 1,
38 Bool_t satOnly = false)
40 // --- Load libraries ----------------------------------------------
41 gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
43 // --- Get analysis manager ----------------------------------------
44 AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
46 // --- Make our object ---------------------------------------------
47 AliMCTruthdNdetaTask* task = new AliMCTruthdNdetaTask("MCTruth");
48 // Set the vertex range to use
49 task->SetIpZRange(vzMin, vzMax);
50 // Set the trigger mask to use (INEL,INEL>0,NSD)
51 task->SetTriggerMask(trig);
52 // Set the trigger efficiency
53 task->SetTriggerEff(trigEff); // 0.997535);
54 task->SetTriggerEff0(trigEff0);
57 // kNone Normalise to accepted events
58 // kEventLevel Normalise to all events in selected range
59 // kAltEventLevel Normalise to all events in selected range
60 // kBackground Also correct for background triggers
62 // kNone, kEventLevel, and kAltEventLevel are mutually exclusive.
63 // If neither kEventLevel, nor kAltEventLevel is specified, then
64 // kNone is assumed. kBackground (when implemented) only makes
65 // sense with kEventLevel and kAltEventLevel. Furthermore, there
66 // are some constants that encode the common cases
68 // kFull = kEventLevel | kBackground
69 // kAltFull = kAltEventLevel | kBackground
72 task->SetNormalizationScheme(AliBasedNdetaTask::kFull);
73 if (scheme) task->SetNormalizationScheme(scheme);
74 // Set the centrality bins to use. These are mutually exclusive.
75 // Note, that a bin specified as a-b, covers the interval from a,
76 // inclusive to b exclusive. An upper bound of 100 is treated
77 // especially, and the upper bound is inclusive in that case .
80 if (task->SetCentralityMethod(cent)) {
81 Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
82 task->SetCentralityAxis(11, bins);
85 // Set satellite vertex flag
86 task->SetSatelliteVertices(satOnly);
88 // Set-up task using a script
89 task->Configure(config);
98 //________________________________________________________________________