Difference between revisions of "Produce and read microDSTs using the Grid"

From LHCb Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
== Producing microDSTs standalone ==
 
== Producing microDSTs standalone ==
  
''' Getting the relevant packages '''
+
''' Getting the relevant packages and setting the environment'''
  
 
<pre>
 
<pre>
Line 31: Line 31:
 
</pre>
 
</pre>
  
You should now see a .dst file in this directory which has just been created. For this standalone production of microDSTs take care that the following lines in the file ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/options/TestMicroDSTMake.py:
+
You should now see a .dst file in this directory which has just been created. For this standalone production of microDSTs take care that the following lines are set properly in the file ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/options/TestMicroDSTMake.py:
  
 
<pre>
 
<pre>
Line 102: Line 102:
 
</pre>
 
</pre>
  
Now the MicroDSTStream does not go to your outputsandbox, but to 'dataoutput' which is the Grid SE (Storage Element), so in case of backend.Dirac() it is
+
the MicroDSTStream does not go to your outputsandbox, but to 'dataoutput' which is the Grid SE (Storage Element), so in case of backend.Dirac() it is
  
 
<pre>
 
<pre>
/castor/cern.ch/grid/lhcb/user/[first letter of username]/[username]
+
/castor/cern.ch/grid/lhcb/user/[first letter of username]/[username]/[first four digits of jobID]/[jobID]
 
</pre>
 
</pre>
  
Line 111: Line 111:
  
 
<pre>
 
<pre>
/castor/cern.ch/user/[first letter of username]/[username]
+
/castor/cern.ch/user/[first letter of username]/[username]/[ganga jobnumber]/outputdata
 
</pre>
 
</pre>
  
????FIND OUT!!!!
+
You find the jobID in the following way: In Ganga do
 +
 
 +
<pre>
 +
jobs([gangajobnr]).backend.id
 +
</pre>
 +
 
 +
or in case you splitted the job in subjobs:
 +
 
 +
<pre>
 +
jobs("[gangajobnr.subjobnumber]").backend.id
 +
</pre>
  
 
== Copying microDSTs from Grid to Sara ==
 
== Copying microDSTs from Grid to Sara ==

Revision as of 14:51, 16 March 2009

Producing microDSTs standalone

Getting the relevant packages and setting the environment

SetupProject DaVinci v22r0p2 --build-env
SetupProject DaVinci v22r0p2

getpack Phys/DaVinci v22r0p2
getpack PhysSel/Ccbar
getpack Ex/MicroDSTExample

cd ${User_release_area}/DaVinci_v22r0p2/Phys/DaVinci_v22r0p2/Phys/DaVinci/cmt
gmake

cd ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/cmt
gmake

cd ${User_release_area}/DaVinci_v22r0p2/PhysSel/Ccbar/cmt
gmake

Making the microDST

Do

cd ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/job
gaudirun.py ../options/TestMicroDSTMake.py
ls -ltr

You should now see a .dst file in this directory which has just been created. For this standalone production of microDSTs take care that the following lines are set properly in the file ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/options/TestMicroDSTMake.py:

#importOptions( "$MICRODSTEXAMPLEROOT/options/JpsiPhiDataLFN.py")                                                                                            
importOptions( "$MICRODSTEXAMPLEROOT/options/JpsiPhiDataPFN.py")

This takes care of using the PFN (physical file name) this time instead of the LFN (logical file name), which we will use later working with the Grid.

Producing microDSTs on the Grid

Become a gRidder

First obtain a Grid Certificate from the Dutch Grid CA.

When you've done this, become a member of the LHCb VO by following this link.

To use the Grid from lxplus you need to copy your certificate to lxplus. You do this by copying the entire .globus directory to your home on lxplus.

Configure Ganga

To setup Ganga do

GangaEnv

Now we still have to configure the file ${User_release_area}/DaVinci_v22r0p2/Ex/MicroDSTExample/job/MicroDST_Ganga.py

First set the correct DaVinci version in this line:

dv = DaVinci( version = 'v22r0p2' )

Now choose the desired backend. To run jobs on the Grid uncomment

#j.backend    = Dirac()  

When all options are set correctly, submit the jobs:

WHAT ABOUT THE LFN/PFN issue at this point?

ganga MicroDST_Ganga.py

This is where you will be asked for your Grid Password. If you work on a 64-bit machine (which you do when logged in on lxplus) you get an error message saying that only slc4_ia32_gcc34 is allowed on the Grid. So you should type

setenv CMTCONFIG slc4_ia32_gcc34

Now the jobs will be submitted. For some general Ganga commands take a look here.

Now the output of these jobs (in this case the microDSTs) will go to your ~/gangadir. But if you are generating a lot of possibly large files, it is more convenient to let Ganga send these files somewhere else.

If in your ~/.gangarc file you change the following line

outputsandbox_types = ['NTupleSvc', 'HistogramPersistencySvc', 'MicroDSTStream\']

into this one

outputsandbox_types = []

the MicroDSTStream does not go to your outputsandbox, but to 'dataoutput' which is the Grid SE (Storage Element), so in case of backend.Dirac() it is

/castor/cern.ch/grid/lhcb/user/[first letter of username]/[username]/[first four digits of jobID]/[jobID]

While if you chose backend.Local() then 'dataoutput' is

/castor/cern.ch/user/[first letter of username]/[username]/[ganga jobnumber]/outputdata

You find the jobID in the following way: In Ganga do

jobs([gangajobnr]).backend.id

or in case you splitted the job in subjobs:

jobs("[gangajobnr.subjobnumber]").backend.id

Copying microDSTs from Grid to Sara

Stageing the Sara microDSTs on Stoomboot

Reading microDSTs

microDSTReadingExample.py

of maak wat nieuws in Bender

Analysis

P2VV

getpack PhysFit/P2VV getpack PhysFit/P2VVPython

and use the RooFit based fit package