PaTrack Class Reference

Track. More...

#include <PaTrack.h>

List of all members.

Public Member Functions

float Zmax () const
 Z coordinate of the most downstram detector of the track.
float Zmin () const
 Z coordinate of the most upstream detector of the track.
float ZLast () const
 Z of the last measured point.
float ZFirst () const
 Z of the first measured point.
int CountNHits ()
 Count NHits in hit pattern and store it in "nhits" data member.
int NHits () const
 Number of hits.
const float & Chi2tot () const
 Total $ \chi^2 $.
int Ndf () const
 Number degrees of freedom.
const float & MeanTime () const
 Track time (with respect to trigger time) in [ns].
const float & SigmaTime () const
 Error of track time calculated from approximate errors of individual hits' times (0 if track time is unknown).
const float & XX0 () const
 Track pass in units of rafiation lengthes (X/X0).
int NTPar () const
 Number of trajectory parameters.
const PaTParvTPar (int i) const
 Trajectory parameter # i.
bool Extrapolate (double Z, PaTPar &Hout) const
 Extrapolate track to position Z.
bool Extrap (double Z, PaTPar &Hout) const
 The same as Extrapolate but without multiple scattering and energy losses.
int Q () const
 charge
bool HasMom () const
 "true" if momentum had been defined
float qP () const
 track momentum with sign (charge*|P|)
int NRichInf () const
 Rich information array size.
const float & RichInf (int i) const
 Rich information array element # i.
TBits HitsExpected () const
 "Expected" hit pattern
TBits HitsFound () const
 "Found" hit pattern
int NHitsFoundInDetect (string str) const
 returns number of found hits in detectors with name begins on substring "str" (e.g. NHitsFoundInDetect("FI") gives number of hits in SciFi)
int NHitsFoundInRange (double Zmin, double Zmax) const
 returns number of found hits in detectors with Z positions within specified range [Zmin; Zmax]
const vector< Int_t > & vHitRef () const
 References to PaHits of this track (not stored in "standard" mDST).
float FieldInteg (float &r) const
 Estimation of the field integral [T*m] "accumulated" by this track.
bool QuickKF (int dir, int mode)
 Quick (no mult. scattering corrections) Kalman fit through already found hits.
bool FullKF (int dir)
 Kalman fit through already found hits (no hits re-assignment) with use of material maps (if switched ON).
double GetSmoothed (PaTPar &Hout, string detname, bool flg)
 Calculate "smoothed" track parameters on the detector with name "detname" and returns Chi2/ndf. (function returns "-1" if this track do not cross detector "detname").
double GetSmoothed (PaTPar &Hout, int ipl, bool flg)
 Calculate "smoothed" track parameters on the plane # ipl and returns Chi2/ndf. (function returns "-1" value in the case of problem).
double GetSmoothed (PaTPar &Hout, double Z)
 Calculate "smoothed" track parameters at given Z and returns Chi2/ndf. If track do not cross plane X, returns "-1".
bool KFdone ()
 return "true" if Kalman fit had been done in both directions for this track.
int iHit (string detname)
 return hit reference to the track's hit on the detector "detname" or "-1" if there is no hit associated to track on this detector
int KeepOnly (const list< string > &detectors)
 Remove all hits from the track excluding hits of detectors with names specified in "detectors" (only few first letters of detector names are allowed).
bool CanBeMuon () const
 Check if the track is a possibly misidentified muon.
bool CrossYokeSM2 (bool strict=true) const
 Check if the track passes through the SM2 yoke.
bool PointsHodoscopes () const
 Check if the track points to a trigger that fired. It is checked that a track goes through the active area of one of the trigger hodoscope pairs that gave the trigger.
int iMCtrack () const
 corresponding MC track index (or -1 in not associated)
int iParticle () const
 corresponding Particle index
const UInt_t * FoundHitsBitMap () const
 return "Found hits" bitmap as plane array (size = HIT_MAP_SIZE defined in PaSetup.h)
void SetMCtrack (int i)
 Set corresponding MC track index.

Detailed Description

Track.

Reconstructed charged track.
This class contains information, that normally is not needed for physical analysis but for various kinds of performance studies only. For physics, use PaParticle instead.

Author:
Sergei.Gerassimov@cern.ch

Member Function Documentation

bool PaTrack::CanBeMuon ( void   )  const

Check if the track is a possibly misidentified muon.

It is checked if the track goes through the hole of COMPASS absorber system.

Author:
Konrad.Klimaszewski@cern.ch

References PaSetup::Detector(), PaTPar::Extrapolate(), PaSetup::iDetector(), PaDetect::InActive(), PaTPar::Mom(), NTPar(), Q(), PaSetup::Ref(), Phast::Ref(), PaEvent::RunNum(), vTPar(), PaDetect::Z(), and ZLast().

Referenced by PaVertex::iMuPrim().

const float& PaTrack::Chi2tot (  )  const [inline]

Total $ \chi^2 $.

Estimation of total $ \chi^2 $ as $\Sigma \delta\chi^2_i $ of every update step on backward Kalman fit of the track

Referenced by FullKF(), and QuickKF().

bool PaTrack::CrossYokeSM2 ( bool  strict = true  )  const

Check if the track passes through the SM2 yoke.

Parameters:
strict - take into account the extrapolation error
Author:
Konrad.Klimaszewski@cern.ch

References PaTPar::Extrapolate(), PaField::getMagInfo(), NTPar(), PaSetup::Ref(), vTPar(), and ZLast().

Referenced by PaVertex::iMuPrim().

bool PaTrack::Extrapolate ( double  Z,
PaTPar Hout 
) const

Extrapolate track to position Z.

Takes track parameters (PaTPar) closest to desired Z position (if more than 1 is stored) and extrapolate it. If track has it's parameters only in the first measured point, then this PaTPar is used.
Extrapolated track parameters are returned via "Hout".
Function returns "false" if extrapolation had failed.

References PaTPar::Extrapolate(), NTPar(), and vTPar().

float PaTrack::FieldInteg ( float &  r  )  const

Estimation of the field integral [T*m] "accumulated" by this track.

Parameters:
r - ratio of field intergal in Z range [1-st track point; 1000cm] to full field integral

References NTPar(), vTPar(), and ZLast().

bool PaTrack::FullKF ( int  dir  ) 

Kalman fit through already found hits (no hits re-assignment) with use of material maps (if switched ON).

Accumulated fraction of rad. lengthes is stored into radLenFr datamember

Parameters:
dir - fit direction
  
  Input:
  
  dir =  1 - fit in  forward direction (resulting helix is last  element of vecTPar)
  dir = -1 - fit in backward direction (resulting helix is first element of vecTPar)
  
  

Kalman fit through already found hits (no hits re-assignment) with use of material maps (if switched ON) Accumulated fraction of rad. lengthes is stored into radLenFr datamember

Parameters:
dir - fit direction
  
  Input:
  
  dir =  1 - fit in  forward direction (resulting helix is last  element of vecTPar)
  dir = -1 - fit in backward direction (resulting helix is first element of vecTPar)
  
  

References PaTPar::AddNoise(), Chi2tot(), PaSetup::Detector(), PaTPar::DirCos(), PaTPar::Extrapolate(), PaTPar::HasMom(), PaTPar::HitChi2(), PaDetect::InActive(), PaMaterialMaps::InMaterialMap(), PaSetup::MaterialMaps(), PaDetect::Name(), PaTPar::Path(), PaEvent::Print(), PaHit::Print(), PaTPar::Print(), QuickKF(), PaDetect::RadLen(), PaTPar::RadLenFr(), Phast::Ref(), PaSetup::Ref(), PaTPar::Update(), and PaDetect::Z().

double PaTrack::GetSmoothed ( PaTPar Hout,
double  Z 
)

Calculate "smoothed" track parameters at given Z and returns Chi2/ndf. If track do not cross plane X, returns "-1".

Parameters:
Hout - output smoothed helix
Z - input: coordinate along the beam, where smoothed track parameters has to be calculated

References PaTPar::Extrapolate(), PaTPar::Print(), and PaTPar::Update().

double PaTrack::GetSmoothed ( PaTPar Hout,
int  ipl,
bool  flg 
)

Calculate "smoothed" track parameters on the plane # ipl and returns Chi2/ndf. (function returns "-1" value in the case of problem).

Parameters:
Hout - output smoothed helix
ipl - input: plane number where smoothed track parameters has to be calculated
flg - input: if == false, measurement on the current plane is excluded. If there is no hit on the plane ipl, this flag has no effect.

References KFdone(), PaEvent::Print(), PaTPar::Print(), and PaTPar::Update().

double PaTrack::GetSmoothed ( PaTPar Hout,
string  detname,
bool  flg 
)

Calculate "smoothed" track parameters on the detector with name "detname" and returns Chi2/ndf. (function returns "-1" if this track do not cross detector "detname").

Parameters:
Hout - output smoothed helix
detname - input: detector name where smoothed track parameters has to be calculated
flg - input: if == false, measurement on the current plane is excluded. If there is no hit on the detector detname, this flag has no effect.

References PaSetup::iDetector(), and PaSetup::Ref().

int PaTrack::KeepOnly ( const list< string > &  detectors  ) 

Remove all hits from the track excluding hits of detectors with names specified in "detectors" (only few first letters of detector names are allowed).

Returns number of left over hits.

Example: If list contains 2 elements "FI" and "SI" all hits excluding hits in silicon detectors and SciFi will be removed.

References CountNHits(), PaSetup::Detector(), PaDetect::Name(), PaSetup::NDetectors(), and PaSetup::Ref().

int PaTrack::Ndf (  )  const [inline]

Number degrees of freedom.

Number degrees of freedom of the track fit.

References HasMom(), and NHits().

bool PaTrack::PointsHodoscopes (  )  const

Check if the track points to a trigger that fired. It is checked that a track goes through the active area of one of the trigger hodoscope pairs that gave the trigger.

Author:
Konrad.Klimaszewski@cern.ch

References PaSetup::Detector(), PaTPar::Extrapolate(), PaField::getMagInfo(), PaSetup::iDetector(), NTPar(), PaSetup::Ref(), Phast::Ref(), PaEvent::RunNum(), PaEvent::TrigMask(), vTPar(), PaTPar::X(), PaTPar::Y(), and PaEvent::Year().

Referenced by PaVertex::iMuPrim().

int PaTrack::Q (  )  const [inline]

charge

Warning:
If the momentum of track is unknown, this function prints a message and returns 999

Referenced by CanBeMuon(), and PaVertex::iMuPrim().

bool PaTrack::QuickKF ( int  dir,
int  mode 
)

Quick (no mult. scattering corrections) Kalman fit through already found hits.

Parameters:
dir - fit direction
mode - defines how to fit
    Input:
    
    dir =  1 - fit in downstream direction (resulting helix is last  element of vecTPar)
    dir = -1 - fit in upstream direction   (resulting helix is first element of vecTPar)
    
    mode =  0 - straight line fit
    mode =  1 - starts from known (in the first approximation) helix 
            (first or last, depending on direction).
             Scale up covariance matrix and do the fit
    mode =  2 - start from fully uncertain (except of momentum) helix (for debug only)
    

References Chi2tot(), PaSetup::Detector(), PaTPar::HasMom(), PaTPar::HitChi2(), PaDetect::Name(), PaEvent::Print(), PaHit::Print(), PaTPar::Print(), Phast::Ref(), PaSetup::Ref(), PaTPar::Update(), and PaDetect::Z().

Referenced by FullKF().

const PaTPar& PaTrack::vTPar ( int  i  )  const [inline]

Trajectory parameter # i.

In "standard" mDST only parameters 2 exists (first and last measured point).
(In productions of 2006 and earlier only PaTPar in the first measured point was stored)

Warning:
For beam tracks (tracks ending before the target) order or track parameters is reversed, so vTPar(0) are parameters at the point closest to target.

References NTPar().

Referenced by CanBeMuon(), CrossYokeSM2(), Extrap(), Extrapolate(), FieldInteg(), PaPid::LikePid(), PointsHodoscopes(), and PaPid::SecondLike().

float PaTrack::ZFirst (  )  const

Z of the first measured point.

This function returns Z of the first track parameter: vTPar(0)

Warning:
As for beam tracks (tracks ending before the target) order of parameters is reversed, i.e. first track parameters is closest to the target.
float PaTrack::ZLast (  )  const [inline]

Z of the last measured point.

This finction return Z coordinate of the last hitted detectors (corresponding to last bit of HitsFound()).

References Zmax().

Referenced by CanBeMuon(), CrossYokeSM2(), FieldInteg(), and PaVertex::iMuPrim().


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

Generated by  doxygen 1.6.2