1 Bool_t RunAnalysisTaskMuonHadronCorrelations(Int_t runNumber = 188362, const char * runMode="full", TString centMethod="V0M") {
3 TString rootVersion = "v5-34-02-1";
4 TString alirootVersion = "v5-04-22-AN";
5 gSystem->AddIncludePath("-I$ALICE_ROOT/include ");
7 gSystem->Load("libTree.so") ;
8 gSystem->Load("libGeom.so") ;
9 gSystem->Load("libVMC.so") ;
10 gSystem->Load("libMinuit.so") ;
11 gSystem->Load("libPhysics.so") ;
12 gSystem->Load("libSTEERBase.so") ;
13 gSystem->Load("libESD.so") ;
14 gSystem->Load("libAOD.so") ;
15 gSystem->Load("libANALYSIS.so") ;
16 gSystem->Load("libOADB.so") ;
17 gSystem->Load("libANALYSISalice.so") ;
18 gSystem->Load("libCORRFW.so") ;
19 gSystem->Load("libPWGmuon.so") ;
21 // -------------------------------
23 // -------------------------------
25 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
27 mgr = new AliAnalysisManager("AM","Analysis Manager");
29 // -------------------------------
30 // INPUT EVENT HANDLER
31 // -------------------------------
33 AliAODInputHandler* inputHandler = new AliAODInputHandler();
34 mgr->SetInputEventHandler(inputHandler);
36 // -------------------------------
37 // ANALYSIS PLUGIN CONFIGURATION
38 // -------------------------------
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");
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
52 analysisPlugin->SetAdditionalRootLibs("CORRFW");
53 analysisPlugin->SetAdditionalRootLibs("PWGmuon");
55 // -------------------------------
57 // -------------------------------
60 analysisPlugin->SetGridDataDir("/alice/data/2012/LHC12g");
61 analysisPlugin->SetDataPattern("*ESDs/pass2/AOD/*/AliAOD.root");
62 analysisPlugin->SetRunPrefix("000"); // real data
64 analysisPlugin->AddRunNumber(runNumber);
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");
70 // Declare alien output directory. Relative to working directory.
71 analysisPlugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
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");
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");
81 analysisPlugin->AddIncludePath("-I.");
83 //les repertoires individuels d'output des jobs sur la grille ont comme nom le numero du run
84 analysisPlugin->SetOutputToRunNo();
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");
90 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
91 analysisPlugin->SetAnalysisMacro("MuonHadronCorr.C");
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);
99 // Optionally modify the executable name (default analysis.sh)
100 analysisPlugin->SetExecutable("MuonHadronCorr.sh");
102 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
103 // analysisPlugin->SetMaxInitFailed(5);
105 // Optionally resubmit threshold.
106 // analysisPlugin->SetMasterResubmitThreshold(90);
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");
119 analysisPlugin->SetNtestFiles(5);
120 // analysisPlugin->SetMergeViaJDL(1);
121 analysisPlugin->SetOverwriteMode(kTRUE);
123 mgr->SetGridHandler(analysisPlugin);
125 // -------------------------------
127 // -------------------------------
128 // gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
129 // AddTaskPhysicsSelection(0);
130 mgr->AddStatisticsTask(AliVEvent::kAny);
132 gROOT->LoadMacro("AddAnalysisTaskMuonHadronCorrelations.C");
133 AddAnalysisTaskMuonHadronCorrelations();
137 // -------------------------------
139 // -------------------------------
143 mgr->StartAnalysis("grid");