|Message: Problem using G4Trap||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
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 , 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?
|Inline Depth:||Outline Depth:||Add message:|