1 AliAnalysisTaskLRC *AddTaskLRCtrain(
2 Bool_t RunKine = kFALSE
3 , Bool_t isIonsAnalysis = kFALSE
4 , TString strPrefixTaskName = "testTask"
5 , TString strRunMode = "default"
8 , double etaWinWidth = 0.2
9 , double etaWindowStep = 0.1
10 , double phiWinWidth = TMath::Pi()/4
11 , int nEventPhiRotations = 8
15 , int multMax = 100000
16 , double vertexZmax = 10.0
20 gROOT->LoadMacro("$ALICE_ROOT/PWGCF/EBYE/macros/configLRCAnalysis.C");
21 //gROOT->LoadMacro("AliAnalysisTaskIA.cxx+g");
23 // A. Get the pointer to the existing analysis manager via the static access method.
24 //==============================================================================
25 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
27 Error("AddTaskLRC", "No analysis manager to connect to.");
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");
38 TString type = mgr->GetInputEventHandler()->GetDataType();
39 cout << " # TaskLRC - input :" << type << "\n";
41 // ########## Task LRC
42 AliAnalysisTaskLRC* taskLRC = 0x0;
43 taskLRC = createLRCtaskSkeleton("Task_LRC_" + strPrefixTaskName /*+ "_MB_Global2"*/,RunKine);
44 //addAliLRCProcessors(taskLRC,windowsConfigId, nPhiSectors,gapAsPartOfPi);//, whichParticleToFill, whichPidCondition);
46 tuneEtaPhiWindows( taskLRC
55 taskLRC->SetNumberOfPhiSectors( nEventPhiRotations );
56 taskLRC->SetAnalysisLevel( type );
59 taskLRC->SetAODtrackCutBit( 128 );//128 );//128 );
60 else if ( type == "ESD" )
61 taskLRC->SetTrackCuts(createAliLRCcuts( "StandardTPCOnlyTrackCuts" )); // "Global2" ));
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
69 int maxMultInHistograms = ( !isIonsAnalysis ? 15 : 70 );
70 setHistMultRange( taskLRC, 0, 0, maxMultInHistograms );
71 const double ptBinWidth = 0.01;
72 //int nPtBinsInHist = ( ptMax - ptMin ) / ptBinWidth;
73 setHistPtRange( taskLRC, ptMin, ptMax, ptBinWidth, 1 );
75 //if PbPb or pPb analysis
76 taskLRC->SetIonsAnalysis(isIonsAnalysis);
77 // to be set in the train wagon config: taskLRC->SetCentralityClass(min, max);
79 taskLRC->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented
80 mgr->AddTask(taskLRC);
82 configureLRCtaskOutput(taskLRC, /*strOutputRootFolder,*/ strPrefixTaskName, strRunMode);