Message: RE: set Step with G4UserLimits..how? not working Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: set Step with G4UserLimits..how? not working 

Forum: Event and Track Management
Re: None set Step with G4UserLimits..how? not working (Jasmine Ma)
Date: 14 Sep, 2007
From: Makoto Asai <Makoto Asai>

Hi,

 As described in the Application Developer's Guide section 5.7
http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch05s07.html
in addition to setting G4UserLimits to logical volumes, you have 
to define G4StepLimiter process in your physics list. This process
should be set to particle types which you want to limit their step
size.

Makoto

> -----Original Message-----
> From: Jasmine Ma [mailto:jyuko@mail1.ph.utexas.edu] 
> Sent: Thursday, September 13, 2007 1:01 PM
> To: publichypernews
> Subject: set Step with G4UserLimits..how? not working
> 
> *** Discussion title: Event and Track Management
> Email replies to PublicHyperNews@slac.stanford.edu must include:
>   In-Reply-To: <"/eventtrackmanage/702"@geant4-hn.slac.stanford.edu>
>   Subject: ...change this to be about your reply.
> 
> Hi- I'm relatively new to geant4 and I've asked this question to my
>  local expert (other grad student) and he has no idea what's wrong.
> 
> I'm trying to limit the stepsize of these particles I'm 
> shooting. To do
> this I used G4UserLimits in my "DetectorConstruction.cc" something
> like...
> 
>   G4LogicalVolumeStore* lvStore=G4LogicalVolumeStore::GetInstance();
>   lvStore=G4LogicalVolumeStore::GetInstance();
>   G4UserLimits *MyLimits = new G4UserLimits();  
> //lvTGAR->GetUserLimits();
>   MyLimits->SetMaxAllowedStep(1*cm);
>   for (size_t ii=0;ii<(*lvStore).size();ii++){   
>     if ((*lvStore)[ii]->GetVisAttributes()==0) {
>       G4String matName=(*lvStore)[ii]->GetMaterial()->GetName();
>       (*lvStore)[ii]->SetVisAttributes(GetMaterialVisAttrib(matName));
>       (*lvStore)[ii]->SetUserLimits(MyLimits);
>     }
>   }
> 
> Additionally, I have the same g4userlimit max set point set in the
> volume I would *really* like to limit the step size.
> 
> None of this is working. THe stepsize isnt changing. If I look at the
> output. I can see that the first step had a length of 8 cm, 
> even though
> I set the max to 1
> 
> Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng 
> TrackLeng  NextVolume ProcName
>     0        0        0   -4e+03  1.19e+05        0        0  
>        0        TGAR initStep
>     1        0        0 -3.92e+03  1.19e+05   0.0162     80.6 
>      80.6        TGAR hIoni
> 
> Is there some other step I must perform?
> 
> Thank you for any help
> 
> Jasmine Ma
> 

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "RE: set Step with G4UserLimits..how? not working"

 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 ]