Re: [VMC] How to set maximal step value in GEANT-4 ?

From: Ivana Hrivnacova (ihrivnac@mail.cern.ch)
Date: Fri Dec 03 2004 - 23:36:23 MET


 Hi Yuri,

 The flag stemax defined in tracking medium is 
 passed to Geant4 user limits on user's demand;
 you have to activate "G3 defaults" via
 /mcControl/g3Defaults
 (in g4config.in, see E03).

 It should not matter if you define geometry
 via VMC or TGeo. In both cases the parameter
 is passed only if g3Defaults were set.
 With this setting you will also set G3 default
 cuts/control process values to Geant4,
 which are then applied via TG4Limit objects
 and special cut/control process
 (if these special processes are activated).
 
> And more general question: I know that for G3 stemax is essential
> parameter for low energy simulation (10 kev - 10 MeV), what's about G4?
> 
 I suggest you to ask this question in Geant4 hypernews.

 Best regards,

 Ivana  
 
==============================================================
e-mail:  Ivana.Hrivnacova@cern.ch
address: Institut Physique Nucleaire, 91406 Orsay, France
phone:   (33) 01 69 15 65 94
==============================================================

On Fri, 3 Dec 2004, Y. Shitov wrote:

> Dear VMC users,
> 
> I found that flag stemax - maximum step permitted - set for particular
> media in TGeoMedium, works only in G3 but not in G4!  Is it possible
> to set maximal step size for partical tracking media in G4 uder VMC?
> 
> It seems, that I can do something like:
> TG4Limits->SetMaxAllowedStep() (?)
> 
> But it's global cut for all media, while I want to set stemax only for
> special crucial media(volume).
> 
> Another solution:
> (http://www-hades.gsi.de/~dbertini/Geant45Doc/G4gstmed_8cc.html)
> 
> {
>   // get the pointer to material nmat
>   G4Material* material = G3Mat.get(nmat);
> 
>   // NB. there is the possibility for redundancy in the mag
>   //     and user limits objects. Who cares.
>   // Generate the mag field object
>   // $$$ G4MagneticField* field = new G4MagneticField(ifield,fieldm, tmaxfd);
> 
>   G4MagneticField* field = 0;
>   	
>   // Generate the user limits object
>   // !!! only "stemax" has its equivalent in G4  
>   G4UserLimits* limits = 0;
>   if (useG3TMLimits) {
>   limits = new G4UserLimits();
>   limits->SetMaxAllowedStep(stemax*cm);
> 
>   // limits->SetG3DefaultCuts();
>   // this is arranged globally by physics manager
>   }
>   
>   // Store this medium in the G3Med structure
>   G3Med.put(itmed, material, field, limits, isvol);
> }
> 
> can't be applied in our case as we have no G4-geometry classes.
> Best,
> Yuri
> 
> 

-- 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 11:25:00 MET