processors Package
Gnomon runs processors. The processors you can use are listed here.
processors Package
Catologue processors
-
gnomon.processors.lookupProcessor(name)
Base Module
Base class for processors
-
class gnomon.processors.Base.Processor
Base call for all processors
Defines the API for processors
-
process(docs)
Not implemented
-
shutdown()
Do nothing
DataManager Module
Routines to save output
-
class gnomon.processors.DataManager.CouchManager
Output to CouchDB
This class handles sending events to CouchDB.
-
commit(force=False)
Commit data to couchdb
Compared to threshold (unless forced) then sends data to couch
-
save(doc)
Save a doc to cache
-
setup_db(couch, dbname)
Setup and configure DB
-
shutdown()
Shutdown and commit rest
-
class gnomon.processors.DataManager.JSONFileManager(arg_file=None)
JSONFileManager writes JSON files to python files
This class outputs to a python file object that
is passed as the only argument ‘arg_file’ to the
constructor. This allows the class to output
to any Python file object:
- an uncompressed ASCII file where each line
represents an event. One can use the
command ‘python -mjson.tool’ to view the
events in a more human-readable fashion. For
example ‘cat filename | python -mjson.tool’;
arg_file=open(‘filename’, ‘w’)
- a gzip-compressed file that can be
decompressed either with InputPyJSON within
MAUS or by the Linux tools gunzip/gzip;
arg_file=GzipFile(‘filename’, ‘wb’)
see http://docs.python.org/library/gzip.html
- a socket;
http://docs.python.org/library/socket.html
- etc...
.
-
save(document)
Save single event
This is called once per time an event needs
to be written.
param document document to be saved
-
shutdown()
Closes down JSONFileManager
Closes the file that the class has open
-
class gnomon.processors.DataManager.Manager
Output base class
-
process(docs)
Loop over docs and save each
-
save(doc)
-
shutdown()
Digitizer Module
The Digitization routines are for simulating electronics response in various
ways. Oh, and we use USA spelling here, so use a ‘zed’ and like it.
-
class gnomon.processors.Digitizer.VlenfSimpleDigitizer
The VLENF digitizer where the energy deposited is multiplied by a
generic energy scale.
-
get_threshold()
-
process(docs)
-
set_threshold(threshold=2)
Threshold for registering a hit
Units are adc counts
Fiducial Module
Determine distance to fiducial boundary
-
class gnomon.processors.Fiducial.FiducialCuts
-
apply_cuts(distances)
-
distance_to_boundaries(z, x)
-
process(docs)
Filter Module
Filter routines
-
class gnomon.processors.Filter.AppearanceCuts
-
process(docs)
-
class gnomon.processors.Filter.SaveInteresting
Save extra information about ‘interesting’ events
Save for example hit information.
-
process(docs)
Fitter Module
Fitter routines
-
class gnomon.processors.Fitter.ClassifyVariables
Compute various variables
For example, (nhit, Qsum) including MINOS variables
-
process(docs)
-
class gnomon.processors.Fitter.CombineViews
Combine x and y views
-
process(docs)
-
sort_points(points)
Take points (z,x,q) and sort by increasing z
-
class gnomon.processors.Fitter.EmptyTrackFromDigits
Prepare for track extraction
-
process(docs)
Extract tracks per view with graph theoretic concepts
-
class gnomon.processors.Fitter.VlenfPolynomialFitter
-
Fit(zxq)
Perform a 2D fit on 2D points then return parameters
Parameters: | zxq – A list where each element is (z, transverse, charge) |
-
process(docs)
RecpackFitter Module
Interface to Recpack’s Kalman Filtering via mind_rec
-
class gnomon.processors.RecpackFitter.RecpackFitter
Use Recpack’s Kalman Filter for reconstruction
MindRec will take as an input on an event by event basis (where the
Genie gst code is specified when available):
- Event vertex (x,y,z) [mm] - determine ourselves (not Genie)
- Genie interaction type - (gst: ‘nuance’)
- Produces charm [bool] - (gst: ‘charm’)
- Charm hadron (pdg designation)
- Q^2 (GENIE Kine.Q2(true)*GeV) (gst: ‘Q2’)
- neutrino type (pdg)
- neutrino energy [GeV]
- Nucleus type (pdg)
- Nucleus energy [GeV]
- interaction particle (pdg)
- interaction particle Energy [GeV]
- Hadron 4 vector – (px, py, pz, E) from sum of all final state particles excluding the final state lepton [GeV]
For a single hit, MindRec requires
- hit position (x,y,z) [mm]
- energy deposition [MeV]
Truth Module
Add truth values to data stream
-
class gnomon.processors.Truth.AppendTruth
-
process(docs)