CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkFitMaker.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkFitMaker.h,v 1.2 2007/11/13 07:27:23 codeman Exp $
4//
5// Description: Abstract base class for FitMaker classes. FitMakers have
6// two functions, and only FitMakers are supposed to perform these
7// functions: 1) creating tracks and 2) changing the TrkRep + Fitter
8// combination for a track.
9// Derived classes may have data members -- e.g. cut values
10// to be set in created fitters.
11// Derived classes usually implement something like these functions:
12// TrkRecoTrk* makeTrack(const TrkExchangePar& helix, const
13// HepAList<TrkHitOnTrk>* hotList, double chi2=-999.);
14// virtual void changeFit(TrkRecoTrk& theTrack) const = 0;
15//
16// But I've found too many exceptions to make these virtual functions.
17// So what this class really does is give friendship access to TrkRecoTrks,
18// and permits derived classes to muck about to their hearts' content.
19//
20// Environment:
21// Software developed for the BaBar Detector at the SLAC B-Factory.
22//
23// Authors: Steve Schaffner
24//
25//------------------------------------------------------------------------
26#ifndef TRKFITMAKER_HH
27#define TRKFITMAKER_HH
28#include "MdcRecoUtil/PdtPid.h"
29#include "TrkBase/TrkRep.h"
30#include <utility>
31
32class TrkHitOnTrk;
33class TrkRep;
34class TrkRecoTrk;
35class TrkExchangePar;
36class TrkContext;
37class TrkIdManager;
38class BField;
39class TrkRepIter;
40class KalMiniTrkK;
41
42// Class interface //
44
45public:
46 virtual ~TrkFitMaker();
47
49
50protected:
51
52 // The following functions provide friendship access to TrkRecoTrk
53 // (including to ctor).
54 // gets current TrkReps from track:
55 std::pair<TrkRepIter,TrkRepIter> uniqueReps(const TrkRecoTrk& t) const; // was currentReps
56 void setRep(TrkRecoTrk&, TrkRep*) const;
58 void setFitNumber(TrkRecoTrk&, PdtPid::PidType, int) const;
59 std::pair<TrkRepIter,TrkRepIter> allReps(const TrkRecoTrk& t) const; // was repPtrs
61 void addHypoTo(TrkRecoTrk&, TrkRep*, PdtPid::PidType hypo) const;
62 TrkRecoTrk* createTrack(PdtPid::PidType, const TrkContext&, double t0) const;
63 TrkRecoTrk* createTrack(PdtPid::PidType, long idnum, double t0) const;
64// the following functions try to cover the fact that the
65// persistence model is completely incompatible with the tracking design.
66// They allow direct manipulation of what should be private or constructor-supplied
67// arguments.
69 void setBField(TrkRecoTrk&, const BField*) const;
70// allow persistence to call these functions
71 friend class KalMiniTrkK;
72 friend class KalMiniRX;
73 friend class KalFit;
74};
75
76#endif
PidType
Definition PdtPid.h:11
void setIdManager(TrkRecoTrk &, TrkIdManager *) const
std::pair< TrkRepIter, TrkRepIter > allReps(const TrkRecoTrk &t) const
virtual ~TrkFitMaker()
void addHypoTo(TrkRecoTrk &, TrkRep *, PdtPid::PidType hypo) const
std::pair< TrkRepIter, TrkRepIter > uniqueReps(const TrkRecoTrk &t) const
TrkRep * getRep(TrkRecoTrk &, PdtPid::PidType) const
void repointHypo(TrkRecoTrk &, PdtPid::PidType hypo, PdtPid::PidType fit) const
void setRep(TrkRecoTrk &, TrkRep *) const
void setBField(TrkRecoTrk &, const BField *) const
TrkRecoTrk * createTrack(PdtPid::PidType, const TrkContext &, double t0) const
void changeDefault(TrkRecoTrk &, PdtPid::PidType) const
void setFitNumber(TrkRecoTrk &, PdtPid::PidType, int) const
friend class KalFit
Definition TrkFitMaker.h:73
friend class KalMiniRX
Definition TrkFitMaker.h:72
friend class KalMiniTrkK
Definition TrkFitMaker.h:71
int t()
Definition t.c:1