11#include <Math/Vector3D.h>
12#include "trg/cdc/modules/ndFinder/CDCTriggerNDFinderModule.h"
13#include "trg/cdc/NDFinder.h"
19CDCTriggerNDFinderModule::CDCTriggerNDFinderModule() :
Module()
21 setDescription(
"CDC Trigger NDFinder Module.\n"
22 "Implements a 3D Hough transformation for \n"
23 "3D track finding in omega, phi, cot. \n"
24 "Uses trained hit patterns for axial and \n"
25 "stereo TS and a density based clustering \n"
27 setPropertyFlags(c_ParallelProcessingCertified);
28 addParam(
"TrackSegmentHitsName", m_trackSegmentHitsName,
29 "The name of the StoreArray of the CDCTriggerSegmentHits.",
30 std::string(
"CDCTriggerSegmentHits"));
31 addParam(
"NDFinderTracksName", m_ndFinderTracksName,
32 "The name of the StoreArray where the tracks found by this NDFinder Module are stored.",
33 std::string(
"CDCTrigger3DFinderTracks"));
34 addParam(
"minSuperAxial", m_minSuperAxial,
35 "Cluster pruning: Minimum number of axial super layer hits related to a cluster "
36 "for the cluster to be considered as a track.",
37 static_cast<unsigned short>(3));
38 addParam(
"minSuperStereo", m_minSuperStereo,
39 "Cluster pruning: Minimum number of stereo super layer hits related to a cluster "
40 "for the cluster to be considered as a track.",
41 static_cast<unsigned short>(2));
42 addParam(
"iterations", m_iterations,
43 "Clustering: Number of iterations for the cluster finding in one Hough space quadrant.",
44 static_cast<unsigned short>(1));
45 addParam(
"omegaTrim", m_omegaTrim,
46 "Clustering: Number of deleted cells in each omega direction of the maximum.",
47 static_cast<unsigned short>(5));
48 addParam(
"phiTrim", m_phiTrim,
49 "Clustering: Number of deleted cells in each phi direction of the maximum.",
50 static_cast<unsigned short>(4));
51 addParam(
"storeAdditionalReadout", m_storeAdditionalReadout,
52 "Switch for writing the full Hough space and the cluster information to the 3DFinderInfo class.",
54 addParam(
"axialFile", m_axialFile,
55 "File name of the axial hit representations.",
56 std::string(
"data/trg/cdc/ndFinderAxial40x384x9.txt.gz"));
57 addParam(
"stereoFile", m_stereoFile,
58 "File name of the stereo hit representations.",
59 std::string(
"data/trg/cdc/ndFinderStereo40x384x9.txt.gz"));
60 addParam(
"NDFinderInfosName", m_ndFinderInfosName,
61 "The name of the StoreArray where the tracks clusters found by this NDFinder Module are stored.",
62 std::string(
"CDCTriggerClusterInfos"));
65CDCTriggerNDFinderModule::~CDCTriggerNDFinderModule() {}
93 hit.getPriorityPosition(),
101 std::vector<NDFinderTrack>* resultTracks =
m_NDFinder.getFinderTracks();
104 m_ndFinderTracks.appendNew(track.getPhi0(), track.getOmega(), 0., 0., track.getCot(), 0.,
105 std::vector<bool>(6,
false),
106 std::vector<bool>(9,
false),
108 std::vector<ROOT::Math::XYZVector> readoutHoughSpace = track.getHoughSpace();
109 std::vector<ROOT::Math::XYZVector> readoutCluster = track.getClusterReadout();
112 ndFinderTrack->addRelationTo(ndFinderInfo);
113 std::vector<unsigned short> relatedHits = track.getRelatedHits();
114 for (
unsigned short hitIdx = 0; hitIdx < relatedHits.size(); ++hitIdx) {
Extra info for analysis of the 3DFinder of the CDC trigger.
virtual void initialize() override
Initialize the Module.
virtual void event() override
This method is the core of the module.
virtual void endRun() override
This method is called if the current run ends.
unsigned short m_minSuperStereo
Minimum number of stereo super layers for the cluster to be considered as a track.
NDFinder m_NDFinder
Instance of the 3D Track Finder.
virtual void terminate() override
This method is called at the end of the event processing.
unsigned short m_phiTrim
Clustering with 3d volume: Max deletion in phi (number of cells in each direction from max)
std::string m_ndFinderTracksName
Name for NDFinder tracks.
unsigned short m_iterations
Clustering with 3d volume: Number of global maximum searches per Hough space quadrant.
std::string m_axialFile
File name of the axial hit patterns.
std::string m_ndFinderInfosName
Name for the NDFinder Cluster Data.
bool m_storeAdditionalReadout
Switch for writing the full Hough space and the cluster information to the 3DFinderInfo class.
virtual void beginRun() override
Called when entering a new run.
StoreArray< CDCTrigger3DFinderInfo > m_ndFinderInfos
StoreArray for NDFinder Cluster Data.
StoreArray< CDCTriggerTrack > m_ndFinderTracks
StoreArray for 2D finder tracks from unpacker.
unsigned short m_minSuperAxial
Minimum number of axial super layers for the cluster to be considered as a track.
std::string m_stereoFile
File name of the stereo hit patterns.
StoreArray< CDCTriggerSegmentHit > m_trackSegmentHits
StoreArray for TS hits.
unsigned short m_omegaTrim
Clustering with 3d volume: Max deletion in omega (number of cells in each direction from max)
std::string m_trackSegmentHitsName
Name for TS hits.
Combination of several CDCHits to a track segment hit for the trigger.
Track created by the CDC trigger.
Class for a found NDFinder track.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.
Struct containing the track segment (hit) information from the Track Segment Finder (TSF)
Struct of NDFinder parameters.