Skip to content
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

Import geant4maker. #659

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

Conversation

klendathu2k
Copy link
Contributor

@klendathu2k klendathu2k commented Feb 21, 2024

Draft PR for geant4star. Supersedes #617.

Branch was rebased against current main (02/21/24). Plus few additional fixes to get it to run (up to loading G3) in the current environment.

NOTE: The code should be functional, but requires two modules which we don't currently have in spack, plus an update to a newer version of the geant4 library. Specifically, we need to add a GEANT3 VMC library, and update the Geant 4 VMC library to one which supports multi-engine simulations.

These versions have been tested together by the VMC team.

I should also mention that we are at a point of divergence in the ROOT / VMC development. Currently we are using the VMC version 1.1, which is built with ROOT. The next version is 2.0, which is shipped separately. The GEANT3 VMC 3.9p1 release includes fixes to sensitive volumes which we require, and is the last version able to run with VMC 1.1. Any move to a new version of ROOT, VMC and/or Geant (either G3 or G4) likely entails advancing to a new version of all of these packages... with the possible exception of ROOT.

geant4star

Code compiles against root 6.24 in our production environment:

starver dev config/v0.3.0-rhel7-root6.24.06
setenv STAR .
cons
  • StGeant4Maker should be excluded from all ROOT5 builds (in CI)
  • StGeant4Maker should be excluded from 32 bit builds
  • root5 and root6 builds should pass CI tests

[g4star] Update stacker and agml extension classes to enable multi engine tracking and user defined hits in the geant4 application.  Few additional fixes and cleanups in the code.

[g4star] Import the StGeant4Maker into the repository.  Builds under root 6.24 (with some additional compilation flags).

[g4star] Defer mysql load until StBFChain can do it.

[g4star] Add geant4vmc, geant4mk and fastjet chain options.  Load libfastjet with stargen package b/c one or more filters depends on it.  (Should consider splitting filters into sep chain opt).

[g4star] Cleanup commented out includes.

[g4star] Reduce compile time warnings...

[g4star] ... more reduction of compiler warnings

... and even more reduction of compiler warnings...

[g4star] And modify cons to pickup the include paths to geant4 and geant4 vmc libraries
…e" option (which was meant as documentation).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

AgMLBTofVolumeId and similarly named classes implement the unique volume IDs defined in pams/sim/g2t/g2t_volume_id.g. They provide the unique associated between hits and hardware channels.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AgStarDummy inserts a few dummy routines (mangled to look like FORtran routines) which satisfy dependencies between the StarGenerator package and starsim.

@@ -167,6 +167,8 @@ class StarPrimaryMaker : public StMaker

/// Return a pointer to the event
StarGenEvent *event() { return mPrimaryEvent; }
/// Return a pointer to the stack
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exposes the particle stack to StGeant4Maker for PushPrimaries.


}

std::map<TString, AgMLExtension*> AgMLExtension::mExtensionMap;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The GEANT3 VMC took use of both the "user" and "framework" extensions to TGeoVolume, leaving us with the only option of keeping a map between volume names and extension data.

Copy link
Member

@iraklic iraklic left a comment

Choose a reason for hiding this comment

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

does this mean we did not have btof and eemc in AgML format before? (I though we did)

@klendathu2k
Copy link
Contributor Author

does this mean we did not have btof and eemc in AgML format before? (I though we did)

I assume you are referring to the "volume ID" classes? No. These are new classes to support the geant4star application.

@plexoos
Copy link
Member

plexoos commented Mar 6, 2024

If you have a chance please try to build with this dependencies

module load geant4-vmc-5-0-p5-root-6.24.06 geant4-10.5.1 geant3-3-8-root-6.24.06

Geant3-3-9-p1 is currently missing from the spack repo so, I'll need to add it

@klendathu2k
Copy link
Contributor Author

klendathu2k commented Mar 6, 2024 via email

@plexoos
Copy link
Member

plexoos commented Mar 6, 2024

geant3@3-9-p1 is also available on the SDCC machines now. So, the following modules can be used for testing:

module load geant4-vmc-5-0-p5-root-6.24.06 geant4-10.5.1 geant3-3-9-p1-root-6.24.06

@klendathu2k
Copy link
Contributor Author

With the last three pushes, code compiles and runs the TPC to completion. Albeit with no hits generated. Reason TBC.

Copy link
Member

Choose a reason for hiding this comment

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

This auto generated file should not be modified

Copy link
Member

Choose a reason for hiding this comment

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

This auto generated file should not be modified

StRoot/StBFChain/BigFullChain.h Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants