SoftwareHints » History » Revision 4
« Previous |
Revision 4/17
(diff)
| Next »
Dobbs, Adam, 02 February 2013 16:25
Software Hints and Tips¶
Running a tracker simulation¶
There is a dedicated directory holding top level scripts for producing tracker data within MAUS at:
bin/user/scifi
For example to run a MAUS simulation of the tracker in the presence of a magnetic field do the following from the MAUS root directory:
source env.sh cd bin/user/scifi ./simulate_scifi.py --configuration_file datacard_mc_helical
The equivalent command for no magnetic field (straight tracks) is:
./simulate_scifi.py --configuration_file datacard_mc_straight
Datacard variables¶
Datacard variables control the various parameters passed to MAUS. The variables assume the default values set in src/common_py/ConfigurationDefaults.py unless overridden in a datacard or elsewhere. Here are a few common variables:
- Number of spills. The number of spills to simulate can be set by editing the relevant datacard file and changing the variable 'spill_generator_number_of_spills'.
- The number of particles per spill is controlled by the beam variable. This has a number of sub-variables, two of which can be set to alter the number of particles per spill:
- 'binomial_n' is the number of attempts at generating a track
- 'binomial_p' is the probability an attempt succeeds
- Helical pattern recognition can be turned on or off by setting 'SciFiHelicalPROn' to 1 or 0 respectively
- Straight pattern recognition can be turned on or off by setting 'SciFiStraightPROn' to 1 or 0 respectively
Accessing the output data¶
Data is output by MAUS either as ROOT or JSON documents. In order for ROOT to understand the classes we have written a ROOT dictionary, built automatically by MAUS must first be loaded. In an interactive ROOT session this done with following command:
.L $MAUS_ROOT_DIR/build/libMausCpp.so
The equivalent command if using PyROOT is
import libMausCpp
An example ROOT session to open a data file would be:
> .L $MAUS_ROOT_DIR/build/libMausCpp.so > TFile f1("maus_output.root") > TBrowser b
The equivalent PyROOT session would be:
> from ROOT import * > import libMausCpp > f1 = TFile("maus_output.root") > b = TBrowser()
The tracker MC data can then be found by browsing to:
Spill:data:_spill:_mc:_sci_fi_hits
The reconstructed data is stored under:
Spill:data:_spill:recon:_scifi_event
Updated by Dobbs, Adam over 10 years ago · 4 revisions