Message: Re: GPS called in BeginofRunAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: GPS called in BeginofRunAction 

Forum: Run Management
Re: Question GPS called in BeginofRunAction (M Tariq Siddique)
Re: None Re: GPS called in BeginofRunAction (Makoto Asai)
Date: 23 Mar, 2017
From: M Tariq Siddique <M Tariq Siddique>

Hello Makoto Asai, thanks for the reply. i m using 10.3 ver. Regarding MT or not MT the behaviour is strange. actually i tried both.

With MT: i have to use following if condition in BeginofRunAction otherwise it crashes with segmentation fault.

if (pga) { gps = pga->GetGPS(); peng = gps->GetParticleEnergy(); } else{ peng = 1.*MeV; }

at first run it says source energy 1 MeV for both threads and at second run it says source energy 0.5 MeV (which is the acutal, and set in gps.mac). and if i start with few events at first run like 10 or less and if all of them are simulated by one thread then in second run one thread says source energy 0.5 MeV (which have simulated events previously) and other says 1 MeV (which have not simulated any event in previous run).

Without MT: life is a bit easy i do not have to use the above if condition code it simply work without it and do not crash with segmentation fault. i m using only two line code at BegineOfRunAction

gps = pga->GetGPS(); peng = gps->GetParticleEnergy();

but again at first run it says source energy 1 MeV although i initialize the peng = 0; in RunAction constructor. and at second run it says source energy 0.5 MeV. i hope i would have explained the problem properly.

 Add Message Add Message
to: "Re: GPS called in BeginofRunAction"

 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 ]