13#ifndef TRGCDCHoughFinder_FLAG_
14#define TRGCDCHoughFinder_FLAG_
17#include "trg/cdc/HoughPlaneMulti2.h"
18#include "trg/cdc/HoughTransformationCircle.h"
19#include "trg/cdc/PeakFinder.h"
23#ifdef TRGCDC_SHORT_NAMES
24#define TCHFinder TRGCDCHoughFinder
34 class TRGCDCPeakFinder;
39 class TRGCDCJSignalData;
50 const std::string& mappingFilePlus,
51 const std::string& mappingFileMinus,
60 std::string
name(
void)
const;
63 std::string
version(
void)
const;
69 int FindAndFit(std::vector<TRGCDCTrack*>& trackList2D,
70 std::vector<TRGCDCTrack*>& trackList2DFitted);
81 std::vector<TRGCDCTrack*>& trackList2DFitted);
85 std::vector<TRGCDCTrack*>& trackList2DFitted);
89 const std::vector<TRGCDCLink*>& links)
const;
93 const std::string& mappingFileMinus);
97 std::vector<TRGCDCTrack*>& trackList2D)
const;
100 int doFinding(std::vector<std::vector<unsigned>> peaks[],
101 std::vector<TRGCDCTrack*>& trackList2D);
105 std::vector<TRGCDCTrack*>& trackList2DFitted)
const;
108 int doFitting(std::vector<TRGCDCTrack*>& trackList2D,
109 std::vector<TRGCDCTrack*>& trackList2DFitted);
120 static void calCosPhi(std::map<std::string, Belle2::TRGCDCJSignal>
122 std::map<std::string, Belle2::TRGCDCJLUT* >
126 static void calSinPhi(std::map<std::string, Belle2::TRGCDCJSignal>
128 std::map<std::string, Belle2::TRGCDCJLUT* >
132 static void rPhi(std::map<std::string, Belle2::TRGCDCJSignal>
134 std::map<std::string, Belle2::TRGCDCJLUT* >
A class to find tracks using Hough algorithm.
bool perfect(bool)
sets and returns switch to do perfect finding.
std::map< std::string, double > m_mConstants
Map to hold const values for Fitter2D.
TRGCDCJSignalData * _commonData
For VHDL code.
std::map< std::string, std::vector< double > > m_mVector
Map to hold vector values for Fitter2D.
const std::string _name
Name.
TRGCDCHoughPlaneMulti2 * _plane[2]
Hough planes, for + and - charges.
std::map< std::string, bool > m_mBool
Map to hold input options.
std::map< std::string, double > m_mConstD
Map to ?
const TRGCDC & _cdc
CDCTRG.
TRGCDCHoughTransformationCircle _circleH
Circle Hough transformtion.
std::map< std::string, TRGCDCJLUT * > m_mLutStorage
Map to hold JLuts.
std::map< std::string, std::vector< double > > m_mConstV
Map to ?
std::map< std::string, double > m_mDouble
Map to hold double values for Fitter2D.
const unsigned _doit
Doit version.
std::map< std::string, TRGCDCJSignal > m_mSignalStorage
Map to hold JSignals.
TRGCDCPeakFinder _peakFinder
Peak finder.
const unsigned _peakMin
Min. peak height for the peak finder.
A class to represent a Hough parameter plane.
A class to hold common data for JSignals.
A class to find peaks in Hough Plane.
A class to represent a track segment hit in CDC.
A class to represent a reconstructed charged track in TRGCDC.
The instance of TRGCDC is a singleton.
int doFindingTrasan(std::vector< unsigned > peaks[], std::vector< TRGCDCTrack * > &trackList2D) const
do track finding. (trasan version)
static void calCosPhi(std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
Calculate Cos Sin ?
static void calSinPhi(std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
Calculate Cos Sin ?
static double calPhi(TRGCDCSegmentHit const *segmentHit, double eventTime)
Utility functions.
TRGCDCTrack * makeTrack(const unsigned serialID, const unsigned pm) const
Make a track from serial ID in Hough plane.
int FindAndFit(std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
do track finding and fitting (wrapper that can choose between different versions).
void mappingByFile(const std::string &mappingFilePlus, const std::string &mappingFileMinus)
creates mappings by a file.
std::vector< TRGCDCLink * > selectBestHits(const std::vector< TRGCDCLink * > &links) const
selects the best(fastest) hits in each super layer.
virtual ~TRGCDCHoughFinder()
Destructor.
void terminate()
termination.
int doFindingAndFitting(std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
do track finding and fitting (Kaiyu version).
int doFindingAndFittingTrasan(std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
do track finding and fitting (Trasan version).
int doFittingTrasan(std::vector< unsigned > peaks[], std::vector< TRGCDCTrack * > &trackList2DFitted) const
do track fitting. (old trasan version)
int doFitting(std::vector< TRGCDCTrack * > &trackList2D, std::vector< TRGCDCTrack * > &trackList2DFitted)
do track fitting. (kaiyu original)
std::string name(void) const
returns name.
static void rPhi(std::map< std::string, Belle2::TRGCDCJSignal > &mSignalStorage, std::map< std::string, Belle2::TRGCDCJLUT * > &mLutStorage)
Calculate r * phi ?
int doFinding(std::vector< std::vector< unsigned > > peaks[], std::vector< TRGCDCTrack * > &trackList2D)
do track finding. (kaiyu version)
std::string version(void) const
returns version.
Abstract base class for different kinds of events.