Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

I am not an expert neither in FRED nor in the different software packages to analyze data. There are people with a lot more expertise than me on these technical issues (Anders, Michael, Leon...). I joined the collaboration just few months ago. Since i am working with both beamtest and full lat data, i spent some time trying to set some simple procedures which allow me to move from one software package to another easily and in a more or less controlled way.  This is what is presented in this web page.

...

1.1 - Scripts to set some environment variables 

 unmigrated-wiki-markup

The script \[\] (\[\] [script .SetSoftRelease(.SetSoftRelease_bash] for bash or sh shell) sets the environement variables CMTCONFIG (to "rh9_gcc32opt"), GLAST_EXT (to "/afs/slac/g/glast/ground/GLAST_EXT/$CMTCONFIG") and the variable CMTPATH. The first 2 point to the directory where all the software packages hang, therefore they DO NOT need to be replaced. On the other hand, the variable CMTPATH points to the specific software package to be used, and consequently it needs to be modified every time you want to change software package or release. Because of that, the script has 2 arguments:

 

  1. Software package; _ BeamtestRelease, EngineeringModel... _
  1. Release version: v3r0907p2, v6r070329p17 ...

An example of how to use it follows:

Wiki Markup_source_ [.SetSoftRelease]\_\[\]\_ _BeamtestRelease_ _v3r0907p2_  BeamtestRelease v3r0907p2

I have this script in my home directory, which allows me to call it from everywhere in the following way:

source $HOME/.SetSoftRelease BeamtestRelease v3r0907p2

 
It is important to note that different software packages might be using different root versions. That is the case (at August 2006) for the BeamtestRelease and the EngineeringModel, which uses root 5 and root 4 respectively. That implies that the root version (and related environment variables) have to be also modified when switching between these two software packages.

...

An example of how to use them follows:

...

  • The above mentioined scripts use the script  script .SetSoftRelease, and they all assume that this script is located in the $HOME directory. Therefore, if you want to place.SetSoftRelease in any other place, you have to change the scripts accordingly...
  • I do have csh and sh scripts because, even though I particularly use csh, FRED wants to use bash (see section 3), and therefore I need both. I do not know whether this applies to you... but that might be useful.

...

1.2 - Root macro to load root libraries

Wiki Markup The macro [LoadLibraries.C|^LoadLibraries.C]\[\] can be used to load (within a root session) the following root  The macro LoadLibraries.C can be used to load (within a root session) the following root libraries:

  •  libcommonRootData.so
  •  libmcRootData.so
  •  libdigiRootData.so
  •  libreconRootData.so
  •  libPhysics.so

...

An example of how to use it follows:

Wiki Markup_root \ [0\] .x _ _[_.x LoadLibraries.C_|^LoadLibraries.C]_ _("BeamtestRelease-v3r0907p2")_

As it will be shown in the next section, one can also include this macro in another macro and execute it from there:

...

The macro FilterRootFiles.C is a very simple macro which makes the event filtering a bit easier. With this macro, the user can specify a software package as argument  (like "BeamtestRelease-v3r0907p2" or "EngineeringModel-v6r070329p16") and the macro loads the appropriate root libraries (using the macro LoadLibraries.C) and then executes EventFilter.C for the 3 types of files sequentially(in case they are specified as arguments) sequencially.

An example of running the macro  FilterRootFiles.C is given by macro FilterEvents_BeamTest_CR_CERN322.C, which is the macro that defines the software package to be used, the input and output filenames and the selection cut to be applied to the events. In partituclar this macro uses the software package  "BeamtestRelease-v3r0907p2" to select events from beam test run 700000322 according to the selection criteria:

...

/afs/slac.stanford.edu/g/glast/applications/install/@sys/usr/bin/fred

However, I would suggest to run it  with the flag  --log DEBUG, so that a logfile ($HOME/fred.log) is created, and you can try to figerout what happens if . This log file is very useful when  FRED crashes or does not want to run. Besides that logfile, a directory $HOME/.fred with is created and contains other logfiles are created. But those ones did not help me when FRED was not working due to configuration errors...

You can use the simple script myfred (from  csh or tcsh) as an example of how to run the fred version you want  (in debug mode) with the ruby package you want.

 

FRED will be acting as a client of Gleam which will be the engine processing the events.
The configuration of the execution of Gleam is performed via the FRED GLAST pannel.

...

  1. A "Gaudi" executable. This is the Gleam executable, Gleam.exe; and its location depends on the software package that is used. BeamtestRelease-v3r0907p2: /nfs/farm/g/glast/u09/builds/rh9_gcc32opt/BeamtestRelease/BeamtestRelease-v3r0907p2/Gleam/v6r18/rh9_gcc32opt/Gleam.exe; EngineeringModel-v6r070329p16: /nfs/farm/g/glast/u09/builds/rh9_gcc32opt/EngineeringModel/EngineeringModel-v6r070329p16/Gleam/v6r8p1/rh9_gcc32opt/Gleam.exe
  1. Wiki Markup*A job options ascii file.* This file defines, among other things, the input data and geometry to be used. It is slightly different for different software package versions. Examples follow: [jobOptions_beamtest.txt|^jobOptions_beamtest.txt], [jobOptions_beamtest_montecarlo.txt|^jobOptions_beamtest_mc.txt]\[ , jobOptions_EngineeringModel.txt\|^jobOptions_EngineeringModel.txt\]
  1. A working directory. Any (valid) directory will work

Important Remark

FRED requires to run the script in a BASH shell, therefore the sripts used in the GLAST panel must BASH scripts.

...

  • BeamtestRelease:  ApplicationMgr.ExtSvc  += "EventSelector/EventSelector","EventCnvSvc";
  • EngineeringMode:  ApplicationMgr.ExtSvc  +=  "GlastEventSelector/EventSelector","EventCnvSvc"

 

Now we are at the point in which we have to push the RUN button. If the files you typed in exist and make sense, then you will be able to start displaying events with FRED.

Important Remark

Occasionally one finds events which cannot be properly displayed and SCREW UP the session.  Leon found a problem in AcdReconFiller (2006/07/13) which caused many of those problems (see corresponding discussion in the beam test mailing list). This is fixed in HepRepSvc v0r18p3. Yet it seems that some large events still have problems to be displayed... There are two "dirty" ways of avoiding the problem:

  •  Not reading the mc.root file; this seems to prevent the problem to happen.
  •  Skip those "special" events that cause the problem in a particular run. This can be done if the events are selected by typing the event number in the event number display of FRED (upper part of panel) instead of scanning them with the "play" button.

 

 I think that's all what you need to know to inspect the data with FRED... at least that is all I know about displaying data with FRED. Hope that is useful. Do not hesitate in contacting me if there are things which are not clear or you have questions about this stuff (dpaneque@slac.stanford.edu).