Message: Re: Tracking in a UnionSolid Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Tracking in a UnionSolid 

Forum: Event and Track Management
Re: Question Tracking in a UnionSolid (Rafayel Paremuzyan)
Re: Feedback Re: Tracking in a UnionSolid (Gumplinger Peter)
Re: Question Re: Tracking in a UnionSolid (Rafayel Paremuzyan)
Re: Feedback Re: Tracking in a UnionSolid (Gumplinger Peter)
Re: Feedback Re: Tracking in a UnionSolid (Rafayel Paremuzyan)
Date: 09 Jan, 2014
From: Gumplinger Peter <Gumplinger Peter>

Dear Rafayel,

BTW, what version of G4 are you using?

(I see nothing wrong with your code.)

I am not so worried about this line:

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0        0        0     70.1  2.93e+03        0        0         0 Vac_scat_chamber_phys initStep

Rather confusing, but the (current) G4SteppingVerbose is printing the name of the NextVolume - not the current volume - though that should probably also not be 'Vac_scat_chamber'(?)

What bothers me is that:

      -----------------------------------------------------------------------
        StepPoint Information               PreStep            PostStep
      -----------------------------------------------------------------------
....
         Volume Name         : Vac_scat_chamber_phys  kapton_window_phys

The code for this is:

http://www-geant4.kek.jp/lxr/source/tracking/src/G4SteppingVerbose.cc#L804

e.g.

fStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); fStep->GetPostStepPoint()->GetPhysicalVolume()->GetName();

And this is clearly wrong!

To be sure, can you put this code into your SteppingAction:

G4Navigator* theNavigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();

G4TouchableHistoryHandle touchable = theNavigator->
                                                CreateTouchableHistoryHandle();

G4int depth = touchable->GetHistoryDepth();
for (G4int i = 0; i<depth; ++i) {
    G4cout << 'Depth: " << i << " Volume Name: " <<    
              touchable->GetVolume()->GetLogicalVolume()->GetName();
    touchable->MoveUpHistory();
}

I have no explanation why the step points give the wrong volumes! I don't know how big your program is, but can you shrink it down to the absolute minimum: define only the union solid (DetectorConstruction) and your PrimaryGeneratorAction.

Peter

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

1 Feedback: Re: Tracking in a UnionSolid   (Rafayel Paremuzyan - 09 Jan, 2014)
(_ Disagree: Re: Tracking in a UnionSolid   (Gumplinger Peter - 10 Jan, 2014)
(_ Feedback: Re: Tracking in a UnionSolid   (Rafayel Paremuzyan - 11 Jan, 2014)
(_ Ok: Re: Tracking in a UnionSolid   (Rafayel Paremuzyan - 16 Jan, 2014)
(_ Disagree: Re: Tracking in a UnionSolid   (Gumplinger Peter - 16 Jan, 2014)
(_ Agree: Re: Tracking in a UnionSolid   (Gumplinger Peter - 16 Jan, 2014)
 Add Message Add Message
to: "Re: Tracking in a UnionSolid"

 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 ]