Difference between revisions of "MCatNLO Step 3"

From Atlas Wiki
Jump to navigation Jump to search
Line 77: Line 77:
  
 
:'''3) Get the script and taylor it to your needs'''
 
:'''3) Get the script and taylor it to your needs'''
 +
 +
The last step is to get the script and start the jobs. For each job it will:
 +
 +
::o create a directory called Job<job#>
 +
:::o create two unique input files
 +
:::o copy all otehr nexessary files here and start the job
 +
:::o copy output files (CBNT,POOL and Logfiles) to an output directory
 +
::o remove directory Job<job#>
 +
 +
: First get the script itself
 
<font color=red>  
 
<font color=red>  
 
<pre>
 
<pre>
Line 84: Line 94:
 
</font>
 
</font>
  
:In the script we need to define a few variables of which the input and output directories are most important.
+
:In the script you need to define the variables related to the input and output directories:
  
 
<font color=blue size="-1">  
 
<font color=blue size="-1">  
Line 91: Line 101:
 
output_dir          = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_OUTPUT/"
 
output_dir          = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_OUTPUT/"
 
steering_files_dir  = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_BASICS/"
 
steering_files_dir  = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_BASICS/"
 +
</pre>
 +
</font>
 +
 +
:There are however also parameters related to the number of events, the number of jobs etc etc.
  
 +
<font color=blue size="-1">
 +
<pre>
 
Nevents            =  12500
 
Nevents            =  12500
 
Nevents_joboptions  =      1
 
Nevents_joboptions  =      1
Line 101: Line 117:
  
 
:<font color=red><b>Important:</b></font>
 
:<font color=red><b>Important:</b></font>
:The variable called Nevents is linked to the number of events that are in the <>.events files. Make sure therefore that this number is the same as in the header of the <>.events file.
+
:The variable called Nevents is linked to the number of events that are in the <>.events files. Make sure therefore that this number is the same as in the header of the <>.events file. The variable Nevents_joboptions controls the number of events that are produced in the
  
 
:'''4)Run the script'''
 
:'''4)Run the script'''
  
When running the script a directory called Job1 filled with the files from the 'basic' directory and changed so that the variables are unique. The output Ntuple is stored in the output directory.
+
:Once the number of events and the number of jobs are defined start the run:
 +
 
 +
<font color=red>
 +
<pre>
 +
./ShipOff_MyMCatNLO_Step3.py
 +
</pre>
 +
</font>
 +
 
 +
:Once you get it running for a single job, set the parameter f_Logfile to 1 and produce many files.
 +
 
 +
You are finished.
 +
 
 +
To POOL files you have produced can then be transformed to AOD after full reconstruction or Atlfast.

Revision as of 13:19, 28 April 2005

On this page we will use the <>.event files that were produced by MCatNLO (see step 2) as input to Herwig. Using the Athena program we will use Herwig to have the top quarks decay and finally we will produce a combined ntuple (CBNT) and Pool file as was done for Rome.

1) Create a few directories
Go again to your generation area where you have produced your <>.event-files and create two new directories. One where you will store the output files (CBNT and POOL files) and one where you will put the necessary files (basic joboptions file for example) to start the athena job:

cd /project/atlas/users/ivov/MyMCatNLO/
mkdir MyMCatNLO_BASICS
mkdir MyMCatNLO_OUTPUT
mkdir MyMCatNLO_OUTPUT/InputAndLogFiles

2) Get necessary files required for Athena running
Since we have used MCatNLO to produce the ttbar momenta, we will have to signal to Herwig that it only has to decay the top quarks and must take the top-momenta from your external <>.event-file. When using Athena, this is done using a joboptions file.
Note: In addition a file that is called inparmMcAtNlo.dat is expected in your run directory that provides the location of the <>.event file and some additional input variables related to the generated samnple in MCatNLO.
(A) First get some Athena python-files in your run directory:

cd MyMCatNLO_BASICS
get_files PDGTABLE.MeV
get_files PartPropSvc.py

(B) Get the two basic input files that are job-dependent:
For each job, the script (presented in step 4) will take the two following basic-files and add the job-dependent quantities to produce a unique joboptions file per athena job.
(B1) Get the two basic input files that are job-dependent:
The first file is the joboptions file:

cp /afs/cern.ch/user/i/ivo/public/MCatNLO_scripts/joboptions_MyMCatNLO_Step3.py.BASIC .


The lines that will be changed by the script are related to the number of events, the random number seeds for the generators and the output files.

theApp.EvtMax = XNEVENTSX
AtRndmGenSvc.Seeds = ["JIMMY  XRNDJIMMY0X XRNDJIMMY1X", "JIMMY_INIT  XRNDJIMMY2X XRNDJIMMY3X",
                      "TAUOLA XRNDTAUOLA0X XRNDTAUOLA1X", "TAUOLA_INIT XRNDTAUOLA2X XRNDTAUOLA3X", 
                      "PHOTOS XRNDPHOTOS0X XRNDPHOTOS1X", "PHOTOS_INIT XRNDPHOTOS2X XRNDPHOTOS3X"]
NTupleSvc.Output     = [ "FILE1 DATAFILE='./XOutputDirCBNTX/MCatNLO.CBNT.JobXJOBNUMBERX.root' OPT='NEW'" ]
Stream1.OutputFile = "./XOutputDirPOOLX/MCatNLO.POOL.JobXJOBNUMBERX.root"

(B2) MCatNLO parameter file
The second file is a file with some McatNLO settings. Also copy this file to the basics directory.

cp /afs/cern.ch/user/i/ivo/public/MCatNLO_scripts/inparmMcAtNlo.dat.BASIC .

The lines that will be changed by the script are related to the number of events, the random number seeds for the generators and the output files.

 './XINPUTDIRX/XINPUTNAMEX'     ! event file
  XNEVENTSX                     ! number of events


3) Get the script and taylor it to your needs

The last step is to get the script and start the jobs. For each job it will:

o create a directory called Job<job#>
o create two unique input files
o copy all otehr nexessary files here and start the job
o copy output files (CBNT,POOL and Logfiles) to an output directory
o remove directory Job<job#>
First get the script itself

cd /project/atlas/users/ivov/MyMCatNLO/
cp /afs/cern.ch/users/i/ivo/public/MCatNLO_scripts/ShipOff_MyMCatNLO_Step3.py .

In the script you need to define the variables related to the input and output directories:

input_dir           = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_MATRIXELEMENT/"
output_dir          = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_OUTPUT/"
steering_files_dir  = "/project/atlas/users/ivov/MyMCatNLO/MyMCatNLO_BASICS/"

There are however also parameters related to the number of events, the number of jobs etc etc.

Nevents             =   12500
Nevents_joboptions  =       1
Njobs               =       1
f_LogFile           =       0


Important:
The variable called Nevents is linked to the number of events that are in the <>.events files. Make sure therefore that this number is the same as in the header of the <>.events file. The variable Nevents_joboptions controls the number of events that are produced in the
4)Run the script
Once the number of events and the number of jobs are defined start the run:

./ShipOff_MyMCatNLO_Step3.py

Once you get it running for a single job, set the parameter f_Logfile to 1 and produce many files.

You are finished.

To POOL files you have produced can then be transformed to AOD after full reconstruction or Atlfast.