SimulationFCL: Difference between revisions
Line 70: | Line 70: | ||
This will run the main reconstruction scripts with default cut parameters in the helix fitting and Kalman seeding modules. | This will run the main reconstruction scripts with default cut parameters in the helix fitting and Kalman seeding modules. | ||
The output file will be in the form: | |||
mcs.owner.description.version.art | mcs.owner.description.version.art |
Revision as of 16:21, 15 October 2021
This page provides documentation on the simulation infrastructure for the MDC2020 era of the Mu2e code base.
Introduction
- Mu2e/Production contains the code a user will use to generate a primary physics process, digitize the output and reconstruct the hits, timecluster, tracks,clusters etc.
Simulation Workflow
Several new generators and workflows have been implemented for MDC2020.
Stopped Particles
In order to make a set of daughter particles, e.g. decay in orbit electrons, the user first needs a list of mother "stopped particles" these could be stopped muons or pions (or other) at either the stopping target or Inner Proton Absorber (IPA), at present these are the only stopping locations available.
These stopped particles must be stored within a .art file and must be created following the standard production workflow :
- Generate Protons on Target (POT) using the Production/JobConfig/beam/POT.fcl file. This will result in 2 output .art files: beam particles and neutral particles.
- Neutrals can be resampled and incorporated in pileup modeling. To make the stopped muons the beam output must be passed through the Production/JobConfig/beam/BeamSplitter.fcl. This will make 2 output .art files: beam electrons and muons. The electrons can be resampled and incorporated in the final mixing job.
- The muon output can then be passed into Production/JobConfig/pileup/MuBeamResampler.fcl. Two output streams are created : Target stops and IPA stops. These will be used to make your stopped muon .art files.
- The make the .art file of stopped muons at the target run the target output through Production/JobConfig/pileup/MuonStopSelector.fcl. The mu - output stream will be what you require.
Generating a Primary
All physics processes (signal and background) should have an associated generator script in the Production/JobConfig/primary directory. These files can be run using the driver fcl file examples in Production/Tests. The .art file of relevent mother stopped particles must be fed into the driver fcl files using the ``FileName" parameter for example:
physics.filters.TargetStopResampler.fileNames : ["/pnfs/mu2e/tape/phy-sim/sim/mu2e/MuminusStopsCat/MDC2020k/art/39/6a/sim.mu2e.MuminusStopsCat.MDC2020k.001201_00000000.art"]
To run on the grid you will need to follow the advice in GenerateFcl. In the case of running on the grid edit the path to the stopped muon file by first typing in the terminal
samweb list-file-locations --schema=root --defname="sim.mu2e.MuminusStopsCat.MDC2020k.art" | cut -f1
replace the FileName in the fcl file with the output of this command.
To run interactively for a pure primary CeEndpoint (as an example):
mu2e -c Production/Tests/CeEndpointSteps.fcl --nevts=1000
If you wish to look at the generator output you can use the fcl file Production/JobConfig/primary/GenPlots.fcl (i.e. include it in your driver fcl and ensure the analyzer is in your end path). If you want an output histogram/root tree file pass in an output file name to the TFileService:
services.TFileService.fileName: "nts.owner.GenPlots.version.sequencer.root"
The final output from the primary stage will be a "dts" type file in the form:
dts.tester.description.version.art
This file contains:
- Monte Carlo Info : GenParticles, SimParticles, StepPointMCs associated with the generator output
- Detector Steps : StrawGasSteps, CrvSteps, CaloShowerSteps - these will be used by the digitization modules to make the hits which will later be used for reconstruction.
Digitization
The next stage (if you intend to look at reconstructed objects) is to run the primary out put (the dts file) through the digitization process. To do this for OnSpill physics:
mu2e -c Production/JobConfig/digitize/OnSpill.fcl dts.tester.process.version.art
If you are working with OffSpill particles, for example off spill cosmics, you should use the OffSpill file instead.
This fcl file will use the detector steps created in the previous stage and pass them through the modules used to digitize those steps in the various detectors.
The output of this stage is split into 2 streams:
- DigiUntriggered
- DigiTriggered
Reconstructing tracks from the target
As a user you can reconstruct either triggered or untriggered streams, it depends on what you are studying. To reconstruct particles from the target simply run the following:
mu2e -c Production/JobConfig/reco/Reco.fcl dig.owner/Digi(Un)Triggered.version.art
This will run the main reconstruction scripts with default cut parameters in the helix fitting and Kalman seeding modules.
The output file will be in the form:
mcs.owner.description.version.art
An "mcs" file contains reconstructed output, digi objects and Monte Carlo truth information.
Reconstructing tracks from the IPA
Other Resources
- GenerateFcl - Learn how to generate a fcl file in preparation for running on the grid.