Difference: DaVinciTutorial0p5 (30 vs. 31)

Revision 312012-12-18 - JackWimberley

Line: 1 to 1
 
META TOPICPARENT name="DaVinciTutorial"

DaVinci Tutorial 0.5

Line: 22 to 22
 
  1. Start an interactive ganga session as instructed in DaVinciTutorial0
  2. At the ganga prompt type:
Changed:
<
<
%SYNTAX{ syntax="python"}% t = JobTemplate( name="DVTutorials", application = DaVinci( version = "v33r7" )) # t.application.setupProjectOptions = '--nightly lhcb1' # uncomment this if DaVinci version is HEAD t.application.getpack( "Tutorial/Analysis v10r6" ) t.application.optsfile = "~/cmtuser/DaVinci_v33r7/Tutorial/Analysis/options/myOptions.py" t.application.make()
>
>
%SYNTAX{ syntax="python"}% t = JobTemplate( name="DVTutorials", application = DaVinci( version = "v33r7" )) # t.application.setupProjectOptions = '--nightly lhcb1' # uncomment this if DaVinci version is HEAD t.application.getpack( "Tutorial/Analysis v10r6" ) t.application.optsfile = "~/cmtuser/DaVinci_v33r7/Tutorial/Analysis/options/myOptions.py" t.application.make()
 %ENDSYNTAX%
Added:
>
>
Just as jobs is a list of previously run ganga jobs, templates is a list of previously created instantiations of the JobTemplate class. This template can be used for all the Tutorial analyses, and if you ever restart ganga you can just copy it off the templates list.
 

- Start to write the options

  1. First make sure you have the LHCb flavour of emacs. If not do what's described here.
  2. Open the main options file (from ganga type:)
    <!-- SyntaxHighlightingPlugin -->
!emacs $t.application.optsfile[0].name &
<!-- end SyntaxHighlightingPlugin -->
  1. Write in the options file. %SYNTAX{ syntax="python"}%from Gaudi.Configuration import *
Changed:
<
<
from Configurables import DaVinci DaVinci()
>
>
from Configurables import DaVinci DaVinci()
 %ENDSYNTAX%

- Configuring DaVinci()

Line: 38 to 45
  Remember from the tutorial that this object is not the same as the Ganga GPI object called "DaVinci". You need to add these lines to your options file, not paste them into the command line, they are used to stter the actual Gaudi, not define some parameter of the ganga job.
Changed:
<
<
%SYNTAX{ syntax="python"}%DaVinci().HistogramFile = "DVHistos.root" # Histogram file DaVinci().EvtMax = 1000 # Number of events DaVinci().DataType = "2012" # Default anyway DaVinci().TupleFile = "DVnTuples.root" # A file to store nTuples, such as the Lumi ntuple DaVinci().Lumi = True # integrate the luminosity FSRs and print/store the result
>
>
%SYNTAX{ syntax="python"}%DaVinci().HistogramFile = "DVHistos.root" # Histogram file DaVinci().EvtMax = 1000 # Number of events DaVinci().DataType = "2012" # Default anyway DaVinci().TupleFile = "DVnTuples.root" # A file to store nTuples, such as the Lumi ntuple DaVinci().Lumi = True # integrate the luminosity FSRs and print/store the result
 %ENDSYNTAX%

Hint: if you have closed the file accidentally you can reopen with:

Line: 74 to 85
 
  • These are stored in a database, which is updated regularly with new alignment conditions
  • It is recommended, though, that you always use the same tags as were used to create the file (unless there was some known bug)
  • Currently the default DaVinci tags for 2012 data will work for you, these should be:%SYNTAX{ syntax="python"}%
Changed:
<
<
DaVinci().DDDBtag="dddb-20120831" DaVinci().CondDBtag="cond-20120831"
>
>
DaVinci().DDDBtag="dddb-20120831" DaVinci().CondDBtag="cond-20120831"
 %ENDSYNTAX%
  • You can find the correct database tags from the book-keeping, by clicking "more information" when you get to the leaf with the files actually in it.
  • If you use directly the dirac lhcb_bkk command (in a different window) it will save a file in which the database tags should be listed.
Line: 82 to 94
 

- Submit

Changed:
<
<
<!-- SyntaxHighlightingPlugin -->
j = Job(t) j.submit()
<!-- end SyntaxHighlightingPlugin -->
>
>
<!-- SyntaxHighlightingPlugin -->
j = Job(t)
j.submit()
<!-- end SyntaxHighlightingPlugin -->
 

- Did it work?

Line: 91 to 104
 

- Try Dirac

  • If you're brave, and if the local test worked, try submitting the job to the grid! %SYNTAX{ syntax="python"}%
Changed:
<
<
j=j.copy() j.backend=Dirac() j.submit()
>
>
j=j.copy() j.backend=Dirac() j.submit()
 %ENDSYNTAX%

- Understanding the DaVinci Configurable

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback