 |
Belle II Software
release-05-02-19
|
13 #include <tracking/modules/DATCON/DATCONTrackCand.h>
14 #include <tracking/modules/DATCON/DATCONHoughCand.h>
15 #include <tracking/modules/DATCON/DATCONHoughSpaceClusterCand.h>
16 #include <tracking/dataobjects/DATCONSVDSpacePoint.h>
17 #include <tracking/dataobjects/DATCONTrack.h>
18 #include <tracking/dataobjects/DATCONSVDDigit.h>
20 #include <tracking/spacePointCreation/SpacePoint.h>
21 #include <tracking/dataobjects/RecoTrack.h>
23 #include <framework/core/Module.h>
24 #include <framework/datastore/StoreArray.h>
26 #include <mdst/dataobjects/MCParticle.h>
28 #include <root/TVector2.h>
29 #include <root/TVector3.h>
31 #include <svd/dataobjects/SVDCluster.h>
33 #include <vxd/dataobjects/VxdID.h>
60 typedef std::map<int, svdHitPair>
svdHitMap;
63 typedef std::pair<VxdID, TVector2>
houghPair;
65 typedef std::map<int, houghPair>
houghMap;
82 virtual void event()
override;
105 TVector2 v2_s, TVector2 v4_s,
106 unsigned int iterations,
unsigned int maxIterations);
120 void DepthFirstSearch(
bool u_side,
int** ArrayOfActiveHoughSpaceSectors,
int angleSectors,
int vertSectors,
121 int actualPositionX,
int actualPositionY,
122 std::vector<unsigned int>& mergedList);
134 bool compareList(std::vector<unsigned int>& aList, std::vector<unsigned int>& bList);
140 void mergeIdList(std::vector<unsigned int>& mergedList, std::vector<unsigned int>& mergeme);
void prepareDATCONSVDSpacePoints()
Prepare the DATCONSVDSpacePoints for the Hough Trafo.
int slowInterceptFinder2d(houghMap &hits, bool u_side)
FPGA-like intercept finder with all the sectors defined a priori, so no subdivision of sectors is nee...
std::string m_storeMCParticlesName
Members holding module parameters:
virtual void terminate() override
Terminate the module.
bool m_useTrackCandMergerU
Use TrackMerger for u-side tracks (candidates)
std::map< int, houghPair > houghMap
Map containing integer ID and corresponding houghPair for the HS TODO make this description better.
StoreArray< SVDCluster > storeDATCONSVDCluster
DATCONSVDCluster StoreArray.
int m_MaximumThetaHSClusterSizeX
Maximum cluster size in horizontal direction in the Theta HS.
std::string m_storeDATCONTracksName
Name of the collection for the SVD Hough tracks.
int m_MaximumPhiHSClusterSize
Maximum cluster size in the Phi HS.
int m_MaximumThetaHSClusterSize
Maximum cluster size in the Theta HS.
DATCONTrackingModule class.
int m_nVertSectorsU
Using independent sectors: Number of vertical sectors for u-side (default: 256)
unsigned short m_minimumLines
Minimum number of lines required for an active sector (default: 3)
std::string m_storeRecoHitInformationName
Name of the RecoHit StoreArray required for RecoTracks.
StoreArray< RecoHitInformation > storeRecoHitInformation
RecoHitInformation StoreArray for DATCON Reco Hits.
svdHitMap vClusters
SVD v-side clusters.
void findandcombine3d()
Find and Combine track candidates Combine found values of phi and r from u-side HS with found values ...
bool m_useTrackCandMergerV
Use TrackMerger for v-side tracks (candidates)
int m_MinimumPhiHSClusterSize
Minimum cluster size in the Phi HS.
StoreArray< DATCONSVDDigit > storeDATCONSVDDigits
DATCONSVDDigit StoreArray.
bool layerFilter(bool *layer)
Layer filter, checking for hits from different SVD layers.
void prepareSVDSpacePoints()
Prepare the DATCONSVDSpacePoints for the Hough Trafo.
double m_mergeThresholdTheta
Merging threshold for theta trackMerger.
void houghTrafo2d(svdHitMap &mapClusters, bool u_side)
Hough transformation function.
bool m_independentSectors
Use tracking with independent sectors in HS like it is possible to do on FPGA (with slowInterceptFind...
double m_mergeThreshold
Global track merger merging threshold.
double m_trackCenterX
Center of the tracks (our Hough Trafo requires (0, 0, 0).
virtual ~DATCONTrackingModule()=default
Standard Deconstructor.
StoreArray< DATCONTrack > storeDATCONTracks
DATCONTracks StoreArray.
int m_maxIterationsU
Maximum number of iterations allowed for u-side (obsolete?) (default: 12)
void DepthFirstSearch(bool u_side, int **ArrayOfActiveHoughSpaceSectors, int angleSectors, int vertSectors, int actualPositionX, int actualPositionY, std::vector< unsigned int > &mergedList)
Depth First Search algorithm, compare with https://en.wikipedia.org/wiki/Depth-first_search (06.
int m_clusterSize
Size of the current cluster.
DATCONTrackingModule()
Constructor.
std::vector< bool > activeSectorVectorTheta
Analogue vector for the Theta Hough Space.
std::vector< DATCONHoughCand > uHoughCand
Hough Candidates.
StoreArray< RecoTrack > storeDATCONRecoTracks
DATCONRecoTracks StoreArray.
bool m_useTrackCandMerger
Use TrackMerger to merge found tracks (candidates) to avoid / reduce fakes.
double m_mergeThresholdV
Merging threshold for v-side trackCandMerger.
std::vector< DATCONTrackCand > uTrackCand
Purified Hough Candidates.
double m_mergeThresholdU
Merging threshold for u-side trackCandMerger.
svdHitMap uClusters
Clusters.
int m_clusterCount
Number of clusters in current event.
houghMap vHough
v-side HoughMap
virtual void initialize() override
Initialize the module and check module parameters.
Abstract base class for different kinds of events.
void saveHitsToRecoTrack(std::vector< unsigned int > &idList, TVector3 momentum)
Save Hits to RecoTrack.
int m_nAngleSectorsV
Using independent sectors: Number of horizontal sectors for v-side (default: 256)
bool m_useTrackMerger
Use TrackMerger to merge found tracks (candidates) to avoid / reduce fakes.
TVector2 m_clusterInitialPosition
Initial position of cluster in HS sector coordinates.
virtual void event() override
Run tracking.
void trackCandMerger()
Track merger to merge DATCONTrackCand with similar properties and to avoid / reduce number of fakes.
bool m_useHoughSpaceClustering
Use FindHoughSpaceCluster algorithm to extract track information from the Hough Spaces?
std::vector< DATCONTrack > DATCONTracks
DATCON Track.
std::string m_storeDATCONSVDSpacePointsName
Name of the DATCONSVDSpacePoints array.
bool m_usePhase2Simulation
Use the simulation for phase 2 geometry and FPGA setup?
std::vector< bool > activeSectorVectorPhi
Vector of bools containing information about the active sectors of the Phi Hough Space in a 1-D repre...
bool m_usePurifier
Use purifying algortihm at all.
std::string m_storeDATCONSVDClusterName
Name of the DATCONSVDSpacePoints array.
std::pair< VxdID, TVector3 > svdHitPair
The DATCON Tracking Module performs track finding / pattern recognition based on SVD hit information.
double m_rectSizeV
For fastInterceptFinder2d: vertical size of HS for v-side (default: 0.1)
double m_trackCenterY
Center position in Y.
std::vector< DATCONTrackCand > vTrackCand
v-side
StoreArray< SpacePoint > storeSVDSpacePoints
SVDSpacePoints StoreArray.
int m_nAngleSectorsU
Using independent sectors: Number of horizontal sectors for u-side (default: 256)
double m_mergeThresholdPhi
Merging threshold for phi trackMerger.
std::vector< DATCONHoughSpaceClusterCand > vHoughSpaceClusterCand
v-side
void FindHoughSpaceCluster(bool u_side)
Cluster finding in the Hough Space using a "depth first search" algorithm.
std::string m_storeDATCONSVDDigitsName
Name of the DATCONSVDDigits array.
int m_MaximumThetaHSClusterSizeY
Maximum cluster size in vertical direction in the Theta HS.
StoreArray< DATCONSVDSpacePoint > storeDATCONSVDSpacePoints
DATCONSVDSpacePoint StoreArray.
void addParameter()
Add module parameter, put in separate function to have the Constructor clean and readable.
int m_nVertSectorsV
Using independent sectors: Number of vertical sectors for v-side (default: 256)
void purifyTrackCandsList()
Purify track candidates by checking list of strip_id (specific id calculated in this module)
int ** ArrayOfActiveSectorsPhiHS
"2D-Array" of the sectors of the Phi Hough Space containing information whether or not a sector is "a...
int ** ArrayOfActiveSectorsThetaHS
Analogue array for the Theta Hough Space.
std::vector< DATCONHoughCand > vHoughCand
v-side
bool m_useSVDSpacePoints
Use SVDSpacePoints.
std::map< int, svdHitPair > svdHitMap
Map containing integer ID and svdHitPair.
int fastInterceptFinder2d(houghMap &hits, bool u_side, TVector2 v1_s, TVector2 v2_s, TVector2 v4_s, unsigned int iterations, unsigned int maxIterations)
Intercept Finder functions.
int m_MinimumThetaHSClusterSize
Minimum cluster size of the Theta HS.
TVector2 m_clusterCenterOfGravity
Center of Gravity of current cluster.
int m_MaximumPhiHSClusterSizeY
Maximum cluster size in vertical direction in the Phi HS.
void trackMerger()
Track merger to merge DATCONTrackCand with similar properties and to avoid / reduce number of fakes.
bool compareList(std::vector< unsigned int > &aList, std::vector< unsigned int > &bList)
Compare strip_id lists / lists of counter variable.
int m_MaximumPhiHSClusterSizeX
Maximum cluster size in horizontal direction in the Phi HS.
StoreArray< MCParticle > storeMCParticles
MCParticles StoreArray.
houghMap uHough
Hough Map.
bool m_useDATCONSVDSpacePoints
Use DATCONSVDSpacePoints.
std::string m_storeSVDSpacePointsName
Name of the SVDSpacePoints array.
int m_maxIterationsV
Maximum number of iterations allowed for v-side (obsolete?) (default: 12)
std::string m_storeDATCONRecoTracksName
Name of the RecoTrack array.
std::vector< DATCONHoughSpaceClusterCand > uHoughSpaceClusterCand
u-side
void mergeIdList(std::vector< unsigned int > &mergedList, std::vector< unsigned int > &mergeme)
Merge strip_id lists / lists of counter variables to combine large lists to smaller ones and thus pur...
std::pair< VxdID, TVector2 > houghPair
Hough Tuples.
double m_rectSizeU
For fastInterceptFinder2d: vertical size of HS for u-side (default: 0.1)