Message: Question about assembly Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Question about assembly 

Forum: Geometry
Date: 10 Feb, 2011
From: Marco Pinto <Marco Pinto>


When I need to get some information about volumes during the run, I call const G4String VolName= step->GetTrack()->GetVolume()->GetName() in my steppingAction class to know what is the volume I'm dealing with.

When I have assemblies in my DetectorConstruction that instruction returns, for example, av_1_impr_1_TinyCrystal_pv_6. However, if I have to change geometries during the run, the rebuild causes the name to change to av_2_impr_1_TinyCrystal_pv_6.

Is there a way to get always the same volume name instead of av_1..., av_2..., av_3..., av_4...? When I have, for example, 4 changes during the run this is easily solved, but if I have 20, 30, 100 changes I need to include a lot of code to cover all the possibilities even being always dealing with the same volume but with some translation or rotation (TinyCrystal in the case shown above).

Thanks, Marco Pinto

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

1 None: Re: Question about assembly   (John Allison - 10 Feb, 2011)
(_ Ok: Re: Question about assembly   (Marco Pinto - 12 Feb, 2011)
 Add Message Add Message
to: "Question about assembly"

 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 ]