Difference between revisions of "HOWTO run a single-particle-gun simulation"

From GlueXWiki
Jump to: navigation, search
(Running a single particle Gun)
(Running a single particle Gun)
Line 3: Line 3:
 
In this example we are going to use hdgeant4 and we are simulating a single particle eta to be generated. The eta is chosen to also show how to force geant to let eta decay only into one final state rather than all possible ones. To achieve all this we require two files:
 
In this example we are going to use hdgeant4 and we are simulating a single particle eta to be generated. The eta is chosen to also show how to force geant to let eta decay only into one final state rather than all possible ones. To achieve all this we require two files:
 
# "control.in", to define the kinematics and with the particle type. An example of this files looks as follows: <br>TRIG 1000<br> KINE  117  5.97  0.01  0.  0.0    0.05    360.<br>SCAP    0.      0.    1. <br>TGTWIDTH          0.5              .5 <br>HADR 1 <br> OUTFILE 'etaRAND.hddm' <br>RNDM 2057859 <br>RUNG 30402
 
# "control.in", to define the kinematics and with the particle type. An example of this files looks as follows: <br>TRIG 1000<br> KINE  117  5.97  0.01  0.  0.0    0.05    360.<br>SCAP    0.      0.    1. <br>TGTWIDTH          0.5              .5 <br>HADR 1 <br> OUTFILE 'etaRAND.hddm' <br>RNDM 2057859 <br>RUNG 30402
# "r.mac", this file contains the necessary commands to run hdgeant4 and also sets up the decay modes for the eta as follows, in this example only mode 1 is enabled (3pi0 decay) and 1000 events are generated: <br>/particle/select eta<br>/particle/property/decay/select 0<br>/particle/property/decay/br 0<br>/particle/property/decay/select 1<br>/particle/property/decay/br 1<br>/particle/property/decay/select 2<br>/particle/property/decay/br 0<br>/particle/property/decay/select 3<br>/particle/property/decay/br 0<br>/run/beamOn 1000
+
# "r.mac", this file contains the necessary commands to run hdgeant4 and also sets up the decay modes for the eta as follows, in this example decay mode 1 is given 100% (3pi0 decay) all other decay modes are zero and 1000 events are generated: <br>/particle/select eta<br>/particle/property/decay/select 0<br>/particle/property/decay/br 0<br>/particle/property/decay/select 1<br>/particle/property/decay/br 1<br>/particle/property/decay/select 2<br>/particle/property/decay/br 0<br>/particle/property/decay/select 3<br>/particle/property/decay/br 0<br>/run/beamOn 1000
 
# run this as follows: hdgeant4 r.mac and will create a file etaRAND.hddm as specified in the control.in file.
 
# run this as follows: hdgeant4 r.mac and will create a file etaRAND.hddm as specified in the control.in file.

Revision as of 21:15, 25 May 2020

Running a single particle Gun

In this example we are going to use hdgeant4 and we are simulating a single particle eta to be generated. The eta is chosen to also show how to force geant to let eta decay only into one final state rather than all possible ones. To achieve all this we require two files:

  1. "control.in", to define the kinematics and with the particle type. An example of this files looks as follows:
    TRIG 1000
    KINE 117 5.97 0.01 0. 0.0 0.05 360.
    SCAP 0. 0. 1.
    TGTWIDTH 0.5 .5
    HADR 1
    OUTFILE 'etaRAND.hddm'
    RNDM 2057859
    RUNG 30402
  2. "r.mac", this file contains the necessary commands to run hdgeant4 and also sets up the decay modes for the eta as follows, in this example decay mode 1 is given 100% (3pi0 decay) all other decay modes are zero and 1000 events are generated:
    /particle/select eta
    /particle/property/decay/select 0
    /particle/property/decay/br 0
    /particle/property/decay/select 1
    /particle/property/decay/br 1
    /particle/property/decay/select 2
    /particle/property/decay/br 0
    /particle/property/decay/select 3
    /particle/property/decay/br 0
    /run/beamOn 1000
  3. run this as follows: hdgeant4 r.mac and will create a file etaRAND.hddm as specified in the control.in file.