Re: [BLAST_ANAWARE] How to Setup the BLAST Monte Carlo and Recon in Tandem

From: Chris Crawford (chris2@lns.mit.edu)
Date: Mon Apr 12 2004 - 10:44:28 EDT


Hi Aaron,
  Thanks for making this file; it looks very useful. A couple of weeks
ago, I also checked in minimalistic setup procedure into 'blast/README'
which did dive into DGen, and did not separate out the BUILD and SOURCE
directories. It would be a good idea to cross-reference these files.
  Also, there is some environment stuff that you may have already setup
in your .cshrc file that would be good to include in
'SettingUpBLASTCVS.txt' (see README) For example, there are some CVS
variables that need set before checking out, and I would suggest
sourcing 'setup.csh' and copying '.rootrc' to your home directory.
--chris

Aaron Joseph Maschinot wrote:

>at Bob and Richard's request and with Chris' help, i have written a file
>explaining how to do the following:
>
> - Get your own copy of the BLAST CVS repository
> - Get the BLAST Monte Carlo running with or without the DGen kinematics
> generator
> - Get the BLAST reconstruction library as well as the "nsed" and "lrn"
> executables working
> - Get the "lrn" executable to reconstruct Monte Carlo data
>
>i have (successfully) tried the method three times using three different
>computers (including the bud's). it is very general and hopefully will
>work for everyone.
>
>the file is attached. i have also added it into the root directory of
>CVS.
>
>aaron
>
>
>------------------------------------------------------------------------
>
>This file attempts to list one way in which to (successfully) do the following:
>
> - Get your own copy of the BLAST CVS repository
> - Get the BLAST Monte Carlo running with or without the DGen kinematics
> generator (FYI the DGen kinematics generator generators kinematics for
> deuteron-target reactions (e.g. d(e,e'), d(e,e'p), d(e,e'n), ...)
> - Get the BLAST reconstruction library as well as the "nsed" and "lrn"
> executables working
> - Get the "lrn" executable to reconstruct Monte Carlo data
>
>There are many ways to do these things; this file describes only one way (the
>way that I use). If you have personal preferences that differ from mine, you
>must obviously be wrong. (j.j.)
>
>Aaron
>
> ------------------------------------------------------------------------------
>
> 1) Make a directory to hold your own copy of the BLAST CVS repository, and go
> into it:
>
> prompt> mkdir BLASTCVS
> prompt> cd BLASTCVS
>
> 2) Make two directories within this directory called "SOURCE" and "BUILD":
>
> prompt> mkdir SOURCE
> prompt> mkdir BUILD
>
> The "SOURCE" directory will hold all of the files in your copy of the BLAST
> CVS repository. The "BUILD" directory will hold your own working version
> of the files (e.g. the shared object libraries and executables). Splitting
> your files in this manner is nice in that, if you need multiple copies of
> libraries to do different things, you just have to make another "BUILD"
> directory (e.g. "BUILD2") and run through this procedure again.
>
> 3) Go into the "SOURCE" directory, and get your own copy of the CVS "head"
> files:
>
> prompt> cd SOURCE
> prompt> cvs co .
>
> If you need a specific branch of the CVS, you must ask CVS for it (after
> you have already gotten a copy of the "head"!!!) by typing the following:
>
> prompt> cvs up -r [BRANCH NAME] [DIRECTORIES TO UPDATE]
>
> Here, [BRANCH NAME] is the branch name you want, and [DIRECTORIES TO
> UPDATE] is a list of directories that are to be updated with the
> [BRANCH NAME] update. For example, at the time of this writing, the most
> up-to-date version of "./BlastLib2" and "./Blast_Params" (which contain the
> reconstruction libraries and parameters files to be used with the
> reconstruction) is branch "b3_1" (no double quotes). Thus, in order to
> update these two directories to this branch, I would type the following
> line (after typing the above two):
>
> prompt> cvs up -r b3_1 ./BlastLib2 ./Blast_Params
>
> Figuring out which is the correct branch for each application is somewhat
> harder. I suggest asking someone "in the know" (e.g. Chris, Chi,
> Tancredi, or Aaron (but only if you're really desperate, cause he's usually
> not sure himself!!!))
>
> *** NOTE: If you wish to use the reconstruction on Monte Carlo data, you
> MUST update "./BlastLib2" and "./Blast_Params" to branch "b3_1"!!!!!
>
> 4) Go into the "BUILD" directory, and configure your copy of the BLAST CVS
> repository for your computer.
>
> prompt> cd ../BUILD
> prompt> ../SOURCE/configure --prefix=[ABSOLUTE PATH OF BUILD DIRECTORY]
> --enable-debug
>
> Usually, before I configure, I type "pwd", and just copy the path in for
> [ABSOLUTE PATH OF BUILD DIRECTORY]. (There's probably a more elegant
> way to do this, but I don't know it.) The "--enable-debug" option is very
> useful as it will show you where errors are instead of just seg faulting.
>
> If you need to use the DGen Monte Carlo kinematics generator, type the
> following line instead of the previous one:
>
> prompt> ../SOURCE/configure --prefix=[ABSOLUTE PATH OF BUILD DIRECTORY]
> --enable-dgen --enable-debug
>
> The "--enable-dgen" tells the Monte Carlo to compile in the DGen kinematics
> generator library. Note: To see a list of all such configure options, type
> the following within the "BUILD" directory:
>
> prompt> ../SOURCE/configure --help
>
> 5) Within the "BUILD" directory, go into the "blastmc" directory and create
> the BLAST Monte Carlo executable:
>
> prompt> cd ./blastmc
> prompt> make
>
> This will create a directory called "run" (if one doesn't already exist)
> within your "BUILD" directory. If you go into this "run" directory, you
> will see an executable file called "blast" as well as a link to a
> shared-object file called "libuserGen.so":
>
> prompt> cd ../run
> prompt> ls
> blast* libuserGen.so@
>
> In order to run the "blast" executable (which is the BLAST Monte Carlo
> executable), you must do BOTH of the following:
>
> a) Set the environment variable "BLAST_PARAM" equal to the absolute path
> to your "Blast_Params" directory. In our on-going example, we would
> type the following:
>
> prompt> setenv BLAST_PARAM ~[USERNAME]/BLASTCVS/SOURCE/Blast_Params
>
> where [USERNAME] is your user name. To make this change permanent,
> add this line at the end of your ".login" file in your ~[USERNAME]
> directory. Then logout and log back in.
>
> b) Within the "BLASTCVS/BUILD/run" directory make a symbolic link (called
> "fort.99") to the "fort.99" file located within your "Blast_Params"
> directory:
>
> prompt> ln -s ../../SOURCE/Blast_Params/fort.99 fort.99
>
> If, in addition to simply running the Monte Carlo, you wish to use the DGen
> libraries, too, you must ALSO do the following:
>
> a) Go into the "/BUILD/userGen/DGen" directory and type "make":
>
> prompt> cd ../userGen/DGen
> prompt> make
>
> b) In a directory COMPLETELY SEPARATE from your entire BLAST CVS copy,
> make a directory called "STRUCTURE". Copy into this directory all of
> the deuteron structure files given to us by Arenhovel. Note: Due to
> their large size and number, these files are NOT in the BLAST CVS.
> There is a copy, however, of all current structure files located
> within "/scratch/bud03/ajmasch/STRUCTURE". Simply copy these files
> into your own "STRUCTURE" directory. Due to their large size and
> number, I suggest that you place your copy of the "STRUCTURE"
> directory onto a /scratch drive!!!! For example:
>
> prompt> cd /scratch/[COMPUTER NAME]/[USER NAME]
> prompt> mkdir STRUCTURE
> prompt> cp /scratch/bud03/ajmasch/STRUCTURE/* .
>
> The above commands will only work if [COMPUTER NAME] happens to be
> "bud03" and if you have already created a [USER NAME] directory on the
> "/scratch/bud03" disk. Else, you'll have to do a litte more in order
> to copy these files...
>
> c) Go back into your "BLASTCVS/BUILD/RUN" directory, delete the
> existing "structure" symbolic link that appeared when you made the
> "userGen/DGen" directory, and create a "new" symbolic link (still
> called "structure" (all LOWER CASE!!!)) to the "STRUCTURE" directory
> you just created.
>
> prompt> cd ~[USERNAME]/BLASTCVS/BUILD/run
> prompt> rm structure
> prompt ln -s /scratch/[COMPUTER NAME]/[USER NAME]/STRUCTURE
> structure
>
> d) Within the "run" directory, open the "fort.99" file (follow the
> symbolic link to it) and change the "KINE" line within it to the
> following:
>
> KINE 10 1 1 1 21 0 3 0 11
>
> Then change the "VERT" line to the following:
>
> VERT -1
>
> Save and close this file.
>
> e) Within the "run" directory, open the "kine.init" file (follow the
> symbolic link to it) and make sure that the line following the
> "#POTENTIAL_GEN_MODEL" line reads as below:
>
> 0 5 0
>
> The BLAST Monte Carlo is now ready to be run. Read through the
> well-documented "fort.99" file to see how.
>
> In order to make the BLAST Monte Carlo do exactly what you want it to,
> you'll have to look into (and possibly change) the "fort.99" file. If you
> are using the DGen kinematics generator as well, you'll probably have to
> make changes to the "kine.init" file as well.
>
> If you wish the Monte Carlo to produce a CODA file (that you can later use
> the reconstruction library on), make sure that the "OUTP" line within the
> "fort.99" file includes the word "'CODA'" (yes, single quotes must be
> written, too!!!). Doing so will make the Monte Carlo generate a CODA file
> after running called "event.coda".
>
> *** NOTE: If you are using DGen in your Monte Carlo, you must be aware of
> one more thing. When you run the "blast" executable, you will eventually
> come to a "GEANT>" prompt. When this prompt first appears, you must
> re-type the above "KINE" statement BEFORE running the Monte Carlo any
> further:
>
> GEANT> KINE 10 1 1 1 21 0 3 0 11
>
> Now you can process events (via the "TRIG" command) as usual. See the
> beginning of the "fort.99" file for more documentation.
>
> 6) Create the reconstruction library ("libBlast.so"), the "nsed" executable,
> and the "lrn" executable within the "BUILD/BlastLib2" directory:
>
> prompt> cd ../BlastLib2
> prompt> make
>
> When everything finishes, you will sse, among other things, the
> shared-object library file, "libBlast.so" as well as the executable files
> "nsed" and "lrn" within this directory.
>
> In order to use "lrn", you will need to set the environment variables
> "DATADIR" and "ANALDIR"; "DATADIR" is the directory containing the CODA
> files that you wish to analyze while "ANALDIR" is the directory that the
> root files produced from "lrn" will be put into. You will also need the
> environment variable "BLAST_PARAM", but that should already be set from
> before when you set up the Monte Carlo. The options file for running the
> reconstruction library is the "blastrc" file, located within
> "SOURCE/Blast_Params". This file is the reconstruction-equivalent of the
> Monte Carlo options file "fort.99"; thus, you might have to make changes to
> it in order to specify the exact reconstruction styles that you want.
>
> If you wish to run reconstruction macros (e.g. show_ep_aymmetry.C or
> show_deep_asym.C) from your own directory, you must first make sure that
> "DATADIR" and "ANALDIR" are setup appropriately. Then you must make a
> symbolic link of "libBlast.so" in the directory containing the macro to be
> run.
>
> 7) With both the Monte Carlo and the reconstruction libraries setup, we can
> now reconstruct Monte Carlo data. To do so, take the "event.coda" file
> that comes out of the Monte Carlo when you run it, and copy it into
> whatever directory has the "lrn" executable in it (in this example, it is
> the "BlastLib2" directory. Once this is done, simply type the following
> from within the directory with the "lrn" executable:
>
> prompt> lrn -m
>
> The "-m" option tells the "lrn" executable that the data is Monte Carlo
> data. "lrn" will then, by default, look IN THE CURRENT DIRECTORY ONLY, for
> a file named "event.coda" (And that's it! If you called the file anything
> else or if you do not have it in the same directory as the "lrn"
> executable, lrn WILL NOT FIND IT!!!).
>
> When "lrn" is done, it will produce three files: "dst-0.root",
> "flr-0.root", and "lr-0.root". It is your responsibility to rename these
> files or else they will be copied over the next time you run "lrn" on a
> Monte Carlo file. You can use root to analyze these files as usual.
>
> *** NOTE: If you wish to use the reconstruction on Monte Carlo data, you
> MUST update "./BlastLib2" and "./Blast_Params" to branch "b3_1"!!!!!
>
>



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:30 EST