Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTrackFitterStraightTrack Class Reference

#include <DTrackFitterStraightTrack.h>

+ Inheritance diagram for DTrackFitterStraightTrack:

Classes

struct  cdc_update_t
 
struct  fdc_update_t
 
class  trajectory_t
 

Public Types

enum  state_vector { state_x, state_y, state_tx, state_ty }
 
enum  state_cartesian {
  state_Px, state_Py, state_Pz, state_X,
  state_Y, state_Z, state_T
}
 
enum  fit_type_t { kWireBased, kTimeBased }
 
enum  fit_status_t { kFitNotDone, kFitSuccess, kFitFailed, kFitNoImprovement }
 

Public Member Functions

 DTrackFitterStraightTrack (JEventLoop *loop)
 
 ~DTrackFitterStraightTrack ()
 
string Name (void) const
 
fit_status_t FitTrack (void)
 
double ChiSq (fit_type_t fit_type, DReferenceTrajectory *rt, double *chisq_ptr=NULL, int *dof_ptr=NULL, vector< pull_t > *pulls_ptr=NULL)
 
unsigned int Locate (const vector< double > &xx, double x) const
 
double CDCDriftVariance (double t) const
 
double CDCDriftDistance (double dphi, double delta, double t) const
 
jerror_t SetReferenceTrajectory (double t0, double z, DMatrix4x1 &S, const DCDCTrackHit *last_cdc, double &dzsign)
 
jerror_t KalmanFilter (DMatrix4x1 &S, DMatrix4x4 &C, vector< int > &used_hits, vector< cdc_update_t > &updates, double &chi2, int &ndof, unsigned int iter)
 
jerror_t Smooth (vector< cdc_update_t > &cdc_updates)
 
DTrackFitter::fit_status_t FitCentralTrack (double &z0, double t0, double dzsign, DMatrix4x1 &Sbest, DMatrix4x4 &Cbest, double &chi2_best, int &ndof_best)
 
double fdc_drift_distance (double time) const
 
double fdc_drift_variance (double t) const
 
DTrackFitter::fit_status_t FitForwardTrack (double t0, double &start_z, DMatrix4x1 &Sbest, DMatrix4x4 &Cbest, double &chi2_best, int &ndof_best)
 
jerror_t SetReferenceTrajectory (double t0, double z, DMatrix4x1 &S)
 
jerror_t KalmanFilter (DMatrix4x1 &S, DMatrix4x4 &C, vector< int > &used_fdc_hits, vector< int > &used_cdc_hits, vector< fdc_update_t > &updates, vector< cdc_update_t > &cdc_updates, double &chi2, int &ndof)
 
jerror_t Smooth (vector< fdc_update_t > &fdc_updates, vector< cdc_update_t > &cdc_updates)
 
shared_ptr< TMatrixFSym > Get7x7ErrorMatrix (TMatrixFSym C, DMatrix4x1 &S, double sign)
 
void GetExtrapolations (const DVector3 &pos0, const DVector3 &dir)
 
 JOBJECT_PUBLIC (DTrackFitter)
 
void Reset (void)
 
void AddHit (const DCDCTrackHit *cdchit)
 
void AddHit (const DFDCPseudo *fdchit)
 
void AddHits (vector< const DCDCTrackHit * > cdchits)
 
void AddHits (vector< const DFDCPseudo * > fdchits)
 
const vector< const
DCDCTrackHit * > & 
GetCDCInputHits (void) const
 
const vector< const DFDCPseudo * > & GetFDCInputHits (void) const
 
const vector< const
DCDCTrackHit * > & 
GetCDCFitHits (void) const
 
const vector< const DFDCPseudo * > & GetFDCFitHits (void) const
 
void ClearExtrapolations (void)
 
const DKinematicDataGetInputParameters (void) const
 
const DTrackingDataGetFitParameters (void) const
 
double GetChisq (void) const
 
int GetNdof (void) const
 
unsigned int GetNumPotentialFDCHits (void) const
 
unsigned int GetNumPotentialCDCHits (void) const
 
bool GetIsSmoothed (void) const
 
vector< pull_t > & GetPulls (void)
 
const map< DetectorSystem_t,
vector< Extrapolation_t > > & 
GetExtrapolations (void) const
 
fit_type_t GetFitType (void) const
 
const DMagneticFieldMapGetDMagneticFieldMap (void) const
 
void SetFitType (fit_type_t type)
 
void SetInputParameters (const DTrackingData &starting_params)
 
fit_status_t FitTrack (const DVector3 &pos, const DVector3 &mom, double q, double mass, double t0=QuietNaN, DetectorSystem_t t0_det=SYS_NULL)
 
fit_status_t FitTrack (const DTrackingData &starting_params)
 
fit_status_t FindHitsAndFitTrack (const DKinematicData &starting_params, const DReferenceTrajectory *rt, JEventLoop *loop, double mass=-1.0, int N=0, double t0=QuietNaN, DetectorSystem_t t0_det=SYS_NULL)
 mass<0 means get it from starting_params More...
 
fit_status_t FindHitsAndFitTrack (const DKinematicData &starting_params, const map< DetectorSystem_t, vector< DTrackFitter::Extrapolation_t > > &extrapolations, JEventLoop *loop, double mass, int N, double t0, DetectorSystem_t t0_det)
 
jerror_t CorrectForELoss (const DKinematicData &starting_params, DReferenceTrajectory *rt, DVector3 &pos, DVector3 &mom, double mass)
 
double CalcDensityEffect (double p, double mass, double density, double Z_over_A, double I)
 
double CalcDensityEffect (double p, double mass, double rho_Z_over_A, double LnI)
 
double CalcDensityEffect (double betagamma, double rho_Z_over_A, double LnI)
 
bool ExtrapolateToRadius (double R, const vector< Extrapolation_t > &extraps, DVector3 &pos, DVector3 &mom, double &t, double &s) const
 
bool ExtrapolateToRadius (double R, const vector< Extrapolation_t > &extraps, DVector3 &pos) const
 
double DistToWire (const DCoordinateSystem *wire, const vector< Extrapolation_t > &extrapolations, DVector3 *pos=NULL, DVector3 *mom=NULL, DVector3 *position_along_wire=NULL) const
 

Protected Attributes

vector< const DCDCTrackHit * > cdchits
 
vector< const DFDCPseudo * > fdchits
 
DTrackingData input_params
 
fit_type_t fit_type
 
const DMagneticFieldMapbfield
 
const DGeometrygeom
 
const DRootGeomRootGeom
 
JEventLoop * loop
 
DTrackingData fit_params
 
double chisq
 
int Ndof
 
vector< pull_tpulls
 
map< DetectorSystem_t, vector
< Extrapolation_t > > 
extrapolations
 
fit_status_t fit_status
 
vector< const DCDCTrackHit * > cdchits_used_in_fit
 
vector< const DFDCPseudo * > fdchits_used_in_fit
 
bool IsSmoothed
 
unsigned int potential_fdc_hits_on_track
 
unsigned int potential_cdc_hits_on_track
 
bool CORRECT_FOR_ELOSS
 

Private Attributes

deque< trajectory_ttrajectory
 
deque< trajectory_tbest_trajectory
 
bool COSMICS
 
bool DO_PRUNING
 
int VERBOSE
 
double CHI2CUT
 
int PLANE_TO_SKIP
 
int RING_TO_SKIP
 
double dTOFz
 
double dFCALz
 
double dDIRCz
 
vector< vector< DVector3 > > sc_dir
 
vector< vector< DVector3 > > sc_pos
 
vector< vector< DVector3 > > sc_norm
 
double SC_BARREL_R
 
double SC_END_NOSE_Z
 
double SC_PHI_SECTOR1
 
vector< double > cdc_drift_table
 
vector< double > fdc_drift_table
 
double CDC_RES_PAR1
 
double CDC_RES_PAR2
 
double CDC_RES_PAR3
 
double DRIFT_RES_PARMS [3]
 
double DRIFT_FUNC_PARMS [6]
 
vector< vector< double > > max_sag
 
vector< vector< double > > sag_phi_offset
 
double long_drift_func [3][3]
 
double short_drift_func [3][3]
 
double downstreamEndplate
 
double upstreamEndplate
 
double cdc_endplate_rmin
 
double cdc_endplate_rmax
 
DTrackFinderfinder
 
shared_ptr< DResourcePool
< TMatrixFSym > > 
dResourcePool_TMatrixFSym
 

Detailed Description

Definition at line 23 of file DTrackFitterStraightTrack.h.

Member Enumeration Documentation

Enumerator
kFitNotDone 
kFitSuccess 
kFitFailed 
kFitNoImprovement 

Definition at line 70 of file DTrackFitter.h.

enum DTrackFitter::fit_type_t
inherited
Enumerator
kWireBased 
kTimeBased 

Definition at line 65 of file DTrackFitter.h.

Enumerator
state_Px 
state_Py 
state_Pz 
state_X 
state_Y 
state_Z 
state_T 

Definition at line 35 of file DTrackFitterStraightTrack.h.

Enumerator
state_x 
state_y 
state_tx 
state_ty 

Definition at line 28 of file DTrackFitterStraightTrack.h.

Constructor & Destructor Documentation

DTrackFitterStraightTrack::~DTrackFitterStraightTrack ( )

Definition at line 200 of file DTrackFitterStraightTrack.cc.

Member Function Documentation

void DTrackFitter::AddHit ( const DFDCPseudo fdchit)
inherited

Definition at line 138 of file DTrackFitter.cc.

void DTrackFitter::AddHits ( vector< const DFDCPseudo * >  fdchits)
inherited

Definition at line 147 of file DTrackFitter.cc.

double DTrackFitter::CalcDensityEffect ( double  p,
double  mass,
double  density,
double  Z_over_A,
double  I 
)
inherited

Definition at line 412 of file DTrackFitter.cc.

Referenced by DTrackFitterKalmanSIMD::GetdEdx().

double DTrackFitter::CalcDensityEffect ( double  p,
double  mass,
double  rho_Z_over_A,
double  LnI 
)
inherited

Definition at line 422 of file DTrackFitter.cc.

double DTrackFitter::CalcDensityEffect ( double  betagamma,
double  rho_Z_over_A,
double  LnI 
)
inherited

Definition at line 430 of file DTrackFitter.cc.

References e, sqrt(), X, and X0.

double DTrackFitterStraightTrack::CDCDriftDistance ( double  dphi,
double  delta,
double  t 
) const
double DTrackFitterStraightTrack::CDCDriftVariance ( double  t) const
inline

Definition at line 246 of file DTrackFitterStraightTrack.cc.

References CDC_RES_PAR1, CDC_RES_PAR2, CDC_RES_PAR3, and sigma.

Referenced by KalmanFilter().

double DTrackFitterStraightTrack::ChiSq ( fit_type_t  fit_type,
DReferenceTrajectory rt,
double *  chisq_ptr = NULL,
int *  dof_ptr = NULL,
vector< pull_t > *  pulls_ptr = NULL 
)
inlinevirtual

Implements DTrackFitter.

Definition at line 74 of file DTrackFitterStraightTrack.h.

double DTrackFitter::DistToWire ( const DCoordinateSystem wire,
const vector< Extrapolation_t > &  extrapolations,
DVector3 pos = NULL,
DVector3 mom = NULL,
DVector3 position_along_wire = NULL 
) const
inherited
bool DTrackFitter::ExtrapolateToRadius ( double  R,
const vector< Extrapolation_t > &  extraps,
DVector3 pos 
) const
inherited

Definition at line 527 of file DTrackFitter.cc.

double DTrackFitterStraightTrack::fdc_drift_distance ( double  time) const

Definition at line 1059 of file DTrackFitterStraightTrack.cc.

References DRIFT_FUNC_PARMS, and sqrt().

Referenced by KalmanFilter(), and Smooth().

double DTrackFitterStraightTrack::fdc_drift_variance ( double  t) const

Definition at line 1081 of file DTrackFitterStraightTrack.cc.

References DRIFT_RES_PARMS, and sigma.

Referenced by KalmanFilter().

DTrackFitter::fit_status_t DTrackFitter::FindHitsAndFitTrack ( const DKinematicData starting_params,
const DReferenceTrajectory rt,
JEventLoop *  loop,
double  mass = -1.0,
int  N = 0,
double  t0 = QuietNaN,
DetectorSystem_t  t0_det = SYS_NULL 
)
inherited

mass<0 means get it from starting_params

Fit a DTrackCandidate using a given mass hypothesis.

This will perform a full wire-based and time-based fit using the given mass and starting from the given candidate. The given DReferenceTrajectory is used to swim the track numerous times during the various stages but will be left with the final time-based fit result. The JEventLoop given will be used to get the hits (CDC and FDC) and default DTrackHitSelector to use for the fit.

Definition at line 271 of file DTrackFitter.cc.

References _DBG_, DKinematicData::charge(), DTrackHitSelector::GetAllHits(), IDTrack(), DTrackHitSelector::kHelical, DTrackHitSelector::kWireBased, DKinematicData::mass(), DKinematicData::momentum(), DKinematicData::position(), start_time, and prof_time::TimeDiffNow().

Referenced by DTrackTimeBased_factory::AddMissingTrackHypothesis(), DTrackWireBased_factory::DoFit(), and DTrackTimeBased_factory::DoFit().

DTrackFitter::fit_status_t DTrackFitter::FindHitsAndFitTrack ( const DKinematicData starting_params,
const map< DetectorSystem_t, vector< DTrackFitter::Extrapolation_t > > &  extrapolations,
JEventLoop *  loop,
double  mass,
int  N,
double  t0,
DetectorSystem_t  t0_det 
)
inherited
DTrackFitter::fit_status_t DTrackFitterStraightTrack::FitCentralTrack ( double &  z0,
double  t0,
double  dzsign,
DMatrix4x1 Sbest,
DMatrix4x4 Cbest,
double &  chi2_best,
int &  ndof_best 
)
DTrackFitter::fit_status_t DTrackFitterStraightTrack::FitForwardTrack ( double  t0,
double &  start_z,
DMatrix4x1 Sbest,
DMatrix4x4 Cbest,
double &  chi2_best,
int &  ndof_best 
)
DTrackFitter::fit_status_t DTrackFitter::FitTrack ( const DVector3 pos,
const DVector3 mom,
double  q,
double  mass,
double  t0 = QuietNaN,
DetectorSystem_t  t0_det = SYS_NULL 
)
inherited
DTrackFitter::fit_status_t DTrackFitter::FitTrack ( const DTrackingData starting_params)
inherited

Definition at line 179 of file DTrackFitter.cc.

References start_time, and prof_time::TimeDiffNow().

shared_ptr< TMatrixFSym > DTrackFitterStraightTrack::Get7x7ErrorMatrix ( TMatrixFSym  C,
DMatrix4x1 S,
double  sign 
)
const vector<const DCDCTrackHit*>& DTrackFitter::GetCDCInputHits ( void  ) const
inlineinherited

Definition at line 137 of file DTrackFitter.h.

const DMagneticFieldMap* DTrackFitter::GetDMagneticFieldMap ( void  ) const
inlineinherited
void DTrackFitterStraightTrack::GetExtrapolations ( const DVector3 pos0,
const DVector3 dir 
)
const vector<const DFDCPseudo*>& DTrackFitter::GetFDCInputHits ( void  ) const
inlineinherited

Definition at line 138 of file DTrackFitter.h.

fit_type_t DTrackFitter::GetFitType ( void  ) const
inlineinherited

Definition at line 167 of file DTrackFitter.h.

const DKinematicData& DTrackFitter::GetInputParameters ( void  ) const
inlineinherited

Definition at line 152 of file DTrackFitter.h.

unsigned int DTrackFitter::GetNumPotentialCDCHits ( void  ) const
inlineinherited
unsigned int DTrackFitter::GetNumPotentialFDCHits ( void  ) const
inlineinherited
DTrackFitter::JOBJECT_PUBLIC ( DTrackFitter  )
inherited
jerror_t DTrackFitterStraightTrack::KalmanFilter ( DMatrix4x1 S,
DMatrix4x4 C,
vector< int > &  used_hits,
vector< cdc_update_t > &  updates,
double &  chi2,
int &  ndof,
unsigned int  iter 
)
jerror_t DTrackFitterStraightTrack::KalmanFilter ( DMatrix4x1 S,
DMatrix4x4 C,
vector< int > &  used_fdc_hits,
vector< int > &  used_cdc_hits,
vector< fdc_update_t > &  updates,
vector< cdc_update_t > &  cdc_updates,
double &  chi2,
int &  ndof 
)
unsigned int DTrackFitterStraightTrack::Locate ( const vector< double > &  xx,
double  x 
) const

Definition at line 961 of file DTrackFitterStraightTrack.cc.

Referenced by CDCDriftDistance().

string DTrackFitterStraightTrack::Name ( void  ) const
inlinevirtual

Implements DTrackFitter.

Definition at line 72 of file DTrackFitterStraightTrack.h.

References string.

void DTrackFitter::SetInputParameters ( const DTrackingData starting_params)
inlineinherited

Definition at line 171 of file DTrackFitter.h.

jerror_t DTrackFitterStraightTrack::SetReferenceTrajectory ( double  t0,
double  z,
DMatrix4x1 S,
const DCDCTrackHit last_cdc,
double &  dzsign 
)
jerror_t DTrackFitterStraightTrack::SetReferenceTrajectory ( double  t0,
double  z,
DMatrix4x1 S 
)

Member Data Documentation

deque<trajectory_t> DTrackFitterStraightTrack::best_trajectory
private

Definition at line 109 of file DTrackFitterStraightTrack.h.

Referenced by FitCentralTrack(), FitForwardTrack(), and Smooth().

vector<double> DTrackFitterStraightTrack::cdc_drift_table
private

Definition at line 126 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftDistance(), and DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::cdc_endplate_rmax
private

Definition at line 141 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::cdc_endplate_rmin
private

Definition at line 141 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::CDC_RES_PAR1
private

Definition at line 130 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftVariance(), and DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::CDC_RES_PAR2
private

Definition at line 130 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftVariance(), and DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::CDC_RES_PAR3
private

Definition at line 130 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftVariance(), and DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::CHI2CUT
private

Definition at line 113 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and KalmanFilter().

bool DTrackFitterStraightTrack::COSMICS
private
double DTrackFitterStraightTrack::dDIRCz
private

Definition at line 117 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

double DTrackFitterStraightTrack::dFCALz
private

Definition at line 117 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

bool DTrackFitterStraightTrack::DO_PRUNING
private

Definition at line 111 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and KalmanFilter().

double DTrackFitterStraightTrack::downstreamEndplate
private
shared_ptr<DResourcePool<TMatrixFSym> > DTrackFitterStraightTrack::dResourcePool_TMatrixFSym
private
double DTrackFitterStraightTrack::DRIFT_FUNC_PARMS[6]
private

Definition at line 133 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and fdc_drift_distance().

double DTrackFitterStraightTrack::DRIFT_RES_PARMS[3]
private

Definition at line 132 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and fdc_drift_variance().

double DTrackFitterStraightTrack::dTOFz
private

Definition at line 117 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

vector<double> DTrackFitterStraightTrack::fdc_drift_table
private

Definition at line 127 of file DTrackFitterStraightTrack.h.

vector<const DFDCPseudo*> DTrackFitter::fdchits_used_in_fit
protectedinherited
DTrackFinder* DTrackFitterStraightTrack::finder
private

Definition at line 142 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and FitTrack().

fit_status_t DTrackFitter::fit_status
protectedinherited
double DTrackFitterStraightTrack::long_drift_func[3][3]
private

Definition at line 138 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftDistance(), and DTrackFitterStraightTrack().

JEventLoop* DTrackFitter::loop
protectedinherited
vector<vector<double> > DTrackFitterStraightTrack::max_sag
private

Definition at line 136 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and KalmanFilter().

int DTrackFitterStraightTrack::PLANE_TO_SKIP
private

Definition at line 114 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), KalmanFilter(), and Smooth().

unsigned int DTrackFitter::potential_cdc_hits_on_track
protectedinherited

Definition at line 247 of file DTrackFitter.h.

Referenced by DTrackFitterKalmanSIMD::FitTrack().

unsigned int DTrackFitter::potential_fdc_hits_on_track
protectedinherited

Definition at line 246 of file DTrackFitter.h.

Referenced by DTrackFitterKalmanSIMD::FitTrack().

int DTrackFitterStraightTrack::RING_TO_SKIP
private

Definition at line 114 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), KalmanFilter(), and Smooth().

const DRootGeom* DTrackFitter::RootGeom
protectedinherited

Definition at line 230 of file DTrackFitter.h.

Referenced by DTrackFitterALT1::DTrackFitterALT1().

vector<vector<double> > DTrackFitterStraightTrack::sag_phi_offset
private

Definition at line 137 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and KalmanFilter().

double DTrackFitterStraightTrack::SC_BARREL_R
private

Definition at line 123 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

vector<vector<DVector3> > DTrackFitterStraightTrack::sc_dir
private

Definition at line 120 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack().

double DTrackFitterStraightTrack::SC_END_NOSE_Z
private

Definition at line 123 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

vector<vector<DVector3> > DTrackFitterStraightTrack::sc_norm
private

Definition at line 122 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

double DTrackFitterStraightTrack::SC_PHI_SECTOR1
private

Definition at line 123 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

vector<vector<DVector3> > DTrackFitterStraightTrack::sc_pos
private

Definition at line 121 of file DTrackFitterStraightTrack.h.

Referenced by DTrackFitterStraightTrack(), and GetExtrapolations().

double DTrackFitterStraightTrack::short_drift_func[3][3]
private

Definition at line 139 of file DTrackFitterStraightTrack.h.

Referenced by CDCDriftDistance(), and DTrackFitterStraightTrack().

deque<trajectory_t> DTrackFitterStraightTrack::trajectory
private
double DTrackFitterStraightTrack::upstreamEndplate
private
int DTrackFitterStraightTrack::VERBOSE
private

The documentation for this class was generated from the following files: