Skip to content

Commit 28d2985

Browse files
committed
* INSTALL, README.md [rtj]
- add references to the wiki HOWTO to the package documentation sources. * g4py/cobrems.py [rtj] - add pydoc documentation to the undocumented methods in cobrems.py
1 parent 93c6422 commit 28d2985

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

INSTALL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ initialized.
7777

7878
Before attempting the build, go into the src directory of the HDGeant4
7979
distribution and create a symlink called G4fixes pointing to the directory
80-
G4<.X.Y-P>fixes where X,Y,P are the version, release, and patch numbers
80+
G4<.X.Y.P>fixes where X,Y,P are the version, release, and patch numbers
8181
of the G4 libraries to which you will be linking in your build.
8282

8383
The general procedure for building hdgeant4 is:

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,37 @@ See VERSIONS file in the project directory.
4646

4747
## Usage synopsis
4848

49+
Usage: hdgeant4 [options] [<batch.mac>]
50+
where options include:
51+
-v : open a graphics window for visualization
52+
-tN : start N worker threads, default 1
53+
-rN : set run to N, default taken from control.in
54+
4955
## Dependencies
5056

57+
See https://halldweb.jlab.org/wiki/index.php/HOWTO_install_and_run_HDGeant4
58+
for detailed information regarding external package dependencies.
59+
5160
## Building instructions
5261

62+
See INSTALL file in the project directory, or for more detailed building
63+
instructions,
64+
see https://halldweb.jlab.org/wiki/index.php/HOWTO_install_and_run_HDGeant4
65+
on the gluex wiki.
66+
5367
## Documentation
5468

69+
See https://halldweb.jlab.org/wiki/index.php/HOWTO_install_and_run_HDGeant4
70+
on the gluex wiki.
71+
5572
## Troubleshooting
5673

74+
See https://halldweb.jlab.org/wiki/index.php/HOWTO_install_and_run_HDGeant4
75+
section on visualization, found on the gluex wiki.
5776
## Bugs
5877

5978
## How to contribute
6079

6180
## Contact the authors
81+
82+
Write to richard.t.jones at uconn.edu, or to davidl at jlab.org.

g4py/cobrems.py

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
generator = CobremsGenerator(E0, Epeak)
4343

4444
def usage():
45+
"""
46+
Print a brief summary of the internal configuration variables
47+
that regulate the behavior of the CobremsGenerator and exit.
48+
"""
4549
print """
4650
Usage: cobrems.init(key=value, ...)
4751
where key should be one of the following, [defaults in backets]:
@@ -322,18 +326,48 @@ def plotPolarization(collimated=1):
322326
return polarH1
323327

324328
def acceptance(vars):
329+
"""
330+
TF1 user function that can be used to plot the collimator acceptance
331+
for photons emitted at lab polar angle vars[0] relative to the incident
332+
electron beam direction at the radiator. Both beam emittance and
333+
multiple-scattering in the target contribute to smearing of the angular
334+
acceptance at the the collimator edge. The scattering angle is contained
335+
in list argument vars[0], expressed in units of (me/fBeamEnergy).
336+
"""
325337
return generator.Acceptance(vars[0] ** 2)
326338

327339
def polarization(vars):
328-
return generator.Polarization(vars[0])
340+
"""
341+
TF1 user function that can be used to plot the linear polarization of
342+
the photon beam at energy k = vars[0] * fBeamEnergy, and production angle
343+
vars[1] expressed in units of (me/fBeamEnergy).
344+
"""
345+
return generator.Polarization(vars[0], vars[1] ** 2)
329346

330347
def dRtdx(vars):
348+
"""
349+
TF1 user function that can be used to plot the total beam flux spectrum
350+
of the collimated coherent bremsstrahlung photon beam at photon energy
351+
k = vars[0] * fBeamEnergy, in units of (/GeV/s).
352+
"""
331353
return generator.Rate_dNtdx(vars[0]) * cur / 1.6e-13
332354

333355
def dRcdx(vars):
356+
"""
357+
TF1 user function that can be used to plot the beam flux spectrum
358+
(coherent component only) of the collimated coherent bremsstrahlung
359+
photon beam at photon energy k = vars[0] * fBeamEnergy, in units
360+
of (/GeV/s).
361+
"""
334362
return generator.Rate_dNcdx(vars[0]) * cur / 1.6e-13
335363

336364
def dRidx(vars):
365+
"""
366+
TF1 user function that can be used to plot the beam flux spectrum
367+
(incoherent component only) of the collimated coherent bremsstrahlung
368+
photon beam at photon energy k = vars[0] * fBeamEnergy, in units
369+
of (/GeV/s).
370+
"""
337371
return generator.Rate_dNidx(vars[0]) * cur / 1.6e-13
338372

339373
def plotTotal_rc(rchist, collimated=1):

0 commit comments

Comments
 (0)