TENDER becomes Tender
[u/mrichter/AliRoot.git] / PWGLF / totEt / macros / CreateAlienHandlerHadEt.C
1 AliAnalysisGrid* CreateAlienHandlerHadEt(Int_t dataset, Bool_t data, Int_t test, Int_t material, Bool_t altV0Scale = kFALSE, bool runCompiledVersion = kFALSE, int simflag = 0)
2 {
3   // Check if user has a valid token, otherwise make one. This has limitations.
4   // One can always follow the standard procedure of calling alien-token-init then
5   //   source /tmp/gclient_env_$UID in the current shell.
6   //if (!AliAnalysisGrid::CreateToken()) return NULL;
7   AliAnalysisAlien *plugin = new AliAnalysisAlien();
8
9   // Overwrite all generated files, datasets and output results from a previous session
10   plugin->SetOverwriteMode();
11   // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
12   if(test==1){
13     plugin->SetRunMode("test");  // VERY IMPORTANT - DECRIBED BELOW
14   }
15   else{
16     if(test==0){
17       plugin->SetRunMode("full");  // VERY IMPORTANT - DECRIBED BELOW
18     }
19     else{
20       plugin->SetRunMode("terminate");  // VERY IMPORTANT - DECRIBED BELOW
21     }
22   }
23   //needed for local testing?
24   //plugin->SetFileForTestMode("files.txt"); // file should contain path name to a local directory containg *ESDs.root etc
25   // Set versions of used packages 
26    plugin->SetAPIVersion("V1.1x");
27    plugin->SetROOTVersion("v5-34-08-6");
28    plugin->SetAliROOTVersion("vAN-20140624");
29   // Declare input data to be processed.
30
31    plugin->AddIncludePath("-I$ALICE_ROOT/PWGUD/base  -I$ALICE_ROOT/ANALYSIS -I$ALICE_ROOT/PWGPP -I$ALICE_ROOT/PWGPP/ITS");
32   // Method 1: Create automatically XML collections using alien 'find' command.
33   // Define production directory LFN
34   //   plugin->SetGridDataDir("/alice/sim/LHC10a18");
35   // Set data search pattern
36   //   plugin->SetDataPattern("*ESDs.root");  // simulated, tags not used
37   //   plugin->SetDataPattern("*ESDs/pass4/*ESDs.root"); // real data check reco pass and data base directory
38   //   plugin->SetRunPrefix("000");   // real data
39   //   plugin->SetDataPattern("*tag.root");  // Use ESD tags (same applies for AOD's)
40   // ...then add run numbers to be considered
41   //   plugin->AddRunNumber(125020);    // simulated
42   //   plugin->AddRunNumber(104065);  // real data
43
44   // Method 2: Declare existing data files (raw collections, xml collections, root file)
45   // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
46   // XML collections added via this method can be combined with the first method if
47   // the content is compatible (using or not tags)
48   //plugin->AddDataFile("tag.xml");
49   //   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
50    TString outputdir = "etPbPbSim";
51    if(data)outputdir = "etPbPbData";
52   if(dataset==20100){//PbPb 2.76 TeV
53     if(data){//185 jobs
54       cout<<"Running over data"<<endl;
55       plugin->SetGridDataDir("/alice/data/2010/LHC10h");//PbPb data
56       plugin->SetDataPattern("*ESDs/pass2/*ESDs.root");
57       plugin->SetRunPrefix("000");   // real data
58
59     }
60     else{
61       cout<<"Running over MC"<<endl;
62       if(material==0){
63           plugin->SetGridDataDir("/alice/sim/LHC11a10a_bis");
64         //plugin->SetGridDataDir("/alice/sim/LHC11a4_bis");//PbPb simulation
65       }
66       if(material==1){//7% more material
67         plugin->SetGridDataDir("/alice/sim/LHC10h9");//PbPb simulation
68       }
69       if(material==-1){//7% less material
70         plugin->SetGridDataDir("/alice/sim/LHC10h10");//PbPb simulation
71       }
72       if(material==10){//OK it's a cheat but this runs on DPM jet
73         plugin->SetGridDataDir("/alice/sim/LHC10h2");//PbPb simulation
74       }
75       if(material==11){//OK it's a cheat but this runs on AMPT
76         plugin->SetGridDataDir(" /alice/sim/LHC11a9a");//PbPb simulation
77         plugin->AddRunNumber(137366);
78       }
79       plugin->SetDataPattern("*ESDs.root");
80       //plugin->SetGridWorkingDir("etPbPbSim");
81     }
82     if(simflag==0){//not really using it as a simflag but that way I don't need a new argument...
83       plugin->AddRunNumber(139465);
84       outputdir += "139465";
85     }
86     if(simflag==1){//not really using it as a simflag but that way I don't need a new argument...
87       outputdir += "138442";
88       plugin->AddRunNumber(138442);
89     }
90     if(simflag==2){//not really using it as a simflag but that way I don't need a new argument...
91       outputdir += "138364";
92       plugin->AddRunNumber(138364);
93     }
94     if(simflag==3){//not really using it as a simflag but that way I don't need a new argument...
95       outputdir += "138396";
96       plugin->AddRunNumber(138396);
97     }
98     if(simflag==4){//not really using it as a simflag but that way I don't need a new argument...
99       outputdir += "137722";
100       plugin->AddRunNumber(137722);
101     }
102     if(simflag==5){//not really using it as a simflag but that way I don't need a new argument...
103       outputdir += "137366";
104       plugin->AddRunNumber(137366);
105     }
106     if(simflag==6){//not really using it as a simflag but that way I don't need a new argument...
107       outputdir += "137161";
108       plugin->AddRunNumber(137161);
109     }
110     cout<<"writing to "<<outputdir.Data()<<endl;
111   }
112   else{
113     if(dataset==2011){//PbPb 2.76 TeV
114       if(data){//185 jobs
115         cout<<"Running over data"<<endl;
116          plugin->SetGridDataDir("/alice/data/2011/LHC11h_2");//PbPb data
117          plugin->SetDataPattern("*ESDs/pass2/*ESDs.root");
118          plugin->SetRunPrefix("000");   // real data
119       }
120       else{
121         cout<<"Running over MC"<<endl;
122         if(simflag==0){//2011 production - 0-10%
123           cout<<"I am here setting grid data dir"<<endl;
124 //        outputDir = outputDir + "LHC13e1a";
125           plugin->SetGridDataDir("/alice/sim/2013/LHC13e1a");
126         }
127         if(simflag==1){//2011 production - 0-10%
128           cout<<"I am here setting grid data dir"<<endl;
129 //        outputDir = outputDir + "LHC13e1a";
130           plugin->SetGridDataDir("/alice/sim/2013/LHC13e1b");
131         }
132         if(simflag==2){//2011 production - 0-10%
133           cout<<"I am here setting grid data dir"<<endl;
134 //        outputDir = outputDir + "LHC13e1a";
135           plugin->SetGridDataDir("/alice/sim/2013/LHC13e1b");
136         }
137       }
138       plugin->AddRunNumber(168464);
139     }
140     if(dataset==2009){//pp 900 GeV
141       if(data){//only 233 jobs!
142         cout<<"Running over data"<<endl;
143         plugin->SetGridDataDir("/alice/data/2010/LHC10c");//PbPb data
144         //plugin->SetDataPattern("*ESDs/pass3/*ESDs.root");
145         plugin->SetDataPattern("*ESDs/pass3/*ESDs.root");
146         plugin->SetRunPrefix("000");   // real data
147       }
148       else{//sim over 1500 jobs, some get killed because it's above quota
149         cout<<"Running over MC"<<endl;
150         if(simflag==0){
151           if(material==0){
152             plugin->SetGridDataDir("/alice/sim/LHC11b1a");//PbPb simulation
153           }
154           if(material==1){//10% more material budget
155             plugin->SetGridDataDir("/alice/sim/LHC11b1b");//PbPb simulation
156           }
157           if(material==-1){//10% less material budget
158             plugin->SetGridDataDir("/alice/sim/LHC11b1c");//PbPb simulation
159           }
160         }
161         if(simflag==1)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h1a");//PYTHIA
162         if(simflag==2)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h1b");//PHOJET
163         if(simflag==3)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h1c");//PYTHIA Flat
164         plugin->SetDataPattern("*ESDs.root");
165       }
166       plugin->AddRunNumber(118506);
167 //       plugin->AddRunNumber(121040);
168 //       plugin->AddRunNumber(121039);
169 //       plugin->AddRunNumber(118561);
170 //       plugin->AddRunNumber(118560);
171 //       plugin->AddRunNumber(118558);
172 //       plugin->AddRunNumber(118557);
173 //       plugin->AddRunNumber(118556);
174 //       plugin->AddRunNumber(118518);
175 //       plugin->AddRunNumber(118512);
176 //       plugin->AddRunNumber(118507);
177 //       plugin->AddRunNumber(118506);
178 //if(data){
179 //      plugin->AddRunNumber(118504);
180 //      plugin->AddRunNumber(118503);
181 //    }
182     }
183   
184     if(dataset==20111){//pp 2.76 TeV 
185       if(data){//257 jobs
186         cout<<"Running over data"<<endl;
187         plugin->SetGridDataDir("/alice/data/2011/LHC11a");//
188         plugin->SetDataPattern("*ESDs/pass4_with_SDD/*ESDs.root");
189         plugin->SetRunPrefix("000");   // real data
190       }
191       else{//sim - 332 jobs
192         cout<<"Running over MC"<<endl;
193         if(simflag==0)  plugin->SetGridDataDir("/alice/sim/LHC11b10a");//
194         if(simflag==1)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h5a");//PYTHIA
195         if(simflag==2)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h5b");//PHOJET
196         if(simflag==3)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h5c");//PYTHIA Flat
197         plugin->SetDataPattern("*ESDs.root");
198       }
199 //       plugin->AddRunNumber(146860);
200 //       plugin->AddRunNumber(146859);
201 //       plugin->AddRunNumber(146856);
202 //       plugin->AddRunNumber(146824);
203 //       plugin->AddRunNumber(146817);
204 //       plugin->AddRunNumber(146806);
205 //       plugin->AddRunNumber(146805);
206 //       plugin->AddRunNumber(146804);
207 //       plugin->AddRunNumber(146803);
208 //       plugin->AddRunNumber(146802);
209 //       plugin->AddRunNumber(146801);
210 //       plugin->AddRunNumber(146748);
211 //       plugin->AddRunNumber(146747);
212 //       plugin->AddRunNumber(146746);
213
214   //     plugin->AddRunNumber(146860);
215 //       plugin->AddRunNumber(146859);
216 //       plugin->AddRunNumber(146858);
217 //       plugin->AddRunNumber(146857);
218 //       plugin->AddRunNumber(146856);
219       //        plugin->AddRunNumber(146824);
220       //        if(data){//these productions are not yet done for MC
221       //         plugin->AddRunNumber(146817);
222       //         plugin->AddRunNumber(146807);
223       //         plugin->AddRunNumber(146806);
224       //         plugin->AddRunNumber(146805);
225       //         plugin->AddRunNumber(146804);
226       //         plugin->AddRunNumber(146803);
227       //         plugin->AddRunNumber(146802);
228       //        }
229       plugin->AddRunNumber(146805);
230
231     }
232     if(dataset==2010){//pp 7 TeV
233       if(data){//data - 569 jobs
234         cout<<"Running over 7 TeV data"<<endl;
235         plugin->SetGridDataDir("/alice/data/2010/LHC10e");//PbPb data
236         plugin->SetDataPattern("*ESDs/pass2/*ESDs.root");
237         cout<<"Setting run prefix to be 000"<<endl;
238         plugin->SetRunPrefix("000");   // real data
239       }
240       else{//sim- 346 jobs
241         if(simflag==0)  plugin->SetGridDataDir("/alice/sim/LHC10e20");//
242         if(simflag==1)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h4a");//PYTHIA
243         if(simflag==2)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h4b");//PHOJET
244         if(simflag==3)  plugin->SetGridDataDir("/alice/sim/2011/LHC11h4c");//PYTHIA Flat
245         plugin->SetDataPattern("*ESDs.root");
246       }
247       plugin->AddRunNumber("130795");
248 //      plugin->AddRunNumber("130840");
249 //      plugin->AddRunNumber("130834");
250 //      plugin->AddRunNumber("130833");
251 //      plugin->AddRunNumber("130831");
252 //      plugin->AddRunNumber("130804");
253 //      plugin->AddRunNumber("130803");
254 //      plugin->AddRunNumber("130802");
255 //      plugin->AddRunNumber("130799");
256 //      plugin->AddRunNumber("130798");
257 //      plugin->AddRunNumber("130795");
258     }
259
260     if(dataset==2012){//pp 8 TeV
261       if(data){//data - 569 jobs
262         cout<<"Running over 8 TeV data"<<endl;
263         plugin->SetGridDataDir("/alice/data/2012/LHC12b");//PbPb data
264         plugin->SetDataPattern("*ESDs/pass1/*ESDs.root");
265         cout<<"Setting run prefix to be 000"<<endl;
266         plugin->SetRunPrefix("000");   // real data
267       }
268       else{//sim- 346 jobs
269         plugin->SetGridDataDir("/alice/sim/2012/LHC12c1b");//
270       }
271       //plugin->AddRunNumber("177799");
272       plugin->AddRunNumber("178030");
273     }
274     if(dataset==2013){//pPb 
275       if(data){//data - 569 jobs
276         cout<<"Running over pPb data"<<endl;
277         plugin->SetGridDataDir("/alice/data/2013/LHC13b");//PbPb data
278         plugin->SetDataPattern("*ESDs/pass3/*ESDs.root");
279         cout<<"Setting run prefix to be 000"<<endl;
280         plugin->SetRunPrefix("000");   // real data
281       }
282       else{//sim- 346 jobs
283         plugin->SetGridDataDir("/alice/sim/2013/LHC13b3");//
284       }
285       plugin->AddRunNumber("195483");
286     }
287   }
288
289
290   if(dataset==20100){//PbPb 2.76 TeV
291     if(data){
292       //plugin->SetGridWorkingDir("etPbPbData");
293       plugin->SetGridWorkingDir(outputdir.Data());
294     }
295     else{
296       if(material==0){plugin->SetGridWorkingDir(outputdir.Data());}
297       if(material==-1) plugin->SetGridWorkingDir("etPbPbSimMatBudLow");
298       if(material==1) plugin->SetGridWorkingDir("etPbPbSimMatBudHigh");
299       if(material==10)  plugin->SetGridWorkingDir("etPbPbSimDPMJET");
300        if(material==11)  plugin->SetGridWorkingDir("etPbPbSimAMPT");
301     }
302   }
303   else{
304     if(dataset==2011){//PbPb 2.76 TeV
305       if(data){
306         plugin->SetGridWorkingDir("etPbPbData2011");
307       }
308       else{
309         if(simflag==0){plugin->SetGridWorkingDir("etPbPbSim2011LHC13e1a");}
310         if(simflag==1){plugin->SetGridWorkingDir("etPbPbSim2011LHC13e1b");}
311         if(simflag==2){plugin->SetGridWorkingDir("etPbPbSim2011LHC13e1c");}
312       }
313     }
314     if(dataset==2009){//pp 900 GeV
315       if(data){
316         plugin->SetGridWorkingDir("etpp900GeVData");
317       }
318       else{
319         if(simflag==0){
320           if(material==0) plugin->SetGridWorkingDir("etpp900GeVSim");
321           if(material==-1) plugin->SetGridWorkingDir("etpp900GeVSimMatBudLow");
322           if(material==1) plugin->SetGridWorkingDir("etpp900GeVSimMatBudHigh");
323         }
324         if(simflag==1)  plugin->SetGridWorkingDir("etpp900GeVSimPYTHIA");//PYTHIA
325         if(simflag==2)  plugin->SetGridWorkingDir("etpp900GeVSimPHOJET");//PHOJET
326         if(simflag==3)  plugin->SetGridWorkingDir("etpp900GeVSimPYTHIAFLAT");//PYTHIA Flat
327       }
328     }
329     if(dataset==20111){//pp 2.76 TeV
330       if(data){
331         //plugin->SetGridWorkingDir("etpp276TeVData");
332       }
333       else{
334         if(altV0Scale) plugin->SetGridWorkingDir("etpp276TeVSimAlt");
335         else{
336           // plugin->SetGridWorkingDir("etpp276TeVSim");
337           
338           if(simflag==0)        plugin->SetGridWorkingDir("etpp276TeVSim");//
339           if(simflag==1)        plugin->SetGridWorkingDir("etpp276TeVSimPYTHIA");//PYTHIA
340           if(simflag==2)        plugin->SetGridWorkingDir("etpp276TeVSimPHOJET");//PHOJET
341           if(simflag==3)        plugin->SetGridWorkingDir("etpp276TeVSimPYTHIAFLAT");//PYTHIA Flat
342         }
343       }
344     }
345     if(dataset==2010){//pp 7 TeV
346       if(data){
347         plugin->SetGridWorkingDir("etpp7TeVData");
348       }
349       else{
350         if(simflag==0)  plugin->SetGridWorkingDir("etpp7TeVSim");//
351         if(simflag==1)  plugin->SetGridWorkingDir("etpp7TeVSimPYTHIA");//PYTHIA
352         if(simflag==2)  plugin->SetGridWorkingDir("etpp7TeVSimPHOJET");//PHOJET
353         if(simflag==3)  plugin->SetGridWorkingDir("etpp7TeVSimPYTHIAFLAT");//PYTHIA Flat
354       }
355     }
356     if(dataset==2012){//pp 8 TeV
357       if(data){
358         plugin->SetGridWorkingDir("etpp8TeVData");
359       }
360       else{
361         plugin->SetGridWorkingDir("etpp8TeVSim");
362       }
363     }
364     if(dataset==2013){//pPb
365       if(data){
366         plugin->SetGridWorkingDir("etpPb5TeVData");
367       }
368       else{
369         plugin->SetGridWorkingDir("etpPb5TeVSim");
370       }
371     }
372   }
373
374     cout<<"writing to "<<outputdir.Data()<<endl;
375
376   // Define alien work directory where all files will be copied. Relative to alien $HOME.
377   //plugin->SetGridWorkingDir("et");
378   // Declare alien output directory. Relative to working directory.
379   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
380   // Declare the analysis source files names separated by blancs. To be compiled runtime IN THE SAME ORDER THEY ARE LISTED
381   // using ACLiC on the worker nodes.
382   //plugin->SetAnalysisSource("AliAnalysisTaskHadEt.cxx");
383   //plugin->SetAnalysisSource("AliAnalysisEt.cxx AliAnalysisEtMonteCarlo.cxx AliAnalysisEtMonteCarloPhos.cxx AliAnalysisEtReconstructed.cxx AliAnalysisEtReconstructedPhos.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisTaskTotEt.cxx");
384   //TString sourcefiles = "AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskHadEt.cxx";
385   //plugin->SetAnalysisSource(sourcefiles.Data());
386   if(!runCompiledVersion){
387     plugin->SetAnalysisSource("AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.cxx AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisTaskHadEt.cxx");
388   }
389    
390   //cout<<"Setting source files "<<sourcefiles<<endl;
391   // Declare all libraries (other than the default ones for the framework. These will be
392   // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
393   //TString additionallibs = "AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx  AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h  AliAnalysisEtSelectionContainer.h AliAnalysisEtSelectionHandler.h AliAnalysisTaskTransverseEnergy.h corrections.root ConfigHadEtAnalysis.C ConfigHadEtMonteCarlo.C ConfigHadEtReconstructed.C physicsSelections.root";
394   //TString additionallibs = "AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx  AliAnalysisEtSelectionContainer.cxx AliAnalysisEtSelectionHandler.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h  AliAnalysisEtSelectionContainer.h AliAnalysisEtSelectionHandler.h AliAnalysisTaskTransverseEnergy.h physicsSelections.root ConfigHadEtMonteCarlo.C  ConfigHadEtReconstructed.C corrections.root";
395   //plugin->SetAdditionalLibs(additionallibs.Data());
396   if(!runCompiledVersion){//
397     plugin->SetAdditionalLibs( "libPWGUDbase.so AliAnalysisEtCuts.h AliAnalysisEtCuts.cxx AliAnalysisHadEtCorrections.h AliAnalysisHadEtCorrections.cxx AliAnalysisTaskTransverseEnergy.cxx AliAnalysisEtCommon.h AliAnalysisEtCommon.cxx AliAnalysisHadEt.cxx AliAnalysisHadEtMonteCarlo.cxx AliAnalysisHadEtReconstructed.cxx AliAnalysisTaskHadEt.cxx AliAnalysisHadEt.h AliAnalysisHadEtMonteCarlo.h AliAnalysisHadEtReconstructed.h AliAnalysisTaskHadEt.h AliAnalysisTaskTransverseEnergy.h ConfigHadEtMonteCarlo.C  ConfigHadEtReconstructed.C corrections.root");
398   }
399   else{
400     plugin->SetAdditionalLibs( "ConfigHadEtMonteCarlo.C  ConfigHadEtReconstructed.C corrections.root libPWGUDbase.so libPWGLFtotEt.so");
401   }
402   // No need for output file names. Procedure is automatic. <-- not true
403   //plugin->SetDefaultOutputs(kFALSE);
404   //plugin->SetOutputFiles("Et.ESD.new.sim.root");
405   // No need define the files to be archived. Note that this is handled automatically by the plugin.
406   //   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
407   // Set a name for the generated analysis macro (default MyAnalysis.C) Make this unique !
408   plugin->SetAnalysisMacro("ChristinesEtAnalysis.C");
409   // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore). The optimum for an analysis
410   // is correlated with the run time - count few hours TTL per job, not minutes !
411   plugin->SetSplitMaxInputFileNumber(50);
412   if(dataset==2013){//pPb 
413     plugin->SetSplitMaxInputFileNumber(20);
414     }
415   // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
416   //plugin->SetMaxInitFailed(5);
417   // Optionally resubmit threshold.
418   //plugin->SetMasterResubmitThreshold(90);
419   // Optionally set time to live (default 30000 sec)
420   plugin->SetTTL(20000);
421   // Optionally set input format (default xml-single)
422   plugin->SetInputFormat("xml-single");
423   // Optionally modify the name of the generated JDL (default analysis.jdl)
424   plugin->SetJDLName("TaskEt.jdl");
425   // Optionally modify job price (default 1)
426   plugin->SetPrice(1); 
427   // Optionally modify split mode (default 'se')    
428   plugin->SetSplitMode("se");
429   plugin->SetTerminateFiles("event_stat.root") ;
430   plugin->SetKeepLogs();
431   plugin->SetMergeViaJDL();
432   return plugin;
433