Skip to content

Commit

Permalink
Merge pull request rat-pac#24 from BenLand100/ftp
Browse files Browse the repository at this point in the history
PathFitter
  • Loading branch information
mastbaum committed May 6, 2015
2 parents a611b6a + ba041df commit cff8c17
Show file tree
Hide file tree
Showing 15 changed files with 1,015 additions and 146 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cint_cls= Split('DS/Root DS/MC DS/EV DS/MCParticle DS/MCPhoton '
'DS/RunStore DS/Run '
'DS/PosFit DS/PMTInfo '
'DS/MCTrack DS/MCTrackStep DS/Calib '
'DS/Centroid '
'DS/Centroid DS/PathFit '
'DSReader DSWriter TrackNav TrackNode TrackCursor DB DBLink '
'DBTextLoader DBJsonLoader HTTPDownloader Log ObjInt ObjDbl '
'DS/LinkDef')
Expand Down
19 changes: 17 additions & 2 deletions config/ROOT.scons
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#-*-python-*-
# ROOT configuration for SCons

import os, os.path
import os, os.path, SCons
from buildhelp import ROOTARCH, RATROOT

#### Builder: RootDict(dictionary_name, [list of header files])
Expand All @@ -22,13 +22,28 @@ rootdict = Builder(generator = generate_action,
src_suffix = '.hh')
####

import subprocess

desired = ['python','minuit2']
features = subprocess.check_output(['root-config','--features']).split(' ')
missing = filter(lambda(x) : not x in features, desired)
if (len(missing) > 0):
print 'scons: FATAL ERROR (ROOT.scons)'
print 'scons: ROOT is missing required features: ' + ', '.join(missing)
error = SCons.Errors.BuildError()
error.errstr = 'ROOT is missing required features: ' + ', '.join(missing)
error.filename = "ROOT.scons"
error.status = 2
error.exitstatus = 2
raise error


# Obtain ROOT build flags
# Temporary SCons object to parse root-config output
rootenv = Environment(ENV={'PATH' : os.environ['PATH']})
rootenv.ParseConfig("root-config --cflags --ldflags --libs")
rootenv.Append(LIBS='-lSpectrum')
rootenv.Append(LIBS=['-lFoam', '-lPyROOT'])
rootenv.Append(LIBS=['-lFoam', '-lPyROOT','-lMinuit2'])


# Put it into form that can be easily merged into main environment
Expand Down
43 changes: 43 additions & 0 deletions data/Watchman/FTP.ratdb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Programmer's Guide
programmer_log
programmer_processors
programmer_generators
programmer_utils
programmer_style

Authors
Expand Down
284 changes: 142 additions & 142 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,39 @@ Installation
Prerequisites
`````````````
These software packages should be installed in the order presented before you attempt to build RAT. Take note of the version numbers as many of these packages make incompatible changes between releases.

* `Python with development headers <https://www.python.org/>`_ - Using common package managers, type

* `Python with development headers <https://www.python.org/>`_ - Using common package managers, type

- on Scientific Linux: ``sudo yum install python-devel``
- on Ubuntu: . . . . . . ``sudo apt-get install python-dev``
- on SUSE Linux: . . . ``sudo zypper install python-devel``


* `ROOT 5.34 <http://root.cern.ch/drupal/content/downloading-root>`_ - Used for object serialization and network processors. (other versions of ROOT 5 are okay too). RAT-PAC requires the python development libraries thus when configuring the root make use the ``--enable-python option`` i.e.
- ``./configure --enable-python``

* `GEANT4 9.6.p03 <http://geant4.web.cern.ch/geant4/support/download.shtml>`_ `tar file <http://geant4.cern.ch/support/source/geant4.9.6.p03.tar.gz>`_- Toolkit used by the Monte Carlo simulation. When running ``cmake`` to configure GEANT4, be sure to use ``-DGEANT4_INSTALL_DATA=ON`` to download the interaction cross-section files (or download them manually).

:For begining GEANT4 users: In the directory you want to install Geant4 (referenced as ``[InstallDir]`` below), type the following commands

- ``DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )``
- ``wget http://geant4.cern.ch/support/source/geant4.9.6.p03.tar.gz``
- ``tar -zxvf geant4.9.6.p03.tar.gz``
- ``mkdir $DIR/geant4.9.6.p03-build``
- ``cd geant4.9.6.p03-build``
- ``cmake -DCMAKE_INSTALL_PREFIX=$DIR/geant4.9.6.p03-build $DIR/geant4.9.6.p03 -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_QT=ON``
- ``make -j1``
- ``make install``
- ``cd ..``
- ``mkdir envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4.sh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4make.sh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4.csh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4make.csh ./envSetupScripts``

The enviroment variable files referenced below will be located in [InstallDir]/envSetupScripts

* `SCons <http://www.scons.org/doc/2.1.0/HTML/scons-user/x121.html>`_ - Using common package managers, type


* `ROOT 5.34 <http://root.cern.ch/drupal/content/downloading-root>`_ - Used for object serialization and network processors. (other versions of ROOT 5 are okay too). RAT-PAC requires the python development libraries and Minuit2 minimization libraries thus when configuring the root make use the ``--enable-python --enable-minuit2`` options i.e.
- ``./configure --enable-python --enable-minuit2``

* `GEANT4 9.6.p03 <http://geant4.web.cern.ch/geant4/support/download.shtml>`_ `tar file <http://geant4.cern.ch/support/source/geant4.9.6.p03.tar.gz>`_- Toolkit used by the Monte Carlo simulation. When running ``cmake`` to configure GEANT4, be sure to use ``-DGEANT4_INSTALL_DATA=ON`` to download the interaction cross-section files (or download them manually).

:For begining GEANT4 users: In the directory you want to install Geant4 (referenced as ``[InstallDir]`` below), type the following commands

- ``DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )``
- ``wget http://geant4.cern.ch/support/source/geant4.9.6.p03.tar.gz``
- ``tar -zxvf geant4.9.6.p03.tar.gz``
- ``mkdir $DIR/geant4.9.6.p03-build``
- ``cd geant4.9.6.p03-build``
- ``cmake -DCMAKE_INSTALL_PREFIX=$DIR/geant4.9.6.p03-build $DIR/geant4.9.6.p03 -DGEANT4_USE_SYSTEM_EXPAT=OFF -DGEANT4_INSTALL_DATA=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_QT=ON``
- ``make -j1``
- ``make install``
- ``cd ..``
- ``mkdir envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4.sh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4make.sh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4.csh ./envSetupScripts``
- ``cp $DIR/geant4.9.6.p03-build/InstallTreeFiles/geant4make.csh ./envSetupScripts``

The enviroment variable files referenced below will be located in [InstallDir]/envSetupScripts

* `SCons <http://www.scons.org/doc/2.1.0/HTML/scons-user/x121.html>`_ - Using common package managers, type

- on Scientific Linux: ``sudo yum install scons``
- on Ubuntu: . . . . . . ``sudo apt-get install scons``
Expand All @@ -45,128 +45,128 @@ Build Steps

* Make sure that you have setup your environment variables:

Source the GEANT4 enviroment variable files
- for bash shell ``geant4.sh``
- for C shell ``geant4.csh``

Source the GEANT4 enviroment variable files
- for bash shell ``thisroot.sh``
- for C shell ``thisroot.csh``

If you do not know where to find these files, type
- ``locate [fileName]``

Replacing [fileName] with the file you wish to locate. If the file path does not appear, type
- ``sudo updatedb`` # ``sudo updatedb`` may require an administrator to run

* Download RAT from GitHub
Move to the directory you wish to install rat-pac in [rat-pacWorkingDIR] hinceforth.
For Anonymous Users type

Source the GEANT4 enviroment variable files
- for bash shell ``geant4.sh``
- for C shell ``geant4.csh``

Source the GEANT4 enviroment variable files
- for bash shell ``thisroot.sh``
- for C shell ``thisroot.csh``

If you do not know where to find these files, type
- ``locate [fileName]``

Replacing [fileName] with the file you wish to locate. If the file path does not appear, type
- ``sudo updatedb`` # ``sudo updatedb`` may require an administrator to run

* Download RAT from GitHub
Move to the directory you wish to install rat-pac in [rat-pacWorkingDIR] hinceforth.
For Anonymous Users type

- ``git clone https://github.com/rat-pac/rat-pac``

For Developers type

For Developers type

- ``git clone [email protected]:rat-pac/rat-pac``


* Build rat-pac
* Build rat-pac
Starting from [rat-pacWorkingDIR] type

- ``cd rat-pac``
- ``./configure``

Source the newly generated rat-pac enviroment variable files :Note: You will also need to source this file in the future before running rat-pac.
- for bash shell type ``env.sh``
- for C shell type ``env.csh``


Source the newly generated rat-pac enviroment variable files :Note: You will also need to source this file in the future before running rat-pac.
- for bash shell type ``env.sh``
- for C shell type ``env.csh``




Build the rat-pac development package by typing
- ``scons``


Test Drive
``````````

* Run an interactive session by typing
- ``rat``

Here's a sample of what you might see (type ``exit`` to exit the interactive rat-pac terminal)::

RAT, version c8164f1
Status messages enabled: info
Hostname: wrangler.phys.vt.edu PID: 31590
DB: Loading /rat-pac-working-dir/rat-pac/data/DAQ.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/DETECTOR.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/ELEMENTS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/IBD.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/IO.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/MATERIALS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/MC.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/NOISE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/NTUPLE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/OPTICS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMT.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMTCHARGE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMTTRANSIT.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/RUN.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/SPECTRUM.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat/rat/data/PMTTRANSIT.ratdb ... Success!
*************************************************************
Geant4 version Name: geant4-08-01-patch-01 (27-July-2006)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLIQt)
OpenGLStoredQt (OGLSQt)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Available UI session types: [ Qt, GAG, tcsh, csh ]
***** Can not open a macro file <prerun.mac>
PreInit>
* Run an interactive session by typing
- ``rat``

Here's a sample of what you might see (type ``exit`` to exit the interactive rat-pac terminal)::

RAT, version c8164f1
Status messages enabled: info
Hostname: wrangler.phys.vt.edu PID: 31590
DB: Loading /rat-pac-working-dir/rat-pac/data/DAQ.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/DETECTOR.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/ELEMENTS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/IBD.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/IO.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/MATERIALS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/MC.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/NOISE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/NTUPLE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/OPTICS.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMT.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMTCHARGE.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/PMTTRANSIT.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/RUN.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat-pac/data/SPECTRUM.ratdb ... Success!
DB: Loading /rat-pac-working-dir/rat/rat/data/PMTTRANSIT.ratdb ... Success!
*************************************************************
Geant4 version Name: geant4-08-01-patch-01 (27-July-2006)
Copyright : Geant4 Collaboration
Reference : NIM A 506 (2003), 250-303
WWW : http://cern.ch/geant4
*************************************************************
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
Visualization Manager initialising...
Registering graphics systems...
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
OpenGLImmediateQt (OGLIQt)
OpenGLStoredQt (OGLSQt)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
Registering model factories...
You have successfully registered the following model factories.
Registered model factories:
generic
drawByCharge
drawByParticleID
drawByOriginVolume
drawByAttribute
Registered filter factories:
chargeFilter
particleFilter
originVolumeFilter
attributeFilter
You have successfully registered the following user vis actions.
Run Duration User Vis Actions: none
End of Event User Vis Actions: none
End of Run User Vis Actions: none
Some /vis commands (optionally) take a string to specify colour.
Available colours:
black, blue, brown, cyan, gray, green, grey, magenta, red, white, yellow
Available UI session types: [ Qt, GAG, tcsh, csh ]
***** Can not open a macro file <prerun.mac>
PreInit>

* Run a macro example job by typing

Expand All @@ -179,12 +179,12 @@ Test Drive
- ``root test.root``
- ``T->Draw("mc.particle.pos.fX")``

You should get a plot of particle x coordinates similar to the plot below.

|RootOutputTutorial000|

.. |RootOutputTutorial000| image:: Tutorial000.png

You should get a plot of particle x coordinates similar to the plot below.

|RootOutputTutorial000|

.. |RootOutputTutorial000| image:: Tutorial000.png

:Note: that with the RAT environment sourced, you are getting a special copy of ROOT that automatically loads the RAT ROOT event library.
report errors to Derek Rountree -- [email protected]
page update Feb. 24 2015
report errors to Derek Rountree -- [email protected]
page update Feb. 24 2015
Loading

0 comments on commit cff8c17

Please sign in to comment.