Message: Physics Constructor Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Physics Constructor 

Forum: Physics List
Date: 03 Jul, 2012
From: Michael Douglass <Michael Douglass>

Hello,

I am attempting to use the G4EmDNAPhysicsChemistry.cc physics list builder in Geant4.9.5_p01. I have replaced my PhysicsList.cc file with the G4EmDNAPhysicsChemistry.cc and G4EmDNAPhysicsChemistry.hh and renamed and modified the code to work with my application. I have fixed all errors except one.

When I compile my code I get the following error:

In function ‘int main(int, char**)’: Microdosimetry.cc:45:47: error: no matching function for call to ‘G4RunManager::SetUserInitialization(G4VPhysicsConstructor*&)’ Microdosimetry.cc:45:47: note: candidates are: /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/G4RunManager.hh:266:17: note: void G4RunManager::SetUserInitialization(G4VUserDetectorConstruction*) /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/G4RunManager.hh:266:17: note: no known conversion for argument 1 from ‘G4VPhysicsConstructor*’ to ‘G4VUserDetectorConstruction*’ /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/G4RunManager.hh:268:17: note: void G4RunManager::SetUserInitialization(G4VUserPhysicsList*) /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/G4RunManager.hh:268:17: note: no known conversion for argument 1 from ‘G4VPhysicsConstructor*’ to ‘G4VUserPhysicsList*’ /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/CLHEP/Units/PhysicalConstants.h: At global scope: /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/CLHEP/Units/PhysicalConstants.h:79:21: warning: ‘CLHEP::electron_charge’ defined but not used [-Wunused-variable] /home/michael/Geant4_New/geant4.9.5_p01-install/include/Geant4/CLHEP/Random/Randomize.h:59:12: warning: ‘CLHEP::HepRandomGenActive’ defined but not used [-Wunused-variable] make: *** [/home/michael/g4work/tmp/Linux-g++/Microdosimetry/exe/Microdosimetry.o] Error 1

I think it may have something to do with my Microdosimetry.cc file (main file). The problem may lie with the following lines in my code.

     G4VPhysicsConstructor* physics = new PhysicsList;
     runManager->SetUserInitialization(detector);
     runManager->SetUserInitialization(physics);

I am building the application under Ubuntu and my code is an adaptation of the Microdosimetry example in the examples/extended directory.

I would appreciate any assistance that you could provide.

Thanks

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

1 More: Re: Physics Constructor   (Michael Douglass - 03 Jul, 2012)
 Add Message Add Message
to: "Physics Constructor"

 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 ]