This is a piece of analysis code aimed at analysis beam and source data, and threshold scans. It is written for the 'classic' DAQ software framework, and hasn't yet been ported to our new analysis framework, because, well, such a thing doesn't yet exist.
Structure
Three files,
- inc/MpsAnalysis.hh - the usual interface, but with a rather perverse
#include "MpsAnalysis.cc"
so this code structure builds and fits with the DAQ software.
- src/MpsAnalysis.cc - contains the implementation
- src/mpsAnalysis.cc - the implementation of a main method: this provides the source for the build
mpsAnalysis
binary.
Once copied to your work area (where you have daquser, records and data directories already in place), use
build mpsAnalysis
to compile the code.
Executing
One can use
mpsAnalysis -h
to get,
mpsAnalysis options:
-b (int) Number of bunch trains, default 1000000000
-c (int) Number of configurations, default 1000000000
-n (int) Number of runs, default 1
-p (int) Print level, default 9
-a (int) MpsAnalysis bits, default 65535
-l (int) Low threshold, default 0
-u (int) Upper threshold, default 500
-i (int) Bins, default 0
Last (int) Run number, default 999999
For normal vanilla behavior over a typical threshold scan, I recommend,
mpsAnalysis -u 500 -i 500
You should then get,
MpsAnalysis::MpsAnalysis(unsigned int, int, int, int, int, int)
RcdReaderBin::open() Opened file data/run/Run490084.000.bin
void MpsAnalysis::populateSensorIds(SubAccessor)
Sensor id for 1: 2
Sensor id for 2: 6
Sensor id for 3: 8
Sensor id for 4: 7
Found 1 writes in PCB configuration data, with v.size() = 5
void MpsAnalysis::makeHistograms(int*)
Initialising histograms...
bins: 500, lowEdge: 0, _highEdge: 500
Processing bunch train: 0
Processing bunch train: 1000
Processing bunch train: 2000
...
When it's completed, you should find a ROOT file named
MpsAnalysis_runNumber.root in your working directory.
Run types handled
At present, this code is designed for analysing beam test data: it handles,
- mpsBeamThresholdScan
- mpsThresholdScan
- mpsBeam
ROOT File Structure
--
JamieBallin - 11 Jan 2008