Message: Problem using G4Trap Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Problem using G4Trap 

Forum: Geometry
Date: 01 Apr, 2010
From: Astrid Velroyen <Astrid Velroyen>

Dear Geant4 Users,

I am a beginner to Geant4 and tried now to change the geometry of a given code where only G4Box was used to something more advanced. I'd like to construct a Right Angular wedge using in the DetectorConstruction.cc:

  wedge = new G4Trap("wedge",2*cm, 3*cm, 3*cm, 0*cm);
  wedgeLV = new G4LogicalVolume(wedge,crystalLYSO,"wedgeLV",0,0,0);
  wedgePV = new G4PVPlacement(0,G4ThreeVector(0,-refThick,0),wedgeLV,"wedgePV",worldLV,false,0);

as described in the User's Guide page 61-62. Of course, I also added

  G4Trap* wedge;
  G4LogicalVolume* wedgeLV;
  G4VPhysicalVolume* wedgePV;

to the DetectorConstruction.hh.

Unfortunately I get the following error, when I compile the code:

src/singleCrystalDetectorConstruction.cc: In member function »G4VPhysicalVolume* singleCrystalDetectorConstruction::ConstructDetector()«: src/singleCrystalDetectorConstruction.cc:222: error: invalid use of incomplete type »struct G4Trap« /geant4/geant4.9.2.p02/source/geometry/management/include/G4VPVParameterisation.hh:60: error: forward declaration of »struct G4Trap« src/singleCrystalDetectorConstruction.cc:223: error: no match in function call of »G4LogicalVolume::G4LogicalVolume(G4Trap*&, G4Material*&, const char [8], int, int, int)« /geant4/geant4.9.2.p02/source/geometry/management/include/G4LogicalVolume.hh:294: candidates are: G4LogicalVolume::G4LogicalVolume(const G4LogicalVolume&) /geant4/geant4.9.2.p02/source/geometry/management/include/G4LogicalVolume.hh:284: G4LogicalVolume::G4LogicalVolume(__void__&) /geant4/geant4.9.2.p02/source/geometry/management/include/G4LogicalVolume.hh:146: G4LogicalVolume::G4LogicalVolume(G4VSolid*, G4Material*, const G4String&, G4FieldManager*, G4VSensitiveDetector*, G4UserLimits*, G4bool)

Can anyone tell me, what I am doing wrong?

Also, I would like to know how I can change the "wedge direction" which is x in the User's guide, but I need the two different lengths in the y direction. Do I have to use general trapezoid for that?

Thanks,

Astrid

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

1 None: Re: Problem using G4Trap   (Vladimir Grichine - 01 Apr, 2010)
 Add Message Add Message
to: "Problem using G4Trap"

 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 ]