StRoot  1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
ForwardTrackMaker Class Reference
Inheritance diagram for ForwardTrackMaker:
ForwardTracker

Public Member Functions

const std::vector
< GenfitTrackResult > & 
getTrackResults () const
 
const std::vector< Seed_t > & getTrackSeeds () const
 
const EventStatsgetEventStats () const
 
void Clear ()
 
void setConfigFile (std::string cf)
 Set the Config File object. More...
 
void setSaveCriteriaValues (bool save)
 Set the Save Criteria Values object. More...
 
void setConfig (FwdTrackerConfig cfg)
 
void setData (std::shared_ptr< FwdDataSource >data)
 
virtual void initialize (TString geoCache, bool genHistograms)
 Initialize FwdTracker. More...
 
std::vector
< KiTrack::ICriterion * > 
loadCriteria (string path)
 Loads Criteria from XML configuration. Utility function for loading criteria from XML config. More...
 
void clearCriteria (std::vector< KiTrack::ICriterion * > &crits)
 Clear the loaded criteria. More...
 
std::vector< float > getCriteriaValues (std::string crit_name)
 Get the Criteria Values object. More...
 
std::vector< std::map
< std::string, float > > 
getCriteriaAllValues (std::string crit_name)
 Get the Criteria All Values object. More...
 
std::vector< int > getCriteriaTrackIds (std::string crit_name)
 Get the Criteria Track Ids object. More...
 
void clearSavedCriteriaValues ()
 Clear the saved values for two hit and three hit criteria.
 
size_t nHitsInHitMap (FwdDataSource::HitMap_t &hitmap)
 Determine the total num of hits in the hitmap. More...
 
void removeHits (FwdDataSource::HitMap_t &hitmap, std::vector< Seed_t > &tracks)
 Remove used hits from the hit map. More...
 
void mergeHitmaps (FwdDataSource::HitMap_t &hitmap1, FwdDataSource::HitMap_t &hitmap2)
 merges the FST and FTT hitmaps into a single hitmap The FTT hits are shifted by the number of FST sectors More...
 
void cleanup ()
 cleanup the event-wise data structures More...
 
bool useMcTrackFinding ()
 
void findTrackSeeds ()
 Perform the track finding Creates a list of track seeds from the hitmaps Retrieve them using getTrackSeeds()
 
std::vector
< genfit::GFRaveVertex * > 
findFwdVertices (const vector< GenfitTrackResult > &globalTracks)
 
GenfitTrackResult fitTrack (Seed_t &seed, TVector3 *momentumSeedState=nullptr)
 Perform a single fit from seed points. More...
 
void doTrackFitting (const std::vector< Seed_t > &trackSeeds)
 Loop on track seeds and fit each one. More...
 
void doMcTrackFinding (FwdDataSource::McTrackMap_t &mcTrackMap, int seedSource)
 MC track finding builds track seeds from available hits using MC association. More...
 
size_t sliceHitMapInPhi (FwdDataSource::HitMap_t &inputMap, FwdDataSource::HitMap_t &outputMap, float phi_min, float phi_max)
 Slices a hitmap into a phi section. More...
 
vector< Seed_tdoSeedFindingOnHitmapSubset (size_t iIteration, FwdDataSource::HitMap_t &hitmap)
 Does track finding steps on a subset of hits (phi slice) More...
 
void doSeedFindingIteration (size_t iIteration, FwdDataSource::HitMap_t &hitmap)
 Main tracking procedure. More...
 
void addFstHitsMc (GenfitTrackResult &gtr)
 Adds compatible FST hits to tracks seeded with FTT.
 
void addFttHits (GenfitTrackResult &gtr, size_t disk)
 Adds compatible FTT hits to tracks seeded with FST. More...
 
void addFttHitsMc (GenfitTrackResult &gtr)
 Adds compatible FTT hits using MC info.
 
void addFstHits (GenfitTrackResult &gtr, size_t disk)
 Adds compatible FST hits to a track. More...
 
Seed_t findFstHitsNearProjectedState (Seed_t &available_hits, genfit::MeasuredStateOnPlane &msp, double dphi=0.004 *20.5, double dr=2.75 *2)
 Finds FST hits near projected state. More...
 
Seed_t findFttHitsNearProjectedState (Seed_t &available_hits, genfit::MeasuredStateOnPlane &msp, double dx=1.5, double dy=1.5)
 Finds FTT hits near projected state. More...
 
bool getSaveCriteriaValues ()
 
std::vector
< KiTrack::ICriterion * > 
getTwoHitCriteria ()
 
std::vector
< KiTrack::ICriterion * > 
getThreeHitCriteria ()
 
TrackFittergetTrackFitter ()
 
void setEventVertex (TVector3 v, TMatrixDSym cov)
 
TVector3 getEventVertex ()
 

Protected Types

enum  SeedSource { kFstSeed = 0, kFttSeed, kSimSeed, kSeqSeed }
 

Protected Attributes

unsigned long long int nEvents
 
bool mDoTrackFitting = true
 
bool mSaveCriteriaValues = false
 
int mSeedSource = 1
 
FwdTrackerConfig mConfig
 
std::string mConfigFile
 
size_t mTotalHitsRemoved
 
std::vector< GenfitTrackResultmTrackResults
 
std::vector< Seed_tmTrackSeeds
 
std::vector< Seed_tmTrackSeedsThisIteration
 
EventStats mEventStats
 
TVector3 mEventVertex
 
FwdHit mEventVertexHit
 
genfit::GFRaveVertexFactory mGFRVertices
 
std::shared_ptr< FwdDataSourcemDataSource
 
TrackFittermTrackFitter = nullptr
 
std::vector
< KiTrack::ICriterion * > 
mTwoHitCrit
 
std::vector
< KiTrack::ICriterion * > 
mThreeHitCrit
 
TString mGeoCache
 

Detailed Description

Definition at line 249 of file FwdTracker.h.

Member Function Documentation

void ForwardTrackMaker::addFstHits ( GenfitTrackResult gtr,
size_t  disk 
)
inline

Adds compatible FST hits to a track.

Parameters
gtr: The GenfitTrackResult to add FST hits to
disk: The FST disk number

Definition at line 1419 of file FwdTracker.h.

void ForwardTrackMaker::addFttHits ( GenfitTrackResult gtr,
size_t  disk 
)
inline

Adds compatible FTT hits to tracks seeded with FST.

Parameters
gtr: The GenfitTrackResult to add FTT hits to
disk: The FTT disk number
Returns
Seed_t : The combined seed points

Definition at line 1348 of file FwdTracker.h.

void ForwardTrackMaker::cleanup ( )
inline

cleanup the event-wise data structures

Definition at line 523 of file FwdTracker.h.

void ForwardTrackMaker::clearCriteria ( std::vector< KiTrack::ICriterion * > &  crits)
inline

Clear the loaded criteria.

Parameters
crits: vector of ICriterion pointers to properly clear

Definition at line 349 of file FwdTracker.h.

void ForwardTrackMaker::doMcTrackFinding ( FwdDataSource::McTrackMap_t &  mcTrackMap,
int  seedSource 
)
inline

MC track finding builds track seeds from available hits using MC association.

Parameters
mcTrackMap: Mc tracks
useFttAsSource: Use FTT for seeds or (false) use Fst

Definition at line 983 of file FwdTracker.h.

void ForwardTrackMaker::doSeedFindingIteration ( size_t  iIteration,
FwdDataSource::HitMap_t &  hitmap 
)
inline

Main tracking procedure.

Parameters
iIteration: The track iteration
hitmap: the hitmap of available hits per plane

Definition at line 1229 of file FwdTracker.h.

vector<Seed_t> ForwardTrackMaker::doSeedFindingOnHitmapSubset ( size_t  iIteration,
FwdDataSource::HitMap_t &  hitmap 
)
inline

Does track finding steps on a subset of hits (phi slice)

doSeedFindingOnHitmapSubset

Parameters
iIteration,:tracking iteration (for determining params)
hitmap,:the hitmap to use, should already be subset of original
Returns
a list of track seeds

Definition at line 1079 of file FwdTracker.h.

void ForwardTrackMaker::doTrackFitting ( const std::vector< Seed_t > &  trackSeeds)
inline

Loop on track seeds and fit each one.

Track fitting proceeds in 3 possible iterations

  1. Fit seed points (without PV)
  2. Look for additional hits in the other tracking detector
  3. Refit the track with the additional hits
  4. Refit the track with the primary vertex
  5. look again and refit any additional hits
Parameters
trackSeeds: Track seeds

Definition at line 728 of file FwdTracker.h.

References GenfitTrackResult::setDCA().

Seed_t ForwardTrackMaker::findFstHitsNearProjectedState ( Seed_t available_hits,
genfit::MeasuredStateOnPlane &  msp,
double  dphi = 0.004 * 20.5,
double  dr = 2.75 * 2 
)
inline

Finds FST hits near projected state.

Parameters
available_hits: FST hits to consider
msp: measured state on plabe from existing track projection
dphi: search distance in phi
dr: search distance in r
Returns
Seed_t : compatible FST hits

Definition at line 1459 of file FwdTracker.h.

Seed_t ForwardTrackMaker::findFttHitsNearProjectedState ( Seed_t available_hits,
genfit::MeasuredStateOnPlane &  msp,
double  dx = 1.5,
double  dy = 1.5 
)
inline

Finds FTT hits near projected state.

Parameters
available_hits: FTT hits to consider
msp: measured state on plane from existing track fit projection
dx: search distance in x
dy: search distance in y
Returns
compatible FTT hits

Definition at line 1490 of file FwdTracker.h.

GenfitTrackResult ForwardTrackMaker::fitTrack ( Seed_t seed,
TVector3 *  momentumSeedState = nullptr 
)
inline

Perform a single fit from seed points.

Parameters
seed: seed points from either FTT or FST
includeVertex: include the primary vertex in the fit or not
Returns
GenfitTrackResult : result of the fit

Definition at line 675 of file FwdTracker.h.

std::vector<std::map < std::string , float > > ForwardTrackMaker::getCriteriaAllValues ( std::string  crit_name)
inline

Get the Criteria All Values object.

Parameters
crit_name: Criteria values to get
Returns
std::vector<std::map < std::string , float >> : map of values

Definition at line 394 of file FwdTracker.h.

std::vector<int> ForwardTrackMaker::getCriteriaTrackIds ( std::string  crit_name)
inline

Get the Criteria Track Ids object.

Parameters
crit_name: Name of criteria to get track ids for
Returns
std::vector<int> : list of track ids

Definition at line 423 of file FwdTracker.h.

std::vector<float> ForwardTrackMaker::getCriteriaValues ( std::string  crit_name)
inline

Get the Criteria Values object.

Parameters
crit_name: Criteria to get
Returns
std::vector<float> : list of values

Definition at line 365 of file FwdTracker.h.

virtual void ForwardTrackMaker::initialize ( TString  geoCache,
bool  genHistograms 
)
inlinevirtual

Initialize FwdTracker.

Parameters
geoCache: name of cached geometry file
genHistograms: generate histograms

Reimplemented in ForwardTracker.

Definition at line 295 of file FwdTracker.h.

Referenced by ForwardTracker::initialize().

std::vector<KiTrack::ICriterion *> ForwardTrackMaker::loadCriteria ( string  path)
inline

Loads Criteria from XML configuration. Utility function for loading criteria from XML config.

Parameters
path: path in config to load
Returns
vector of ICriterion pointers

Definition at line 309 of file FwdTracker.h.

void ForwardTrackMaker::mergeHitmaps ( FwdDataSource::HitMap_t &  hitmap1,
FwdDataSource::HitMap_t &  hitmap2 
)
inline

merges the FST and FTT hitmaps into a single hitmap The FTT hits are shifted by the number of FST sectors

Parameters
hitmap1,:FST hitmap
hitmap2,:FTT hitmap
Returns
void

Definition at line 510 of file FwdTracker.h.

size_t ForwardTrackMaker::nHitsInHitMap ( FwdDataSource::HitMap_t &  hitmap)
inline

Determine the total num of hits in the hitmap.

Parameters
hitmap: hitmap to consider
Returns
size_t : total num of hits

Definition at line 472 of file FwdTracker.h.

void ForwardTrackMaker::removeHits ( FwdDataSource::HitMap_t &  hitmap,
std::vector< Seed_t > &  tracks 
)
inline

Remove used hits from the hit map.

Parameters
hitmap: hitmap with hits used this round
tracks: tracks formed from hits

Definition at line 486 of file FwdTracker.h.

void ForwardTrackMaker::setConfigFile ( std::string  cf)
inline

Set the Config File object.

Parameters
cf: config filename

Definition at line 271 of file FwdTracker.h.

void ForwardTrackMaker::setSaveCriteriaValues ( bool  save)
inline

Set the Save Criteria Values object.

Parameters
save: true to save crit values

Definition at line 280 of file FwdTracker.h.

size_t ForwardTrackMaker::sliceHitMapInPhi ( FwdDataSource::HitMap_t &  inputMap,
FwdDataSource::HitMap_t &  outputMap,
float  phi_min,
float  phi_max 
)
inline

Slices a hitmap into a phi section.

sliceHitMapInPhi

Parameters
inputMapINPUT hitmap to process
outputMapOUTPUT hitmap, will be cleared and filled with only the hits from inputMap that are within phi region
phi_minThe minimum phi to accept
phi_maxThe maximum Phi to accept
Returns
The number of hits in the outputMap

Definition at line 1056 of file FwdTracker.h.


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