Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Generators/gen_tcs_bh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This directory contain the configuration file for running: gen_tcs_bh event generator.

Make changes in the configuration file: "tcs_bh.cfg" with the
desire input or settings you want to run the event generator with.

Do not edit the file: in run/"tcs_bh_TEMPLATE.conf"
It is the template use by MCWrapper during event generations run.
479 changes: 479 additions & 0 deletions Generators/gen_tcs_bh/run/Gcontrol.in

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions Generators/gen_tcs_bh/run/MC_gen_tcs_bh.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#THESE TWO ARE OPTIONAL IF THE STANDARD RUNNING DOESN'T SUIT YOUR NEEDS
#CUSTOM_MAKEMC=use-this-script-instead
CUSTOM_MAKEMC=/w/halld-scshelf2101/home/gchung/tcs_sim2/gluex_MCwrapper/MakeMC.sh
#CUSTOM_GCONTROL=use-this-Gcontrol-instead
#CUSTOM_GCONTROL=/w/halld-scshelf2101/home/gchung/tcs_sim2/gluex_MCwrapper/Generators/gen_tcs_bh/run/Gcontrol.in
#========================================================================

#VARIATION=mc calibtime=timegoeshere #set your jana calib context here with or without calibtime Default is variation=mc
#RECON_VERSION=versiongoeshere
#RECON_CALIBTIME=timegoeshere
#ANA_VERSION=versiongoeshere
#ANA_CALIBTIME=timegoeshere

#RCDB_QUERY=

#RUNNING_DIRECTORY=/run/in/this/directory #where the code should run. This is defaulted to ./. Use only when NEEDED
RUNNING_DIRECTORY=/w/halld-scshelf2101/home/gchung/tcs_sim2/gluex_MCwrapper


#ccdbSQLITEPATH=/your/sqlite/path/ccdb.sqlite #if you use SQLITE and it is not part of the environment file that gets sourced
#rcdbSQLITEPATH=/your/sqlite/path/rcdb.sqlite #if you use SQLITE and it is not part of the environment file that gets sourced

#TAG=my-custom-prefix-tag

#DATA_OUTPUT_BASE_DIR=OUTPUT-LOCATION #your desired output location
DATA_OUTPUT_BASE_DIR=/w/halld-scshelf2101/home/gchung/tcs_sim2/gluex_MCwrapper #your desired output location

NCORES=4 # Number of CPU threads to use or nodes:node-id:ppn or nodes:ppn depending on your system

#GENERATOR=generator-to-use #or you may specifile file:/.../file-to-use.hddm
GENERATOR=gen_tcs_bh #or you may specifile file:/.../file-to-use.hddm

#GENERATOR_CONFIG=config file for generator
GENERATOR_CONFIG=/w/halld-scshelf2101/home/gchung/tcs_sim2/gluex_MCwrapper/Generators/gen_tcs_bh/tcs_bh.cfg
#GENERATOR_POSTPROCESS=decay_evtgen:pathToConfigFile:pathToEVT.PDL:pathToDECAY.DEC # last two are optional (set 2nd to default if only 3rd is used), eg evtgen:/u/home/evtgen.cfg:default:someOther.DEC

#common parameters for generators
#FLUX_TO_GEN=/[full path]/flux.root:flux_hist
#POL_TO_GEN=/[full path]/tpol.root:pol_hist
#eBEAM_ENERGY=12 #either use rcdb or do not set to pull the value for the chosen run number from the rcdb
#eBEAM_CURRENT=0.01 #either use rcdb or do not set to pull the value for the chosen run number from the rcdb in uA
#RADIATOR_THICKNESS=50.e-06 #either use rcdb or do not set to pull the value for the chosen run number from the rcdb
#COHERENT_PEAK=9 #either use rcdb or do not set to pull the value for the chosen run number from the rcdb
GEN_MIN_ENERGY=4
GEN_MAX_ENERGY=11.6

GEANT_VERSION=4
#VERTEX_VOLUME=ccdb:29.5 #defines the VERTEX card in geant. The first value should be a comma seperated string x,y,z,var_xx,var_xy,var_yy,dxdz,dydz and the second part is the length (only the length need be given)

BKG=None #[None, Random:[TAG], BeamPhotons, TagOnly, custom e.g bg.hddm:1.8] Can be stacked eg Random:[TAG]+TagOnly:.123 where the :[num] defines BGRATE


#GENERATOR_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported
#POSTGEN_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported
#SIMULATION_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported
#MCSMEAR_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported
#RECON_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported
#ANA_OS=centos7 #use only if code needs to run on special OS, either centos7 or alma9 container are supported


#environment file location
#ENVIRONMENT_FILE=your-environment-files #change this to your own environment file
ENVIRONMENT_FILE=/u/home/gchung/version_hdsim.xml #change this to your own environment file
#ANA_ENVIRONMENT_FILE=your-analysis-environment-file #optional either a .(c)sh file to be sourced or .xml before the below plugins are run

#optional additional plugins that will be run along side danarest and hd_root. This should be a comma separated list (e.g. plugin1,plugin2)
#CUSTOM_PLUGINS= #or file:/.../file-to-use which is a configuration file for jana/hd_root
#CUSTOM_ANA_PLUGINS= #or file:/.../file-to-use which is a configuration file for jana/hd_root, this is used in the analysis launch emulation. Don't include the mcthrown_tree plugin here!
#====================================================================================
#EVERYTHING BELOW FOR BATCH ONLY

#VERBOSE=True
BATCH_SYSTEM=swif2cont #can be swif or swif2 or swif2cont (to run in centos9 container) or condor or osg or qsub adding :[name] will pass -q [name] into PBS.

WORKFLOW_NAME=WORKFLOW-NAME #SWIF WORKFLOW NAME

# for swif
PROJECT = gluex # http://scicomp.jlab.org/scicomp/#/projects
TRACK= simulation # https://scicomp.jlab.org/docs/batch_job_tracks
# for swif2
ACCOUNT = halld # https://scicomp.jlab.org/scicomp/slurmJob/slurmAccount
PARTITION = production # https://scicomp.jlab.org/scicomp/slurmJob/slurmInfo
EXPERIMENT = GlueX # GlueX (default) or CPP

# RESOURCES for swif(2) jobs
DISK=5GB # Max Disk usage
RAM=5GB # Max RAM usage
TIMELIMIT=300minutes # Max walltime. This may be of the form xx:xx:xx depending on your system
OS=el9 # Specify CentOS65 machines
65 changes: 65 additions & 0 deletions Generators/gen_tcs_bh/run/tcs_bh_TEMPLATE.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# --- Reaction -------------------------------------------------
# reaction (1 -> TCS; 11-> TCS phase space)
reaction: TEMPREACTION

# seed for random number generator
seedentry: TEMPRANDSEED

# --- Beam configuration -------------------------------------------------
# Electron beam=1 or photon beam=0
beamtype: TEMPBEAMTYPE

# Energy range of the photon
EphotonMin: TEMPEMIN
EphotonMax: TEMPEMAX

# Incoming electron energy or equivalent
Eelectron: TEMPEELECTRON

# Beam angular dispersion
thetaphotoMax: TEMPTHEMAX

# --- Event generation ----------------------------------------------------
nTotEvents: TEMPNEVENTS
runNum: TEMPRUNNUM
outLepton: TEMPARTICLE

# --- Target configuration ------------------------------------------------
targetLength: TEMPTGT_LEN
A_target: TEMPTGT_A
Z_target: TEMPTGT_Z
protonOrNeutron: TEMPPROT_NEUT

# --- Polarization --------------------------------------------------------
polBeamDeg: TEMPPOLBEAM
beamPolarType: TEMPPOLTYPE
targetPolDir: TEMPTGTPOLDIR
polTargetDeg: TEMPTGTPOLDEG

# --- Kinematic limits ----------------------------------------------------
mt_Min: TEMP_MTMIN
mt_Max: TEMP_MTMAX
Qp2Min: TEMP_QPMIN
Qp2Max: TEMP_QPMAX
thetaCMMin: TEMP_TCMMIN
thetaCMMax: TEMP_TCMMAX
Q2Max: TEMP_Q2MAX

# --- Radiative corrections -----------------------------------------------
radCorrType: TEMPRADTYPE
eCut: TEMPECUT

# --- Output options ------------------------------------------------------
outFormat: TEMPOUTFORMAT

# --- SIMC parameters -----------------------------------------------------
thetaHMS: TEMP_THMS
thetaSHMS: TEMP_SHMS
pHMS: TEMP_PHMS
pSHMS: TEMP_PSHMS

# --- File configuration --------------------------------------------------
xsecpath: TEMPXSECPATH
outFile: TEMPOUTFILE
indexrun: TEMPINDEX

121 changes: 121 additions & 0 deletions Generators/gen_tcs_bh/tcs_bh.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# --- Reaction -------------------------------------------------
# reaction (1 -> TCS; 11-> TCS phase space)
# 1) tcs = TCS exclusive production of lepton pair from gamma or e beam"<<endl;
# - phase space for exclusive processes (flags):"<<endl;
# 11) ps_eephoto_fix = TCS phase space for fix target exp. (no weight),"<<endl;
reaction: 1

# seed for random number generator
seedentry: 0
# --- Beam configuration -------------------------------------------------
# Electron beam=1 (equivalent photon approximation) or photon beam=0
beamtype: 0

# Energy range of the photon (maximal range: 5 < Egamma < 11.5 GeV or less than electron energy)
EphotonMin: 7.5
# photon energy maximum
EphotonMax: 12.0
# In case of initial electron beam, energy of the incoming electron
# In case of a fix energy photon beam, electron energy before radiator (used to calculate the polarization)
Eelectron: 12.0

# In case of initial electron beam, or collimated real photon (not only along z-axis), polar angle limit of the photon (real and/or quasi-real). -> recommended to let it at 0
# Default = 0 for real photon. If set at 0, the beam is along axis without any dispersion.
# If set at 0 for quasi-real beam, no cut is applied. Average angles without cut: 5e-5 rad for bremsstrahlung, 1e-2 rad for quasi-real.
thetaphotoMax: 0.0

# --- Event generation ----------------------------------------------------
# number of events to generate
nTotEvents: 10
# run number
runNum: 9001
# Outgoing particle to study: 1=electron, 2=muon
# Warning: mass correction is included only for kinematic variables, not in cross sections
outLepton: 1

# --- Target configuration ------------------------------------------------
# target length (cm); Target lenght in cm and target atoms {A,N} or choose an element instead of A (for LH2 target, set (1,1) or (1001,1)) -> relevant only if use of quasi-real photon beam
# target type and code = LH2: 1001; He: 1002; LiH: 1003; Carbon: 1006; NH3: 1007; dry air: 1011; Al: 1013; Fe: 1016; Pb: 1082; lead-glas: 1083.
# or with atoms, use numbers H (1), He (2), Be (4), N-H3 (7) , Au (79).
targetLength: 10.0
A_target: 1001
Z_target: 1

# TCS on Proton (1) or TCS on Neutron (2)
protonOrNeutron: 1

# --- Polarization --------------------------------------------------------
# Beam polarization: degree of linear e- or circular gamma polarization in lab frame (<1)
# If electron beam, will calculate P_circ as a function of the photon energy
# If circularly polarized photon beam from bremstrahlung: calculated as a function of energy
# If linearly polarized photon: set average polarization (energy dependence of P is not included)

polBeamDeg: 1.0

# Real photon polarization type: set 0 if no polarizer used (circular polarization rate is calculated as a fonction of energy transfered to the photon, or it is fixed to beam polarization in case of fix photon energy)
# set 0 if a linearly polarized electron beam is used or a circularly polarized photon beam (default option)
# if a linear polarizer is used for photons: 1 = along x-axis, 2=along y-axis, 3=45^0
beamPolarType: 1
# Target nucleon polarization, incoherent scattering on proton
# 0=unpolarized, +1 or +2 = transverse (perp to beam: 1 = x-axis, 2 = y-axis), +3 = longitudinal (same orientation as beam)
targetPolDir: 0

#degree of target polarization in lab frame(between -1 and +1)
polTargetDeg: 0.0

# --- Kinematic limits ----------------------------------------------------
# minimal -t and maximal -t; limits in -t (maximal range: 0.04 < -t < 2.02 GeV2)
mt_Min: 0.04
mt_Max: 1.2

# minimal Q'² and maximal Q'²: limits in Q'2 (maximal range: 3.8 < Q'2 < 9.2 GeV2)
Qp2Min: 3.8
Qp2Max: 9.2

# outgoing lepton CM theta_min (deg) and outgoing lepton CM theta_max (deg); outgoing lepton angle in CM frame (maximal range= 30 < th < 150 degree)
thetaCMMin: 30.0
thetaCMMax: 150.0

# maximal allowed Q² in case of electron beam, maximal Q2 allowed (max=0.3 GeV2)
Q2Max: 0.3

# --- Radiative corrections -----------------------------------------------
# LO (0) or include radiative corrections:
# (1) only external radiation of beam (2) + internal real corrections (3) + virtual corrections
radCorrType: 0

# if radiative corrections apply, set energy cut-off (max) . applied on electron beam and leptons out
# Warning: Ecut has to be less than Eelectron - 1.5 GeV
eCut: 0.0

# --- Output options ------------------------------------------------------
# HDDM is default:-1 Print in HDDM format only
# Print in ROOT only: 0, ROOT+HEP: 1, HEP only: 2, input for SIMC only: 3, SIMC+ROOT:4
# simc text only, angular and momentum cuts (below): 5
# simc+root, angular and momentum cuts (below): 6
outFormat: 0

# --- SIMC-specific parameters --------------------------------------------
# If for SIMC, theta HMS vs beam axis (deg) only with option SIMC (opt 5 or 6) +-25%
# default=0 if not used
thetaHMS: 0.0

# If for SIMC, theta SHMS vs beam axis (deg) only with option SIMC (opt 5 or 6) +(25%)
# default=0 if not used
thetaSHMS: 0.0

# If for SIMC, momentum HMS (opt 5 or 6) +-25%
# default=0 if not used
pHMS: 0.0

# If for SIMC, momentum SHMS (opt 5 or 6) +-25%
# default=0 if not used
pSHMS: 0.0

# --- File configuration --------------------------------------------------
# Path to directory where input cross-sections tables are store e.g xsecpath: /w/halld-scshelf2101/home/u/leptons/20251104/Data
xsecpath: /w/halld-scshelf2101/home/gchung/tcs_sim2/halld_sim/src/programs/Simulation/gen_tcs_bh/Data
# output filename (for .hddm)
outFile: tcs_bh_output.hddm
# index run for output filename
indexrun: 1
65 changes: 65 additions & 0 deletions Generators/gen_tcs_bh/tcs_bh_TEMPLATE.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# --- Reaction -------------------------------------------------
# reaction (1 -> TCS; 11-> TCS phase space)
reaction: TEMPREACTION

# seed for random number generator
seedentry: TEMPRANDSEED

# --- Beam configuration -------------------------------------------------
# Electron beam=1 or photon beam=0
beamtype: TEMPBEAMTYPE

# Energy range of the photon
EphotonMin: TEMPEMIN
EphotonMax: TEMPEMAX

# Incoming electron energy or equivalent
Eelectron: TEMPEELECTRON

# Beam angular dispersion
thetaphotoMax: TEMPTHEMAX

# --- Event generation ----------------------------------------------------
nTotEvents: TEMPNEVENTS
runNum: TEMPRUNNUM
outLepton: TEMPARTICLE

# --- Target configuration ------------------------------------------------
targetLength: TEMPTGT_LEN
A_target: TEMPTGT_A
Z_target: TEMPTGT_Z
protonOrNeutron: TEMPPROT_NEUT

# --- Polarization --------------------------------------------------------
polBeamDeg: TEMPPOLBEAM
beamPolarType: TEMPPOLTYPE
targetPolDir: TEMPTGTPOLDIR
polTargetDeg: TEMPTGTPOLDEG

# --- Kinematic limits ----------------------------------------------------
mt_Min: TEMP_MTMIN
mt_Max: TEMP_MTMAX
Qp2Min: TEMP_QPMIN
Qp2Max: TEMP_QPMAX
thetaCMMin: TEMP_TCMMIN
thetaCMMax: TEMP_TCMMAX
Q2Max: TEMP_Q2MAX

# --- Radiative corrections -----------------------------------------------
radCorrType: TEMPRADTYPE
eCut: TEMPECUT

# --- Output options ------------------------------------------------------
outFormat: TEMPOUTFORMAT

# --- SIMC parameters -----------------------------------------------------
thetaHMS: TEMP_THMS
thetaSHMS: TEMP_SHMS
pHMS: TEMP_PHMS
pSHMS: TEMP_PSHMS

# --- File configuration --------------------------------------------------
xsecpath: TEMPXSECPATH
outFile: TEMPOUTFILE
indexrun: TEMPINDEX

Loading