Project

General

Profile

Support #24283

review larsim for geant4 v4_10_6_p01

Added by Lynn Garren 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
04/07/2020
Due date:
% Done:

100%

Estimated time:
Spent time:
Experiment:
-
Co-Assignees:
Duration:

Description

Although we have a build of larsim which uses geant4 v4_10_6_p01, there are two changes which need review.

Hans, would you take a look at LegacyLArG4?

legacy_test.fcl (2.85 KB) legacy_test.fcl Hans-Joachim Wenzel, 04/10/2020 09:15 AM
legacy_test.log (48.9 KB) legacy_test.log Hans-Joachim Wenzel, 04/10/2020 09:15 AM
build_larsim.txt (396 Bytes) build_larsim.txt Hans-Joachim Wenzel, 04/10/2020 09:15 AM

Related issues

Related to LArSoft - Support #24180: larsoft test release with geant4 10.6.p01Closed03/13/2020

History

#1 Updated by Lynn Garren 6 months ago

  • Related to Support #24180: larsoft test release with geant4 10.6.p01 added

#2 Updated by Hans-Joachim Wenzel 6 months ago

Disclaimer I am not the best person to check the legacy code😋
So I was concentrating on:

building it (that seems to work fine see attached file build_larsim.txt)
provide a fcl file to run it using a single particle generator to feed particles into the simulation
see what happens and see if it runs to the end (it does). (see attached files)

Concerning run time I didn't have to do any of the fixes I had to apply to the new larg4 which is not surprising since we don't use a specialized gdml reader in legacy.

At runtime complains about:
alt::G4PhysListFactory failed to find ReferencePhysList "larg4::PhysicsList"
G4VModularPhysicsLists in G4PhysicsProcessFactorySingleton are:
G4PhysicsProcessFactorySingleton supports variants of the above
with physics process replacements:
_EMV > G4EmStandardPhysics_option1 known
_EMX > G4EmStandardPhysics_option2 known
_EMY > G4EmStandardPhysics_option3 known
_LIV > G4EmLivermorePhysics known
_PEN ==> G4EmPenelopePhysics known
G4PhysListFactory could not construct "larg4::PhysicsList",fall back to using QGSP_BERT
<<< Geant4 Physics List simulation engine: QGSP_BERT
alt::G4PhysListFactory failed to find ReferencePhysList "larg4::PhysicsList"
G4VModularPhysicsLists in G4PhysicsProcessFactorySingleton are:

So it falls back to what it call QGSP_BERT (which might or might correspond to the geant4 QGSP_BERT physics list. As far as I am concerned that's all I can do.

#3 Updated by Kyle Knoepfel 5 months ago

  • Status changed from New to Work in progress

#4 Updated by Christoph Alt 5 months ago

I triggered a DUNE CI test "dune_ci/8644" with the larsoft test release v08_48_01_02 with geant4 v4_10_6_p01.
For DUNE FD and protoDUNEdp, which are using the legacy LArG4, I see the same "alt::G4PhysListFactory" error at run time that Hans mentioned, and no SimChannels or SimPhotonsLite are produced. For protoDUNEsp, which is using the refactored g4, no error appears and only minor changes show up in the g4 data products (see below).

If you want to reproduce this locally, get a copy of dunetpc and check out my branch chalt_dunetpc_with_larsoftv08_48_01_02. The CI test fcl's, input and reference files are:

DUNE FD:
fcl: test/ci/ci_test_g4_dunefd.fcl (from top folder of dunetpc)
input: /pnfs/dune/persistent/stash/ContinuousIntegration/DUNEFD/gen/prodgenie_nue_dune10kt_1x2x6_gen_Reference.root
reference: /pnfs/dune/persistent/stash/ContinuousIntegration/DUNEFD/g4/prodgenie_nue_dune10kt_1x2x6_g4_Reference.root

protoDUNEsp:
fcl: test/ci/ci_test_g4_protoDUNEsp.fcl (from top folder of dunetpc)
input: /pnfs/dune/persistent/stash/ContinuousIntegration/protoDUNEsp/gen/protoDune_pion_2GeV_mono_gen_Reference.root
reference: /pnfs/dune/persistent/stash/ContinuousIntegration/protoDUNEsp/g4/protoDune_pion_2GeV_mono_g4_Reference.root


Logs and changes in g4 data product sizes for DUNE FD and protoDUNEsp:

DUNE FD:
- stdout: https://dbweb5.fnal.gov:8443/LarCI/app/ns:dune/storage/docs/2020/04/15/stdout%23DbwMtkl.log
- stderr: https://dbweb5.fnal.gov:8443/LarCI/app/ns:dune/storage/docs/2020/04/15/stderr%23PmKAT7h.log

1548: < G4 | largeant |  | std::vector<sim::OpDetBacktrackerRecord> | 419
1549: ---
1550: > G4 | largeant |  | std::vector<sim::OpDetBacktrackerRecord> | 0
1551: 13c13
1552: < G4 | largeant |  | std::vector<simb::MCParticle> | 384
1553: ---
1554: > G4 | largeant |  | std::vector<simb::MCParticle> | 171
1555: 15,19c15,19
1556: < G4 | largeant | Reflected | std::vector<sim::OpDetBacktrackerRecord> | 480
1557: < G4 | largeant |  | art::Assns<simb::MCTruth,simb::MCParticle,sim::GeneratedParticleInfo> | 384
1558: < G4 | largeant | Reflected | std::vector<sim::SimPhotonsLite> | 480
1559: < G4 | largeant |  | std::vector<sim::SimChannel> | 3132
1560: < G4 | largeant |  | std::vector<sim::SimPhotonsLite> | 419
1561: ---
1562: > G4 | largeant | Reflected | std::vector<sim::OpDetBacktrackerRecord> | 0
1563: > G4 | largeant |  | art::Assns<simb::MCTruth,simb::MCParticle,sim::GeneratedParticleInfo> | 171
1564: > G4 | largeant | Reflected | std::vector<sim::SimPhotonsLite> | 0
1565: > G4 | largeant |  | std::vector<sim::SimChannel> | 0
1566: > G4 | largeant |  | std::vector<sim::SimPhotonsLite> | 0

protoDUNEsp:
- stdout: https://dbweb5.fnal.gov:8443/LarCI/app/ns:dune/storage/docs/2020/04/15/stdout%23TUmsgEx.log
- stderr: https://dbweb5.fnal.gov:8443/LarCI/app/ns:dune/storage/docs/2020/04/15/stderr%23ha50QUv.log

1502: < G4 | largeant | LArG4DetectorServicevolAuxDetSensitiveCRTPaddle | std::vector<sim::AuxDetHit> | 633
1503: ---
1504: > G4 | largeant | LArG4DetectorServicevolAuxDetSensitiveCRTPaddle | std::vector<sim::AuxDetHit> | 675
1505: 15c15
1506: < G4 | IonAndScint |  | std::vector<sim::SimEnergyDeposit> | 1438133
1507: ---
1508: > G4 | IonAndScint |  | std::vector<sim::SimEnergyDeposit> | 1408992
1509: 17c17
1510: < G4 | largeant |  | std::vector<simb::MCParticle> | 710754
1511: ---
1512: > G4 | largeant |  | std::vector<simb::MCParticle> | 729268
1513: 19c19
1514: < G4 | largeant |  | art::Assns<simb::MCTruth,simb::MCParticle,sim::GeneratedParticleInfo> | 710754
1515: ---
1516: > G4 | largeant |  | art::Assns<simb::MCTruth,simb::MCParticle,sim::GeneratedParticleInfo> | 729268

#5 Updated by Lynn Garren 5 months ago

As noted above, PhysicsList does not build with geant4 v4_10_6_p01. Expert help is needed to resolve that problem.

#6 Updated by Robert Hatcher 4 months ago

  • % Done changed from 80 to 100
  • Assignee changed from Hans-Joachim Wenzel to Robert Hatcher
  • Co-Assignees Hans-Joachim Wenzel added

I worked out solutions to the two issues. The GDMLUtils problem is resolved by linking in the Geant4 "global" (core) library; I'm a little surprised that one could satisfactorily link without this before. The second issue is the removal of `G4DataQuestionaire` in Geant4.10.6. This class/routine simply checked that the appropriate environment variables (representing locations for Geant4 data files) were set. This preemptively called out issues before the files were needed. In 10.6 his is handled differently and so it was removed. The "solution" is to then just remove including the (now non-existent) header and reference to that function when using releases 10.6 and beyond.

These fixes are in https://github.com/nusense/larsim/tree/rhatcher_support24283 (for develop branch) and https://github.com/nusense/larsim/tree/v08_48_01_g4_test_br (for a pre-existing G4.10.6 test branch). A pull request for development was made to https://github.com/LArSoft/larsim

#7 Updated by Kyle Knoepfel 4 months ago

  • Status changed from Work in progress to Resolved

#8 Updated by Lynn Garren 3 months ago

larsoft v08_55_00_01 is now available with these changes.

#9 Updated by Kyle Knoepfel 3 months ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF