DRAGON analyzer
summary
This analyzer has been tailored for the DRAGON experiment.
Most of this program was originally written by Jonty Pearson.
The latest enhancements support making graphical cut on one histogram
to determine if related histogram is filled.
The syntax for the analyzer input file is similar to carpere7's input file. If you are
familiar with those files, then you'll have a significant advantage in
understanding how to make cuts in the analyzer using these enhancements.
requirements
The dragon analyser makes use of the following:
- A mysql server with a database named 'Online' containing
detailed information mapping ADC and TDC channels to each detector [REQUIRED].
- A MIDAS data file (with the 'mid' extension) [REQUIRED].
- A MIDAS odb file containing the configuration parameters for analysing
the midas data file [usually REQUIRED]. The ODB field /Analyzer/ConfigFile determines
which input file is parsed to make cuts (see next item).
- A text file defining which cuts to be used and in what manner [OPTIONAL].
- One or more text files, each containing a root script for a graphical cut [OPTIONAL].
command line
If you confuse the MIDAS analyzer enough you'll get the following:
valid options are:
-c <filename1> Configuration file name(s). May contain a '%05d' to be
<filename2> replaced by the run number. Up to ten files can be
... specified in one "-c" statement
-d Debug flag when started the analyzer fron a debugger.
Prevents the system to kill the analyzer when the
debugger stops at a breakpoint
-D Start analyzer as a daemon in the background (UNIX only).
-e <experiment> MIDAS experiment to connect to
-f Filter mode. Write original events to output file
only if analyzer accepts them (doesn't return ANA_SKIP).
-h <ostname>> MIDAS host to connect to when running the analyzer online
-i <filename1> Input file name. May contain a '%05d' to be replaced by
<filename2> the run number. Up to ten input files can be specified
... in one "-i" statement
-l If set, don't load histos from last histo file when
running online.
-L HBOOK LREC size. Default is 8190.
-n <count> Analyze only "count" events.
<first> <last>
Analyze only events from "first" to "last".
<first> <last> <n>
Analyze every n-th event from "first" to "last".
-o <filename> Output file name. Extension may be .mid (MIDAS binary),
.asc (ASCII) or .rz (HBOOK). If the name contains a '%05d',
one output file is generated for each run. Use "OFLN" as
output file name to creaate a HBOOK shared memory instead
of a file.
-p <param=value> Set individual parameters to a specific value.
Overrides any setting in configuration files
-P <ODB tree> Protect an ODB subtree from being overwritten
with the online data when ODB gets loaded from .mid file
-q Quiet flag. If set, don't display run progress in
offline mode.
-r <range> Range of run numbers to analyzer like "-r 120 125"
to analyze runs 120 to 125 (inclusive). The "-r"
flag must be used with a '%05d' in the input file name.
-s <port> Start ROOT histo server under <port>. If port==0, don't start server.
-R Start ROOT interpreter after analysis has finished.
-v Verbose output.
-w Produce row-wise N-tuples in outpur .rz file. By
default, column-wise N-tuples are used.
In this case, one of the most useful options is the ability to
choose which ODB file (what MIDAS calls a 'Configuration file')
to load when reanalyzing a MIDAS file. Since the analyzer uses the ODB
to know which input file to use when determining cuts, this allows you to
change which input file to use when reanalyzing a run.
Example:
~/src/E810/bin/analyzer -c cuts/Mg24_234AkeV_6plus_7.7T.odb -i ../E810/run18320.mid -o media/test.root
example
supported histograms
All of the following histograms are supported for analyzer based cuts.
Cuts can be made on singles or coincidences. This list also defines
the list of histograms which can be populated upon passing a cut.
tag | description |
BgoE | Energy vs. Bgo number |
BgoE0 | Largest detected energy signal (per event) vs. Bgo number |
BgoE0E1 | E0 vs. E1 (second largest energy signal) |
BgoPosition | A 'bear skin' plot of Bgo hit position |
GrTofHiTof | BGO array TOF vs. Heavy Ion TOF |
IcE | Energy vs. IC anode |
IcEdE | IC anode 0 vs. anode 1 |
IcEtotE0 | total IC energy vs anode 0 |
IcEtotE1 | total IC energy vs anode 1 |
IcEtotE2 | total IC energy vs anode 2 |
IcEtotE3 | total IC energy vs anode 3 |
IcEtotE4 | total IC energy vs anode 4 |
IcSum | total IC energy |
IcSumVsTAC | total IC energy vs. local MCP TOF |
McpTOF | local MCP TOF |
McpXY | spatial position of MCP hit |
input files
The input file is broken into blocks, each representing a single command,
contained within open and close tags. See below for a
list of blocks supported.
open tag | description |
cut | define a graphical cut on a histogram |
group | define a group of histograms, requiring the dragon events to pass one or more cuts |
version | alters processing of the input file based on a version |
And here is a more complete description of the syntax for each block:
cut
Define a graphical cut on a histogram type.
tag | parameters | description |
cut | | open tag |
name | <name> | referenced by 'group' tags |
object | <name> | name of the cut within the root script |
script | <file name> | file name containing the root script |
type | <histogram type> | a single histogram type taken from the list above |
end | | closing tag |
Example:
cut
script cuts/Mg24_234AkeV_6plus_7.7T_cut1.C
object cut1_77
name cut1
type IcSumVsTAC
end
group
Define a histogram group -- each event must pass the cuts on the group to be included in the histograms.
tag | parameters | description |
group | | open tag |
name | <prefix> | All histograms have this prefix |
data | <type> | Supported types are 'single' or 'coincidence' |
folder | <name> | All histograms are placed within this folder (under DragonEvent) |
cuts | | A block of cut names (terminate with 'end') |
histograms | | A block of histogram types taken from the list above (terminate with 'end') |
end | | closing tag |
Example:
group
name hsCut1
data single
folder Cut1_Singles
cuts
cut1
end
histograms
IcE
IcEdE
IcEtotE0
IcEtotE1
IcEtotE2
IcSumVsTAC
end
end
Example:
group
name hcCut1
data coincidence
folder Cut1_Coincidence
cuts
cut1
end
histograms
IcE
IcEdE
IcEtotE0
IcEtotE1
IcEtotE2
IcSumVsTAC
BgoE
BgoE0
BgoE0E1
BgoPosition
end
end
version
The version tag (not really a block in this case) is supported in case future input files
have changed their syntax beyond the point of backwards compatibility. Presently,
only version 1 is supported.
Example:
version 1
|