Message: Help with simple G4ExtrudedSolid example Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Help with simple G4ExtrudedSolid example 

Forum: Geometry
Date: 30 Mar, 2012
From: EJ <EJ>


I would like to use G4ExtrudedSolid to change a rectangular detector into an octagonal shape. But to start, I'd simply like to replace the existing G4Box with an identical G4ExtrudedSolid to check that it works. Here's the original box:

G4Box *MyBar = new G4Box("MyBar", dx, dy, dz);

And here is the new code:

  // Define the contours of the quartz bar
  std::vector<G4TwoVector> newBar(4);
  newBar[0] = G4TwoVector( -dx, -dy);
  newBar[1] = G4TwoVector( -dx,  dy);
  newBar[2] = G4TwoVector(  dx,  dy);
  newBar[3] = G4TwoVector(  dx, -dy);

  G4ExtrudedSolid *MyBar = new G4ExtrudedSolid("MyBar", newBar, dz, G4TwoVector(0, 0), 1.0, G4TwoVector(0, 0), 1.0);

Shouldn't I get identical results to the G4Box? In both cases 'MyBar' is being then being placed inside a larger world volume. Am I doing something obviously incorrect with this simple substitution?

Thanks for any help!

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

1 None: Re: Help with simple G4ExtrudedSolid example   (Ivana Hrivnacova - 17 Apr, 2012)
 Add Message Add Message
to: "Help with simple G4ExtrudedSolid example"

 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 ]