BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkRecoTrk Class Reference

#include <TrkRecoTrk.h>

Public Types

typedef std::unary_function< TrkRecoTrk, boolpredicate_type
 

Public Member Functions

const TrkIdid () const
 
PdtPid::PidType defaultType () const
 
PdtPid::PidType whichFit (PdtPid::PidType hypo) const
 
int fitNumber (PdtPid::PidType hypo) const
 
double trackT0 () const
 
const BFieldbField () const
 
TrkErrCode addFit (PdtPid::PidType hypo, bool fit=true)
 
void resetT0 (double time)
 
const TrkFitfitResult () const
 
const TrkFitfitResult (PdtPid::PidType hypo) const
 
TrkHitListhits ()
 
const TrkHitListhits () const
 
TrkHitListhits (PdtPid::PidType hypo)
 
const TrkHitListhits (PdtPid::PidType hypo) const
 
TrkHotListhots ()
 
const TrkHotListhots () const
 
TrkHotListhots (PdtPid::PidType hypo)
 
const TrkHotListhots (PdtPid::PidType hypo) const
 
const TrkFitStatusstatus () const
 
const TrkFitStatusstatus (PdtPid::PidType hypo) const
 
TrkFitStatusstatus ()
 
TrkFitStatusstatus (PdtPid::PidType hypo)
 
bool attach (TrkExtInterface &, PdtPid::PidType hypo)
 
bool attach (TrkExtInterface &, PdtPid::PidType hypo) const
 
 TrkRecoTrk (const TrkRecoTrk &right)
 
virtual ~TrkRecoTrk ()
 
const TrkRecoTrkoperator= (const TrkRecoTrk &right)
 
bool operator== (const TrkRecoTrk &other) const
 
bool operator< (const TrkRecoTrk &other) const
 
virtual void print (std::ostream &) const
 
virtual void printAll (std::ostream &) const
 
void markForStore (PdtPid::PidType hypo, double fltlen, const char *listname="Default")
 
const std::set< TrkStoreHypo > & storageRequests (const char *listname="Default") const
 
void clearStorageRequests (const char *listname="Default")
 
void storageLists (std::set< std::string > &storage) const
 
const TrkReptestRep (PdtPid::PidType hypo) const
 

Protected Member Functions

TrkRepgetRep (PdtPid::PidType hypo)
 
const TrkRepgetRep (PdtPid::PidType hypo) const
 
void copyReps (const TrkRecoTrk &rhs)
 
void setRep (TrkRep *)
 
void repointHypo (PdtPid::PidType hypo, PdtPid::PidType fit)
 
void changeDefault (PdtPid::PidType newHypo)
 
std::pair< TrkRepIter, TrkRepIteruniqueReps () const
 
std::pair< TrkRepIter, TrkRepIterallReps () const
 
void setFitNumber (PdtPid::PidType hypo, int newNumber)
 
void updateReps ()
 
void addHypoTo (TrkRep *newRep, PdtPid::PidType hypo)
 
void setIdManager (TrkIdManager *idMan)
 
void setBField (const BField *field)
 
 TrkRecoTrk (PdtPid::PidType defaultPart, const TrkContext &, double t0)
 
 TrkRecoTrk (PdtPid::PidType defaultPart, long idnum, double t0)
 

Friends

class TrkFitMaker
 
class TrkHitOnTrk
 
class TrkHitList
 
class KalMiniTrkK
 
class TrkKalMiniCompositeK
 

Detailed Description

Definition at line 71 of file TrkRecoTrk.h.

Member Typedef Documentation

◆ predicate_type

typedef std::unary_function<TrkRecoTrk,bool> TrkRecoTrk::predicate_type

Definition at line 73 of file TrkRecoTrk.h.

Constructor & Destructor Documentation

◆ TrkRecoTrk() [1/3]

TrkRecoTrk::TrkRecoTrk ( const TrkRecoTrk right)

Definition at line 97 of file TrkRecoTrk.cxx.

97 :
98 _impl(new TrkRecoTrkImpl),
99 _id(rhs._id.idManager()),
100 _fitNumber(PdtPid::nPidType,(int)0),
101 _storage(rhs._storage),
102 _trackT0( rhs._trackT0),
103 _bField(rhs._bField)
104{
105 _defaultType = rhs.defaultType();
106 unsigned i=0;
107 for (TrkRecoTrkImpl::hitListIter iface = _impl->_hitInterfaces.begin();
108 iface!= _impl->_hitInterfaces.end(); ++iface) {
109 iface->reset( new TrkHitList(this, (PdtPid::PidType)i++) ); //cast
110 }
111 copyReps(rhs);
112}
PidType
Definition: PdtPid.h:11
@ nPidType
Definition: PdtPid.h:8
friend class TrkHitList
Definition: TrkRecoTrk.h:222
void copyReps(const TrkRecoTrk &rhs)
Definition: TrkRecoTrk.cxx:314

◆ ~TrkRecoTrk()

TrkRecoTrk::~TrkRecoTrk ( )
virtual

Definition at line 114 of file TrkRecoTrk.cxx.

115{
116 delete _impl;
117}

◆ TrkRecoTrk() [2/3]

TrkRecoTrk::TrkRecoTrk ( PdtPid::PidType  defaultPart,
const TrkContext ctext,
double  t0 
)
protected

Definition at line 62 of file TrkRecoTrk.cxx.

63 :
64 _impl(new TrkRecoTrkImpl),
65 _id(ctext.getId()),
66 _fitNumber(PdtPid::nPidType,(int)0),
67 _defaultType(defaultPart),
68 _trackT0(t0),
69 _bField( ctext.bField() )
70{
71 // No TrkRep is defined here; must be created in appropriate FitMaker.
72 unsigned i=0;
73 for (TrkRecoTrkImpl::hitListIter iface = _impl->_hitInterfaces.begin();
74 iface!= _impl->_hitInterfaces.end(); ++iface) {
75 iface->reset( new TrkHitList(this, (PdtPid::PidType)i++) ); //cast
76 }
77}
const BField * bField() const
Definition: TrkContext.h:35
virtual TrkId getId() const =0

◆ TrkRecoTrk() [3/3]

TrkRecoTrk::TrkRecoTrk ( PdtPid::PidType  defaultPart,
long  idnum,
double  t0 
)
protected

Definition at line 80 of file TrkRecoTrk.cxx.

80 :
81 _impl(new TrkRecoTrkImpl),
82 _id(idnum,0),
83 _fitNumber(PdtPid::nPidType,(int)0),
84 _defaultType(defaultPart),
85 _trackT0(t0),
86 _bField(0)
87{
88 // No TrkRep is defined here; must be created in appropriate FitMaker.
89 unsigned i=0;
90 for (TrkRecoTrkImpl::hitListIter iface = _impl->_hitInterfaces.begin();
91 iface!= _impl->_hitInterfaces.end(); ++iface) {
92 iface->reset( new TrkHitList(this, (PdtPid::PidType)i++) ); //cast
93 }
94}

Member Function Documentation

◆ addFit()

TrkErrCode TrkRecoTrk::addFit ( PdtPid::PidType  hypo,
bool  fit = true 
)

Definition at line 220 of file TrkRecoTrk.cxx.

221{
222 // If there is no fit, create one. If hypo points to a fit for a different
223 // particle type, create a fit of type hypo, and point at that. Carry
224 // out the fit if needed.
225 if (hits() == 0) {
226 // Unfittable rep
227 return TrkErrCode(TrkErrCode::fail, 11,
228 "TrkRecoTrk::addFit(): cannot add a fit to this track.");
229 }
230 if (whichFit(hypo) == hypo) {
232 "TrkRecoTrk::addFit(): requested fit already exists.");
233 }
234 _impl->_reps[hypo].reset( _impl->_reps[defaultType()]->cloneNewHypo(hypo) );
236 if (fit && !_impl->_reps[hypo]->fitCurrent()) {
237 fitErr = _impl->_reps[hypo]->fit();
238 }
239 ++_fitNumber[hypo];
240 return fitErr;
241}
TrkHitList * hits()
Definition: TrkRecoTrk.h:107
PdtPid::PidType whichFit(PdtPid::PidType hypo) const
Definition: TrkRecoTrk.cxx:146
PdtPid::PidType defaultType() const
Definition: TrkRecoTrk.h:78

◆ addHypoTo()

void TrkRecoTrk::addHypoTo ( TrkRep newRep,
PdtPid::PidType  hypo 
)
protected

Definition at line 430 of file TrkRecoTrk.cxx.

431{
432 _impl->_reps[hypo].reset( newRep );
433}

Referenced by TrkFitMaker::addHypoTo().

◆ allReps()

std::pair< TrkRepIter, TrkRepIter > TrkRecoTrk::allReps ( ) const
protected

Definition at line 511 of file TrkRecoTrk.cxx.

512{
513 typedef std::vector<TrkRep*> RPL;
514 boost::shared_ptr<RPL> x( new RPL );
515 //std::cout << " TrkRecoTrk::allReps" << std::endl;//yzhang debug
516
517 for (TrkRecoTrkImpl::repConstIter i=_impl->_reps.begin();i!=_impl->_reps.end();++i) {
518 x->push_back(i->get());
519 /*
520 i->get()->printType(std::cout);//yzhang debug
521 i->get()->printAll(std::cout);//yzhang debug
522 */
523 }
524 //std::cout << "------ " << std::endl;//yzhang debug
525 return std::make_pair(TrkRepIter(x,0),TrkRepIter(x,x->size()));
526}
Double_t x[10]

◆ attach() [1/2]

bool TrkRecoTrk::attach ( TrkExtInterface interface,
PdtPid::PidType  hypo 
)

Definition at line 366 of file TrkRecoTrk.cxx.

367{
368 TrkRep* rp = getRep(hypo);
369 return rp!=0?interface.attach(rp):0;
370}
virtual bool attach(TrkRep *)
TrkRep * getRep(PdtPid::PidType hypo)
Definition: TrkRecoTrk.cxx:277
Definition: TrkRep.h:43

◆ attach() [2/2]

bool TrkRecoTrk::attach ( TrkExtInterface interface,
PdtPid::PidType  hypo 
) const

Definition at line 358 of file TrkRecoTrk.cxx.

359{
360 const TrkRep* rp = getRep(hypo);
361 return rp!=0?interface.attach(rp):0;
362}

◆ bField()

◆ changeDefault()

void TrkRecoTrk::changeDefault ( PdtPid::PidType  newHypo)
protected

Definition at line 296 of file TrkRecoTrk.cxx.

297{
298 if (newHypo == defaultType()) return;
299 assert(whichFit(newHypo) != PdtPid::null);
300
301 TrkHotList *oldList = getRep(defaultType())->hotList();
302 std::for_each(oldList->begin(),
303 oldList->end(),
304 std::mem_fun_ref(&TrkHitOnTrk::setUnusedHit));
305 assert(getRep(newHypo) != 0);
306 TrkHotList *newList= getRep(newHypo)->hotList();
307 std::for_each(newList->begin(),
308 newList->end(),
309 std::mem_fun_ref(&TrkHitOnTrk::setUsedHit));
310 _defaultType = newHypo;
311}
@ null
Definition: PdtPid.h:12
void setUnusedHit()
void setUsedHit()
hot_iterator end() const
Definition: TrkHotList.h:45
hot_iterator begin() const
Definition: TrkHotList.h:44
virtual TrkHotList * hotList()
Definition: TrkRep.h:109

◆ clearStorageRequests()

void TrkRecoTrk::clearStorageRequests ( const char *  listname = "Default")

Definition at line 480 of file TrkRecoTrk.cxx.

480 {
481 _storage[std::string(listname)].clear();
482}

◆ copyReps()

void TrkRecoTrk::copyReps ( const TrkRecoTrk rhs)
protected

Definition at line 314 of file TrkRecoTrk.cxx.

315{
316 TrkRecoTrkImpl::repIter lhs = _impl->_reps.begin();
317 for (TrkRecoTrkImpl::repIter i=rhs._impl->_reps.begin();i!=rhs._impl->_reps.end();++i,++lhs) {
318 TrkRecoTrkImpl::repIter j=std::find(rhs._impl->_reps.begin(),i,*i);
319 if (j==i) { // first time this one is seen
320 lhs->reset( (*i)->clone(this) );
321 (*lhs)->setValid((*i)->fitValid());
322 (*lhs)->setCurrent((*i)->fitCurrent());
323 } else {
324 *lhs = *(_impl->_reps.begin()+(j-rhs._impl->_reps.begin()));
325 }
326 }
327 assert(_fitNumber.size()==rhs._fitNumber.size());
328 std::copy(rhs._fitNumber.begin(),rhs._fitNumber.end(),_fitNumber.begin());
329}

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

◆ defaultType()

◆ fitNumber()

int TrkRecoTrk::fitNumber ( PdtPid::PidType  hypo) const

Definition at line 157 of file TrkRecoTrk.cxx.

158{
159 PdtPid::PidType used = whichFit(hypo);
160 if (used == PdtPid::null) return -1;
161 int index = used;
162 return _fitNumber[index];
163}

Referenced by print(), and printAll().

◆ fitResult() [1/2]

◆ fitResult() [2/2]

const TrkFit * TrkRecoTrk::fitResult ( PdtPid::PidType  hypo) const

Definition at line 393 of file TrkRecoTrk.cxx.

394{
395 const TrkRep* rp = getRep(hypo);
396 return rp==0?0:(rp->fitValid()?rp:0);
397}
bool fitValid() const
Definition: TrkFitStatus.h:34

◆ getRep() [1/2]

TrkRep * TrkRecoTrk::getRep ( PdtPid::PidType  hypo)
protected

Definition at line 277 of file TrkRecoTrk.cxx.

278{
279 assert(hypo>=PdtPid::electron && hypo<= PdtPid::proton);
280 TrkRep* theRep = _impl->_reps[hypo].get();
281// insist the default rep exist
282 if(hypo == defaultType())assert(0 != theRep);
283 return theRep;
284}
@ proton
Definition: PdtPid.h:17
@ electron
Definition: PdtPid.h:13

Referenced by attach(), changeDefault(), fitResult(), hits(), hots(), markForStore(), printAll(), repointHypo(), status(), and testRep().

◆ getRep() [2/2]

const TrkRep * TrkRecoTrk::getRep ( PdtPid::PidType  hypo) const
protected

Definition at line 287 of file TrkRecoTrk.cxx.

288{
289 assert(hypo>=PdtPid::electron && hypo<= PdtPid::proton);
290 const TrkRep* theRep = _impl->_reps[hypo].get();
291 if(hypo == defaultType())assert(0 != theRep);
292 return theRep;
293}

◆ hits() [1/4]

◆ hits() [2/4]

const TrkHitList * TrkRecoTrk::hits ( ) const
inline

Definition at line 108 of file TrkRecoTrk.h.

108{return hits(defaultType());}

Referenced by hits().

◆ hits() [3/4]

TrkHitList * TrkRecoTrk::hits ( PdtPid::PidType  hypo)

Definition at line 373 of file TrkRecoTrk.cxx.

374{
375 const TrkRep* rp = getRep(hypo);
376 return rp==0?0:_impl->_hitInterfaces[hypo].get();
377}

◆ hits() [4/4]

const TrkHitList * TrkRecoTrk::hits ( PdtPid::PidType  hypo) const

Definition at line 380 of file TrkRecoTrk.cxx.

381{
382 const TrkRep* rp = getRep(hypo);
383 return rp==0?0:_impl->_hitInterfaces[hypo].get();
384}

◆ hots() [1/4]

TrkHotList * TrkRecoTrk::hots ( )
inline

Definition at line 113 of file TrkRecoTrk.h.

113{return hots(defaultType());}
TrkHotList * hots()
Definition: TrkRecoTrk.h:113

Referenced by MdcTrackList::finishCircle(), and hots().

◆ hots() [2/4]

const TrkHotList * TrkRecoTrk::hots ( ) const
inline

Definition at line 114 of file TrkRecoTrk.h.

114{return hots(defaultType());}

Referenced by hots().

◆ hots() [3/4]

TrkHotList * TrkRecoTrk::hots ( PdtPid::PidType  hypo)

Definition at line 497 of file TrkRecoTrk.cxx.

498{
499 TrkRep* rp = getRep(hypo);
500 return rp==0?0:rp->hotList();
501}

◆ hots() [4/4]

const TrkHotList * TrkRecoTrk::hots ( PdtPid::PidType  hypo) const

Definition at line 504 of file TrkRecoTrk.cxx.

505{
506 const TrkRep* rp = getRep(hypo);
507 return rp==0?0:rp->hotList();
508}

◆ id()

const TrkId & TrkRecoTrk::id ( ) const

Definition at line 134 of file TrkRecoTrk.cxx.

135{
136 return _id;
137}

Referenced by MdcTrackListBase::arbitrateHits(), print(), TrkCircleRep::print(), TrkHelixRep::print(), and printAll().

◆ markForStore()

void TrkRecoTrk::markForStore ( PdtPid::PidType  hypo,
double  fltlen,
const char *  listname = "Default" 
)

Definition at line 455 of file TrkRecoTrk.cxx.

456 {
457// first, translate to the real hypo
458 PdtPid::PidType realhypo = whichFit(hypo);
459// Then, make sure this hypo has a valid fit
460 if(getRep(realhypo)!= 0 && getRep(realhypo)->fitValid())
461// add an entry in the toStore list (if it's unique)
462 _storage[std::string(listname)].insert(TrkStoreHypo(realhypo,fltlen));
463 else
464// It's an error to try to store invalid fits
465 std::cout<<"ErrMsg(error) "<< "Invalid fits cannot be marked for storage" << std::endl;
466}

◆ operator<()

bool TrkRecoTrk::operator< ( const TrkRecoTrk other) const

Definition at line 266 of file TrkRecoTrk.cxx.

268{
269 return _id < other._id;
270}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ operator=()

const TrkRecoTrk & TrkRecoTrk::operator= ( const TrkRecoTrk right)

Definition at line 120 of file TrkRecoTrk.cxx.

121{
122 if (&right == this) return *this;
123 _trackT0 = right._trackT0;
124 _defaultType = right.defaultType();
125 copyReps(right);
126 _bField = right._bField;
127// AbsEvtObj::operator=(right);
128 _id.setNewValue(right._id);
129 _storage = right._storage;
130 return *this;
131}
void setNewValue(const TrkId &)
Definition: TrkId.cxx:77

◆ operator==()

bool TrkRecoTrk::operator== ( const TrkRecoTrk other) const

Definition at line 261 of file TrkRecoTrk.cxx.

262{
263 return _id == other._id;
264}

◆ print()

void TrkRecoTrk::print ( std::ostream &  ) const
virtual

Definition at line 166 of file TrkRecoTrk.cxx.

167{
168 ostr << "Trk: " << id() << " def: "
170 << " fitNumber:" << fitNumber(defaultType());
171 const TrkFit* daFit = fitResult();
172 const TrkHitList* daList = hits();
173 const TrkFitStatus* daStatus = status();
174 if (daList != 0) {
175 ostr << " nhit: " << daList->nHit();
176 }
177 if (daFit != 0) {
178 ostr << " nactive: " << daFit->nActive() << " chisq: " << daFit->chisq();
179 }
180 if (daStatus != 0) {
181 ostr << " 3-d: " << (daStatus->is2d() == 0);
182 }
183 ostr << " t0: " << _trackT0 << "\n";
184 if (daFit != 0) {
185 TrkExchangePar par = daFit->helix(0.);
186 ostr << "phi0: " << par.phi0()
187 << " om: "<< par.omega()
188 << " d0: " << par.d0() << " z0: " << par.z0()
189 << " ct: " << par.tanDip();
190 }
191 ostr << std::endl;
192}
const char * name() const
Definition: PdtEntry.h:53
static PdtEntry * lookup(const std::string &name)
Definition: Pdt.cxx:207
virtual double chisq() const =0
double phi0() const
double omega() const
double z0() const
double d0() const
double tanDip() const
bool is2d() const
Definition: TrkFitStatus.h:32
Definition: TrkFit.h:23
virtual int nActive() const =0
virtual TrkExchangePar helix(double fltL) const =0
unsigned nHit() const
Definition: TrkHitList.h:44
int fitNumber(PdtPid::PidType hypo) const
Definition: TrkRecoTrk.cxx:157
const TrkId & id() const
Definition: TrkRecoTrk.cxx:134
const TrkFitStatus * status() const
Definition: TrkRecoTrk.cxx:400

Referenced by MdcxCosmicSewer::execute(), MdcTrackList::finishCircle(), and operator<<().

◆ printAll()

void TrkRecoTrk::printAll ( std::ostream &  ) const
virtual

Definition at line 195 of file TrkRecoTrk.cxx.

196{
197 // This should be expanded to print other hypotheses as well
198 ostr << "Trk: " << id() << " def: "
200 << " fitNumber:" << fitNumber(defaultType());
201 const TrkFit* daFit = fitResult();
202 const TrkHitList* daList = hits();
203 const TrkFitStatus* daStatus = status();
204 if (daList != 0) {
205 ostr << " nhit: " << daList->nHit();
206 }
207 if (daFit != 0) {
208 ostr << " nactive: " << daFit->nActive() << " chisq: " << daFit->chisq();
209 }
210 if (daStatus != 0) {
211 ostr << " 3-d: " << (daStatus->is2d() == 0);
212 }
213 ostr << " t0: " << _trackT0 << "\n";
214 getRep(defaultType())->printAll(ostr);
215 // allReps();//yzhang debug
216 ostr << std::endl;
217}
virtual void printAll(std::ostream &ostr) const =0

Referenced by MdcTrackListCsmc::createFromSegs(), MdcTrackList::dumpAxCombine(), MdcTrackList::dumpAxFill(), MdcTrackList::dumpCircle(), MdcTrackList::dumpHelix(), MdcTrackList::dumpStCombine(), MdcTrackList::finishCircle(), and MdcTrackListBase::plot().

◆ repointHypo()

void TrkRecoTrk::repointHypo ( PdtPid::PidType  hypo,
PdtPid::PidType  fit 
)
protected

Definition at line 343 of file TrkRecoTrk.cxx.

344{
345 // Do we have to do anything?
346 if (fit == hypo || getRep(fit) == getRep(hypo)) return;
347
348 if (hypo == defaultType()) {
349 std::cout << "ErrMsg(error) "<<
350 "TrkRecoTrk: can't make default hypothesis point at different fit"
351 << std::endl;
352 return;
353 }
354 _impl->_reps[hypo] = _impl->_reps[fit];
355}

◆ resetT0()

void TrkRecoTrk::resetT0 ( double  time)

Definition at line 244 of file TrkRecoTrk.cxx.

245{
246 _trackT0 = t;
247 updateReps();
248}
void updateReps()
Definition: TrkRecoTrk.cxx:251
int t()
Definition: t.c:1

◆ setBField()

void TrkRecoTrk::setBField ( const BField field)
protected

Definition at line 449 of file TrkRecoTrk.cxx.

450{
451 _bField = field;
452}

Referenced by TrkFitMaker::setBField().

◆ setFitNumber()

void TrkRecoTrk::setFitNumber ( PdtPid::PidType  hypo,
int  newNumber 
)
protected

Definition at line 424 of file TrkRecoTrk.cxx.

425{
426 _fitNumber[hypo] = newNumber;
427}

◆ setIdManager()

void TrkRecoTrk::setIdManager ( TrkIdManager idMan)
protected

Definition at line 436 of file TrkRecoTrk.cxx.

437{
438 _id.setIdManager(idMan);
439}
void setIdManager(TrkIdManager *idMan)
Definition: TrkId.cxx:93

Referenced by TrkFitMaker::setIdManager().

◆ setRep()

void TrkRecoTrk::setRep ( TrkRep r)
protected

Definition at line 332 of file TrkRecoTrk.cxx.

333{
334 // Sets the default rep to be r, clears out other reps., and sets
335 // non-default rep ptrs to point at default. Increments all fit numbers.
336 std::fill(_impl->_reps.begin(),_impl->_reps.end(),boost::shared_ptr<TrkRep>(r));
337 std::transform(_fitNumber.begin(),_fitNumber.end(),
338 _fitNumber.begin(),
339 std::bind2nd(std::plus<int>(),1));
340}

Referenced by TrkFitMaker::setRep().

◆ status() [1/4]

TrkFitStatus * TrkRecoTrk::status ( )

Definition at line 412 of file TrkRecoTrk.cxx.

413{
414 return status(defaultType());
415}

◆ status() [2/4]

const TrkFitStatus * TrkRecoTrk::status ( ) const

◆ status() [3/4]

TrkFitStatus * TrkRecoTrk::status ( PdtPid::PidType  hypo)

Definition at line 418 of file TrkRecoTrk.cxx.

419{
420 return getRep(hypo);
421}

◆ status() [4/4]

const TrkFitStatus * TrkRecoTrk::status ( PdtPid::PidType  hypo) const

Definition at line 406 of file TrkRecoTrk.cxx.

407{
408 return getRep(hypo);
409}

◆ storageLists()

void TrkRecoTrk::storageLists ( std::set< std::string > &  storage) const

Definition at line 485 of file TrkRecoTrk.cxx.

485 {
486 // clear the output set
487 storage.clear();
488 // iterate over all the storage requests
489 std::map<std::string,std::set<TrkStoreHypo> >::const_iterator miter = _storage.begin();
490 while(miter != _storage.end()){
491 storage.insert(miter->first);
492 miter++;
493 }
494}

◆ storageRequests()

const std::set< TrkStoreHypo > & TrkRecoTrk::storageRequests ( const char *  listname = "Default") const

Definition at line 469 of file TrkRecoTrk.cxx.

469 {
470 static std::set<TrkStoreHypo> empty; // empty set to return if list doesn't exist
471 std::map<std::string,std::set<TrkStoreHypo> >::const_iterator foundit =
472 _storage.find(std::string(listname));
473 if(foundit != _storage.end())
474 return foundit->second;
475 else
476 return empty;
477}

◆ testRep()

const TrkRep * TrkRecoTrk::testRep ( PdtPid::PidType  hypo) const
inline

Definition at line 219 of file TrkRecoTrk.h.

219{ return getRep(hypo);}

Referenced by TrkTypeUtil::getRep().

◆ trackT0()

double TrkRecoTrk::trackT0 ( ) const

Definition at line 140 of file TrkRecoTrk.cxx.

141{
142 return _trackT0;
143}

Referenced by MdcTrackList::pickHits(), MdcHitOnTrack::timeAbsolute(), TrkRep::trackT0(), and TrkOutAvgTimeCalculator::trackTime().

◆ uniqueReps()

std::pair< TrkRepIter, TrkRepIter > TrkRecoTrk::uniqueReps ( ) const
protected

Definition at line 529 of file TrkRecoTrk.cxx.

530{
531 typedef std::vector<TrkRep*> RPL;
532 boost::shared_ptr<RPL> x( new RPL );
533 for (TrkRecoTrkImpl::repConstIter i=_impl->_reps.begin();i!=_impl->_reps.end();++i) {
534 if (std::find(x->begin(),x->end(),i->get())==x->end()) x->push_back(i->get());
535
536 }
537 return std::make_pair(TrkRepIter(x,0),TrkRepIter(x,x->size()));
538}

Referenced by TrkHitList::appendHit(), TrkHitList::appendHot(), TrkHitList::removeHit(), and updateReps().

◆ updateReps()

void TrkRecoTrk::updateReps ( )
protected

Definition at line 251 of file TrkRecoTrk.cxx.

252{
253 std::pair<TrkRepIter,TrkRepIter> x = uniqueReps();
254 std::for_each(x.first,x.second,std::mem_fun_ref(&TrkRep::updateHots));
255 std::transform(_fitNumber.begin(),_fitNumber.end(),
256 _fitNumber.begin(),
257 std::bind2nd(std::plus<int>(),1));
258}
std::pair< TrkRepIter, TrkRepIter > uniqueReps() const
Definition: TrkRecoTrk.cxx:529
virtual void updateHots()
Definition: TrkRep.cxx:323

Referenced by resetT0().

◆ whichFit()

PdtPid::PidType TrkRecoTrk::whichFit ( PdtPid::PidType  hypo) const

Definition at line 146 of file TrkRecoTrk.cxx.

147{
148 if (_impl->_reps[hypo].get() == 0) {
149 return hypo;
150 }
151// return _repPtr[hypo]->fitValid() ? _repPtr[hypo]->particleType()
152// : PdtPid::null;
153 return _impl->_reps[hypo]->particleType();
154}

Referenced by addFit(), changeDefault(), fitNumber(), and markForStore().

Friends And Related Function Documentation

◆ KalMiniTrkK

friend class KalMiniTrkK
friend

Definition at line 223 of file TrkRecoTrk.h.

◆ TrkFitMaker

friend class TrkFitMaker
friend

Definition at line 220 of file TrkRecoTrk.h.

◆ TrkHitList

friend class TrkHitList
friend

Definition at line 222 of file TrkRecoTrk.h.

Referenced by TrkRecoTrk().

◆ TrkHitOnTrk

friend class TrkHitOnTrk
friend

Definition at line 221 of file TrkRecoTrk.h.

◆ TrkKalMiniCompositeK

friend class TrkKalMiniCompositeK
friend

Definition at line 224 of file TrkRecoTrk.h.


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