]>
Commit | Line | Data |
---|---|---|
75f8532d | 1 | AliAnalysisTaskLRC *AddTaskLRCtrain( |
fbe139eb | 2 | Bool_t RunKine = kFALSE |
3 | , Bool_t isIonsAnalysis = kFALSE | |
75f8532d | 4 | , TString strPrefixTaskName = "testTask" |
5 | , TString strRunMode = "default" | |
6 | , int nEtaWindows = 8 | |
7 | , int nPhiWindows = 8 | |
8 | , double etaWinWidth = 0.2 | |
9 | , double etaWindowStep = 0.1 | |
10 | , double phiWinWidth = TMath::Pi()/4 | |
11 | , int nEventPhiRotations = 8 | |
12 | , double ptMin = 0.3 | |
13 | , double ptMax = 1.5 | |
14 | , int multMin = 0 | |
fbe139eb | 15 | , int multMax = 100000 |
16 | , double vertexZmax = 10.0 | |
75f8532d | 17 | ) |
18 | { | |
447e6ac1 | 19 | //!!!!!! |
faf9f4d2 | 20 | gROOT->LoadMacro("$ALICE_ROOT/PWGCF/EBYE/macros/configLRCAnalysis.C"); |
75f8532d | 21 | //gROOT->LoadMacro("AliAnalysisTaskIA.cxx+g"); |
fbe139eb | 22 | |
75f8532d | 23 | // A. Get the pointer to the existing analysis manager via the static access method. |
24 | //============================================================================== | |
25 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
26 | if (!mgr) { | |
27 | Error("AddTaskLRC", "No analysis manager to connect to."); | |
28 | return NULL; | |
29 | } | |
fbe139eb | 30 | |
75f8532d | 31 | // B. Check the analysis type using the event handlers connected to the analysis |
32 | // manager. The availability of MC handler cann also be checked here. | |
33 | //============================================================================== | |
34 | if (!mgr->GetInputEventHandler()) { | |
35 | Error("AddTaskLRC", "This task requires an input event handler"); | |
36 | return NULL; | |
37 | } | |
38 | TString type = mgr->GetInputEventHandler()->GetDataType(); | |
39 | cout << " # TaskLRC - input :" << type << "\n"; | |
447e6ac1 | 40 | |
75f8532d | 41 | // ########## Task LRC |
42 | AliAnalysisTaskLRC* taskLRC = 0x0; | |
43 | taskLRC = createLRCtaskSkeleton("Task_LRC_" + strPrefixTaskName /*+ "_MB_Global2"*/,RunKine); | |
44 | //addAliLRCProcessors(taskLRC,windowsConfigId, nPhiSectors,gapAsPartOfPi);//, whichParticleToFill, whichPidCondition); | |
fbe139eb | 45 | |
75f8532d | 46 | tuneEtaPhiWindows( taskLRC |
47 | , nEtaWindows | |
48 | , nPhiWindows | |
49 | , etaWinWidth | |
50 | , etaWindowStep | |
51 | , 0 | |
52 | , phiWinWidth | |
53 | ); | |
fbe139eb | 54 | |
75f8532d | 55 | taskLRC->SetNumberOfPhiSectors( nEventPhiRotations ); |
56 | taskLRC->SetAnalysisLevel( type ); | |
fbe139eb | 57 | |
58 | if ( type == "AOD" ) | |
59 | taskLRC->SetAODtrackCutBit( 128 );//128 );//128 ); | |
60 | else if ( type == "ESD" ) | |
61 | taskLRC->SetTrackCuts(createAliLRCcuts( "StandardTPCOnlyTrackCuts" )); // "Global2" )); | |
75f8532d | 62 | |
63 | taskLRC->SetVtxDiamond(0.4,0.4,vertexZmax); | |
64 | taskLRC->SetMaxPtLimit(ptMax); | |
65 | taskLRC->SetMinPtLimit(ptMin); | |
66 | //taskLRC->SetMinNumberOfSPDtracklets( systConfig->minNtracklets ); | |
67 | taskLRC->SetNchCuts( multMin, multMax ); // !!! for mult studies | |
fbe139eb | 68 | |
69 | int maxMultInHistograms = ( !isIonsAnalysis ? 15 : 70 ); | |
70 | setHistMultRange( taskLRC, 0, 0, maxMultInHistograms ); | |
447e6ac1 | 71 | const double ptBinWidth = 0.01; |
72 | //int nPtBinsInHist = ( ptMax - ptMin ) / ptBinWidth; | |
73 | setHistPtRange( taskLRC, ptMin, ptMax, ptBinWidth, 1 ); | |
fbe139eb | 74 | |
75 | //if PbPb or pPb analysis | |
76 | taskLRC->SetIonsAnalysis(isIonsAnalysis); | |
77 | // to be set in the train wagon config: taskLRC->SetCentralityClass(min, max); | |
78 | ||
75f8532d | 79 | taskLRC->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented |
80 | mgr->AddTask(taskLRC); | |
fbe139eb | 81 | |
75f8532d | 82 | configureLRCtaskOutput(taskLRC, /*strOutputRootFolder,*/ strPrefixTaskName, strRunMode); |
fbe139eb | 83 | |
75f8532d | 84 | return taskLRC; |
85 | } | |
86 | ||
87 | ||
88 |