13#ifndef TRGCDCFitter3D_FLAG_
14#define TRGCDCFitter3D_FLAG_
22#ifdef TRGCDC_SHORT_NAMES
23#define TCFitter3D TRGCDCFitter3D
34 class TRGCDCSegmentHit;
37 class TRGCDCJSignalData;
46 const std::string& rootFitter3DFile,
48 const std::map<std::string, bool>& flags);
60 int doit(std::vector<TRGCDCTrack*>& trackList);
63 int doitComplex(std::vector<TRGCDCTrack*>& trackList);
69 std::map<std::string, double>& m_mDouble_in, std::map<std::string, std::vector<double> >& m_mVector_in);
91 const std::map<std::string, double>& m_mConstD_in,
92 std::map<std::string, std::vector<double> >& m_mConstV_in, std::map<std::string, double>& m_mDouble_in,
93 std::map<std::string, std::vector<double> >& m_mVector_in);
107 std::string
name(
void)
const;
109 std::string
version(
void)
const;
112 static void getStereoGeometry(std::map<std::string, std::vector<double> >& stGeometry);
115 static void getStereoXt(std::vector<double>
const& stPriorityLayer, std::vector<std::vector<double> >& stXts,
bool isSimple = 0);
118 static void getConstants(std::map<std::string, double>& mConstD, std::map<std::string, std::vector<double> >& mConstV,
119 bool isXtSimple = 0);
A class to fit tracks in 3D.
std::map< std::string, TVectorD * > m_mTVectorD
TVectorD map for saving values to root file.
std::map< std::string, std::vector< double > > m_mVector
Map to hold vector values for Fitter3D.
std::map< std::string, bool > m_mBool
Map to hold input options.
std::map< std::string, double > m_mConstD
Map to hold constant values for Fitter3D.
std::map< std::string, std::vector< signed long long > > m_mSavedSignals
Array of saved signals.
std::map< std::string, TRGCDCJLUT * > m_mLutStorage
Map to hold JLuts.
std::map< std::string, std::vector< double > > m_mConstV
Map to hold constant vectcors for Fitter3D.
std::map< std::string, double > m_mDouble
Map to hold double values for Fitter3D.
const std::string m_name
Name.
std::map< std::string, TRGCDCJSignal > m_mSignalStorage
Map to hold JSignals.
std::map< std::string, TClonesArray * > m_mTClonesArray
TClonesArray map for saving values to root file.
TFile * m_fileFitter3D
Tfile for Fitter3D root file.
TRGCDCJSignalData * m_commonData
For VHDL code.
TTree * m_treeTrackFitter3D
TTree for tracks of fitter3D.
std::map< std::string, std::vector< signed long long > > m_mSavedIoSignals
Array of I/O signals.
TTree * m_treeConstantsFitter3D
TTree for constants of fitter3D.
std::string m_rootFitter3DFileName
Members for saving.
const TRGCDC & m_cdc
CDCTRG.
A class to hold common data for JSignals.
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.
static void findHitAxialSuperlayers(const TRGCDCTrack &aTrack, std::vector< double > &useAxSL, bool printError)
Finds which axial superlayers has TSs. useAxSL array indicating hit superlayers.
static void getStereoGeometry(std::map< std::string, std::vector< double > > &stGeometry)
Get stereo geometry.
void initialize()
Initialization.
static double calPhi(TRGCDCSegmentHit const *segmentHit, double eventTime)
Utility functions.
bool isStereoTrackFull(const TRGCDCTrack &aTrack)
Checks if stereo track has 4 TSs. One per each superlayer.
void saveVhdlAndCoe()
Functions for saving.
int doit(std::vector< TRGCDCTrack * > &trackList)
Does track fitting.
static void getStereoXt(std::vector< double > const &stPriorityLayer, std::vector< std::vector< double > > &stXts, bool isSimple=0)
Get stereo Xt.
void removeImpossibleStereoSuperlayers(std::vector< double > &useStSL)
Removes TSs that are not possible with track Pt.
static void selectAxialTSs(const TRGCDCTrack &aTrack, std::vector< int > &bestTSIndex)
Selects priority TSs when there are multiple candidate TSs for a superlayer.
void terminate()
Termination.
void saveIoSignals()
Saves all I/O signals for debugging.
void print3DInformation(int iTrack)
Print's information for debugging 3D.
virtual ~TRGCDCFitter3D()
Destructor.
static void findHitStereoSuperlayers(const TRGCDCTrack &aTrack, std::vector< double > &useStSL, bool printError)
Finds which stereo superlayers has TSs. useStSL array indicating hit superlayers.
static int do2DFit(TRGCDCTrack &aTrack, const std::map< std::string, bool > &m_mBool_in, const std::map< std::string, double > &m_mConstD_in, std::map< std::string, std::vector< double > > &m_mConstV_in, std::map< std::string, double > &m_mDouble_in, std::map< std::string, std::vector< double > > &m_mVector_in)
Does 2D fit. Returns 0 if fit is done successfully. m_mBool should have fIsPrintError,...
std::string name(void) const
Gets name of class.
static void getConstants(std::map< std::string, double > &mConstD, std::map< std::string, std::vector< double > > &mConstV, bool isXtSimple=0)
Get constants for firmwareFit.
std::string version(void) const
Gets version of class.
static void getMCValues(const TRGCDC &m_cdc_in, TRGCDCTrack *aTrack, const std::map< std::string, double > &m_mConstD_in, std::map< std::string, double > &m_mDouble_in, std::map< std::string, std::vector< double > > &m_mVector_in)
Function for mc debugging.
void saveAllSignals()
Saves all signals for debugging.
int doitComplex(std::vector< TRGCDCTrack * > &trackList)
Does track fitting using JSignals.
bool isAxialTrackFull(const TRGCDCTrack &aTrack)
Checks if axial track has 5 TSs. One per each superlayer.
Abstract base class for different kinds of events.