User Tools

Site Tools


start:davinciexample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start:davinciexample [2010/02/05 12:41] – looking at the output nchiapstart:davinciexample [2012/03/29 11:29] (current) – [Create Python Configuration] added links to particle table and loki references nchiap
Line 1: Line 1:
 ====== DaVinci Example ====== ====== DaVinci Example ======
  
-This example creates a simplified version of the algorithm described in [[https://twiki.cern.ch/twiki/bin/view/LHCb/DaVinciTutorial4 | DaVinciTutorial4]].+This example creates a simple selection for J/psi -> mu+ mu- using the Particle Selection Framework (i.e. CombineParticle). It is a simplified version of the algorithm described in [[https://twiki.cern.ch/twiki/bin/view/LHCb/DaVinciTutorial4 | DaVinciTutorial4]].
  
  
Line 58: Line 58:
 </code> </code>
  
-===== Prepare Data Files ===== +For more details about the names used in the DecayDescriptor, [[davinci:particletable | look at the ParticleTable]].  
-  * run the Bookkeeping-GUI +For a list of availbale funtors for CombinationCut and MotherCut, [[loki:lists | check the Loki references]].
-<code>lhcb_bkk</code> +
-  * select +
  
-<file>MC / MC09 / Beam5TeV-VeloClosed-MagDown-Nu1 / MC09-Sim03Reco02-withTruth / 24142000 / DST</file> +=====Running===== 
- +  * Set environment for Ganga
-  * double-click on **Nb of Files/Events** and select all files +
- +
-  * **if you want to run on the grid** +
-    * click "Save Files" +
- +
-  * **if you want to run locally** +
-    * click "Advanced Save" +
-    * give Filename, select PFN(s) and CERN +
-    * click "save" +
- +
- +
-===== Run ===== +
- +
-=== Running Locally==+
-<code> +
-SetupProject DaVinci +
-gaudirun.py myOptions.py myFiles.py +
-</code> +
- +
-===Running With Ganga=== +
-  * Set environment +
 <code>SetupProject Ganga</code> <code>SetupProject Ganga</code>
  
Line 98: Line 75:
 t = JobTemplate( application = DaVinci( )) t = JobTemplate( application = DaVinci( ))
 t.application.optsfile = File( "~/example/myOptions.py" ) t.application.optsfile = File( "~/example/myOptions.py" )
-t.application.optsfile[1:] = [File( "~/example/myFiles.py" )] +</code> 
-it is better to use inputdata + 
-# for this you have to reselect the files in the bookkeeping-GUI: +  * add input data 
-# t.inputdata = browseBK()+<code python> 
 +t.inputdata = browseBK() 
 +# select MC / MC09 / Beam5TeV-VeloClosed-MagDown-Nu1 / MC09-Sim03Reco02-withTruth / 24142000 / DST 
 +# you could instead use an python option file with the data locations  
 +# (see below on how to generate one) 
 +#t.application.optsfile.append(  File( "~/example/myOptions.py" )  ) 
 +# the Ganga-Manual marks this as depreciated 
 +</code> 
 + 
 +  * create a job and run it 
 +<code python>
 j = Job( t, backend = Interactive() ) j = Job( t, backend = Interactive() )
 j.submit() j.submit()
 </code> </code>
 +
 +
 +==== Running outside Ganga (locally)====
 +=== Prepare Data Files ===
 +  * run the Bookkeeping-GUI
 +<code>lhcb_bkk</code>
 +  * select 
 +
 +<file>MC / MC09 / Beam5TeV-VeloClosed-MagDown-Nu1 / MC09-Sim03Reco02-withTruth / 24142000 / DST</file>
 +
 +  * double-click on **Nb of Files/Events** and select all files
 +
 +  * click **Advanced Save**
 +  * give Filename (e.g. "myFiles.py"), select **PFN(s)** and **CERN**
 +  * click **save**
 +
 +=== Run ===
 +<code>
 +SetupProject DaVinci
 +gaudirun.py myOptions.py myFiles.py
 +</code>
 +
  
 ===== Looking at the output ===== ===== Looking at the output =====
start/davinciexample.1265370093.txt.gz · Last modified: by nchiap