Linear Collider Forum



Home » ILCDirac » Applications » help getting started with Mokka in ILCDIRAC
Re: help getting started with Mokka in ILCDIRAC [message #2286 is a reply to message #2285] Wed, 20 November 2013 23:58 Go to previous message
jeans
Messages: 22
Registered: November 2012
Thanks, André, I've now got it working.

For the reference of others, I'll post the scripts which worked for me:

The python script for ilcdirac (testmokka.py):
Quote:

from DIRAC.Core.Base import Script
Script.parseCommandLine()
from ILCDIRAC.Interfaces.API.DiracILC import DiracILC
dirac = DiracILC(True,"daniel_mokka_job_repository.rep")
from ILCDIRAC.Interfaces.API.NewInterface.UserJob import UserJob
job = UserJob()
job.setName("MokkaDiracTest")
job.setJobGroup("MMTEST")
job.setOutputSandbox(["*.log","*.slcio","*.xml","*.steer "])
job.setCPUTime(50000)
job.setSystemConfig('x86_64-slc5-gcc43-opt')
from ILCDIRAC.Interfaces.API.NewInterface.Applications import Mokka
mo = Mokka()
mo.setVersion("080003")
mo.setOutputFile("test_mokka.slcio")
mo.setDetectorModel("ILD_o1_v05")
mo.setSteeringFile("tttt.steer")
mo.setMacFile("tttt.mac")
res = job.append(mo)
print job.submit(dirac)


the steering file tttt.steer:
Quote:

/Mokka/init/lcioWriteMode WRITE_NEW
/Mokka/init/lcioStoreCalHitPosition true
/Mokka/init/dbHost pollin1.in2p3.fr
/Mokka/init/user consult
/Mokka/init/dbPasswd consult


and the macro file tttt.mac:
Quote:

/generator/generator particleGun
/gun/position 0 0 0 mm
/gun/energy 5 GeV
/gun/direction 0 1 0
/gun/thetaSmearing 360
/gun/phiSmearing 360
/gun/particle mu-
/run/beamOn 30


I believe that I had to specify the number of events with the explicit "/run/beamOn 30" command in the Mokka macro. Using mo.setNbEvts() method seemed to have no effect.

put all 3 files in the same directory, set up the ILCDIRAC environment (something like "source bashrc"), then run
> python testmokka.py

looking at the mokka steering file and log file in the output tarball were useful for debugging.
 
Read Message
Read Message
Read Message
Read Message
Next Topic:policy for ilcsoft updates in ilcdirac
Goto Forum:
  


Current Time: Sat Feb 24 04:20:58 Pacific Standard Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software