This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| start:davinciexample [2010/02/05 12:29] – nchiap | start: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:// | + | This example creates |
| Line 58: | Line 58: | ||
| </ | </ | ||
| - | ===== Prepare Data Files ===== | + | For more details about the names used in the DecayDescriptor, |
| - | * run the Bookkeeping-GUI | + | For a list of availbale funtors for CombinationCut and MotherCut, [[loki: |
| - | < | + | |
| - | * select | + | |
| - | < | + | =====Running===== |
| - | + | * Set environment | |
| - | * double-click on **Nb of Files/ | + | |
| - | + | ||
| - | * **if you want to run on the grid** | + | |
| - | * click "Save Files" | + | |
| - | + | ||
| - | * **if you want to run locally** | + | |
| - | * click " | + | |
| - | * give Filename, select PFN(s) and CERN | + | |
| - | * click " | + | |
| - | + | ||
| - | + | ||
| - | ===== Run ===== | + | |
| - | + | ||
| - | === Running | + | |
| - | < | + | |
| - | SetupProject DaVinci | + | |
| - | gaudirun.py myOptions.py myFiles.py | + | |
| - | </ | + | |
| - | + | ||
| - | ===Running With Ganga=== | + | |
| - | * Set environment | + | |
| < | < | ||
| Line 98: | Line 75: | ||
| t = JobTemplate( application = DaVinci( )) | t = JobTemplate( application = DaVinci( )) | ||
| t.application.optsfile = File( " | t.application.optsfile = File( " | ||
| - | t.application.optsfile[1:] = [File( " | + | </ |
| - | # 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( | ||
| + | # the Ganga-Manual marks this as depreciated | ||
| + | </ | ||
| + | |||
| + | * create a job and run it | ||
| + | <code python> | ||
| j = Job( t, backend = Interactive() ) | j = Job( t, backend = Interactive() ) | ||
| j.submit() | j.submit() | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ==== Running outside Ganga (locally)==== | ||
| + | === Prepare Data Files === | ||
| + | * run the Bookkeeping-GUI | ||
| + | < | ||
| + | * select | ||
| + | |||
| + | < | ||
| + | |||
| + | * double-click on **Nb of Files/ | ||
| + | |||
| + | * click **Advanced Save** | ||
| + | * give Filename (e.g. " | ||
| + | * click **save** | ||
| + | |||
| + | === Run === | ||
| + | < | ||
| + | SetupProject DaVinci | ||
| + | gaudirun.py myOptions.py myFiles.py | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Looking at the output ===== | ||
| + | The Algorithm creates a file called histograms.root. | ||
| + | * If run with gaudirun.py it should be in the working directory. | ||
| + | * If run with ganga it can be found at **~/ | ||
| + | Start root and have a look at the histograms. | ||
| ===== More Info ===== | ===== More Info ===== | ||