Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KalmanFastTracking Class Reference

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/packages/reco/ktracker/KalmanFastTracking.h>

Public Member Functions

 KalmanFastTracking (const PHField *field, const TGeoManager *geom, bool flag=true)
 
 ~KalmanFastTracking ()
 
void Verbosity (const int a)
 
int Verbosity () const
 
void printTimers ()
 
int setRawEvent (SRawEvent *event_input)
 
void setRawEventDebug (SRawEvent *event_input)
 
bool acceptEvent (SRawEvent *rawEvent)
 
void buildTrackletsInStation (int stationID, int listID, double *pos_exp=nullptr, double *window=nullptr)
 Tracklet finding stuff. More...
 
void buildBackPartialTracks ()
 
void buildGlobalTracks ()
 
int fitTracklet (Tracklet &tracklet)
 
bool acceptTracklet (Tracklet &tracklet)
 
bool hodoMask (Tracklet &tracklet)
 
bool muonID_comp (Tracklet &tracklet)
 
bool muonID_search (Tracklet &tracklet)
 
bool muonID_hodoAid (Tracklet &tracklet)
 
void buildPropSegments ()
 
void resolveLeftRight (SRawEvent::hit_pair hpair, int &LR1, int &LR2)
 
void resolveLeftRight (Tracklet &tracklet, double threshold)
 
void resolveSingleLeftRight (Tracklet &tracklet)
 
void removeBadHits (Tracklet &tracklet)
 
int reduceTrackletList (std::list< Tracklet > &tracklets)
 
void getSagittaWindowsInSt1 (Tracklet &tracklet, double *pos_exp, double *window, int st1ID)
 
void getExtrapoWindowsInSt1 (Tracklet &tracklet, double *pos_exp, double *window, int st1ID)
 
void printAtDetectorBack (int stationID, std::string outputFileName)
 
SRecTrack processOneTracklet (Tracklet &tracklet)
 Track fitting stuff. More...
 
bool fitTrack (KalmanTrack &kmtrk)
 
void resolveLeftRight (KalmanTrack &kmtrk)
 
std::list< Tracklet > & getFinalTracklets ()
 Final output. More...
 
std::list< Tracklet > & getBackPartials ()
 
std::list< Tracklet > & getTrackletList (int i)
 
std::list< SRecTrack > & getSRecTracks ()
 
std::list< PropSegment > & getPropSegments (int i)
 
void setOutputListID (unsigned int i)
 Set the index of the final output tracklet list. More...
 
void chi2fit (int n, double x[], double y[], double &a, double &b)
 Tool, a simple-minded chi square fit. More...
 

Detailed Description

Definition at line 34 of file KalmanFastTracking.h.

Constructor & Destructor Documentation

KalmanFastTracking::KalmanFastTracking ( const PHField field,
const TGeoManager *  geom,
bool  flag = true 
)
explicit

Definition at line 125 of file KalmanFastTracking.cxx.

References Tracklet::Eval(), PHFlag::get_DoubleFlag(), recoConsts::instance(), GeomSvc::instance(), nChamberPlanes, nHodoPlanes, nPropPlanes, and nStations.

+ Here is the call graph for this function:

KalmanFastTracking::~KalmanFastTracking ( )

Definition at line 415 of file KalmanFastTracking.cxx.

Member Function Documentation

bool KalmanFastTracking::acceptEvent ( SRawEvent rawEvent)

Definition at line 586 of file KalmanFastTracking.cxx.

References SRawEvent::getNHitsInD0(), SRawEvent::getNHitsInD1(), SRawEvent::getNHitsInD2(), SRawEvent::getNHitsInD3m(), SRawEvent::getNHitsInD3p(), SRawEvent::getNHitsInDetectors(), SRawEvent::getNPropHitsAll(), SRawEvent::getNRoadsNeg(), SRawEvent::getNRoadsPos(), LogInfo, Verbosity(), and Fun4AllBase::VERBOSITY_A_LOT.

Referenced by setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool KalmanFastTracking::acceptTracklet ( Tracklet tracklet)

Definition at line 1342 of file KalmanFastTracking.cxx.

References Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), hodoMask(), GeomSvc::isInKMAG(), Tracklet::isValid(), LogInfo, muonID_comp(), muonID_search(), nStations, and Tracklet::stationID.

Referenced by buildBackPartialTracks(), buildGlobalTracks(), and buildTrackletsInStation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::buildBackPartialTracks ( )

Remove bad hits if needed

Definition at line 624 of file KalmanFastTracking.cxx.

References acceptTracklet(), chi2fit(), Tracklet::chisq, fitTracklet(), GeomSvc::getPlaneType(), hodoMask(), Tracklet::isValid(), LogInfo, nChamberPlanes, Tracklet::print(), reduceTrackletList(), removeBadHits(), and resolveLeftRight().

Referenced by setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::buildGlobalTracks ( )

Resolve the left-right with a tight pull cut, then a loose one, then resolve by single projections

Remove bad hits if needed

Set vertex information - only applied when KF is enabled TODO: maybe in the future add a Genfit-based equivalent here, for now leave as is

Definition at line 760 of file KalmanFastTracking.cxx.

References acceptTracklet(), buildTrackletsInStation(), Tracklet::chisq_vtx, fitTracklet(), SRecTrack::getChisqVertex(), getExtrapoWindowsInSt1(), Tracklet::getMomentum(), getSagittaWindowsInSt1(), hodoMask(), Tracklet::invP, SRecTrack::isValid(), Tracklet::isValid(), LogInfo, Tracklet::merge(), Tracklet::print(), processOneTracklet(), removeBadHits(), resolveLeftRight(), and resolveSingleLeftRight().

Referenced by setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::buildPropSegments ( )

Definition at line 1601 of file KalmanFastTracking.cxx.

References PropSegment::fit(), SRawEvent::getPartialHitPairsInSuperDetector(), PropSegment::hits, PropSegment::isValid(), LogInfo, and PropSegment::print().

Referenced by setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::buildTrackletsInStation ( int  stationID,
int  listID,
double *  pos_exp = nullptr,
double *  window = nullptr 
)

Tracklet finding stuff.

Definition at line 1176 of file KalmanFastTracking.cxx.

References acceptTracklet(), fitTracklet(), SRawEvent::getPartialHitPairsInSuperDetector(), Tracklet::hits, Tracklet::isValid(), LogInfo, Tracklet::nUHits, Tracklet::nVHits, Tracklet::nXHits, Tracklet::print(), Tracklet::sortHits(), and Tracklet::stationID.

Referenced by buildGlobalTracks(), and setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::chi2fit ( int  n,
double  x[],
double  y[],
double &  a,
double &  b 
)

Tool, a simple-minded chi square fit.

Definition at line 2057 of file KalmanFastTracking.cxx.

Referenced by buildBackPartialTracks().

+ Here is the caller graph for this function:

bool KalmanFastTracking::fitTrack ( KalmanTrack kmtrk)

Definition at line 1990 of file KalmanFastTracking.cxx.

References KalmanTrack::getNodeList(), KalmanFitter::processOneTrack(), and KalmanFitter::updateTrack().

Referenced by processOneTracklet(), and resolveLeftRight().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int KalmanFastTracking::fitTracklet ( Tracklet tracklet)

Definition at line 1666 of file KalmanFastTracking.cxx.

References Tracklet::chisq, Tracklet::err_invP, Tracklet::err_tx, Tracklet::err_ty, Tracklet::err_x0, Tracklet::err_y0, Tracklet::invP, nStations, Tracklet::stationID, Tracklet::tx, Tracklet::ty, Tracklet::x0, and Tracklet::y0.

Referenced by buildBackPartialTracks(), buildGlobalTracks(), buildTrackletsInStation(), main(), removeBadHits(), resolveLeftRight(), and resolveSingleLeftRight().

+ Here is the caller graph for this function:

std::list<Tracklet>& KalmanFastTracking::getBackPartials ( )
inline

Definition at line 104 of file KalmanFastTracking.h.

void KalmanFastTracking::getExtrapoWindowsInSt1 ( Tracklet tracklet,
double *  pos_exp,
double *  window,
int  st1ID 
)

Definition at line 1745 of file KalmanFastTracking.cxx.

References Tracklet::getExpPosErrorX(), Tracklet::getExpPosErrorY(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), GeomSvc::getPlaneType(), GeomSvc::getUinStereoPlane(), nStations, and Tracklet::stationID.

Referenced by buildGlobalTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::list<Tracklet>& KalmanFastTracking::getFinalTracklets ( )
inline

Final output.

Definition at line 103 of file KalmanFastTracking.h.

Referenced by SQReco::process_event().

+ Here is the caller graph for this function:

std::list<PropSegment>& KalmanFastTracking::getPropSegments ( int  i)
inline

Definition at line 107 of file KalmanFastTracking.h.

void KalmanFastTracking::getSagittaWindowsInSt1 ( Tracklet tracklet,
double *  pos_exp,
double *  window,
int  st1ID 
)

Definition at line 1773 of file KalmanFastTracking.cxx.

References Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), GeomSvc::getPlaneType(), GeomSvc::getUinStereoPlane(), Tracklet::hits, nStations, and Tracklet::stationID.

Referenced by buildGlobalTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::list<SRecTrack>& KalmanFastTracking::getSRecTracks ( )
inline

Definition at line 106 of file KalmanFastTracking.h.

std::list<Tracklet>& KalmanFastTracking::getTrackletList ( int  i)
inline

Definition at line 105 of file KalmanFastTracking.h.

Referenced by SQReco::process_event().

+ Here is the caller graph for this function:

bool KalmanFastTracking::hodoMask ( Tracklet tracklet)

Definition at line 1372 of file KalmanFastTracking.cxx.

References Tracklet::getExpPosErrorX(), Tracklet::getExpPosErrorY(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), LogInfo, nChamberPlanes, nStations, and Tracklet::stationID.

Referenced by acceptTracklet(), buildBackPartialTracks(), and buildGlobalTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool KalmanFastTracking::muonID_comp ( Tracklet tracklet)

Definition at line 1495 of file KalmanFastTracking.cxx.

References Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), Tracklet::invP, LogInfo, nStations, Tracklet::seg_x, Tracklet::seg_y, Tracklet::stationID, Tracklet::tx, and Tracklet::ty.

Referenced by acceptTracklet().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool KalmanFastTracking::muonID_hodoAid ( Tracklet tracklet)

Definition at line 1552 of file KalmanFastTracking.cxx.

References Tracklet::getExpPosErrorX(), Tracklet::getExpPosErrorY(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), PropSegment::hodoHits, Tracklet::invP, nChamberPlanes, PropSegment::nHodoHits, nStations, Tracklet::seg_x, Tracklet::seg_y, and Tracklet::stationID.

Referenced by muonID_search().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool KalmanFastTracking::muonID_search ( Tracklet tracklet)

Definition at line 1423 of file KalmanFastTracking.cxx.

References PropSegment::fit(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), PropSegment::getPosRef(), SignedHit::hit, PropSegment::hits, PropSegment::init(), Tracklet::invP, GeomSvc::isInPlane(), muonID_hodoAid(), nChamberPlanes, PropSegment::nHodoHits, nStations, Tracklet::seg_x, Tracklet::seg_y, SignedHit::sign, Tracklet::stationID, Tracklet::tx, and Tracklet::ty.

Referenced by acceptTracklet().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::printAtDetectorBack ( int  stationID,
std::string  outputFileName 
)

Definition at line 1821 of file KalmanFastTracking.cxx.

References c1, GeomSvc::getPlaneCenterX(), GeomSvc::getPlaneCenterY(), GeomSvc::getPlanePosition(), GeomSvc::getPlaneScaleX(), and GeomSvc::getPlaneScaleY().

+ Here is the call graph for this function:

void KalmanFastTracking::printTimers ( )

Definition at line 2043 of file KalmanFastTracking.cxx.

Referenced by SQReco::process_event().

+ Here is the caller graph for this function:

SRecTrack KalmanFastTracking::processOneTracklet ( Tracklet tracklet)

Track fitting stuff.

Definition at line 1865 of file KalmanFastTracking.cxx.

References PropSegment::a, fitTrack(), PropSegment::getNHits(), TriggerRoad::getRoadID(), KalmanTrack::getSRecTrack(), Tracklet::getSRecTrack(), KalmanTrack::isValid(), LogInfo, Tracklet::seg_x, Tracklet::seg_y, SRecTrack::setKalmanStatus(), SRecTrack::setNHitsInPT(), SRecTrack::setPTSlope(), KalmanTrack::setTracklet(), and SRecTrack::setTriggerRoad().

Referenced by buildGlobalTracks(), and setRawEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int KalmanFastTracking::reduceTrackletList ( std::list< Tracklet > &  tracklets)

Definition at line 1708 of file KalmanFastTracking.cxx.

References LogInfo.

Referenced by buildBackPartialTracks().

+ Here is the caller graph for this function:

void KalmanFastTracking::removeBadHits ( Tracklet tracklet)

Definition at line 1036 of file KalmanFastTracking.cxx.

References Tracklet::calcChisq(), Hit::detectorID, Hit::driftDistance, fitTracklet(), GeomSvc::getPlaneType(), SignedHit::hit, Tracklet::hits, Hit::index, Tracklet::isValid(), LogInfo, nChamberPlanes, Tracklet::nUHits, Tracklet::nVHits, Tracklet::nXHits, Hit::print(), Tracklet::print(), Tracklet::residual, resolveSingleLeftRight(), and SignedHit::sign.

Referenced by buildBackPartialTracks(), and buildGlobalTracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::resolveLeftRight ( SRawEvent::hit_pair  hpair,
int &  LR1,
int &  LR2 
)

Definition at line 1136 of file KalmanFastTracking.cxx.

Referenced by buildBackPartialTracks(), and buildGlobalTracks().

+ Here is the caller graph for this function:

void KalmanFastTracking::resolveLeftRight ( Tracklet tracklet,
double  threshold 
)

Definition at line 911 of file KalmanFastTracking.cxx.

References Tracklet::err_tx, Tracklet::err_ty, Tracklet::err_x0, Tracklet::err_y0, fitTracklet(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), Tracklet::getXZErrorInSt1(), Tracklet::getXZInfoInSt1(), Tracklet::hits, LogInfo, Tracklet::print(), Tracklet::stationID, Tracklet::tx, Tracklet::ty, Tracklet::x0, and Tracklet::y0.

+ Here is the call graph for this function:

void KalmanFastTracking::resolveLeftRight ( KalmanTrack kmtrk)

Definition at line 2003 of file KalmanFastTracking.cxx.

References fitTrack(), KalmanTrack::getHitIndexList(), KalmanTrack::getNodeList(), GeomSvc::getPlaneResolution(), and GeomSvc::getUinStereoPlane().

+ Here is the call graph for this function:

void KalmanFastTracking::resolveSingleLeftRight ( Tracklet tracklet)

Definition at line 1013 of file KalmanFastTracking.cxx.

References fitTracklet(), Tracklet::getExpPositionX(), Tracklet::getExpPositionY(), Tracklet::hits, LogInfo, and Tracklet::print().

Referenced by buildGlobalTracks(), and removeBadHits().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::setOutputListID ( unsigned int  i)
inline

Set the index of the final output tracklet list.

Definition at line 110 of file KalmanFastTracking.h.

int KalmanFastTracking::setRawEvent ( SRawEvent event_input)

Definition at line 428 of file KalmanFastTracking.cxx.

References acceptEvent(), buildBackPartialTracks(), buildGlobalTracks(), buildPropSegments(), buildTrackletsInStation(), SRawEvent::getAllHits(), SRawEvent::getHitsIndexInDetector(), SRawEvent::getHitsIndexInDetectors(), SRawEvent::isFPGATriggered(), LogInfo, processOneTracklet(), TFEXIT_FAIL_BACKPARTIAL, TFEXIT_FAIL_GLOABL, TFEXIT_FAIL_MULTIPLICITY, TFEXIT_FAIL_ST2_TRACKLET, TFEXIT_FAIL_ST3_TRACKLET, and TFEXIT_SUCCESS.

Referenced by SQReco::process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KalmanFastTracking::setRawEventDebug ( SRawEvent event_input)

Definition at line 422 of file KalmanFastTracking.cxx.

References SRawEvent::getAllHits().

+ Here is the call graph for this function:

void KalmanFastTracking::Verbosity ( const int  a)
inline

Definition at line 41 of file KalmanFastTracking.h.

Referenced by SQReco::InitRun().

+ Here is the caller graph for this function:

int KalmanFastTracking::Verbosity ( ) const
inline

Definition at line 42 of file KalmanFastTracking.h.

Referenced by acceptEvent().

+ Here is the caller graph for this function:


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