9 #include "trg/cdc/modules/ndFinder/CDCTriggerNDFinderModule.h"
16 CDCTriggerNDFinderModule::CDCTriggerNDFinderModule() :
Module()
19 "Implements a 3D Hough transformation for \n"
20 "3D track finding in omega, phi, theta. \n"
21 "Uses trained hit patterns for axial and \n"
22 "stereo TS and a density based clustering \n"
26 "The name of the StoreArray of the CDCTriggerSegmentHits.",
27 string(
"CDCTriggerSegmentHits"));
29 "The name of the StoreArray where the tracks found by this NDFinder Module are stored.",
30 string(
"CDCTrigger3DFinderTracks"));
32 "Cluster pruning: Minimum number of hits related to a cluster "
33 "for the cluster to be considered as a track.",
36 "Cluster pruning: Minimum number of axial hits related to a cluster "
37 "for the cluster to be considered as a track.",
40 "Clustering: Minimum weight of a cell in Hough space "
41 "for the cell to be considered as a cluster member.",
44 "Clustering: Minimum number of neighbor cells with minweight "
45 "for a cell to be considered a core cell.",
48 "Track estimation: Minimum weight of a cluster member cell "
49 "relative to the peak weight of the cluster "
50 "for the cell to enter in the weighted mean "
51 "track parameter value estimation.",
54 "Hit to cluster assignment limit: "
55 "Minimum relatively larger weight contribution to the largest cluster.",
58 "Clustering: consider diagonal neighbors.",
61 "Clustering: minimum number of cells for a cluster.",
64 "Print Hough planes and verbose output. ",
67 "File name of the axial hit patterns. ",
68 string(
"data/trg/cdc/ndFinderAxialShallow.txt.gz"));
70 "File name of the stereo hit patterns. ",
71 string(
"data/trg/cdc/ndFinderStereoShallow.txt.gz"));
80 B2DEBUG(11,
"CDCTriggerNDFinderModule initialize, m_minweight=" <<
m_minweight <<
113 0., 0., trackND.getCot(), 0.);
114 vector<unsigned short> relHits = trackND.get_relHits();
115 for (ulong i = 0; i < relHits.size(); i++) {
int m_minhits_axial
Cluster pruning: Minimum number of axial hits related to a cluster for the cluster to be considered a...
double m_minassign
Hit to cluster assignment: Minimum relative weight contribution to the largest cluster.
std::string m_NDFinderTracksName
Name for NDFinder tracks.
virtual void initialize() override
Module functions.
virtual void event() override
This method is the core of the module.
double m_thresh
Track estimation: Minimum weight of a cluster member cell relative to the peak weight of the cluster ...
int m_minpts
Clustering: Minimum number of neighbor cells with minweight for a cell to be considered a core cell.
int m_minweight
Clustering: Minimum weight of a cell in Hough space for the cell to be considered as a cluster member...
virtual void endRun() override
This method is called if the current run ends.
NDFinder m_NDFinder
Instance of the 3D Track Finder.
virtual void terminate() override
This method is called at the end of the event processing.
std::string m_axialFile
File name of the axial hit patterns.
int m_mincells
Clustering: minimum number of cells for a cluster.
virtual ~CDCTriggerNDFinderModule()
Destructor.
virtual void beginRun() override
Called when entering a new run.
bool m_diagonal
Clustering: consider diagonal neighbors.
std::string m_TrackSegmentHitsName
Name for TS hits.
StoreArray< CDCTriggerSegmentHit > m_TrackSegmentHits
StoreArray for TS hits.
StoreArray< CDCTriggerTrack > m_NDFinderTracks
StoreArray for 2D finder tracks from unpacker.
std::string m_stereoFile
File name of the stereo hit patterns.
int m_minhits
Cluster pruning: Minimum number of hits related to a cluster for the cluster to be considered as a tr...
bool m_verbose
Print Hough planes and verbose output.
Combination of several CDCHits to a track segment hit for the trigger.
Track created by the CDC trigger.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Store track parameters of found tracks.
std::vector< NDFinderTrack > * getFinderTracks()
retreive the results
void printParams()
Debug: print configured parameters.
void reset()
NDFinder reset data structure to process next event.
void findTracks()
main function for track finding
void addHit(unsigned short hitId, unsigned short hitPrioPos)
fill hit info of the event
void init(int minweight, int minpts, bool diagonal, int minhits, int minhits_axial, double thresh, double minassign, int mincells, bool verbose, std::string &axialFile, std::string &stereoFile)
initialization
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.