Feature #22466

Provide a LArSoft geometry example working with the new larg4

Added by Gianluca Petrillo 4 months ago. Updated 3 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


My attempt to figure out what it takes to use the new LArG4 package has been frustrated at the point where the detector description from the GDML source needs to be updated.

I feel that we will benefit from a real, working LArSoft full example of how to do that step, including up to running GEANT4 in LArSoft.
So I have pushed into LArCoreAlg develop branch a geometry description, larcorealg:source:larcorealg/Geometry/gdml/MinimalLArTPCdetector.gdml and its _nowires companion, which contains the minimal set of GDML instructions that make LArSoft geometry and presumably GEANT4 and larg4::LArG4 module (LArSim) work properly.
I would like that simplified file to be adapted so that the rest of the community can start from there and give a try to the new LArG4.
To be clear: I am aware of the instructions on LArG4 wiki, and while I got a flavour of the required changed, the instructions proved not enough to bootstrap me into updating a LArTPC geometry file.

For reference, that geometry is the same, in LArSoft terms, as larcorealg:source:larcorealg/Geometry/gdml/LArTPCdetector.gdml, which is a MicroBooNE-like detector with TPC (1), PMTs (30), and auxiliary detectors (267). I can provide configuration files using that geometry and running the current LArG4 module (although I failed to fully enable optical simulation so far).

fcl.tgz (24.7 KB) fcl.tgz Hans-Joachim Wenzel, 05/13/2019 05:25 PM


#1 Updated by Lynn Garren 4 months ago

  • File test_311dp.fcl added
  • File services_dune2.fcl added
  • File dune_refactored.fcl added
  • File 3x1x1dphase_nowires.gdml added

From Hans:

The people working on dual phase TPC's were able to get the full chain running and I think everything can be found in the dune repositories. I have attached the fcl and gdml file they used.

I am in the process of compiling an example that shows how to use the new workflow using a simplified liquid Argon Detector geometry. But I still have to complete some coding which completely splits the electron drift and detector response. That means the larsim:source:larsim/ElectronDrift/ used by the example above will be split into the and another module that produces the simchannels.

Here the DriftElectronstoPlane_module will take the SimEnergyDeposits as input, drift the electrons to a surface and create the SimDriftedElectronClusters which then are the input for a new module that takes the SimDriftedElectronClusters as input and simchannels as output.

#2 Updated by Kyle Knoepfel 4 months ago

  • Assignee set to Hans-Joachim Wenzel
  • Status changed from New to Assigned

Hans, can you take care of this?

#3 Updated by Kyle Knoepfel 3 months ago

Hans, what is the status of this issue?

#4 Updated by Hans-Joachim Wenzel 3 months ago

  • File fcl.tgz added

#5 Updated by Hans-Joachim Wenzel 3 months ago

  • File dune_refactored2.fcl added

Currently an example is available as part of dunetpc. It was developed by the group working on a dual-phase TPC (Jose, Bea and Paul). So to look at the example one needs to setup dunetpc. Below is what I am doing until we find a place for a more generic example.

mkdir example 
cd example
mkdir larsim_dev
cd larsim_dev
source /cvmfs/
setup mrb
export MRB_PROJECT=larsim
mrb newDev -v v08_07_00 -q e17:prof
source localProducts_larsim_v08_07_00_e17_prof/setup
cd srcs
mrb g larsim
mrb b -j 4
unsetup cetpkgsupport
source /cvmfs/
setup dunetpc -qe17:prof v08_20_00 
tar xzvf fcl.tgz
lar -c dune_refactored.fcl

to run the module by Bill seligman which does the simdrift and injects the charge into the simchannels. (Currently this still depends on the LArG4Parameters service but we will remove this dependency)

lar -c dune_refactored2.fcl

#6 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (fcl.tgz)

#7 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (dune_refactored2.fcl)

#8 Updated by Hans-Joachim Wenzel 3 months ago

#9 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (3x1x1dphase_nowires.gdml)

#10 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (dune_refactored.fcl)

#11 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (services_dune2.fcl)

#12 Updated by Hans-Joachim Wenzel 3 months ago

  • File deleted (test_311dp.fcl)

Also available in: Atom PDF