]>
Commit | Line | Data |
---|---|---|
d30a006f | 1 | AliAnalysisTask *AddTask_ConversionAODProduction(Int_t dataset=1){ |
2 | ||
3 | // dataset 0: pp | |
4 | // dataset 1: PbPb | |
5 | ||
6 | Bool_t IsHeavyIon=(dataset==1); | |
7 | ||
8 | //get the current analysis manager | |
9 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
10 | if (!mgr) { | |
11 | Error("AddTask_V0ReaderV1", "No analysis manager found."); | |
12 | return 0; | |
13 | } | |
14 | ||
15 | ||
16 | TString analysiscut; | |
17 | ||
18 | if(IsHeavyIon){ | |
19 | analysiscut="900177009350113211200001000000000"; | |
20 | } | |
21 | else{ | |
22 | analysiscut="900397209450304221200000002000000"; | |
23 | } | |
24 | ||
25 | //========= Add V0 Reader to ANALYSIS manager ===== | |
26 | ||
27 | AliV0ReaderV1 *fV0Reader=new AliV0ReaderV1("ConvGammaAODProduction"); | |
28 | fV0Reader->SetCreateAODs(kTRUE); | |
29 | fV0Reader->SetUseOwnXYZCalculation(kTRUE); | |
30 | // Set AnalysisCut Number | |
31 | AliConversionCuts *fCuts= new AliConversionCuts(analysiscut.Data(),analysiscut.Data()); | |
32 | if(fCuts->InitializeCutsFromCutString(analysiscut.Data())){ | |
33 | fV0Reader->SetConversionCuts(fCuts); | |
34 | } | |
35 | fV0Reader->Init(); | |
36 | mgr->AddTask(fV0Reader); | |
37 | ||
38 | AliLog::SetGlobalLogLevel(AliLog::kInfo); | |
39 | ||
40 | //================================================ | |
41 | // data containers | |
42 | //================================================ | |
43 | // find input container | |
44 | //below the trunk version | |
45 | AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); | |
46 | ||
47 | // connect input V0Reader | |
48 | fV0Reader->SelectCollisionCandidates(AliVEvent::kAny); | |
49 | mgr->ConnectInput (fV0Reader,0,cinput); | |
50 | ||
51 | return fV0Reader; | |
52 | } |