User:Sophie/SingleProcessGenerator

From Mu2eWiki
Revision as of 23:34, 13 December 2024 by Sophie (talk | contribs) (→‎Use Cases)
Jump to navigation Jump to search

Purpose

The module: /Offline/EventGenerator/src/SingleProcessGenerator_module.cc is a generic module which is capable of generating a chosen physics process from a stopped muon particle.

An example use cases is the DIO:

 physics.producers.generate : {
 module_type : SingleProcessGenerator
 inputSimParticles: TargetStopResampler
 stoppingTargetMaterial : "Al"
 decayProducts :
 {
   tool_type : DIOGenerator
   spectrum : {
     pdgId            :  11
     spectrumVariable : "totalEnergy"
     spectrumShape    : "tabulated"
     spectrumFileName : "Offline/ConditionsService/data/heeck_finer_binning_2016_szafron.tbl"
     ehi              : 104.97
     elow             : 100.
   }
 }
 verbosity : 0

}

As you see the DIO has a "Generator tool" which contains the relevant generator spectrum but the SingleProcessGenerator module is capable of taking any such tool and making the outgoing electron spectra from a stopped muon at the target.

Use Cases

The module can be used for any stopped particle process. However an appropriate generator tool must be provided as the "tool_type" input.

So far we have implemented just two use-cases:

  • DIOGenerator
  • RMCGenerator

These must inherit from the ParticleGeneratorTool class. Alongside specifying generator tool, the user also requires an energy range to generator over. The module builds the chosen spectra in bins using the BinnedSpectrum util: Offline/Mu2eUtilities/inc/BinnedSpectrum.hh. The spectrumFileName parameter passes the module the chosen spectra. This must be in a tabulated txt file format.

How to use

There are two examples in Production/JobConfig/primary:

  • DIOtail.fcl
  • RMC.fcl

They must be ran using the gen_Primary.sh script available in Production/Scripts:

gen_Primary.sh --primary DIOtail --campaign MDC2020 --pver ah --sver p --type Muminus --njobs 1000 --events 4000 --pdg 11 --start 95 --end 110 

This builds the DIOtail using the SingleProcessGenerator in the range 95-110 MeV/c.

Contact

  • Module Developer: Sophie Middleton
  • Production: Yuri Oksuzian