Skip to content

Generating MC for specific reactions with gen_amp

Justin Stevens edited this page Jul 19, 2019 · 21 revisions

Current builds of the GlueX software are located at /sciclone/home10/jrstevens01/analysisGluexI/builds/ and can be set in your environment with this command

source /sciclone/home10/jrstevens01/analysisGluexI/builds/setup.csh

We'll be using the gen_amp generator to simulate our reactions, which allows us to give as input certain resonances which decay through the 2-body isobar mechanism.

Example generator configuration

An example generation file for the K+K-pi0 reaction shows how amplitudes can be constructed for different resonance contributions. We'll start with some of the resonances observed in the E852 pion beam experiment hep-ex/0107042 for the same reaction:

reaction Pi0K+K- Beam Proton Pi0 K+ K-

sum Pi0K+K- xpol

amplitude Pi0K+K-::xpol::eta1295_a0pi_S BreitWigner eta1295 0 34 2
amplitude Pi0K+K-::xpol::eta1295_a0pi_S BreitWigner a0 0 3 4

# angular amplitude parameters: JX LX DaughtersX JIso1 DaughtersIso1 JIso2 DaughtersIso2 ...
amplitude Pi0K+K-::xpol::eta1295_a0pi_S IsobarAngles 1 0 234 1 34

amplitude Pi0K+K-::xpol::f11420_KStarPlusK_P BreitWigner f11420 1 23 4
amplitude Pi0K+K-::xpol::f11420_KStarPlusK_P BreitWigner KStar 0 2 3

amplitude Pi0K+K-::xpol::f11420_KStarMinusK_P BreitWigner f11420 1 24 3
amplitude Pi0K+K-::xpol::f11420_KStarMinusK_P BreitWigner KStar 0 2 4

initialize Pi0K+K-::xpol::eta1295_a0pi_S cartesian 1.0 0.0
initialize Pi0K+K-::xpol::f11420_KStarPlusK_P cartesian 1.0 0.0
initialize Pi0K+K-::xpol::f11420_KStarMinusK_P cartesian 1.0 0.0

For other final states a similar set of amplitude definitions for the BreitWigner amplitudes can be defined. This simple example does not include the decay angular distributions, etc. which are needed for the actual amplitude analysis. More information on the available amplitudes can be found in the halld_sim repository

Generating events with MCWrapper

Once the generator config file is prepared you can create an MCWrapper configuration file which will generate events and run the full reconstruction to produce the Analysis TTrees for your reaction. See for example, this config file for how to set the relevant MCWrapper config parameters.

To generate events in the local interactive mode for testing you can use the command

gluex_MC.py MC.config 30496 100 batch=0

To submit jobs which generate many more events

gluex_MC.py MC.config 30496 25000 per_file=1000 batch=1

The initial goal for this generation step is to simulate what we "think" are the relevant resonances in these channels and see how the measured distributions we obtain from the DSelector match those simulated by these simple models.

Next, we'll attempt to fit these simulation samples to extract the amplitudes we've used during generation. This will check to be sure we have a self-consistent process, which is often referred to as an "input-output" test.

Create your own build environment for modifying generator

cd ~/

mkdir myBuilds

cp /sciclone/home10/jrstevens01/myBuilds/version.xml ./

cp /sciclone/home10/jrstevens01/myBuilds/setup.csh ./

Edit version.xml:

Change this line of version.xml

<package name="halld_sim" home="/sciclone/home10/jrstevens01/myBuilds/halld_sim"/>

to list your myBuilds directory as the “home” for halld_sim instead of jrstevens01. Be sure to check that you have the right home10 or home20 for your home directory.

source setup.csh

Download and compile your own version of halld_sim

In your myBuilds directory, do the following

git clone https://github.com/JeffersonLab/halld_sim.git
cd halld_sim
git checkout wm_amp
cd src
scons -u install -j8

See the wm_amp branch on GitHub

Now when you run the generator you’ll use your private version. You can change modify:

halld_sim/src/programs/Simulation/gen_amp/gen_amp.cc -> to display diagnostic histograms halld_sim/src/libraries/AMPTOOLS_AMPS/IsobarAngles.cc -> to change the way the decay angle distribution is calculated

Testing generated angular distributions

Instead of running the full simulation and reconstruction, you can just run the generator portion with something like this command:

gen_amp -c /sciclone/home10/jrstevens01/analysisGluexI/omegapipi/gen_omegapipi_angles.cfg -hd gen_amp_030496_000.hddm -o gen_amp_030496_000.root -n 500 -r 30496 -a 8.0 -b 11.6 -p 8.820 -m 11.614

The diagnostic file gen_amp_diagnostic.root produced by gen_amp.cc has some angular distributions which you should look at to verify you get the expected distribution from IsobarAngles. You should add/modify gen_amp.cc in your version of halld_sim and recompile to fill additional histograms you need to validate the angular decay contributions you introduce to your generator.