Message: How to give different names to the copies of Physical volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question How to give different names to the copies of Physical volume 

Forum: Geometry
Date: 05 May, 2015
From: Amit Kumar <Amit Kumar>

Dear All

I want to give different names to same logical volumes physically placed at ten different places and I want to use them in steppingAction. Please let me know whether following lines are appropriate to serve my purpose.

1. Following lines are added to DetectorConstruction class

for (G4int i=0; i<10; i++) {
new G4PVPlacement(0, G4ThreeVector(0,0,Z), LogicBox,
                        "physBox[i]",worldVolume,false,i, 0); 
}

2. And following lines are added to SteppingAction class

for (G4int j=0; j<10; j++) { if (step->GetPhysicalVolume()->GetNames() = "physBox[j]") {;} }

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

1 Idea: Re: How to give different names to the copies of Physical volume   (C Mos - 05 May, 2015)
2 Feedback: Re: How to give different names to the copies of Physical volume   (Michael H. Kelsey - 05 May, 2015)
3 None: Re: How to give different names to the copies of Physical volume   (michel maire - 06 May, 2015)
 Add Message Add Message
to: "How to give different names to the copies of Physical volume"

 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 ]