|Message: Example B1 Modification||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)|
Hello Geant4 Users,
I am using geant4-10.0.0 on SLC6 and I am attempting to modify example B1 to use the G$GeneralParticleSource class instead of G4ParticleGun. The GPS User's Manual states that:
G4GeneralParticleSource is used exactly the same way as G4ParticleGun in a Geant4 application. In existing application one can simply change yourPrimaryGeneratorAction by globally replacing "G4ParticleGun" with "G4GeneralParticleSource".
I have replaced all the instances of "G4ParticleGun" with "G4GeneralParticleSource" in all of my project files, however I still receive the following error when trying to compile the application in cmake:
-- Configuring done -- Generating done -- Build files have been written to: /home/apistudent/Desktop/S1.1-build
[apistudent@ip021-146 S1.1-build]$ make
Scanning dependencies of target exampleS1 [ 12%] Building CXX object CMakeFiles/exampleS1.dir/exampleS1.cc.o [ 25%] Building CXX object CMakeFiles/exampleS1.dir/src/S1DetectorConstruction.cc.o [ 37%] Building CXX object CMakeFiles/exampleS1.dir/src/S1EventAction.cc.o [ 50%] Building CXX object CMakeFiles/exampleS1.dir/src/S1ActionInitialization.cc.o [ 62%] Building CXX object CMakeFiles/exampleS1.dir/src/S1RunAction.cc.o /home/apistudent/Desktop/S1/src/S1RunAction.cc: In member function ‘virtual void S1RunAction::EndOfRunAction(const G4Run*)’: /home/apistudent/Desktop/S1/src/S1RunAction.cc:113: error: no matching function for call to ‘G4GeneralParticleSource::GetParticleDefinition() const’ /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/G4GeneralParticleSource.hh:186: note: candidates are: G4ParticleDefinition* G4GeneralParticleSource::GetParticleDefinition() <near match> /home/apistudent/Desktop/S1/src/S1RunAction.cc:115: error: no matching function for call to ‘G4GeneralParticleSource::GetParticleEnergy() const’ /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/G4GeneralParticleSource.hh:203: note: candidates are: G4double G4GeneralParticleSource::GetParticleEnergy() <near match> /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Units/PhysicalConstants.h: At global scope: /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Units/PhysicalConstants.h:79: warning: ‘CLHEP::electron_charge’ defined but not used /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Random/Randomize.h:61: warning: ‘CLHEP::HepRandomGenActive’ defined but not used make: *** [CMakeFiles/exampleS1.dir/src/S1RunAction.cc.o] Error 1 make: *** [CMakeFiles/exampleS1.dir/all] Error 2 make: *** [all] Error 2
I was hoping someone could give me some insight as to why S1RunAction.cc and G4GeneralParticleSource.hh are not communicating.
Thank you in advance.
|Inline Depth:||Outline Depth:||Add message:|