This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| start:davinciexample [2010/02/05 09:08] – layout improvements 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, |
| + | For a list of availbale funtors for CombinationCut and MotherCut, [[loki: | ||
| + | |||
| + | =====Running===== | ||
| + | * Set environment for Ganga | ||
| + | < | ||
| + | |||
| + | * maybe you need to create a new config file | ||
| + | < | ||
| + | |||
| + | * start | ||
| + | < | ||
| + | |||
| + | * prepare job | ||
| + | <code python> | ||
| + | t = JobTemplate( application = DaVinci( )) | ||
| + | t.application.optsfile = File( " | ||
| + | </ | ||
| + | |||
| + | * add input data | ||
| + | <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) | ||
| + | # | ||
| + | # the Ganga-Manual marks this as depreciated | ||
| + | </ | ||
| + | |||
| + | * create a job and run it | ||
| + | <code python> | ||
| + | j = Job( t, backend = Interactive() ) | ||
| + | j.submit() | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Running outside Ganga (locally)==== | ||
| + | === Prepare Data Files === | ||
| * run the Bookkeeping-GUI | * run the Bookkeeping-GUI | ||
| < | < | ||
| Line 67: | Line 104: | ||
| * double-click on **Nb of Files/ | * double-click on **Nb of Files/ | ||
| - | * **if you want to run on the grid** | + | * click **Advanced Save** |
| - | * click "Save Files" | + | * give Filename (e.g. "myFiles.py"), select **PFN(s)** and **CERN** |
| + | * click **save** | ||
| - | * **if you want to run locally** | + | === Run === |
| - | * click " | + | |
| - | * give Filename, select PFN(s) and CERN | + | |
| - | * click " | + | |
| - | + | ||
| - | + | ||
| - | ===== Run ===== | + | |
| - | + | ||
| - | === Running Locally=== | + | |
| < | < | ||
| SetupProject DaVinci | SetupProject DaVinci | ||
| Line 84: | Line 114: | ||
| </ | </ | ||
| - | ===Running With Ganga=== | ||
| - | * Set environment | ||
| - | < | ||
| - | * maybe you need to create | + | ===== Looking at the output ===== |
| - | < | + | The Algorithm creates |
| + | * 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. | ||
| - | * start | + | ===== More Info ===== |
| - | < | + | You can find more info at following locations: |
| - | + | * [[ganga: | |
| - | * prepare job | + | * [[davinci: |
| - | <code python> | + | |
| - | t = JobTemplate( application | + | |
| - | t.application.optsfile | + | |
| - | t.application.extraopts | + | |
| - | # or you select the files in the Bookkeeping-GUI: | + | |
| - | # t.inputdata | + | |
| - | j = Job( t, backend | + | |
| - | j.submit() | + | |
| - | </ | + | |