]>
Commit | Line | Data |
---|---|---|
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 | * | |
bd6f5206 | 10 | * @ingroup pwglf_forward_scripts_tasks |
ffca499d | 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 | |
c6115ede | 21 | * @param mcanalysisfilename Take final MC corrections from this - if present |
33438b4c | 22 | * @param trigEff Trigger efficiency |
23 | * @param trigEff0 Trigger efficiency for 0-bin | |
24 | * @param corrEmpty Correct for empty bins | |
ffca499d | 25 | * |
26 | * @return Newly created and configured task | |
27 | * | |
bd6f5206 | 28 | * @ingroup pwglf_forward_dndeta |
b00b37ad | 29 | */ |
30 | AliAnalysisTask* | |
dc1adf8d | 31 | AddTaskCentraldNdeta(const char* config = "dNdetaConfig.C", |
32 | const char* trig = "INEL", | |
93df36ef | 33 | Double_t vzMin = -10, |
34 | Double_t vzMax = +10, | |
dc1adf8d | 35 | const char* cent = "", |
93df36ef | 36 | const char* scheme = 0, |
93df36ef | 37 | Double_t trigEff = 1, |
38 | Double_t trigEff0 = 1, | |
dc1adf8d | 39 | Bool_t satVtx = false) |
b00b37ad | 40 | { |
56236b95 | 41 | // --- Load libraries ---------------------------------------------- |
bd6f5206 | 42 | gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2"); |
56236b95 | 43 | |
ffca499d | 44 | // --- Analysis manager -------------------------------------------- |
b00b37ad | 45 | AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager(); |
0be6c8cd | 46 | |
290052e7 | 47 | // --- Check that we have an AOD input handler --------------------- |
48 | UShort_t aodInput = 0; | |
49 | if (!(aodInput = AliForwardUtil::CheckForAOD())) | |
50 | Fatal("","Cannot proceed without and AOD handler"); | |
51 | if (aodInput == 2 && | |
52 | !AliForwardUtil::CheckForTask("AliCentralMultiplicityTask")) | |
53 | Fatal("","The relevant task wasn't added to the train"); | |
54 | ||
ffca499d | 55 | // --- Make our object --------------------------------------------- |
b00b37ad | 56 | AliCentraldNdetaTask* task = new AliCentraldNdetaTask("Central"); |
c89b9ac1 | 57 | |
ffca499d | 58 | // Set the vertex range to use |
c8b1a7db | 59 | task->SetIpZRange(vzMin, vzMax); |
ffca499d | 60 | // Set the trigger mask to use (INEL,INEL>0,NSD) |
b00b37ad | 61 | task->SetTriggerMask(trig); |
66cf95f2 | 62 | task->SetTriggerEff(trigEff); // 0.997535); |
63 | task->SetTriggerEff0(trigEff0); | |
dc1adf8d | 64 | |
ffca499d | 65 | // Bit mask of |
66 | // | |
0be6c8cd | 67 | // kNone Normalise to accepted events |
68 | // kEventLevel Normalise to all events in selected range | |
69 | // kBackground Also correct for background triggers | |
70 | // kTriggerEfficiency Correct for trigger efficiency | |
ffca499d | 71 | // |
0be6c8cd | 72 | // kNone and kEventLevel are mutually exclusive. If kEventLevel is |
73 | // not specified, then kNone is assumed. kBackground only makes | |
74 | // sense with kEventLevel. Furthermore, there | |
ffca499d | 75 | // are some constants that encode the common cases |
76 | // | |
5f2f85f0 | 77 | // kFull = kEventLevel | kBackground | kTriggerEfficiency |
ffca499d | 78 | // |
79 | // Default is kFull | |
80 | task->SetNormalizationScheme(AliBasedNdetaTask::kFull); | |
81 | if (scheme) task->SetNormalizationScheme(scheme); | |
82 | // Set the centrality bins to use. These are mutually exclusive. | |
83 | // Note, that a bin specified as a-b, covers the interval from a, | |
84 | // inclusive to b exclusive. An upper bound of 100 is treated | |
85 | // especially, and the upper bound is inclusive in that case . | |
dc1adf8d | 86 | if (cent) { |
87 | if (task->SetCentralityMethod(cent)) { | |
88 | Short_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100 }; | |
89 | task->SetCentralityAxis(10, bins); | |
90 | } | |
e308a636 | 91 | } |
dc1adf8d | 92 | |
93 | // Set-up task using a script | |
94 | task->Configure(config); | |
95 | ||
96 | // Connect to manager | |
c8b1a7db | 97 | task->Connect(0,0); |
b00b37ad | 98 | |
b00b37ad | 99 | return task; |
100 | } | |
101 | ||
102 | ||
103 | //________________________________________________________________________ | |
104 | // | |
105 | // EOF | |
106 | // |