QwAnalysis
|
Controls all the routines involved in finding tracks in an event. More...
#include <QwTrackingWorker.h>
Public Member Functions | |
QwTrackingWorker (QwOptions &options, const QwGeometry &geometry) | |
Default constructor with name. More... | |
virtual | ~QwTrackingWorker () |
Destructor. More... | |
void | ProcessOptions (QwOptions &options) |
Process command line and config file options. More... | |
int | GetDebugLevel () const |
Get the debug level. More... | |
void | SetDebugLevel (const int debug) |
Set the debug level. More... | |
const QwGeometry | GetGeometry () const |
Get the geometry. More... | |
void | SetGeometry (const QwGeometry &geometry) |
Set the geometry. More... | |
double | GetMagneticFieldCurrent () const |
Get the magnetic field current. More... | |
void | SetMagneticFieldCurrent (const double current) |
Set the magnetic field current. More... | |
void | ProcessEvent (const QwSubsystemArrayTracking *detectors, QwEvent *event) |
Process the hit list and construct the event. More... | |
Static Public Member Functions | |
static void | DefineOptions (QwOptions &options) |
Define command line and config file options. More... | |
Data Fields | |
int | ngood |
number of good events More... | |
int | nbad |
number of bad events More... | |
int | R2Good |
int | R2Bad |
int | R3Good |
int | R3Bad |
int | nbridged |
number of beidged tracks More... | |
Private Member Functions | |
void | InitTree (const QwGeometry &geometry) |
Initialize the pattern search tree. More... | |
QwTrackingWorker () | |
Private Attributes | |
QwGeometry | fGeometry |
Detector geometry. More... | |
int | fDebug |
Debug level. More... | |
bool | fRegenerate |
Regenerate the search tree. More... | |
int | fLevelsR2 |
Region 2 levels. More... | |
int | fLevelsR3 |
Region 3 levels. More... | |
std::vector < QwTrackingTreeRegion * > | fSearchTrees |
Internal list of search trees created by QwTrackingWorker. More... | |
Momentum determination bridging methods | |
QwBridgingTrackFilter * | fBridgingTrackFilter |
Track filter. More... | |
QwRayTracer * | fRayTracer |
Ray tracing bridging method. More... | |
Parsed configuration options | |
bool | fDisableTracking |
Disable all tracking. More... | |
bool | fPrintPatternDatabase |
Print the pattern database. More... | |
bool | fShowEventPattern |
Show all event patterns. More... | |
bool | fShowMatchingPattern |
Show matching event patterns. More... | |
bool | fDisableMomentum |
Disable momentum reconstruction. More... | |
bool | fDisableMatrixLookup |
Disable matrix lookup momentum reconstruction. More... | |
bool | fDisableRayTracer |
Disable ray tracer momentum reconstruction. More... | |
bool | fMismatchPkg |
Indicates if the pkg for R2 and R3 is differnt at the same octant. More... | |
std::string | fFilenameFieldmap |
Filename of the fieldmap in QW_FIELDMAP. More... | |
std::string | fFilenameLookupTable |
Filename of the lookup table in QW_LOOKUP. More... | |
Helper modules | |
QwTrackingTreeSearch * | fTreeSearch |
Module that handles the tree search. More... | |
QwTrackingTreeCombine * | fTreeCombine |
Module that combines treelines and partial tracks. More... | |
QwTrackingTreeSort * | fTreeSort |
Module that sorts lists of treelines and partial tracks. More... | |
QwTrackingTreeMatch * | fTreeMatch |
Module that matches up VDC front and back treelines. More... | |
Controls all the routines involved in finding tracks in an event.
The tracking worker coordinates the track finding based on the hit list provided to the ProcessHits() method.
Definition at line 46 of file QwTrackingWorker.h.
QwTrackingWorker::QwTrackingWorker | ( | QwOptions & | options, |
const QwGeometry & | geometry | ||
) |
Default constructor with name.
Definition at line 119 of file QwTrackingWorker.cc.
References QwLog::endl(), fBridgingTrackFilter, fDebug, fDisableMomentum, fDisableRayTracer, fDisableTracking, fRayTracer, fShowMatchingPattern, fTreeCombine, fTreeMatch, fTreeSearch, fTreeSort, QwOptions::GetValue(), InitTree(), nbad, nbridged, ngood, ProcessOptions(), QwDebug, R2Bad, R2Good, R3Bad, R3Good, QwTrackingTreeSort::SetDebugLevel(), QwTrackingTreeCombine::SetDebugLevel(), QwTrackingTreeSearch::SetDebugLevel(), QwTrackingTreeMatch::SetDebugLevel(), QwTrackingTreeCombine::SetGeometry(), SetGeometry(), QwTrackingTreeCombine::SetMaxRoad(), QwTrackingTreeCombine::SetMaxXRoad(), and QwTrackingTreeSearch::SetShowMatchingPatterns().
|
virtual |
Destructor.
Definition at line 183 of file QwTrackingWorker.cc.
References QwLog::endl(), fBridgingTrackFilter, fRayTracer, fSearchTrees, fTreeCombine, fTreeMatch, fTreeSearch, fTreeSort, QwObjectCounter< QwHitPattern >::GetObjectsAlive(), QwObjectCounter< QwTreeLine >::GetObjectsAlive(), QwObjectCounter< QwEvent >::GetObjectsAlive(), QwObjectCounter< QwPartialTrack >::GetObjectsAlive(), QwObjectCounter< QwTrack >::GetObjectsAlive(), QwObjectCounter< QwEventHeader >::GetObjectsAlive(), QwObjectCounter< QwHit >::GetObjectsAlive(), QwObjectCounter< QwTrack >::GetObjectsCreated(), QwObjectCounter< QwTreeLine >::GetObjectsCreated(), QwObjectCounter< QwPartialTrack >::GetObjectsCreated(), QwObjectCounter< QwHitPattern >::GetObjectsCreated(), QwObjectCounter< QwEventHeader >::GetObjectsCreated(), QwObjectCounter< QwEvent >::GetObjectsCreated(), QwObjectCounter< QwHit >::GetObjectsCreated(), and QwMessage.
|
private |
|
static |
Define command line and config file options.
Definition at line 222 of file QwTrackingWorker.cc.
References QwOptions::AddOptions(), and default_bool_value.
Referenced by DefineOptionsTracking().
|
inline |
|
inline |
|
inline |
Get the magnetic field current.
Definition at line 81 of file QwTrackingWorker.h.
References fRayTracer, and QwRayTracer::GetMagneticFieldCurrent().
Referenced by main().
|
private |
Initialize the pattern search tree.
Region 2 contains 4 layers
Region 3 contains 8 layers
Create a new search tree
Set the maximum slope
Set the geometry
Set up the filename with the following format tree[numlayers]-[levels]-[u|l]-[1|2|3]-[n|u|v|x|y].tre
Each element of search tree will point to a pattern database
Definition at line 329 of file QwTrackingWorker.cc.
References QwLog::endl(), fLevelsR2, fLevelsR3, fPrintPatternDatabase, fRegenerate, fSearchTrees, QwDetectorInfo::GetActiveWidthZ(), QwDetectorInfo::GetElementSpacing(), getenv_safe_string(), QwDetectorInfo::GetNumberOfElements(), QwDetectorInfo::GetRegion(), QwOptions::GetValue(), gQwOptions, QwGeometry::in(), QwTrackingTree::inittree(), kDirectionV, kDirectionX, kPackage1, kRegionID2, kRegionID3, QwTrackingTreeRegion::PrintNodes(), QwDebug, QwTrackingTree::SetGeometry(), and QwTrackingTree::SetMaxSlope().
Referenced by QwTrackingWorker().
void QwTrackingWorker::ProcessEvent | ( | const QwSubsystemArrayTracking * | detectors, |
QwEvent * | event | ||
) |
Process the hit list and construct the event.
ProcessHits() - this function is the main tracking function. It performs tracking in projections (u/v/x) to form treelines, it combines projection tracks to tracks in space and bridges tracks in space before and after the magnet to form recon- structed particle tracks. The function calculates the momentum of the tracks and afterwards reiterates the track parameters using the now known track position and momentum for iterating the hit positions in the tracking chambers.
inputs: (1) QwHitContainer &hitlist - pointer to the QwHitContainer object with the hit list.
outputs: (1) Event* ProcessHits() - pointer to the structure with all of the reconstruction information for this event.
If no hits, return
If tracking is disabled, return
Loop through all detector packages
Loop through the detector regions
Loop through the detector directions
-— 1st: check that the direction is tree-searchable -—
-— 2nd: do some variable initialization for the found tree line linked list -—
-— 3rd: create the bit patterns for the hits -—
Get the subhitlist of hits in this detector
-— TASK 2: Combine the treelines into partial tracks -—
-— TASK 3: Sort out the Partial Tracks -—
-— TASK 4: Hook up the partial track info to the event info -—
If momentum reconstruction is disabled
Definition at line 431 of file QwTrackingWorker.cc.
References QwHitContainer::Append(), QwRayTracer::Bridge(), QwLog::endl(), fBridgingTrackFilter, fDebug, fDisableMomentum, fDisableRayTracer, fDisableTracking, fGeometry, QwBridgingTrackFilter::Filter(), fLevelsR2, fLevelsR3, fMismatchPkg, fRayTracer, fShowEventPattern, fTreeCombine, fTreeMatch, fTreeSearch, fTreeSort, QwDetectorInfo::GetNumberOfElements(), QwEvent::GetNumberOfTreeLines(), QwDetectorInfo::GetPlane(), QwHitContainer::GetSubList_Plane(), QwEvent::GetTrack(), QwTrackingTreeRegion::GetWidth(), QwGeometry::in(), QwDetectorInfo::IsInactive(), QwTrackingTreeRegion::IsSearchable(), kDirectionU, kDirectionV, kDirectionX, kPackage1, kPackage2, kRegionID2, kRegionID3, QwTrackingTreeMatch::MatchRegion3(), MAX_LAYERS, nbad, nbridged, QwTreeLine::next, ngood, QwHitContainer::Print(), QwTreeLine::Print(), QwDebug, QwMessage, QwOut, QwVerbose, QwWarning, R2Bad, R2Good, R3Bad, R3Good, QwTrackingTreeSort::rcPartConnSort(), QwTrackingTreeSort::rcTreeConnSort(), QwTrackingTreeSearch::SearchTreeLines(), VQwTrackingElement::SetDirection(), QwHitPattern::SetHDCHitList(), VQwTrackingElement::SetPackage(), VQwTrackingElement::SetPlane(), VQwTrackingElement::SetRegion(), QwHitPattern::SetVDCHit(), QwTrackingTreeCombine::TlTreeCombine(), and QwTrackingTreeCombine::TlTreeLineSort().
Referenced by main().
void QwTrackingWorker::ProcessOptions | ( | QwOptions & | options | ) |
Process command line and config file options.
Definition at line 296 of file QwTrackingWorker.cc.
References fDebug, fDisableMatrixLookup, fDisableMomentum, fDisableRayTracer, fDisableTracking, fFilenameLookupTable, fLevelsR2, fLevelsR3, fMismatchPkg, fPrintPatternDatabase, fRegenerate, fShowEventPattern, fShowMatchingPattern, and QwOptions::GetValue().
Referenced by QwTrackingWorker().
|
inline |
|
inline |
Set the geometry.
Definition at line 78 of file QwTrackingWorker.h.
References fGeometry.
Referenced by QwTrackingWorker().
|
inline |
Set the magnetic field current.
Definition at line 86 of file QwTrackingWorker.h.
References fRayTracer, and QwRayTracer::SetMagneticFieldCurrent().
Referenced by main().
|
private |
Track filter.
Definition at line 115 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), QwTrackingWorker(), and ~QwTrackingWorker().
|
private |
Debug level.
Definition at line 99 of file QwTrackingWorker.h.
Referenced by GetDebugLevel(), ProcessEvent(), ProcessOptions(), QwTrackingWorker(), and SetDebugLevel().
|
private |
Disable matrix lookup momentum reconstruction.
Definition at line 128 of file QwTrackingWorker.h.
Referenced by ProcessOptions().
|
private |
Disable momentum reconstruction.
Definition at line 127 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), ProcessOptions(), and QwTrackingWorker().
|
private |
Disable ray tracer momentum reconstruction.
Definition at line 129 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), ProcessOptions(), and QwTrackingWorker().
|
private |
Disable all tracking.
Definition at line 123 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), ProcessOptions(), and QwTrackingWorker().
|
private |
Filename of the fieldmap in QW_FIELDMAP.
Definition at line 131 of file QwTrackingWorker.h.
|
private |
Filename of the lookup table in QW_LOOKUP.
Definition at line 132 of file QwTrackingWorker.h.
Referenced by ProcessOptions().
|
private |
Detector geometry.
Definition at line 96 of file QwTrackingWorker.h.
Referenced by GetGeometry(), ProcessEvent(), and SetGeometry().
|
private |
Region 2 levels.
Definition at line 105 of file QwTrackingWorker.h.
Referenced by InitTree(), ProcessEvent(), and ProcessOptions().
|
private |
Region 3 levels.
Definition at line 107 of file QwTrackingWorker.h.
Referenced by InitTree(), ProcessEvent(), and ProcessOptions().
|
private |
Indicates if the pkg for R2 and R3 is differnt at the same octant.
Definition at line 130 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), and ProcessOptions().
|
private |
Print the pattern database.
Definition at line 124 of file QwTrackingWorker.h.
Referenced by InitTree(), and ProcessOptions().
|
private |
Ray tracing bridging method.
Definition at line 117 of file QwTrackingWorker.h.
Referenced by GetMagneticFieldCurrent(), ProcessEvent(), QwTrackingWorker(), SetMagneticFieldCurrent(), and ~QwTrackingWorker().
|
private |
Regenerate the search tree.
Definition at line 102 of file QwTrackingWorker.h.
Referenced by InitTree(), and ProcessOptions().
|
private |
Internal list of search trees created by QwTrackingWorker.
Definition at line 146 of file QwTrackingWorker.h.
Referenced by InitTree(), and ~QwTrackingWorker().
|
private |
Show all event patterns.
Definition at line 125 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), and ProcessOptions().
|
private |
Show matching event patterns.
Definition at line 126 of file QwTrackingWorker.h.
Referenced by ProcessOptions(), and QwTrackingWorker().
|
private |
Module that combines treelines and partial tracks.
Definition at line 140 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), QwTrackingWorker(), and ~QwTrackingWorker().
|
private |
Module that matches up VDC front and back treelines.
Definition at line 142 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), QwTrackingWorker(), and ~QwTrackingWorker().
|
private |
Module that handles the tree search.
Definition at line 139 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), QwTrackingWorker(), and ~QwTrackingWorker().
|
private |
Module that sorts lists of treelines and partial tracks.
Definition at line 141 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), QwTrackingWorker(), and ~QwTrackingWorker().
int QwTrackingWorker::nbad |
number of bad events
Definition at line 51 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::nbridged |
number of beidged tracks
Definition at line 58 of file QwTrackingWorker.h.
Referenced by main(), ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::ngood |
number of good events
Definition at line 50 of file QwTrackingWorker.h.
Referenced by main(), ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::R2Bad |
Definition at line 54 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::R2Good |
Definition at line 53 of file QwTrackingWorker.h.
Referenced by main(), ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::R3Bad |
Definition at line 56 of file QwTrackingWorker.h.
Referenced by ProcessEvent(), and QwTrackingWorker().
int QwTrackingWorker::R3Good |
Definition at line 55 of file QwTrackingWorker.h.
Referenced by main(), ProcessEvent(), and QwTrackingWorker().