HPS-MC
 
Loading...
Searching...
No Matches
hpsmc.func Namespace Reference

Miscellaneous math functions. More...

Functions

 lint (target_dz, num_electrons, density=6.306e-14)
 Calculate integrated luminosity.
 
 csection (filename)
 Extract cross-section from gzipped LHE file.
 
 mu (filename, target_dz, num_electrons)
 Calculate mu = number of events per bunch.
 
 nevents (filename, confirm=False)
 Read number of events in file from LHE header and optionally confirm by counting <event> blocks.
 
 nbunches (filename, target_dz, num_electrons)
 Get the approximate number of beam bunches represented by an LHE file from its event count.
 

Variables

 logger = logging.getLogger("hpsmc.func")
 

Detailed Description

Miscellaneous math functions.

Function Documentation

◆ csection()

csection (   filename)

Extract cross-section from gzipped LHE file.

WARNING: This function does not work!

Todo:
remove or replace by more useful function
Parameters
filenamename of input file

Definition at line 20 of file func.py.

◆ lint()

lint (   target_dz,
  num_electrons,
  density = 6.306e-14 
)

Calculate integrated luminosity.

Parameters
target_dztarget thickness in cm
num_electronsnumber of electrons in bunch
density1/(cm*pb), default value is for tungsten
Returns
integrated luminosity in 1/pb

Definition at line 9 of file func.py.

◆ mu()

mu (   filename,
  target_dz,
  num_electrons 
)

Calculate mu = number of events per bunch.

WARNING: This function does not work properly because csection() is broken!

Parameters
filenamename of input LHE input file containing cross section
target_dztarget thickness in cm
num_electronsnumber of electrons in bunch
Returns
number of events per bunch (L_int[1/pb] * xsec[pb])

Definition at line 44 of file func.py.

◆ nbunches()

nbunches (   filename,
  target_dz,
  num_electrons 
)

Get the approximate number of beam bunches represented by an LHE file from its event count.

Parameters
filenamename of input LHE file
target_dztarget thickness in cm
num_electronsnumber of electrons in bunch

Definition at line 84 of file func.py.

◆ nevents()

nevents (   filename,
  confirm = False 
)

Read number of events in file from LHE header and optionally confirm by counting <event> blocks.

Parameters
filenamename of input LHE file
confirmset to True to confirm number of events

Definition at line 57 of file func.py.

Variable Documentation

◆ logger

logger = logging.getLogger("hpsmc.func")

Definition at line 6 of file func.py.