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
19 gROOT->LoadMacro("$ALICE_ROOT/PWGCF/EBYE/macros/configLRCAnalysis.C");
20 //gROOT->LoadMacro("AliAnalysisTaskIA.cxx+g");
22 // A. Get the pointer to the existing analysis manager via the static access method.
23 //==============================================================================
24 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
26 Error("AddTaskLRC", "No analysis manager to connect to.");
30 // B. Check the analysis type using the event handlers connected to the analysis
31 // manager. The availability of MC handler cann also be checked here.
32 //==============================================================================
33 if (!mgr->GetInputEventHandler()) {
34 Error("AddTaskLRC", "This task requires an input event handler");
37 TString type = mgr->GetInputEventHandler()->GetDataType();
38 cout << " # TaskLRC - input :" << type << "\n";
40 // ########## Task LRC
41 AliAnalysisTaskLRC* taskLRC = 0x0;
42 taskLRC = createLRCtaskSkeleton("Task_LRC_" + strPrefixTaskName /*+ "_MB_Global2"*/,RunKine);
43 //addAliLRCProcessors(taskLRC,windowsConfigId, nPhiSectors,gapAsPartOfPi);//, whichParticleToFill, whichPidCondition);
45 tuneEtaPhiWindows( taskLRC
54 taskLRC->SetNumberOfPhiSectors( nEventPhiRotations );
55 taskLRC->SetAnalysisLevel( type );
58 taskLRC->SetAODtrackCutBit( 128 );//128 );//128 );
59 else if ( type == "ESD" )
60 taskLRC->SetTrackCuts(createAliLRCcuts( "StandardTPCOnlyTrackCuts" )); // "Global2" ));
62 taskLRC->SetVtxDiamond(0.4,0.4,vertexZmax);
63 taskLRC->SetMaxPtLimit(ptMax);
64 taskLRC->SetMinPtLimit(ptMin);
65 //taskLRC->SetMinNumberOfSPDtracklets( systConfig->minNtracklets );
66 taskLRC->SetNchCuts( multMin, multMax ); // !!! for mult studies
68 int maxMultInHistograms = ( !isIonsAnalysis ? 15 : 70 );
69 setHistMultRange( taskLRC, 0, 0, maxMultInHistograms );
70 setHistPtRange( taskLRC, ptMin, ptMax, 0.01, 5 );
72 //if PbPb or pPb analysis
73 taskLRC->SetIonsAnalysis(isIonsAnalysis);
74 // to be set in the train wagon config: taskLRC->SetCentralityClass(min, max);
76 taskLRC->SelectCollisionCandidates(AliVEvent::kMB); // if physics selection performed in UserExec(), this line should be commented
77 mgr->AddTask(taskLRC);
79 configureLRCtaskOutput(taskLRC, /*strOutputRootFolder,*/ strPrefixTaskName, strRunMode);