The package name is a bit misleading, since the only the algorithm depends on NTupleWriterSvc, not the tools.
Currently, AnalysisNtupleAlg outputs the ntuple variables to the merit ntuple. It also serves as the test routine for the package
The definition of the variables can be found in the "Related Pages" of the doxygen output.
In debug mode, it exercises some other methods of the tools: getVal(), to return an individual value, and browse(), to print out a name and value.
Since all the tools have the same abstract interface, the manipulation of these tools can be handled in a loop.
float myVar; // or int, unsigned, or double
At init time:
addItem("MyVarName", &myVar);
At execution time:
myVar = sin(x)/x;
Any item in the ntuple can be retrieved:
getVal("MyVarName", &retrievedVar, NOCALC);
NOCALC says don't recalculate the ntuple contents. The default is CALC.
It's now also possible to define arrays:
double arrayVar[3];
...
addItem("ArrayVar[3]", arrayVar); // note: ArrayVar is a pointer
...
for(i=0;i<3;++i) { arrayVar[i] = 3.14159*i; }
...
getVal("ArrayVar[1]", &arrayVar[1], NOCALC); //
Note: because Insightful Miner (C) doesn't recognize arrays, we aren't using this feature in the official merit ntuple. But it's available for private variables.
There are currently ten tools. Eight are invoked to produce the standard merit ntuple: McValsTool, GltValsTool, CalValsTool, CalMipValsTool, TkrValsTool, VtxValsTool, AcdValsTool and EvtValsTool.
Two other tools are not part of the standard job, but may be invoked by adding their names to the tools list: TkrHitValsTool gives some addtional information about cluster counts, and McAnalValsTool does an analysis of the simulated event; it requires that various nonstandard packages have been run.
EvtValsTool is special, in that it produces ntuple variables from the variables in the other tools, using the getVal() method of those tools. These are generally needed for the Gleam implementation of the classification trees.
The common interface is IValsTool, which provides access to the values in each tool, and handles the interactions with the visitor through the class ValsVisitor.
Each tool fills a list of variable names and pointers to the values they represent. This is what allows the visitor to return names and values in a loop.
Another method of each tool receives a call from the Gaudi IncidentSvc, to signal the beginning of a new event. This signal allows the tool to do its calculations at most once for each event.
| AnalysisNtupleAlg.doNtuple | Controls the generation of the ntuple. (Default is true.) This package now does the output for the ntuple. |
| AnalysisNtupleAlg.tupleName | Sets the name of the ntuple. (Default is "MeritTuple".) Must be the one opened by NTupleWriteSvc, but there's no way for the code to find out what that is. |
| AnalysisNtupleAlg.toolList | A vector of strings that sets the list of tools requested. (Default is the 8 standard tools.) Each string is the name of a tool with the "ValsTool" removed, so "TkrHitValsTool" becomes "TkrHit". This means that any tool written for the package should be named "BlahBlahValsTool". |
| AnalysisNtupleAlg.enableDebugCalc | Does some tests on the ntuple vars for every event... doesn't seem to be working too well at the moment! |
| AnalysisNtupleAlg.countCalcs | Counts the number of times that a given Tool is called for each event |
| PtValsAlg.pointing_info_tree_name | ["MeritTuple"] Sets the name of the tuple to write Pt info to |
| PtValsAlg.PointingHistory | [""] name of a FT2 FITS file, or a pointing history ascii file. If not set, the default orbit will be used to define the pointing |
| FT1Alg.EnableAberrationCorrection | [false] if set true, the flag in GPS will be set to apply the orbital aberration correction when converting from instrument to celestical coordinates. |
| FT1Alg.AlignmentFlavor | [""] Set to a flavor to enable the alignment correction from LAT to S/C coordinates. |
package AnalysisNtuple
version v2r52p4
author Leon Rochester <lsrea@slac.stanford.edu>
branches src cmt doc
use GlastPolicy v*
# these really belong below the "private" line, but apparently linux can't handle it...
use TkrUtil v*
use G4Propagator v*
use ntupleWriterSvc v*
use enums v*
apply_pattern packageShr
apply_pattern package_include
#=============================================================
private
use GlastSvc v*
use facilities v*
use RootIo v*
use AcdUtil v*
use OnboardFilterTds v*
use gr_app v*
macro AnalysisNtuple_cppflags "" \
Linux "-DGLEAM -D__i386 -DEFC_FILTER -DMSG_ST -D__unix__ -DWUT_IMPLEMENTATION_PX "\
WIN32 " /D GLEAM /D__i386 /DEFC_FILTER /D_WIN32"
# -nostdinc -I/usr/local/gcc-3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include -I/usr/include"\
macro AnalysisNtuple_cflags $(AnalysisNtuple_cppflags)
macro_append cpplinkflags "" Linux " -ldl -lpthread " WIN32 ""
set JOBOPTIONS ${ANALYSISNTUPLEROOT}/src/test/jobOptions.txt
# This is a kludge to get the program pointed the proper particle.cdf file
# The problem has something to do with the new CMT handling "privates" better
# It may be necessary to move this to the public part for some configurations
# other than vanilla Gleam.
#
use astro v*
# use OnBoardFilterTDS v*
set LCHBDBASE ${FLUXSVCROOT}/cdf
#
# End of kludge
apply_pattern package_headers
library AnalysisNtuple *.cxx Dll/*.cxx ${AnalysisNtuple_headers}
apply_pattern package_Cshlibflags
private # Traudl says we need this
# build this for testing, console only. Load all objects directly.
application test_AnalysisNtuple ${GlastMain} AnalysisNtupleAlg.cxx $(Joboptions)
1.3.3