]>
Commit | Line | Data |
---|---|---|
76d89202 | 1 | /*************************************************************************** |
2 | massimo.venaruzzo@cern.ch - last modified on 11/10/2012 | |
3 | // | |
4 | // General macro to configure the RSN analysis task. | |
5 | // It calls all configs desired by the user, by means | |
6 | // of the boolean switches defined in the first lines. | |
7 | // --- | |
8 | // Inputs: | |
9 | // 1) flag to know if running on MC or data | |
10 | // 2) path where all configs are stored | |
11 | // --- | |
12 | // Returns: | |
13 | // kTRUE --> initialization successful | |
14 | // kFALSE --> initialization failed (some config gave errors) | |
15 | // | |
16 | ****************************************************************************/ | |
17 | ||
e4b380b8 | 18 | AliRsnMiniAnalysisTask * AddAnalysisTaskSigmaStarPP |
76d89202 | 19 | ( |
20 | Bool_t isMC, | |
21 | Bool_t isPP, | |
f073f459 | 22 | Float_t cutV = 10.0, |
76d89202 | 23 | Int_t aodFilterBit = 5, |
92932daf | 24 | Float_t piPIDCut = 3.0, |
25 | Float_t pPIDCut = 3.0, | |
26 | Float_t trackDCAcut = 7.0, | |
9307e3fc | 27 | Float_t massTol = 0.01, |
278e195d | 28 | Float_t lambdaDCA = 0.3, |
9307e3fc | 29 | Float_t lambdaCosPoinAn = 0.99, |
30 | Float_t lambdaDaughDCA = 0.5, | |
9d4bb6d8 | 31 | Int_t NTPCcluster = 70, |
9307e3fc | 32 | Int_t nmix = 5, |
76d89202 | 33 | Float_t maxDiffVzMix = 1.0, |
34 | Float_t maxDiffMultMix = 10.0, | |
35 | Float_t maxDiffAngleMixDeg = 20.0, | |
36 | Int_t aodN = 0, | |
e4b380b8 | 37 | TString outNameSuffix = "Sigma1385" |
76d89202 | 38 | ) |
39 | { | |
40 | // | |
41 | // -- INITIALIZATION ---------------------------------------------------------------------------- | |
42 | // retrieve analysis manager | |
43 | // | |
44 | ||
45 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
46 | if (!mgr) { | |
47 | ::Error("AddAnalysisTaskSigmaStarPP", "No analysis manager to connect to."); | |
48 | return NULL; | |
49 | } | |
50 | ||
51 | // create the task and configure | |
65ddd3ef | 52 | TString taskName = Form("SigmaStar%s%s_%.1f_%d_%.1f_%.1f_%.2f_%.2f_%.1f_%.2f_%.1f", (isPP? "pp" : "PbPb"), (isMC ? "MC" : "Data"),cutV,NTPCcluster,piPIDCut,pPIDCut,trackDCAcut,massTol,lambdaDCA,lambdaCosPoinAn,lambdaDaughDCA); |
76d89202 | 53 | AliRsnMiniAnalysisTask *task = new AliRsnMiniAnalysisTask(taskName.Data(), isMC); |
54 | if (!isMC && !isPP){ | |
55 | Printf(Form("========== SETTING USE CENTRALITY PATCH AOD049 : %s", (aodN==49)? "yes" : "no")); | |
56 | task->SetUseCentralityPatch(aodN==49); | |
57 | } | |
58 | if (isPP) | |
59 | task->UseMultiplicity("QUALITY"); | |
60 | else | |
61 | task->UseCentrality("V0M"); | |
62 | // set event mixing options | |
63 | task->UseContinuousMix(); | |
64 | //task->UseBinnedMix(); | |
65 | task->SetNMix(nmix); | |
66 | task->SetMaxDiffVz(maxDiffVzMix); | |
67 | task->SetMaxDiffMult(maxDiffMultMix); | |
68 | if (!isPP) task->SetMaxDiffAngle(maxDiffAngleMixDeg*TMath::DegToRad()); //set angle diff in rad | |
e4b380b8 | 69 | ::Info("AddAnalysisTaskSigmaStarPP", Form("Event mixing configuration: \n events to mix = %i \n max diff. vtxZ = cm %5.3f \n max diff multi = %5.3f \n max diff EP angle = %5.3f deg", nmix, maxDiffVzMix, maxDiffMultMix, (isPP ? 0.0 : maxDiffAngleMixDeg))); |
76d89202 | 70 | |
71 | mgr->AddTask(task); | |
72 | ||
73 | // | |
74 | // -- EVENT CUTS (same for all configs) --------------------------------------------------------- | |
75 | // | |
76 | // cut on primary vertex: | |
77 | // - 2nd argument --> |Vz| range | |
78 | // - 3rd argument --> minimum required number of contributors | |
79 | // - 4th argument --> tells if TPC stand-alone vertexes must be accepted | |
f073f459 | 80 | AliRsnCutPrimaryVertex *cutVertex = new AliRsnCutPrimaryVertex("cutVertex", cutV, 0, kFALSE); |
76d89202 | 81 | if (isPP) cutVertex->SetCheckPileUp(kTRUE); // set the check for pileup |
82 | ||
83 | // define and fill cut set for event cut | |
84 | AliRsnCutSet *eventCuts = new AliRsnCutSet("eventCuts", AliRsnTarget::kEvent); | |
85 | eventCuts->AddCut(cutVertex); | |
86 | eventCuts->SetCutScheme(cutVertex->GetName()); | |
87 | // set cuts in task | |
88 | task->SetEventCuts(eventCuts); | |
89 | ||
90 | // | |
91 | // -- EVENT-ONLY COMPUTATIONS ------------------------------------------------------------------- | |
92 | // | |
93 | //vertex | |
94 | Int_t vtxID = task->CreateValue(AliRsnMiniValue::kVz, kFALSE); | |
95 | AliRsnMiniOutput *outVtx = task->CreateOutput("eventVtx", "HIST", "EVENT"); | |
96 | outVtx->AddAxis(vtxID, 400, -20.0, 20.0); | |
97 | ||
98 | //multiplicity or centrality | |
99 | Int_t multID = task->CreateValue(AliRsnMiniValue::kMult, kFALSE); | |
100 | AliRsnMiniOutput *outMult = task->CreateOutput("eventMult", "HIST", "EVENT"); | |
101 | if (isPP) | |
102 | outMult->AddAxis(multID, 400, 0.0, 400.0); | |
103 | else | |
104 | outMult->AddAxis(multID, 100, 0.0, 100.0); | |
105 | ||
106 | //event plane (only for PbPb) | |
107 | Int_t planeID = task->CreateValue(AliRsnMiniValue::kPlaneAngle, kFALSE); | |
e4b380b8 | 108 | AliRsnMiniOutput *outPlane = 0x0; //task->CreateOutput("eventPlane", "HIST", "EVENT"); |
109 | if (!isPP){ | |
110 | outPlane = task->CreateOutput("eventPlane", "HIST", "EVENT"); | |
76d89202 | 111 | outPlane->AddAxis(planeID, 180, 0.0, TMath::Pi()); |
e4b380b8 | 112 | } |
76d89202 | 113 | |
114 | // | |
115 | // -- PAIR CUTS (common to all resonances) ------------------------------------------------------ | |
116 | // | |
117 | AliRsnCutMiniPair *cutY = new AliRsnCutMiniPair("cutRapidity", AliRsnCutMiniPair::kRapidityRange); | |
a9d94049 | 118 | cutY->SetRangeD(-0.5, 0.5); |
76d89202 | 119 | |
120 | AliRsnCutSet *cutsPair = new AliRsnCutSet("pairCuts", AliRsnTarget::kMother); | |
121 | cutsPair->AddCut(cutY); | |
122 | cutsPair->SetCutScheme(cutY->GetName()); | |
123 | ||
124 | // | |
125 | // -- CONFIG ANALYSIS -------------------------------------------------------------------------- | |
126 | gROOT->LoadMacro("$ALICE_ROOT/PWGLF/RESONANCES/macros/mini/ConfigSigmaStar.C"); | |
127 | if (isMC) { | |
e4b380b8 | 128 | Printf("========================== MC analysis - PID cuts not used"); |
76d89202 | 129 | } else |
130 | Printf("========================== DATA analysis - PID cuts used"); | |
92932daf | 131 | if (!ConfigSigmaStar(task, isPP, isMC, piPIDCut, pPIDCut, aodFilterBit, trackDCAcut, massTol, lambdaDCA, lambdaCosPoinAn, lambdaDaughDCA, NTPCcluster, "", cutsPair)) return 0x0; |
76d89202 | 132 | |
133 | // | |
134 | // -- CONTAINERS -------------------------------------------------------------------------------- | |
135 | // | |
136 | TString outputFileName = AliAnalysisManager::GetCommonFileName(); | |
137 | // outputFileName += ":Rsn"; | |
e4b380b8 | 138 | Printf("AddAnalysisTaskSigmaStarPP - Set OutputFileName : \n %s\n", outputFileName.Data() ); |
76d89202 | 139 | |
65ddd3ef | 140 | AliAnalysisDataContainer *output = mgr->CreateContainer(Form("RsnOut_%s_%.1f_%d_%.1f_%.1f_%.2f_%.2f_%.1f_%.2f_%.1f",outNameSuffix.Data(),cutV,NTPCcluster,piPIDCut,pPIDCut,trackDCAcut,massTol,lambdaDCA,lambdaCosPoinAn,lambdaDaughDCA), |
76d89202 | 141 | TList::Class(), |
142 | AliAnalysisManager::kOutputContainer, | |
143 | outputFileName); | |
144 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); | |
145 | mgr->ConnectOutput(task, 1, output); | |
146 | ||
147 | return task; | |
148 | } |