Message: How to import GDML file to Geant4? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question How to import GDML file to Geant4? 

Forum: Geometry
Date: Oct 11, 22:48
From: Kyuwon Jung <Kyuwon Jung>

Dear, All experts.

I am trying to import GDML file to Geant4, so I wrote down the coding like,

> #include "DetectorConstruction.hh"
> 
> #include "G4Tubs.hh"
> #include "G4Box.hh"
> #include "G4VSolid.hh"
>
> #include "G4LogicalVolume.hh"
> #include "G4NistManager.hh"
>
> #include "G4PVPlacement.hh"
> #include "G4PvReplica.hh"
>
> #include "G4VisAttributes.hh"
>
> #include "SensitiveDetector.hh"
> #include "G4SDManager.hh"
>
> #include "G4GDMLParser.hh"
>
> DetectorConstruction::DetectorConstruction() :
>     G4VUserDetectorConstruction() {
> }
>
> DetectorConstruction::~DetectorConstruction() {
> }
>
> G4VPhysicalVolume* DetectorConstruction::Construct() {
>    G4GDMLParser parser;
>    parser.Read( "Test_Model_Geant4.gdml" );
>
>    return parser.GetworldVolume();
> }

Then ran make command, the error message

"undefined reference to 'DetectorConstruction::ConstructionSDandField()' collect2: error: ld returned 1 exit status" popped up.

I have no idea which point is wrong, and how I should modify the coding.

Please, help and teach me,

Kyuwon Jung.

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

1 None: Re: How to import GDML file to Geant4?   (John Apostolakis - Oct 12, 01:59) new
(_ Ok: Re: How to import GDML file to Geant4?   (Kyuwon Jung - Oct 14, 22:21) new
 Add Message Add Message
to: "How to import GDML file to Geant4?"

 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 ]