]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/MuonHadron/RunAnalysisTaskMuonHadronCorrelations.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / MuonHadron / RunAnalysisTaskMuonHadronCorrelations.C
CommitLineData
07c2615a 1Bool_t RunAnalysisTaskMuonHadronCorrelations(Int_t runNumber = 188362, const char * runMode="full", TString centMethod="V0M") {
2
3 TString rootVersion = "v5-34-02-1";
4 TString alirootVersion = "v5-04-22-AN";
5 gSystem->AddIncludePath("-I$ALICE_ROOT/include ");
6
4070f709 7 gSystem->Load("libTree") ;
8 gSystem->Load("libGeom") ;
9 gSystem->Load("libVMC") ;
10 gSystem->Load("libMinuit") ;
11 gSystem->Load("libPhysics") ;
12 gSystem->Load("libSTEERBase") ;
13 gSystem->Load("libESD") ;
14 gSystem->Load("libAOD") ;
15 gSystem->Load("libANALYSIS") ;
16 gSystem->Load("libOADB") ;
17 gSystem->Load("libANALYSISalice") ;
18 gSystem->Load("libCORRFW") ;
19 gSystem->Load("libPWGmuon") ;
07c2615a 20
21 // -------------------------------
22 // ANALYSIS MANAGER
23 // -------------------------------
24
25 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
26 if (mgr) delete mgr;
27 mgr = new AliAnalysisManager("AM","Analysis Manager");
28
29 // -------------------------------
30 // INPUT EVENT HANDLER
31 // -------------------------------
32
33 AliAODInputHandler* inputHandler = new AliAODInputHandler();
34 mgr->SetInputEventHandler(inputHandler);
35
36 // -------------------------------
37 // ANALYSIS PLUGIN CONFIGURATION
38 // -------------------------------
39
40 AliAnalysisAlien *analysisPlugin = new AliAnalysisAlien();
41 if (!analysisPlugin) { Printf("Error : analysisPlugin is null !!!"); return kFALSE; }
42 analysisPlugin->SetAPIVersion("V1.1x");
43 //analysisPlugin->SetROOTVersion(rootVersion.Data());
44 analysisPlugin->SetAliROOTVersion(alirootVersion.Data());
45 analysisPlugin->SetExecutableCommand("aliroot -b -q");
46
47 // Overwrite all generated files, datasets and output results from a previous session
48 analysisPlugin->SetOverwriteMode();
49 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
50 analysisPlugin->SetRunMode(runMode); // VERY IMPORTANT
51
52 analysisPlugin->SetAdditionalRootLibs("CORRFW");
53 analysisPlugin->SetAdditionalRootLibs("PWGmuon");
54
55 // -------------------------------
56 // GRID CONFIG
57 // -------------------------------
58
59 // Location of Data
60 analysisPlugin->SetGridDataDir("/alice/data/2012/LHC12g");
61 analysisPlugin->SetDataPattern("*ESDs/pass2/AOD/*/AliAOD.root");
62 analysisPlugin->SetRunPrefix("000"); // real data
63
64 analysisPlugin->AddRunNumber(runNumber);
65
66 // Define alien work directory where all files will be copied. Relative to alien $HOME.
67 // analysisPlugin->SetGridWorkingDir("LHC11h_MUON");
68 analysisPlugin->SetGridWorkingDir("MuonHadronCorrelations_LHC12g");
69
70 // Declare alien output directory. Relative to working directory.
71 analysisPlugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
72
73 // Declare the analysis source files names separated by blancs. To be compiled runtime
74 // using ACLiC on the worker nodes.
75 analysisPlugin->SetAnalysisSource("AliAnalysisTaskMuonHadronCorrelations.cxx");
76
77 // Declare all libraries (other than the default ones for the framework. These will be
78 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
79 analysisPlugin->SetAdditionalLibs("libCORRFW.so libPWGmuon.so AliAnalysisTaskMuonHadronCorrelations.h AliAnalysisTaskMuonHadronCorrelations.cxx");
80
81 analysisPlugin->AddIncludePath("-I.");
82
83 //les repertoires individuels d'output des jobs sur la grille ont comme nom le numero du run
84 analysisPlugin->SetOutputToRunNo();
85
86 // Optionally define the files to be archived.
87 // analysisPlugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
88 // analysisPlugin->SetOutputArchive("log_archive.zip:stdout,stderr");
89
90 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
91 analysisPlugin->SetAnalysisMacro("MuonHadronCorr.C");
92
93 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
94 // analysisPlugin->SetSplitMaxInputFileNumber(20);
95 analysisPlugin->SetSplitMaxInputFileNumber(40);
96 // Number of runs per master job
97 analysisPlugin->SetNrunsPerMaster(1);
98
99 // Optionally modify the executable name (default analysis.sh)
100 analysisPlugin->SetExecutable("MuonHadronCorr.sh");
101
102 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
103 // analysisPlugin->SetMaxInitFailed(5);
104
105 // Optionally resubmit threshold.
106 // analysisPlugin->SetMasterResubmitThreshold(90);
107
108 // Optionally set time to live (default 30000 sec)
109 analysisPlugin->SetTTL(30000);
110 // Optionally set input format (default xml-single)
111 analysisPlugin->SetInputFormat("xml-single");
112 // Optionally modify the name of the generated JDL (default analysis.jdl)
113 analysisPlugin->SetJDLName("MuonHadronCorr.jdl");
114 // Optionally modify job price (default 1)
115 analysisPlugin->SetPrice(1);
116 // Optionally modify split mode (default 'se')
117 analysisPlugin->SetSplitMode("se");
118
119 analysisPlugin->SetNtestFiles(5);
120 // analysisPlugin->SetMergeViaJDL(1);
121 analysisPlugin->SetOverwriteMode(kTRUE);
122
123 mgr->SetGridHandler(analysisPlugin);
124
125 // -------------------------------
126 // PHYSICS SELECTION
127 // -------------------------------
63b6cbd0 128 // gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskPhysicsSelection.C");
07c2615a 129 // AddTaskPhysicsSelection(0);
130 mgr->AddStatisticsTask(AliVEvent::kAny);
131
57a9cc15 132 gROOT->LoadMacro("AddAnalysisTaskMuonHadronCorrelations.C");
133 AddAnalysisTaskMuonHadronCorrelations();
07c2615a 134
07c2615a 135 TStopwatch timer;
136 timer.Start();
137 // -------------------------------
138 // RUN ANALYSIS
139 // -------------------------------
140 mgr->InitAnalysis();
141 mgr->PrintStatus();
142
143 mgr->StartAnalysis("grid");
144
145 timer.Stop();
146 timer.Print();
147 return kTRUE;
148
149};