Message: Re: how to loop runs in .mac file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: how to loop runs in .mac file 

Forum: Run Management
Re: None how to loop runs in .mac file (Ma yunzhi)
Re: None Re: how to loop runs in .mac file (Makoto Asai)
Date: 14 Oct, 2014
From: Pierre <Pierre>

Hi G4users and Ma yunzhi

I have read your post and my problem is similar from yours. I would like to increment two variables in my application : the energy and the name of the output file.

For example :

 1.0 MeV -> "Data_1.0MeV.txt" 
 1.1 MeV -> "Data_1.1MeV.txt" 
 1.2 MeV -> "Data_1.2MeV.txt"  

I have found how to implement easily the energy in a macro with the command :

/control/loop macro.mac {energycounter} 'i' 'j' 'step'.

with the macro.mac :

/gun/energy {energycounter} MeV

But not for the output.

My idea is to do the same thing for the file name with something like :

/output macro.mac {filenamecounter} ...

And here is where I block.

Do you have some idea ?

Thanks for helpful discussions

 Add Message Add Message
to: "Re: how to loop runs in .mac file"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]