Difference between revisions of "PhysicalVolumeInfoCollection"

From Mu2eWiki
Jump to navigation Jump to search
Line 15: Line 15:
 
SimParticle volume number is the index in PhysicalVolumeHelper
 
SimParticle volume number is the index in PhysicalVolumeHelper
 
StepPointMC's record only the copy number for the volume.
 
StepPointMC's record only the copy number for the volume.
 +
  
 
The components are:
 
The components are:
Line 26: Line 27:
 
* Mu2eG4/src/PhysicalVolumeHelper holds full list of volumes as geant pointers, list of PV's for a single stage, converts geant track to an index in the volume list
 
* Mu2eG4/src/PhysicalVolumeHelper holds full list of volumes as geant pointers, list of PV's for a single stage, converts geant track to an index in the volume list
 
* Mu2eG4/src/Mu2eG4_module.cc creates PhysicalVolumeHelper, fills with all volumes at begin run from geant PhysicalVolumeStore, creates PhysicalVolumeInfoMultiCollection in beginSubRun - copies existing, adds new from PhysicalVolumeHelper for current stage
 
* Mu2eG4/src/Mu2eG4_module.cc creates PhysicalVolumeHelper, fills with all volumes at begin run from geant PhysicalVolumeStore, creates PhysicalVolumeInfoMultiCollection in beginSubRun - copies existing, adds new from PhysicalVolumeHelper for current stage
* CompressPhysicalVolumes_module.cc filters the PVIC to a PVISS, saving only PVI used on SimParticles
+
* CompressPhysicalVolumes_module.cc  
 
+
** in event: saves the set of volumes used by input SimParticles and SimParticles pointed to by StepPointMC's
 +
** in subrun:
 
[[Category:Computing]]
 
[[Category:Computing]]
 
[[Category:Code]]
 
[[Category:Code]]

Revision as of 21:46, 6 March 2018

Expert.jpeg This page page needs expert review!

Actually, the definition of a data product is slightly broader than this. The art::Run object is just an art::RunId object plus a collection of data products; similarly for the art::SubRun object. An example of a data product in the Run record is PhysicalVolumeInfoCollection. When we intialize Geant4, we do it in the beginRun method of Mu2eG4/src/G4_plugin.cc. At the end of Geant4 initialization we create a std::vector of all physical volumes known to G4 and we put this information into the art::Run object as a PhysicalVolumeInfoCollection. The SimParticle class holds two indices into this collection; one describes the volume in which the particle was born and the other describes the volume in which the particle stopped.

SimParticle volume number is the index in PhysicalVolumeHelper StepPointMC's record only the copy number for the volume.


The components are:

  • PhysicalVolumeInfo - a volume text name and material name. It also contains the copy number for volumes which are repeated, such as crystals.
  • PhysicalVolumeInfoCollection - a vector of PhysicalVolumeInfo
  • PhysicalVolumeInfoSingleStage - a cet::map_vector of PhysicalVolumeInfo, only the PVI that are used by SimParticles. The map_vector index is a counter over the geant volume store.
  • PhysicalVolumeInfoMultiCollection - a vector of PhysicalVolumeInfoSingleStage

The PhysicalVolumeInfoMultiCollection is needed because different stages of a simulation might use completely different geometries, which have different numbers for the volumes.

  • Mu2eG4/src/PhysicalVolumeHelper holds full list of volumes as geant pointers, list of PV's for a single stage, converts geant track to an index in the volume list
  • Mu2eG4/src/Mu2eG4_module.cc creates PhysicalVolumeHelper, fills with all volumes at begin run from geant PhysicalVolumeStore, creates PhysicalVolumeInfoMultiCollection in beginSubRun - copies existing, adds new from PhysicalVolumeHelper for current stage
  • CompressPhysicalVolumes_module.cc
    • in event: saves the set of volumes used by input SimParticles and SimParticles pointed to by StepPointMC's
    • in subrun: