]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/macros/runTaskFlowHigherOrdersAllPID.C
af411430a8d7ffc17bb9ac5c9bd7d30f9d8c24a5
[u/mrichter/AliRoot.git] / PWGCF / FLOW / macros / runTaskFlowHigherOrdersAllPID.C
1 // run.C
2 //
3 // Template run macro for AliBasicTask.cxx/.h with example layout of
4 // physics selections and options, in macro and task.
5 //
6 // Author: Arvinder Palaha
7 //
8 class AliAnalysisGrid;
9 class AliAnalysisTaskBF;
10 class AliBalance;
11
12 //Centrality stuff
13 Int_t binfirst = 0;  //where do we start numbering bins
14 Int_t binlast = 8;  //where do we stop numbering bins
15 const Int_t numberOfCentralityBins = 9;
16 Double_t centralityArray[numberOfCentralityBins+1] = {0.,5.,10.,20.,30.,40.,50.,60.,70.,80.}; // in centrality percentile
17
18 //Systematic studies
19 const Int_t numberOfSyst = 13;
20 Float_t vZ[numberOfSyst]     = {10.,12.,6.,8.,10.,10.,10.,10.,10.,10.,10.,10.,10.};     // global Vertex Z cut
21 Float_t DCAxy[numberOfSyst]  = {-1.,2.4,2.4,2.4,2.2,2.0,1.8,2.4,2.4,2.4,2.4,2.4,2.4};   // DCA xy cut (afterburner, -1 = w/o additional cut)
22 Float_t DCAz[numberOfSyst]   = {-1.,3.2,3.2,3.2,3.0,2.8,2.6,3.2,3.2,3.2,3.2,3.2,3.2};   // DCA z cut (afterburner, -1 = w/o additional cut)
23 Float_t ptMin[numberOfSyst]  = {0.3,0.3,0.3,0.3,0.3,0.3,0.3,1.5,5.0,0.3,0.3,0.3,0.3};   // pt cuts
24 Float_t ptMax[numberOfSyst]  = {5.,1.5,1.5,1.5,1.5,1.5,1.5,5.0,10.0,10.0,1.5,1.5,1.5}; // pt cuts
25 Float_t etaMin[numberOfSyst] = {-0.8,-0.8,-0.8,-0.8,-0.8,-0.8,-0.8,-0.8,-0.8,-0.8,-1.0,-0.6,-0.4}; // eta cuts
26 Float_t etaMax[numberOfSyst] = {0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,1.0,0.6,0.4};   // eta cuts
27
28 Bool_t kUsePID = kFALSE;
29 Bool_t bUseHBTCut = kTRUE;
30 Bool_t bUseConversionCut = kTRUE;
31 Bool_t bResonancesCut = kTRUE;
32 Bool_t bMomentumDifferenceCut = kTRUE;
33 Int_t kNSigmaElectronRejection = 3;
34
35 //______________________________________________________________________________
36 void runTaskFlowHigherOrdersAllPID(
37          const char* runtype = "local", // local, proof or grid
38          const char *gridmode = "terminate", // Set the run mode (can be "full", "test", "offline", "submit" or "terminate"). Full & Test work for proof
39          const Int_t bunchN = 0,
40          const bool bAOD = 1, // 1 = AOD ANALYSIS, 0 = ESD ANALYSIS
41          const bool bMCtruth = 0, // 1 = MCEvent handler is on (MC truth), 0 = MCEvent handler is off (MC reconstructed/real data)
42          const bool bMCphyssel = 1, // 1 = looking at MC truth or reconstructed, 0 = looking at real data
43          const Long64_t nentries = 50000, // for local and proof mode, ignored in grid mode. Set to 1234567890 for all events.
44          const Long64_t firstentry = 0, // for local and proof mode, ignored in grid mode
45          TString proofdataset = "bunchPROOF", // path to dataset on proof cluster, for proof analysis
46          const char *proofcluster = "miweber@alice-caf.cern.ch", // which proof cluster to use in proof mode
47          const char *taskname = "BF_Syst_Test" // sets name of grid generated macros
48          )
49 {
50     // check run type
51     if(runtype != "local" && runtype != "proof" && runtype != "grid") {
52         Printf("\n\tIncorrect run option, check first argument of run macro");
53         Printf("\tint runtype = local, proof or grid\n");
54         return;
55     }
56     Printf("%s analysis chosen",runtype);
57   
58     // load libraries
59     gSystem->Load("libCore");
60     gSystem->Load("libGeom");
61     gSystem->Load("libVMC");
62     gSystem->Load("libPhysics");
63     gSystem->Load("libTree");
64     gSystem->Load("libSTEERBase");
65     gSystem->Load("libESD");
66     gSystem->Load("libAOD");
67     gSystem->Load("libANALYSIS");
68     gSystem->Load("libANALYSISalice");
69     gSystem->Load("libEventMixing");
70     gSystem->Load("libCORRFW");
71     gSystem->Load("libPWGTools");
72     gSystem->Load("libPWGCFebye");
73     gSystem->Load("libPWGflowBase");
74     gSystem->Load("libPWGflowTasks");
75
76     // additional
77
78     // compile standalone stuff
79     //gROOT->LoadMacro("AliBalance.cxx++g");
80     //gROOT->LoadMacro("AliAnalysisTaskBF.cxx++g");
81
82     // add aliroot indlude path
83     //gROOT->ProcessLine(".include $PWD/.");
84     //gROOT->ProcessLine(Form(".include %s/include",gSystem->ExpandPathName("$ALICE_ROOT")));
85
86     gROOT->SetStyle("Plain");
87
88     // analysis manager
89     AliAnalysisManager* mgr = new AliAnalysisManager(Form("%s%i",taskname,bunchN));
90     
91     // create the alien handler and attach it to the manager
92     if(runtype == "grid") {
93       AliAnalysisGrid *plugin = CreateAlienHandler(bAOD,bunchN,Form("%s%i",taskname,bunchN), gridmode, proofcluster, Form("%s_%d.txt",proofdataset.Data(),bunchN)); 
94       mgr->SetGridHandler(plugin);
95     }
96     else if(runtype == "local") {
97       TString filename;
98       TChain* chain = 0x0;
99       if((!bAOD)&&(!bMCtruth)) {
100         chain = new TChain("esdTree");
101         for(Int_t i = 0; i < 4; i++) {
102           filename = "/data/alice2/pchrist/HeavyIons/Data/2011/Set";
103           filename += i; filename += "/AliESDs.root";
104           chain->Add(filename.Data());
105         }
106       }
107       else if((bAOD)&&(!bMCtruth)) {
108         chain = new TChain("aodTree");
109         for(Int_t i = 0; i < 10; i++) {
110           filename = "/glusterfs/alice1/alice2/pchrist/HeavyIons/Data/2011/Set";
111           filename += i; filename += "/AliAOD.root";
112           chain->Add(filename.Data());
113         }
114       }
115       else if((!bAOD)&&(bMCtruth)) {
116         chain = new TChain("TE");
117         for(Int_t i = 10; i < 99; i++) {
118           filename = "/project/alice/users/alisrm/Efficiency_Contamination/LHC13b3_HIJING_pA_AOD/";
119           filename += i;
120           filename += "/galice.root";
121           chain->Add(filename.Data());
122         }
123       }
124       else if((bAOD)&&(bMCtruth)) { //used for MCAOD
125         chain = new TChain("aodTree");   
126         for(Int_t i = 10; i < 99; i++) { 
127           filename = "/project/alice/users/alisrm/Efficiency_Contamination/LHC13b3_HIJING_pA_AOD/";
128           filename += i; 
129           filename += "/AliAOD.root";
130           chain->Add(filename.Data());
131         } 
132       }
133       
134
135     }//local mode
136
137     // input handler (ESD or AOD)
138     AliVEventHandler* inputH = NULL;
139     if(!bAOD){
140       inputH = new AliESDInputHandler();
141     }
142     else{
143       inputH = new AliAODInputHandler();
144     }
145     mgr->SetInputEventHandler(inputH);
146     
147     // mc event handler
148     if(bMCtruth) {
149       AliMCEventHandler* mchandler = new AliMCEventHandler();
150       // Not reading track references
151       mchandler->SetReadTR(kFALSE);
152       mgr->SetMCtruthEventHandler(mchandler);
153     }   
154     
155     // AOD output handler
156     //AliAODHandler* aodoutHandler = new AliAODHandler();
157     //aodoutHandler->SetOutputFileName("aod.root");
158     //mgr->SetOutputEventHandler(aodoutHandler); 
159     
160     // === Physics Selection Task ===
161     //
162     // In SelectCollisionCandidate(), default is kMB, so the task UserExec() 
163     // function is only called for these events.
164     // Options are:
165     //    kMB             Minimum Bias trigger
166     //    kMBNoTRD        Minimum bias trigger where the TRD is not read out
167     //    kMUON           Muon trigger
168     //    kHighMult       High-Multiplicity Trigger
169     //    kUserDefined    For manually defined trigger selection
170     //
171     // Multiple options possible with the standard AND/OR operators && and ||
172     // These all have the usual offline SPD or V0 selections performed.
173     //
174     // With a pointer to the physics selection object using physSelTask->GetPhysicsSelection(),
175     // one can manually set the selected and background classes using:
176     //    AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL")
177     //    AddBGTriggerClass("+CINT1A-ABCE-NOPF-ALL");
178     //
179     // One can also specify multiple classes at once, or require a class to NOT
180     // trigger, for e.g.
181     //    AddBGTriggerClass("+CSMBA-ABCE-NOPF-ALL -CSMBB-ABCE-NOPF-ALL");
182     //
183     // NOTE that manually setting the physics selection overrides the standard
184     // selection, so it must be done in completeness.
185     //
186     // ALTERNATIVELY, one can make the physics selection inside the task
187     // UserExec().
188     // For this case, comment out the task->SelectCol.... line, 
189     // and see AliBasicTask.cxx UserExec() function for details on this.
190
191     //gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
192     //AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(bMCphyssel);
193     //if(!physSelTask) { Printf("no physSelTask"); return; }
194     //AliPhysicsSelection *physSel = physSelTask->GetPhysicsSelection();
195     //physSel->AddCollisionTriggerClass("+CINT1B-ABCE-NOPF-ALL");// #3119 #769");
196                 
197     // create task
198     //Add the centrality determination task and the physics selection 
199     // (only on ESD level, in AODs centrality is already in header and events are selected)
200 //    if((!bAOD)&&(!bMCtruth)){
201 //      gROOT->LoadMacro("$ALICE_ROOT/OADB/macros/AddTaskCentrality.C");
202 //      AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();
203
204       // Add physics selection task (NOT needed for AODs)
205 //      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
206 //      AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(bMCphyssel);
207 //    }
208 /////////////////////////////////////////
209     //Add flow centrality bayesian 
210
211       gROOT->LoadMacro("AddTaskFlowHigherOrdersAllPID.C");
212       //gROOT->LoadMacro("$ALICE_ROOT/PWGCF/FLOW/macros/AddTaskFlowHigherOrdersAllPID.C");
213   //  gROOT->LoadMacro("$ALICE_ROOT/PWGCF/FLOW/macros/AddTaskFlowCentralityBayesian.C");
214   //  gROOT->LoadMacro("~/Desktop/work/PhD/flow/AddTaskFlowCentralityBayesian.C");
215       AliAnalysisTaskFlowEvent* FlowTask = AddTaskFlowHigherOrdersAllPID(AliVEvent::kCentral | AliVEvent::kSemiCentral | AliVEvent::kMB,0.,80.,"AnalysisResults",kTRUE,768,768,AliPID::kPion,AliFlowTrackCuts::kTOFbayesian,0,kFALSE,-0.8,0.8,"");
216 /////////////////////////////////////////
217
218     //Add the PID response
219 //    if((kUsePID)||(kNSigmaElectronRejection)) {
220 //      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
221 //      AddTaskPIDResponse(bMCphyssel); 
222 //    }
223
224     //Add the VZERO event plane task
225 //    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskVZEROEPSelection.C"); 
226 //    AliVZEROEPSelectionTask* epSelTask = AddTaskVZEROEPSelection();
227
228     //Add the BF task (all centralities)
229  //   gROOT->LoadMacro("$ALICE_ROOT/PWGCF/EBYE/macros/AddTaskBalancePsiCentralityTrain.C"); 
230
231 //    AliAnalysisTaskBFPsi *taskBF = AddTaskBalancePsiCentralityTrain(0, 500, kFALSE, kTRUE, kFALSE, "V0M", 10, -1, -1, 0.2, 20.0, -0.8, 0.8, -1, -1, kUsePID, kFALSE, kTRUE, 0.02, kFALSE, 0.04, kTRUE, 0.1, 128, 1, "AnalysisResults","TE","Multiplicity","AOD",kTRUE, kNSigmaElectronRejection);
232     //taskBF->SetDebugLevel();
233
234     // enable debug printouts
235     //mgr->SetDebugLevel(2);
236     //mgr->SetUseProgressBar(1,100);
237     if (!mgr->InitAnalysis()) return;
238     mgr->PrintStatus();
239   
240     // start analysis
241     Printf("Starting Analysis....");
242     if(runtype == "local") 
243       mgr->StartAnalysis("local",chain);
244     else
245       mgr->StartAnalysis(runtype,nentries,firstentry);
246 }
247
248 //______________________________________________________________________________
249 AliAnalysisGrid* CreateAlienHandler(Bool_t bAOD, Int_t bunchN, const char *taskname, const char *gridmode, const char *proofcluster, const char *proofdataset)
250 {
251     AliAnalysisAlien *plugin = new AliAnalysisAlien();
252     // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
253     plugin->SetRunMode(gridmode);
254
255     // Set versions of used packages
256     plugin->SetAPIVersion("V1.1x");
257     plugin->SetROOTVersion("v5-34-08");
258     plugin->SetAliROOTVersion("v5-05-19-AN");
259
260     // Declare input data to be processed.
261
262     // Method 1: Create automatically XML collections using alien 'find' command.
263     // Define production directory LFN
264     plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
265     // On real reconstructed data:
266     // plugin->SetGridDataDir("/alice/data/2009/LHC09d");
267
268     // Set data search pattern
269     //plugin->SetDataPattern("*ESDs.root"); // THIS CHOOSES ALL PASSES
270     // Data pattern for reconstructed data
271     if(!bAOD){
272       plugin->SetDataPattern("*ESDs/pass2/*ESDs.root"); // CHECK LATEST PASS OF DATA SET IN ALIENSH
273     } 
274     else{
275       plugin->SetDataPattern("*ESDs/pass2/AOD086/*/AliAOD.root");
276     }
277
278     plugin->SetRunPrefix("000");   // real data
279     // ...then add run numbers to be considered
280     //plugin->SetRunRange(114917,115322);
281
282     if(bunchN==0){
283       plugin->AddRunNumber(137366);
284     }
285     
286     //bunch1
287     else if(bunchN == 1){
288       plugin->AddRunNumber(139510);
289       plugin->AddRunNumber(139507);
290       plugin->AddRunNumber(139505);
291       plugin->AddRunNumber(139503); 
292       plugin->AddRunNumber(139465); 
293       plugin->AddRunNumber(139438);
294       plugin->AddRunNumber(139437);
295       plugin->AddRunNumber(139360); 
296       plugin->AddRunNumber(139329);
297       plugin->AddRunNumber(139328); 
298     }
299
300     //bunch2
301     else if(bunchN == 2){
302       plugin->AddRunNumber(139314); 
303       plugin->AddRunNumber(139310);
304       plugin->AddRunNumber(139309); 
305       plugin->AddRunNumber(139173); 
306       plugin->AddRunNumber(139107); 
307       plugin->AddRunNumber(139105); 
308       plugin->AddRunNumber(139038); 
309       plugin->AddRunNumber(139037); 
310       plugin->AddRunNumber(139036); 
311       plugin->AddRunNumber(139029); 
312       plugin->AddRunNumber(139028); 
313       plugin->AddRunNumber(138872); 
314       plugin->AddRunNumber(138871); 
315       plugin->AddRunNumber(138870); 
316       plugin->AddRunNumber(138837); 
317       plugin->AddRunNumber(138732); 
318       plugin->AddRunNumber(138730);
319       plugin->AddRunNumber(138666);
320       plugin->AddRunNumber(138662); 
321       plugin->AddRunNumber(138653); 
322     }
323
324     else if(bunchN == 3){
325       plugin->AddRunNumber(138652);
326       plugin->AddRunNumber(138638);
327       plugin->AddRunNumber(138624); 
328       plugin->AddRunNumber(138621); 
329       plugin->AddRunNumber(138583); 
330       plugin->AddRunNumber(138582); 
331       plugin->AddRunNumber(138579); 
332       plugin->AddRunNumber(138578);
333       plugin->AddRunNumber(138534);
334       plugin->AddRunNumber(138469); 
335     }
336
337     else if(bunchN == 4){
338       
339       plugin->AddRunNumber(138442);
340       plugin->AddRunNumber(138439);
341       plugin->AddRunNumber(138438);
342       plugin->AddRunNumber(138396); 
343       plugin->AddRunNumber(138364); 
344       plugin->AddRunNumber(138275); 
345       plugin->AddRunNumber(138225); 
346       plugin->AddRunNumber(138201);
347       plugin->AddRunNumber(138197); 
348       plugin->AddRunNumber(138192); 
349     }
350
351     else if(bunchN == 5){
352
353       plugin->AddRunNumber(138190);
354       plugin->AddRunNumber(137848); 
355       plugin->AddRunNumber(137844); 
356       plugin->AddRunNumber(137752); 
357       plugin->AddRunNumber(137751); 
358       plugin->AddRunNumber(137724); 
359       plugin->AddRunNumber(137722); 
360       plugin->AddRunNumber(137718); 
361       plugin->AddRunNumber(137704); 
362       plugin->AddRunNumber(137693);
363     }
364
365     else if(bunchN == 6){
366
367       plugin->AddRunNumber(137692); 
368       plugin->AddRunNumber(137691); 
369       plugin->AddRunNumber(137686); 
370       plugin->AddRunNumber(137685); 
371       plugin->AddRunNumber(137639); 
372       plugin->AddRunNumber(137638);
373       plugin->AddRunNumber(137608); 
374       plugin->AddRunNumber(137595);
375       plugin->AddRunNumber(137549);
376       plugin->AddRunNumber(137546); 
377
378     }
379
380     else if(bunchN == 7){
381
382       plugin->AddRunNumber(137544); 
383       plugin->AddRunNumber(137541); 
384       plugin->AddRunNumber(137539); 
385       plugin->AddRunNumber(137531); 
386       plugin->AddRunNumber(137530); 
387       plugin->AddRunNumber(137443); 
388       plugin->AddRunNumber(137441); 
389       plugin->AddRunNumber(137440); 
390       plugin->AddRunNumber(137439); 
391       plugin->AddRunNumber(137434); 
392
393     }
394
395     else if(bunchN == 8){
396
397       plugin->AddRunNumber(137432); 
398       plugin->AddRunNumber(137431); 
399       plugin->AddRunNumber(137430); 
400       plugin->AddRunNumber(137366); 
401       plugin->AddRunNumber(137243); 
402       plugin->AddRunNumber(137236);
403       plugin->AddRunNumber(137235);
404       plugin->AddRunNumber(137232); 
405       plugin->AddRunNumber(137231); 
406       plugin->AddRunNumber(137162); 
407       plugin->AddRunNumber(137161);
408     }
409
410     else{
411
412       stderr<<"BUNCH NOT THERE"<<endl;
413       return NULL;
414
415     }
416
417     //plugin->AddRunList("139510, 139507, 139505, 139503, 139465, 139438, 139437, 139360, 139329, 139328, 139314, 139310, 139309, 139173, 139107, 139105, 139038, 139037, 139036, 139029, 139028, 138872, 138871, 138870, 138837, 138732, 138730, 138666, 138662, 138653, 138652, 138638, 138624, 138621, 138583, 138582, 138579, 138578, 138534, 138469, 138442, 138439, 138438, 138396, 138364, 138275, 138225, 138201, 138197, 138192, 138190, 137848, 137844, 137752, 137751, 137724, 137722, 137718, 137704, 137693, 137692, 137691, 137686, 137685, 137639, 137638, 137608, 137595, 137549, 137546, 137544, 137541, 137539, 137531, 137530, 137443, 137441, 137440, 137439, 137434, 137432, 137431, 137430, 137366, 137243, 137236, 137235, 137232, 137231, 137162, 137161");
418
419
420
421
422
423     plugin->SetNrunsPerMaster(1);
424     plugin->SetOutputToRunNo();
425     // comment out the next line when using the "terminate" option, unless
426     // you want separate merged files for each run
427     plugin->SetMergeViaJDL();
428
429     // Method 2: Declare existing data files (raw collections, xml collections, root file)
430     // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
431     // XML collections added via this method can be combined with the first method if
432     // the content is compatible (using or not tags)
433     //   plugin->AddDataFile("tag.xml");
434     //   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
435
436     // Define alien work directory where all files will be copied. Relative to alien $HOME.
437     plugin->SetGridWorkingDir(taskname);
438
439     // Declare alien output directory. Relative to working directory.
440     plugin->SetGridOutputDir("out"); // In this case will be $HOME/taskname/out
441
442    // Declare the analysis source files names separated by blancs. To be compiled runtime
443     // using ACLiC on the worker nodes.
444     plugin->SetAnalysisSource("AliBalance.cxx AliAnalysisTaskBF.cxx");
445
446     // Declare all libraries (other than the default ones for the framework. These will be
447     // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
448     //plugin->AddIncludePath("-I.");
449     //plugin->SetAdditionalLibs("libPWGCFebye.so");
450     plugin->SetAdditionalLibs("AliBalance.cxx AliBalance.h AliAnalysisTaskBF.cxx AliAnalysisTaskBF.h");
451
452      // Declare the output file names separated by blancs.
453     // (can be like: file.root or file.root@ALICE::Niham::File)
454     // To only save certain files, use SetDefaultOutputs(kFALSE), and then
455     // SetOutputFiles("list.root other.filename") to choose which files to save
456     plugin->SetDefaultOutputs();
457     //plugin->SetOutputFiles("list.root");
458
459     // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
460     plugin->SetAnalysisMacro(Form("%s.C",taskname));
461
462     // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
463     plugin->SetSplitMaxInputFileNumber(100);
464
465     // Optionally modify the executable name (default analysis.sh)
466     plugin->SetExecutable(Form("%s.sh",taskname));
467
468     // set number of test files to use in "test" mode
469     plugin->SetNtestFiles(1);
470
471     // Optionally resubmit threshold.
472     plugin->SetMasterResubmitThreshold(90);
473
474     // Optionally set time to live (default 30000 sec)
475     plugin->SetTTL(90000);
476
477     // Optionally set input format (default xml-single)
478     plugin->SetInputFormat("xml-single");
479
480     // Optionally modify the name of the generated JDL (default analysis.jdl)
481     plugin->SetJDLName(Form("%s.jdl",taskname));
482
483     // Optionally modify job price (default 1)
484     plugin->SetPrice(1);      
485
486     // Optionally modify split mode (default 'se')    
487     plugin->SetSplitMode("se");
488
489     //plugin->SetUseSubmitPolicy();
490     //plugin->SetKeepLogs();
491     
492     //----------------------------------------------------------
493     //---      PROOF MODE SPECIFIC SETTINGS         ------------
494     //---------------------------------------------------------- 
495     // Proof cluster
496     plugin->SetProofCluster(proofcluster);
497     // Dataset to be used   
498     plugin->SetProofDataSet(proofdataset);
499     // May need to reset proof. Supported modes: 0-no reset, 1-soft, 2-hard
500     plugin->SetProofReset(0);
501     // May limit number of workers
502     plugin->SetNproofWorkers(0);
503     // May limit the number of workers per slave
504     plugin->SetNproofWorkersPerSlave(1);   
505     // May use a specific version of root installed in proof
506     plugin->SetRootVersionForProof("current");
507     // May set the aliroot mode. Check http://aaf.cern.ch/node/83 
508     plugin->SetAliRootMode("default"); // Loads AF libs by default
509     // May request ClearPackages (individual ClearPackage not supported)
510     plugin->SetClearPackages(kFALSE);
511     // Plugin test mode works only providing a file containing test file locations, used in "local" mode also
512     plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
513     // Request connection to alien upon connection to grid
514     plugin->SetProofConnectGrid(kFALSE);
515
516     plugin->Print();
517
518     return plugin;
519 }
520