I am trying to build my detector based on the exampleB1, but with hits/sensitive detector classes added. However, my code doesn’t compile referring to undeclared identifiers C1DetectorConstruction and C1SensitiveDetector. I’ve already checked everything up: I have defined classes in header files, I have included those files into source files, and include and src paths links are present in the CMakeLists.txt file.
Any ideas? I feel like I’m missing some tiny important thing…
Thank you a lot in advance for suggestions!
Did you call a SD manager pointer and add the new detector in logical volume ? `
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4VSensitiveDetector* X = new TrackerSD(SDname="/X");
You can refer Example B2 and B5 for hits and sensitive detector.
The OP’s errors are compile-time, not runtime.
Are you sure that you have the right
#include statements in your
C1DetectorConstruction.cc file? That file must contain both
Hi Michael! Thanks for your response! Yes, files were inside.
Apparently I assume there was some typo, since I re-wrote all the files and it compiled. Thanks