LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArVoxelReadout.h File Reference

A Geant4 sensitive detector that accumulates voxel information. More...

#include <algorithm>
#include <stddef.h>
#include <vector>
#include "Geant4/G4PVPlacement.hh"
#include "Geant4/G4VSensitiveDetector.hh"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "larcore/Geometry/Geometry.h"
#include "larcoreobj/SimpleTypesAndConstants/geo_vectors.h"
#include "lardataobj/Simulation/SimChannel.h"
#include "larsim/Simulation/LArG4Parameters.h"

Go to the source code of this file.

Classes

struct  larg4::TPCID_t
 Simple structure holding a TPC and cryostat number. More...
 
class  larg4::G4PVPlacementWithID< IDTYPE >
 A G4PVPlacement with an additional identificator. More...
 
class  larg4::LArVoxelReadout
 Transports energy depositions from GEANT4 to TPC channels. More...
 
struct  larg4::LArVoxelReadout::Setup_t
 Collection of what it takes to set a LArVoxelReadout up. More...
 

Namespaces

 detinfo
 General LArSoft Utilities.
 
 CLHEP
 
 larg4
 Geant4 interface.
 

Typedefs

typedef G4PVPlacementWithID< TPCID_t > larg4::G4PVPlacementInTPC
 A physical volume with a TPC ID. More...
 

Detailed Description

A Geant4 sensitive detector that accumulates voxel information.

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

One way to implement voxels in Geant4 is to create a parallel "read-out" geometry along with the real, physical geometry. The read-out geometry is implemented in LArVoxelReadoutGeometry; this class is the sensitive detector for that geometry. That is, Geant4 will call this routine every time there is a step within a volume of the read-out geometry; this routine then accumulates information from that step.

In general, Geant4 expects to have per-event user information attached to the G4Event in some way; their G4VSensitiveDetector class supports this by allowing user-defined hit collections to added to a G4HCOfThisEvent object (a collection of hit collections; yes, it makes my head ache too!) that's part of each G4Event.

This class works differently, by accumulating the information in its internal sim::LArVoxelList. See LArVoxelListAction for how this information is made available to the main LArG4 module.

Why define a parallel geometry? Here are some reasons:

  • The regular LAr TPC is one large volume of liquid argon. When Geant4 does its physics modeling, it can be unconstrained in step size by the voxels. Only for readout would the steps be sub-divided.
  • There may be more than one kind of readout, depending on a detector's instrumentation (e.g., OpDets in addition to the wire planes). It's possible that the voxelization appropriate for the wire planes may not be an appropriate readout for the other readouts. Geant4 allows the construction of multiple parallel readouts, so this mechanism is relatively easy to extend for each type of readout.
    N.B. At the beginning of each event, the clock data pointer must be set to the event currently being processed. This is a thread-safety problem which should be reconciled for the larg4 package if it has not already been. The way that is done for the LArG4_module is for the LArVoxelReadoutGeometry object to update the state of the LArVoxelReadout object

    through a sentry object.

Definition in file LArVoxelReadout.h.