Skip to content

Clean-up of geo files #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Clean-up of geo files #285

wants to merge 2 commits into from

Conversation

tannerbk
Copy link
Contributor

@tannerbk tannerbk commented May 22, 2025

Unused or eos specific files.

fixes #267

@@ -85,8 +84,6 @@ G4VPhysicalVolume *DetectorConstruction::Construct() {

// Add sensitive volumes here (only veto for now)
G4SDManager *sdman = G4SDManager::GetSDMpointer();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake now complains that sdman : warning: unused variable 'sdman' [-Wunused-variable].

Any reason to keep the G4SDManager line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this line and the code compiled without issue. Searched for this string and found that it was not called within DetectorConstruction.cc. While found in other functions, it looked like it was properly called within those functions.

Output of grep:

src/geo/src/GeoFactory.cc:    G4SDManager *sdman = G4SDManager::GetSDMpointer();
src/geo/src/GeoFactory.cc:    G4VSensitiveDetector *sd = sdman->FindSensitiveDetector(sensitive_detector);
src/geo/src/GeoNestedTubeConstruction.cc:    G4SDManager *sdman = G4SDManager::GetSDMpointer();
src/geo/src/GeoNestedTubeConstruction.cc:    sdman->AddNewDetector(sensitive);
src/geo/src/GeoSolidArrayFactoryBase.cc:    G4SDManager *sdman = G4SDManager::GetSDMpointer();
src/geo/src/GeoSolidArrayFactoryBase.cc:    G4VSensitiveDetector *sd = sdman->FindSensitiveDetector(sensitive_detector_name);

Please consider removing this line, and I think this is Good To Go from my perspective.

@tannerbk
Copy link
Contributor Author

tannerbk commented Jun 5, 2025

I may move these files to a legacy directory instead of deleting them entirely, so marking this as not ready to merge for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move Eos geometry factory out of ratpac-two
3 participants