In the molecular DNA example, I am trying to use geant4dna physics for gold nanoparticles. To create PhysicisList, I followed the example given by AuNP. My only changes were to replace physicslist and main files from AuNP’s example. Attached are the files that I used.
PhysicsList.cc (16.3 KB)
PhysicsListMessenger.cc (3.2 KB)
PhysicsList.hh (3.1 KB)
PhysicsListMessenger.hh (2.7 KB)
molecular.cc (4.2 KB)
However, I encountered the following compilation error. There is something I am missing and I am confused about this error. Do you have any ideas on how to resolve this? Currently, I’m using Geant 4.11.1.0.
> [akap@ldragon1 build]$ cmake ..
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /akap/G411.1.0/test/moleculardna/build
> [akap@ldragon1 build]$ make -j20
> Consolidate compiler generated dependencies of target molecular
> [ 2%] Building CXX object CMakeFiles/molecular.dir/molecular.cc.o
>/akap/G411.1.0/test/moleculardna/molecular.cc: In function ‘int main(int, char**)’:
> /akap/G411.1.0/test/moleculardna/molecular.cc:83:27: error: no matching function for call to ‘PhysicsList::PhysicsL ist()’
> 83 | PhysicsList* phys = new PhysicsList;
> | ^~~~~~~~~~~
> In file included from /akap/G411.1.0/test/moleculardna/molecular.cc:49:
>/akap/G411.1.0/test/moleculardna/PhysicsList.hh:43:12: note: candidate: ‘PhysicsList::PhysicsList(const G4int&)’
> 43 | explicit PhysicsList(const G4int& list);
> | ^~~~~~~~~~~
>/akap/G411.1.0/test/moleculardna/PhysicsList.hh:43:12: note: candidate expects 1 argument, 0 provided
> /akap/G411.1.0/test/moleculardna/PhysicsList.hh:40:7: note: candidate: ‘PhysicsList::PhysicsList(const PhysicsList& )’
> 40 | class PhysicsList : public G4VModularPhysicsList
> | ^~~~~~~~~~~
> /akap/G411.1.0/test/moleculardna/PhysicsList.hh:40:7: note: candidate expects 1 argument, 0 provided
> make[2]: *** [CMakeFiles/molecular.dir/molecular.cc.o] Error 1
> make[1]: *** [CMakeFiles/molecular.dir/all] Error 2
> make: *** [all] Error 2