Project

General

Profile

GMC User's Guide

Before Running GMC

Before you run GMC, you need to create the schema the data will reside in and load some necessary tables into it. To do this, run the TableLoader program that can be found in the seaquest software distribution at seaquest-gmc/build/bin/. Default MySQL server is seaquel.physics.illinois.edu and the default port number is 3283. If you installed with the Seaquest software distribution, the -t argument should be unnecessary.

The seaguest login allows you to create, modify, and delete schemas named like test_* and user_*, as well as view other schemas. It is recommended to name your schemas like user_yourname_*. The production login allows you to create, modify, and delete schemas like mc_* and geometry_*. I recommend logging in as seaguest unless you need the extra permissions of production.


-s arg: Runs this program on the schema arg
-g arg: Uses the geometry in the schema arg
-l arg: Uses arg as the username for MySQL
-p arg: Uses arg as the password for MySQL
-m arg: Uses arg as the MySQL server address
-port arg: Uses arg as the MySQL port number
-t arg: Uses arg as the path to find several tables, including the RT curves.
-help: Prints the list of possible options to screen and exits

Example: TableLoader -s user_name_Monte_Carlo -l login -p password -g geometry_G10_run3

Running GMC

GMC takes one argument, -m macro_name. While GMC can be run by entering in commands when it prompts you, I highly recommend using a macro. When GMC is given a macro as an argument, it runs all the commands then exits. A macro is just a text file with a single command on each line. After GMC finishes, it will output some warning lines about attempting to delete things with the geometry closed. These warnings can be ignored.

Essential Commands

/control/outputFile (string): This sets the name of the SQL scheme that is created, as well as the prefix of any normalization files that are produced.

/control/login (string): This changes the login used to access the SQL server. You will have to set this to write the output to a schema that doesn't start with "test_" or "user_name" .

/control/password (string): This changes the password used to access the SQL server. If you change the login you will need to change this.

/control/server (string): This sets the name of the MySQL server the data is set to. The default is seaquel.physics.illinois.edu.

/control/mysqlPort (int): This sets the port number for the MySQL server. The default is 3283. Most servers other than seaquel.physics.illinois.edu will use 3306.

/control/geometrySchema (string): This is the geometry schema that loads objects into Geant4's geometry. Should be the same as from TableLoader.

/set/target (int): 1 is LH2, 3 is LD2, 5 is Iron, 6 is Carbon, and 7 is Tungsten. You can also look up these integers in the TargetInfo table in the geometry schema.

/set/kmagMultiplier (double): Sets the strength of the KMag field. This number multiplies the field numbers found in the magnetic field file.

/set/fmagMultiplier (double): Sets the strength of the FMag field. This number multiplies the field numbers found in the magnetic field file.

/random/setSeed (number, 0 or greater): This changes the random number seed. The default is 0. This is different than random/setSeeds, and requires less knowledge of the random number generator. This is necessary for running multiple instances of the GMC in parallel without getting duplicate data.

/set/eventGenType (gun, dimuon, custom): gun makes the generator a proton beam fired at the target. dimuon creates muon pairs from the Drell-Yan process and/or JPsi decay in the target and/or beam dump. custom tells it to read in a MySQL table of tracks to generate events.

/set/dimuonSource (DY, JPsi, PsiPrime): Only affects the generation of dimuon events. Determines if dimuons will come from JPsi decay, or from Drell-Yan scattering, or both. Default is both.

/set/eventPos (all, dump, target, upstream): Only affects the generation of dimuon events. Determines the location where dimuons will be generated.

/set/recordMethod (hits, dimuonFull, dimuonOnly): If it is set to hits events that generate 0 hits are not recorded and every track that generated a hit either directly or indirectly through creating other tracks will be recorded. If it is set to dimuonFull, only events where both muons from a dimuon hit all 4 hodoscope stations are recorded. There is a little fudge room in the size of the hodoscope stations. If it is set to dimuonOnly, all dimuon data will be recorded, but no hits or tracks will be recorded and the track interaction with our spectrometer will not be computed. This can very quickly generate 4pi data.

/control/initialize: Initializes the run manager for Geant4. This should be done after all the MySQL server options and target selection are set correctly. To be safe this command should be right before /run/beamOn.

/run/beamOn (int): Generates this many events. This should be the last command entered. For the gun generator this is the number of protons, even though GMC groups many protons into a single event in the output.

Other Commands

You can run the monte carlo without worrying about setting these, but these can give you more control over the output if you desire it.

/control/magnetPath (string): This should be set to the path where the magnetic field maps are stored on your computer. The Seaquest software distribution has things set up so the files can be found without this option.

/control/customSchema (string): This tells GMC which schema to read in tracks from if /set/eventGenType custom is used. It's been a while since I tested the custom generator since no one seems to use it, so it may not work.

/set/pdfSet (string): This sets the PDF set used in GMC. It has to match a folder name in the LHAPDF data folder. The default is currently CT14lo. There are a few other PDF sets installed on seaquestgpvm but if you want a particular PDF set you will likely have to add it to the LHAPDF installation.

/set/bucketSize (int): This changes the number of protons in a bucket for the gun generator. The default is 40,000.

/set/beamCurrent (int): This changes the number of protons per second. The default is 2E12

/set/beamMomentum (number and energy unit): This changes the momentum of the beam hitting the target. The default is 120 GeV.

/set/dimuonRepeat (int): When a set of dimuon kinematics is generated, this number of dimuons will be generated. Default is 1.

/set/xbMax (double): Sets the maximum value that Bjorken x of the beam can have.

/set/xbMin (double): Sets the minimum value that Bjorken x of the beam can have.

/set/xtMax (double): Sets the maximum value that Bjorken x of the target can have.

/set/xtMin (double): Sets the minimum value that Bjorken x of the target can have.

/set/massMax (double): Sets the maximum value of the virtual photon mass.

/set/massMin (double): Sets the minimum value of the virtual photon mass.

/set/xfMax (double): Sets the maximum value of Feynman x.

/set/xfMin (double): Sets the minimum value of Feynman x.

/set/cosThetaMin (double): Sets the minimum value that cos(Collins Soper theta) can have.

/set/cosThetaMax (double): Sets the maximum value that cos(Collins Soper theta) can have.

/set/monteTables (bool): If false, mHit, triggerHit, and mNoiseHit tables are not created. Can be useful for saving room and time if the production is large.

/control/magFromAscii (bool): If true, the magnetic field is loaded from ascii files. If false, they are loaded from the SQL server. The information is identical, but the ascii loading is faster. Default is true. If you load from MySQL, set the next option.

/control/magnetSchema (string): The name of a MySQL schema to load magnetic field information from.

/control/kmagFile (string): File name for the magnetic field map for kmag. Should not be needed.

/control/fmagFile (string): File name for the magnetic field map for fmag. Should not be needed.

Example Macro

As an example, a macro file might look like this:

/control/login login
/control/password password
/control/server seaquel.physics.illinois.edu
/control/mysqlPort 3283
/control/outputFile user_name_Monte_Carlo
/set/eventGenType dimuon
/set/dimuonSource DY
/set/eventPos target
/set/target 3
/set/recordMethod hits
/random/setSeed 1
/control/geometrySchema geometry_G10_run3
/control/initialize
/run/beamOn 1000

After Running GMC

After you are finished running all the instances of GMC in a production, the TableMerger program needs to be run. This program can be found in the Seaquest software distribution at seaquest/GMC/build/bin/. The GMC program will have created separate tables for each instance of GMC, i.e. Event_1, Event_2, Event_3, etc. This program will merge all the separate tables. The default MySQL server is seaquel.physics.illinois.edu and default port number is 3283.

-s arg: Runs this program on the schema arg%BR%
-l arg: Uses arg as the username for MySQL%BR%
-p arg: Uses arg as the password for MySQL%BR%
-m arg: Uses arg as the MySQL server address%BR%
-port arg: Uses arg as the MySQL port number%BR%
-help: Prints the list of possible options to screen and exits

Example: TableMerger -s user_name_Monte_Carlo -l login -p password

After this is complete, it is necessary to run the Index program. This program can be found in the Seaquest software distribution at seaquest/GMC/build/bin/.

-s arg: Runs this program on the schema arg%BR%
-l arg: Uses arg as the username for MySQL%BR%
-p arg: Uses arg as the password for MySQL%BR%
-m arg: Uses arg as the MySQL server address%BR%
-port arg: Uses arg as the MySQL port number%BR%
-help: Prints the list of possible options to screen and exits

Example: Index -s user_name_Monte_Carlo -l login -p password

After this, the data should be ready for use.