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

#include <DReferenceTrajectory.h>

Classes

class  swim_step_t
 

Public Types

enum  direction_t { kForward, kBackward }
 This class is a utility class used by the TRACKING package. It is used to swim a particle through the (inhomogeneous) magnetic field, accounting for energy loss in the geometry, and recording each step so that derivatives and distances can be calculated. Because this uses the coordinates defined in the reference trajectory method (B. Mecking Nucl. Instr. and Methods. 203 (1982) 299-305), the angles needed to rotate into the lab frame are saved as well. This used the DMagneticFieldStepper class for swimming through the field. More...
 
enum  state_t {
  kPx, kPy, kPz, kX,
  kY, kZ, kT
}
 

Public Member Functions

 DReferenceTrajectory (const DMagneticFieldMap *, double q=1.0, swim_step_t *swim_steps=NULL, int max_swim_steps=0, double step_size=-1.0)
 
 DReferenceTrajectory (const DReferenceTrajectory &rt)
 
DReferenceTrajectoryoperator= (const DReferenceTrajectory &rt)
 
virtual ~DReferenceTrajectory ()
 
virtual const char * className (void)
 
void CopyWithShift (const DReferenceTrajectory *rt, DVector3 shift)
 
void Reset (void)
 
double DistToRT (double x, double y, double z) const
 
double DistToRT (DVector3 hit, double *s=NULL, DetectorSystem_t detector=SYS_NULL) const
 
double DistToRTwithTime (DVector3 hit, double *s=NULL, double *t=NULL, double *var_t=NULL, DetectorSystem_t detector=SYS_NULL) const
 
double DistToRT (const DCoordinateSystem *wire, double *s=NULL) const
 
double DistToRTBruteForce (const DCoordinateSystem *wire, double *s=NULL) const
 
double DistToRT (const DCoordinateSystem *wire, const swim_step_t *step, double *s=NULL) const
 
double DistToRTBruteForce (const DCoordinateSystem *wire, const swim_step_t *step, double *s=NULL) const
 
double Straw_dx (const DCoordinateSystem *wire, double radius) const
 
swim_step_tFindClosestSwimStep (const DCoordinateSystem *wire, int *istep_ptr=NULL) const
 
swim_step_tFindClosestSwimStep (const DVector3 &origin, DVector3 norm, int *istep_ptr=NULL) const
 
swim_step_tFindPlaneCrossing (const DVector3 &origin, DVector3 norm, int first_i=0, DetectorSystem_t detector=SYS_NULL) const
 
void Swim (const DVector3 &pos, const DVector3 &mom, double q=-1000.0, const TMatrixFSym *cov=NULL, double smax=2000.0, const DCoordinateSystem *wire=NULL)
 
void FastSwim (const DVector3 &pos, const DVector3 &mom, double q, double smax=2000.0, double zmin=-100., double zmax=1000.0)
 
void FastSwimForHitSelection (const DVector3 &pos, const DVector3 &mom, double q)
 
void FastSwim (const DVector3 &pos, const DVector3 &mom, DVector3 &last_pos, DVector3 &last_mom, double q, double smax=2000.0, const DCoordinateSystem *wire=NULL)
 
void FastSwim (const DVector3 &pos, const DVector3 &mom, DVector3 &last_pos, DVector3 &last_mom, double q, const DVector3 &origin, const DVector3 &dir, double smax=2000.0)
 
int InsertSteps (const swim_step_t *start_step, double delta_s, double step_size=0.02)
 
jerror_t GetIntersectionWithPlane (const DVector3 &origin, const DVector3 &norm, DVector3 &pos, double *s=NULL, double *t=NULL, double *var_t=NULL, DetectorSystem_t detector=SYS_NULL) const
 
jerror_t GetIntersectionWithPlane (const DVector3 &origin, const DVector3 &norm, DVector3 &pos, DVector3 &p_at_intersection, double *s=NULL, double *t=NULL, double *var_t=NULL, DetectorSystem_t detector=SYS_NULL) const
 
jerror_t GetIntersectionWithRadius (double R, DVector3 &mypos, double *s=NULL, double *t=NULL, DVector3 *dir=NULL) const
 
DVector3 GetLastDOCAPoint (void) const
 
void GetLastDOCAPoint (DVector3 &pos, DVector3 &mom) const
 
jerror_t FindPOCAtoPoint (const DVector3 &point, const DMatrixDSym *covpoint, DKinematicData *track_kd, double &doca, double &var_doca) const
 
jerror_t FindPOCAtoLine (const DVector3 &origin, const DVector3 &dir, const DMatrixDSym *covpoint, DKinematicData *track_kd, DVector3 &commonpos, double &doca, double &var_doca) const
 
double GetLastDistAlongWire (void) const
 
void SetStepSize (double step_size)
 
void SetDRootGeom (const DRootGeom *RootGeom)
 
void SetDGeometry (const DGeometry *geom)
 
const DRootGeomGetDRootGeom (void) const
 
const DGeometryGetDGeometry (void) const
 
const DMagneticFieldMapGetBfield (void) const
 
double GetMass (void) const
 
double GetStepSize (void) const
 
void SetMass (double mass)
 
void SetPLossDirection (direction_t direction)
 
void SetCheckMaterialBoundaries (bool check_material_boundaries)
 
bool GetCheckMaterialBoundaries (void) const
 
direction_t GetPLossDirection (void) const
 
double GetBoundaryStepFraction (void) const
 
double GetMinStepSize (void) const
 
double GetMaxStepSize (void) const
 
double dPdx_from_A_Z_rho (double ptot, double A, double Z, double density) const
 
double dPdx (double ptot, double KrhoZ_overA, double rhoZ_overA, double LogI) const
 
bool GetHitCDCEndplate (void) const
 
void SetZmaxTrackingBoundary (double zmax)
 
void SetZminTrackingBoundary (double zmin)
 
double GetZmaxTrackingBoundary (void)
 
double GetZminTrackingBoundary (void)
 
int GetDebugLevel (void)
 
void SetDebugLevel (int new_level)
 
void Dump (double zmin=-1000.0, double zmax=1000.0)
 
const swim_step_tGetLastSwimStep (void) const
 
jerror_t IntersectTracks (const DReferenceTrajectory *rt2, DKinematicData *track1_kd, DKinematicData *track2_kd, DVector3 &pos, double &doca, double &var_doca, double &vertex_chi2, bool DoFitVertex=false) const
 
jerror_t PropagateCovariance (double ds, double q, double mass_sq, const DVector3 &mom, const DVector3 &pos, const DVector3 &B, TMatrixFSym &C) const
 
jerror_t BrentsAlgorithm (DVector3 &pos1, DVector3 &mom1, DVector3 &pos2, DVector3 &mom2, double ds, double q2, double &doca) const
 
void FitVertex (const DVector3 &pos1, const DVector3 &mom1, const DVector3 &pos2, const DVector3 &mom2, const TMatrixFSym &cov1, const TMatrixFSym &cov2, DVector3 &pos, double &vertex_chi2, double q1=1., double q2=1.) const
 

Static Public Member Functions

static const char * static_className (void)
 

Public Attributes

swim_step_tswim_steps
 
int Nswim_steps
 
float q
 
int index_at_bcal
 
int index_at_tof
 
int index_at_fcal
 
double Rsqmax_interior
 
double Rsqmax_exterior
 

Protected Attributes

int debug_level
 
int max_swim_steps
 
bool own_swim_steps
 
int dist_to_rt_depth
 
double step_size
 
const DMagneticFieldMapbfield
 
const DRootGeomRootGeom
 
const DGeometrygeom
 
direction_t ploss_direction
 
bool check_material_boundaries
 
double zmin_track_boundary
 
double zmax_track_boundary
 
double last_phi
 last phi found in DistToRT More...
 
const swim_step_tlast_swim_step
 last swim step used in DistToRT More...
 
double last_dist_along_wire
 
double last_dz_dphi
 
double mass
 
double mass_sq
 
bool hit_cdc_endplate
 
double BOUNDARY_STEP_FRACTION
 
double MIN_STEP_SIZE
 
double MAX_STEP_SIZE
 

Static Protected Attributes

static thread_local shared_ptr
< DResourcePool< TMatrixFSym > > 
dResourcePool_TMatrixFSym = std::make_shared<DResourcePool<TMatrixFSym>>(10, 10, 50)
 

Private Member Functions

 DReferenceTrajectory ()
 

Detailed Description

Definition at line 32 of file DReferenceTrajectory.h.

Member Enumeration Documentation

This class is a utility class used by the TRACKING package. It is used to swim a particle through the (inhomogeneous) magnetic field, accounting for energy loss in the geometry, and recording each step so that derivatives and distances can be calculated. Because this uses the coordinates defined in the reference trajectory method (B. Mecking Nucl. Instr. and Methods. 203 (1982) 299-305), the angles needed to rotate into the lab frame are saved as well. This used the DMagneticFieldStepper class for swimming through the field.

Enumerator
kForward 
kBackward 

Definition at line 46 of file DReferenceTrajectory.h.

Enumerator
kPx 
kPy 
kPz 
kX 
kY 
kZ 
kT 

Definition at line 50 of file DReferenceTrajectory.h.

Constructor & Destructor Documentation

DReferenceTrajectory::DReferenceTrajectory ( const DMagneticFieldMap bfield,
double  q = 1.0,
swim_step_t swim_steps = NULL,
int  max_swim_steps = 0,
double  step_size = -1.0 
)

Definition at line 32 of file DReferenceTrajectory.cc.

References MIN_STEP_SIZE.

DReferenceTrajectory::DReferenceTrajectory ( const DReferenceTrajectory rt)

The copy constructor will always allocate its own memory for the swim steps and set its internal flag to indicate that is owns them regardless of the owner of the source trajectory's.

Definition at line 94 of file DReferenceTrajectory.cc.

References bfield, debug_level, geom, GetBoundaryStepFraction(), GetCheckMaterialBoundaries(), GetMass(), GetMaxStepSize(), GetMinStepSize(), last_dist_along_wire, last_dz_dphi, last_phi, last_swim_step, max_swim_steps, MIN_STEP_SIZE, Nswim_steps, ploss_direction, q, RootGeom, step_size, and swim_steps.

DReferenceTrajectory::~DReferenceTrajectory ( )
virtual

Definition at line 202 of file DReferenceTrajectory.cc.

DReferenceTrajectory::DReferenceTrajectory ( )
inlineprivate

Definition at line 232 of file DReferenceTrajectory.h.

Member Function Documentation

jerror_t DReferenceTrajectory::BrentsAlgorithm ( DVector3 pos1,
DVector3 mom1,
DVector3 pos2,
DVector3 mom2,
double  ds,
double  q2,
double &  doca 
) const
virtual const char* DReferenceTrajectory::className ( void  )
inlinevirtual

Definition at line 85 of file DReferenceTrajectory.h.

References static_className().

void DReferenceTrajectory::CopyWithShift ( const DReferenceTrajectory rt,
DVector3  shift 
)

Definition at line 212 of file DReferenceTrajectory.cc.

double DReferenceTrajectory::DistToRT ( const DCoordinateSystem wire,
double *  s = NULL 
) const

Find the closest distance to the given wire in cm. The value of "L" should be the active wire length (in cm). The coordinate system defined by "wire" should have its origin at the center of the wire with the wire running in the direction of udir.

Definition at line 1747 of file DReferenceTrajectory.cc.

References DReferenceTrajectory::swim_step_t::s.

double DReferenceTrajectory::DistToRT ( const DCoordinateSystem wire,
const swim_step_t step,
double *  s = NULL 
) const

Calculate the distance of the given wire(in the lab reference frame) to the Reference Trajectory which the given swim step belongs to. This uses the momentum directions and positions of the swim step to define a curve and calculate the distance of the hit from it. The swim step should be the closest one to the wire. IMPORTANT: This approximates the helix locally by a parabola. This means the swim step should be fairly close to the wire so that this approximation is valid. If the reference trajectory from which the swim step came is too sparse, the results will not be nearly as good.

Definition at line 1775 of file DReferenceTrajectory.cc.

References _DBG_, c, F, G, h, H, DCoordinateSystem::L, DReferenceTrajectory::swim_step_t::mom, ONE_THIRD, DCoordinateSystem::origin, DReferenceTrajectory::swim_step_t::Ro, DReferenceTrajectory::swim_step_t::s, S, DCoordinateSystem::sdir, sin(), sqrt(), DCoordinateSystem::tdir, temp, u, DCoordinateSystem::udir, x, and y.

double DReferenceTrajectory::DistToRTBruteForce ( const DCoordinateSystem wire,
double *  s = NULL 
) const

Find the closest distance to the given wire in cm. The value of "L" should be the active wire length (in cm). The coordinate system defined by "wire" should have its origin at the center of the wire with the wire running in the direction of udir.

Definition at line 1761 of file DReferenceTrajectory.cc.

double DReferenceTrajectory::DistToRTBruteForce ( const DCoordinateSystem wire,
const swim_step_t step,
double *  s = NULL 
) const

Calculate the distance of the given wire(in the lab reference frame) to the Reference Trajectory which the given swim step belongs to. This uses the momentum directions and positions of the swim step to define a curve and calculate the distance of the hit from it. The swim step should be the closest one to the wire. IMPORTANT: This calculates the distance using a "brute force" method of taking tiny swim steps to find the minimum distance. It is vey SLOW and you should be using DistToRT(...) instead. This is only here to provide an independent check of DistToRT(...).

Definition at line 2143 of file DReferenceTrajectory.cc.

References DReferenceTrajectory::swim_step_t::mom, DCoordinateSystem::origin, DReferenceTrajectory::swim_step_t::Ro, DReferenceTrajectory::swim_step_t::s, DCoordinateSystem::sdir, sin(), sqrt(), DCoordinateSystem::tdir, and DCoordinateSystem::udir.

double DReferenceTrajectory::DistToRTwithTime ( DVector3  hit,
double *  s = NULL,
double *  t = NULL,
double *  var_t = NULL,
DetectorSystem_t  detector = SYS_NULL 
) const

Definition at line 1262 of file DReferenceTrajectory.cc.

References SPEED_OF_LIGHT, and sqrt().

Referenced by DParticleID::Distance_ToTrack().

double DReferenceTrajectory::dPdx ( double  ptot,
double  KrhoZ_overA,
double  rhoZ_overA,
double  LogI 
) const
inline

Calculate the momentum loss per unit distance traversed of the material with the given A, Z, and density. Value returned is in GeV/c per cm This follows the July 2008 PDG section 27.2 ppg 268-270.

Definition at line 2361 of file DReferenceTrajectory.cc.

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

double DReferenceTrajectory::dPdx_from_A_Z_rho ( double  ptot,
double  A,
double  Z,
double  density 
) const
inline

Definition at line 2348 of file DReferenceTrajectory.cc.

References e, and I.

void DReferenceTrajectory::Dump ( double  zmin = -1000.0,
double  zmax = 1000.0 
)
void DReferenceTrajectory::FastSwim ( const DVector3 pos,
const DVector3 mom,
DVector3 last_pos,
DVector3 last_mom,
double  q,
double  smax = 2000.0,
const DCoordinateSystem wire = NULL 
)

Definition at line 245 of file DReferenceTrajectory.cc.

References DCoordinateSystem::origin, and DCoordinateSystem::udir.

void DReferenceTrajectory::FastSwim ( const DVector3 pos,
const DVector3 mom,
DVector3 last_pos,
DVector3 last_mom,
double  q,
const DVector3 origin,
const DVector3 dir,
double  smax = 2000.0 
)
DReferenceTrajectory::swim_step_t * DReferenceTrajectory::FindClosestSwimStep ( const DCoordinateSystem wire,
int *  istep_ptr = NULL 
) const

Find the closest swim step to the given wire. The value of "L" should be the active wire length. The coordinate system defined by "wire" should have its origin at the center of the wire with the wire running in the direction of udir.

Definition at line 1533 of file DReferenceTrajectory.cc.

References _DBG_, DCoordinateSystem::L, DCoordinateSystem::origin, u, and DCoordinateSystem::udir.

Referenced by DTrackFitterALT1::FitTrack().

DReferenceTrajectory::swim_step_t * DReferenceTrajectory::FindClosestSwimStep ( const DVector3 origin,
DVector3  norm,
int *  istep_ptr = NULL 
) const

Find the closest swim step to the plane specified by origin and norm. origin should indicate any point in the plane and norm a vector normal to the plane.

Definition at line 1623 of file DReferenceTrajectory.cc.

References _DBG_, and DCoordinateSystem::origin.

DReferenceTrajectory::swim_step_t * DReferenceTrajectory::FindPlaneCrossing ( const DVector3 origin,
DVector3  norm,
int  first_i = 0,
DetectorSystem_t  detector = SYS_NULL 
) const

Find the closest swim step to the position where the track crosses the plane specified by origin and norm. origin should indicate any point in the plane and norm a vector normal to the plane.

Definition at line 1675 of file DReferenceTrajectory.cc.

References _DBG_, DCoordinateSystem::origin, and SYS_START.

jerror_t DReferenceTrajectory::FindPOCAtoPoint ( const DVector3 point,
const DMatrixDSym covpoint,
DKinematicData track_kd,
double &  doca,
double &  var_doca 
) const

Definition at line 2676 of file DReferenceTrajectory.cc.

References dir.

void DReferenceTrajectory::FitVertex ( const DVector3 pos1,
const DVector3 mom1,
const DVector3 pos2,
const DVector3 mom2,
const TMatrixFSym &  cov1,
const TMatrixFSym &  cov2,
DVector3 pos,
double &  vertex_chi2,
double  q1 = 1.,
double  q2 = 1. 
) const

Definition at line 2967 of file DReferenceTrajectory.cc.

References e, f, S, and sin().

const DMagneticFieldMap* DReferenceTrajectory::GetBfield ( void  ) const
inline

Definition at line 143 of file DReferenceTrajectory.h.

References bfield.

double DReferenceTrajectory::GetBoundaryStepFraction ( void  ) const
inline

Definition at line 151 of file DReferenceTrajectory.h.

References BOUNDARY_STEP_FRACTION.

Referenced by DReferenceTrajectory(), and operator=().

bool DReferenceTrajectory::GetCheckMaterialBoundaries ( void  ) const
inline

Definition at line 149 of file DReferenceTrajectory.h.

References check_material_boundaries.

Referenced by DReferenceTrajectory(), and operator=().

int DReferenceTrajectory::GetDebugLevel ( void  )
inline

Definition at line 162 of file DReferenceTrajectory.h.

References debug_level.

const DGeometry* DReferenceTrajectory::GetDGeometry ( void  ) const
inline

Definition at line 142 of file DReferenceTrajectory.h.

References geom.

const DRootGeom* DReferenceTrajectory::GetDRootGeom ( void  ) const
inline

Definition at line 141 of file DReferenceTrajectory.h.

References RootGeom.

bool DReferenceTrajectory::GetHitCDCEndplate ( void  ) const
inline

Definition at line 156 of file DReferenceTrajectory.h.

References hit_cdc_endplate.

jerror_t DReferenceTrajectory::GetIntersectionWithPlane ( const DVector3 origin,
const DVector3 norm,
DVector3 pos,
double *  s = NULL,
double *  t = NULL,
double *  var_t = NULL,
DetectorSystem_t  detector = SYS_NULL 
) const
jerror_t DReferenceTrajectory::GetIntersectionWithPlane ( const DVector3 origin,
const DVector3 norm,
DVector3 pos,
DVector3 p_at_intersection,
double *  s = NULL,
double *  t = NULL,
double *  var_t = NULL,
DetectorSystem_t  detector = SYS_NULL 
) const

Get the intersection point of this trajectory with a plane. The plane is specified by origin and norm. The origin vector should give the coordinates of any point on the plane and norm should give a vector normal to the plane. The norm vector will be copied and normalized so it can be of any magnitude upon entry.

The coordinates of the intersection point will copied into the supplied pos vector. If a non-NULL pointer for s is passed in, the pathlength of the trajectory from its begining to the intersection point is copied into location pointed to.

Definition at line 988 of file DReferenceTrajectory.cc.

References _DBG_, DReferenceTrajectory::swim_step_t::cov_t_t, DReferenceTrajectory::swim_step_t::mom, DCoordinateSystem::origin, DReferenceTrajectory::swim_step_t::Ro, DReferenceTrajectory::swim_step_t::s, DCoordinateSystem::sdir, SPEED_OF_LIGHT, sqrt(), SYS_FCAL, SYS_TOF, DReferenceTrajectory::swim_step_t::t, DCoordinateSystem::tdir, and DCoordinateSystem::udir.

jerror_t DReferenceTrajectory::GetIntersectionWithRadius ( double  R,
DVector3 mypos,
double *  s = NULL,
double *  t = NULL,
DVector3 dir = NULL 
) const
double DReferenceTrajectory::GetLastDistAlongWire ( void  ) const
inline
void DReferenceTrajectory::GetLastDOCAPoint ( DVector3 pos,
DVector3 mom 
) const

Use values saved by the last call to one of the DistToRT functions to calculate the 3-D DOCA position in lab coordinates and momentum in GeV/c.

Definition at line 2280 of file DReferenceTrajectory.cc.

References QuietNaN, x, and y.

double DReferenceTrajectory::GetMaxStepSize ( void  ) const
inline

Definition at line 153 of file DReferenceTrajectory.h.

References MAX_STEP_SIZE.

Referenced by DReferenceTrajectory(), and operator=().

double DReferenceTrajectory::GetMinStepSize ( void  ) const
inline

Definition at line 152 of file DReferenceTrajectory.h.

References MIN_STEP_SIZE.

Referenced by DReferenceTrajectory(), and operator=().

direction_t DReferenceTrajectory::GetPLossDirection ( void  ) const
inline

Definition at line 150 of file DReferenceTrajectory.h.

References ploss_direction.

double DReferenceTrajectory::GetStepSize ( void  ) const
inline

Definition at line 145 of file DReferenceTrajectory.h.

References step_size.

double DReferenceTrajectory::GetZmaxTrackingBoundary ( void  )
inline

Definition at line 159 of file DReferenceTrajectory.h.

References zmax_track_boundary.

double DReferenceTrajectory::GetZminTrackingBoundary ( void  )
inline

Definition at line 160 of file DReferenceTrajectory.h.

References zmin_track_boundary.

int DReferenceTrajectory::InsertSteps ( const swim_step_t start_step,
double  delta_s,
double  step_size = 0.02 
)

Insert additional steps into the reference trajectory starting at start_step and swimming for at least delta_s by step_size sized steps. Both delta_s and step_size are in centimeters. If the value of delta_s is negative then the particle's momentum and charge are reversed before swimming. This could be a problem if energy loss is implemented.

Definition at line 1167 of file DReferenceTrajectory.cc.

References xstream::base64::index(), DReferenceTrajectory::swim_step_t::itheta02, DReferenceTrajectory::swim_step_t::itheta02s, DReferenceTrajectory::swim_step_t::itheta02s2, DReferenceTrajectory::swim_step_t::mom, Nswim_steps, DCoordinateSystem::origin, DReferenceTrajectory::swim_step_t::s, SetStepSize(), StepStruct::steps, Swim(), and swim_steps.

DReferenceTrajectory & DReferenceTrajectory::operator= ( const DReferenceTrajectory rt)

The assignment operator will always make sure the memory allocated for the swim_steps is owned by the object being copied into. If it already owns memory of sufficient size, then it will be reused. If it owns memory that is too small, it will be freed and a new block allocated. If it does not own its swim_steps coming in, then it will allocate memory so that it does own it on the way out.

Definition at line 140 of file DReferenceTrajectory.cc.

References bfield, dist_to_rt_depth, geom, GetBoundaryStepFraction(), GetCheckMaterialBoundaries(), GetMass(), GetMaxStepSize(), GetMinStepSize(), last_dist_along_wire, last_dz_dphi, last_phi, last_swim_step, max_swim_steps, MIN_STEP_SIZE, Nswim_steps, ploss_direction, q, RootGeom, step_size, and swim_steps.

jerror_t DReferenceTrajectory::PropagateCovariance ( double  ds,
double  q,
double  mass_sq,
const DVector3 mom,
const DVector3 pos,
const DVector3 B,
TMatrixFSym &  C 
) const

Definition at line 2459 of file DReferenceTrajectory.cc.

References py, SPEED_OF_LIGHT, sqrt(), and temp.

Referenced by IntersectTracks().

void DReferenceTrajectory::Reset ( void  )
void DReferenceTrajectory::SetCheckMaterialBoundaries ( bool  check_material_boundaries)
inline

Definition at line 148 of file DReferenceTrajectory.h.

References check_material_boundaries.

Referenced by DTrackFitterALT1::FitTrack().

void DReferenceTrajectory::SetDebugLevel ( int  new_level)
inline

Definition at line 163 of file DReferenceTrajectory.h.

References debug_level.

void DReferenceTrajectory::SetPLossDirection ( direction_t  direction)
inline

Definition at line 147 of file DReferenceTrajectory.h.

References ploss_direction.

Referenced by DTrackFitter::CorrectForELoss(), and DTrackFitterALT1::FitTrack().

void DReferenceTrajectory::SetStepSize ( double  step_size)
inline

Definition at line 138 of file DReferenceTrajectory.h.

References step_size.

Referenced by InsertSteps().

void DReferenceTrajectory::SetZmaxTrackingBoundary ( double  zmax)
inline

Definition at line 157 of file DReferenceTrajectory.h.

References zmax, and zmax_track_boundary.

void DReferenceTrajectory::SetZminTrackingBoundary ( double  zmin)
inline

Definition at line 158 of file DReferenceTrajectory.h.

References zmin, and zmin_track_boundary.

static const char* DReferenceTrajectory::static_className ( void  )
inlinestatic

Definition at line 86 of file DReferenceTrajectory.h.

Referenced by className().

double DReferenceTrajectory::Straw_dx ( const DCoordinateSystem wire,
double  radius 
) const

Find the distance traveled within the specified radius of the specified wire. This will give the "dx" component of a dE/dx measurement for cylindrical geometry as we have with straw tubes.

At this point, the estimate is done using a simple linear extrapolation from the DOCA point in the direction of the momentum to the 2 points at which it itersects the given radius. Segments which extend past the end of the wire will be clipped to the end of the wire before calculating the total dx.

Definition at line 2203 of file DReferenceTrajectory.cc.

References c, DCoordinateSystem::L, DCoordinateSystem::origin, sqrt(), and DCoordinateSystem::udir.

Referenced by DEventProcessor_cdc_hists::evnt().

void DReferenceTrajectory::Swim ( const DVector3 pos,
const DVector3 mom,
double  q = -1000.0,
const TMatrixFSym *  cov = NULL,
double  smax = 2000.0,
const DCoordinateSystem wire = NULL 
)
    (Re)Swim the trajectory starting from pos with momentum mom.

This will use the charge and step size (if given) passed to the constructor when the object was created. It will also (re)use the sim_step buffer, replacing it's contents.

Definition at line 611 of file DReferenceTrajectory.cc.

References DReferenceTrajectory::swim_step_t::B, DReferenceTrajectory::swim_step_t::cov_px_t, DReferenceTrajectory::swim_step_t::cov_py_t, DReferenceTrajectory::swim_step_t::cov_pz_t, DReferenceTrajectory::swim_step_t::cov_t_t, EPS, DMagneticFieldStepper::GetBField(), DMagneticFieldStepper::GetDirs(), DMagneticFieldStepper::GetPosMom(), DMagneticFieldStepper::GetRo(), DReferenceTrajectory::swim_step_t::invX0, DReferenceTrajectory::swim_step_t::itheta02, DReferenceTrajectory::swim_step_t::itheta02s, DReferenceTrajectory::swim_step_t::itheta02s2, MIN_STEP_SIZE, DReferenceTrajectory::swim_step_t::mom, DCoordinateSystem::origin, DReferenceTrajectory::swim_step_t::Ro, DReferenceTrajectory::swim_step_t::s, DCoordinateSystem::sdir, DMagneticFieldStepper::SetStartingParams(), DMagneticFieldStepper::SetStepSize(), SPEED_OF_LIGHT, sqrt(), DMagneticFieldStepper::Step(), DReferenceTrajectory::swim_step_t::t, DCoordinateSystem::tdir, DCoordinateSystem::udir, and X0.

Referenced by MyProcessor::AddKinematicDataTrack(), JEventProcessor_dumpcandidates::evnt(), DTrackWireBased_factory_THROWN::evnt(), DTrackTimeBased_factory_THROWN::evnt(), DEventProcessor_cdc_covariance_hists::evnt(), DEventProcessor_fdc_covariance_hists::evnt(), DTrackCandidate_factory_THROWN::evnt(), DEventProcessor_cdc_hists::evnt(), DEventProcessor_candidate_tree::evnt(), DEventSourceEVIO::Extract_DTrackTimeBased(), DTrackFitterALT1::FitTrack(), MyProcessor::GetDReferenceTrajectory(), MyProcessor::GetIntersectionWithCalorimeter(), DTrackFitterALT1::GetResiInfo(), InsertSteps(), and DCustomAction_CutNoDetectorHit::Perform_Action().

Member Data Documentation

const DMagneticFieldMap* DReferenceTrajectory::bfield
protected

Definition at line 209 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), GetBfield(), and operator=().

double DReferenceTrajectory::BOUNDARY_STEP_FRACTION
protected

Definition at line 225 of file DReferenceTrajectory.h.

Referenced by GetBoundaryStepFraction().

bool DReferenceTrajectory::check_material_boundaries
protected
int DReferenceTrajectory::debug_level
protected

Definition at line 203 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), GetDebugLevel(), and SetDebugLevel().

int DReferenceTrajectory::dist_to_rt_depth
protected

Definition at line 207 of file DReferenceTrajectory.h.

Referenced by operator=().

thread_local std::shared_ptr< DResourcePool< TMatrixFSym > > DReferenceTrajectory::dResourcePool_TMatrixFSym = std::make_shared<DResourcePool<TMatrixFSym>>(10, 10, 50)
staticprotected

Definition at line 229 of file DReferenceTrajectory.h.

const DGeometry* DReferenceTrajectory::geom
protected
bool DReferenceTrajectory::hit_cdc_endplate
protected

Definition at line 223 of file DReferenceTrajectory.h.

Referenced by GetHitCDCEndplate().

int DReferenceTrajectory::index_at_bcal

Definition at line 197 of file DReferenceTrajectory.h.

int DReferenceTrajectory::index_at_fcal

Definition at line 197 of file DReferenceTrajectory.h.

int DReferenceTrajectory::index_at_tof

Definition at line 197 of file DReferenceTrajectory.h.

double DReferenceTrajectory::last_dist_along_wire
mutableprotected

Definition at line 219 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), GetLastDistAlongWire(), and operator=().

double DReferenceTrajectory::last_dz_dphi
mutableprotected

Definition at line 220 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), and operator=().

double DReferenceTrajectory::last_phi
mutableprotected

last phi found in DistToRT

Definition at line 217 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), and operator=().

const swim_step_t* DReferenceTrajectory::last_swim_step
mutableprotected

last swim step used in DistToRT

Definition at line 218 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), GetLastSwimStep(), and operator=().

double DReferenceTrajectory::mass
protected

Definition at line 222 of file DReferenceTrajectory.h.

Referenced by GetMass(), and SetMass().

double DReferenceTrajectory::mass_sq
protected

Definition at line 222 of file DReferenceTrajectory.h.

Referenced by IntersectTracks(), and SetMass().

double DReferenceTrajectory::MAX_STEP_SIZE
protected

Definition at line 227 of file DReferenceTrajectory.h.

Referenced by GetMaxStepSize().

int DReferenceTrajectory::max_swim_steps
protected

Definition at line 205 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), and operator=().

double DReferenceTrajectory::MIN_STEP_SIZE
protected

Definition at line 226 of file DReferenceTrajectory.h.

Referenced by GetMinStepSize().

bool DReferenceTrajectory::own_swim_steps
protected

Definition at line 206 of file DReferenceTrajectory.h.

direction_t DReferenceTrajectory::ploss_direction
protected
const DRootGeom* DReferenceTrajectory::RootGeom
protected
double DReferenceTrajectory::Rsqmax_exterior
double DReferenceTrajectory::Rsqmax_interior
double DReferenceTrajectory::step_size
protected

Definition at line 208 of file DReferenceTrajectory.h.

Referenced by DReferenceTrajectory(), GetStepSize(), operator=(), and SetStepSize().

double DReferenceTrajectory::zmax_track_boundary
protected

Definition at line 215 of file DReferenceTrajectory.h.

Referenced by GetZmaxTrackingBoundary(), and SetZmaxTrackingBoundary().

double DReferenceTrajectory::zmin_track_boundary
protected

Definition at line 214 of file DReferenceTrajectory.h.

Referenced by GetZminTrackingBoundary(), and SetZminTrackingBoundary().


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