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

#include <TrkRecoTrk.h>

Public Types

typedef std::unary_function< TrkRecoTrk, boolpredicate_type
 
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
 
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)
 
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

Member Typedef Documentation

◆ predicate_type [1/2]

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

◆ predicate_type [2/2]

Constructor & Destructor Documentation

◆ TrkRecoTrk() [1/6]

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}
void copyReps(const TrkRecoTrk &rhs)
Definition: TrkRecoTrk.cxx:314

◆ ~TrkRecoTrk() [1/2]

TrkRecoTrk::~TrkRecoTrk ( )
virtual

Definition at line 114 of file TrkRecoTrk.cxx.

115{
116 delete _impl;
117}

◆ TrkRecoTrk() [2/6]

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}
virtual TrkId getId() const =0

◆ TrkRecoTrk() [3/6]

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}

◆ TrkRecoTrk() [4/6]

TrkRecoTrk::TrkRecoTrk ( const TrkRecoTrk right)

◆ ~TrkRecoTrk() [2/2]

virtual TrkRecoTrk::~TrkRecoTrk ( )
virtual

◆ TrkRecoTrk() [5/6]

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

◆ TrkRecoTrk() [6/6]

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

Member Function Documentation

◆ addFit() [1/2]

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}
PdtPid::PidType whichFit(PdtPid::PidType hypo) const
Definition: TrkRecoTrk.cxx:146

◆ addFit() [2/2]

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

◆ addHypoTo() [1/2]

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().

◆ addHypoTo() [2/2]

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

◆ allReps() [1/2]

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]

◆ allReps() [2/2]

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

◆ attach() [1/4]

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

◆ attach() [2/4]

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

◆ attach() [3/4]

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}

◆ attach() [4/4]

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

◆ bField() [1/2]

◆ bField() [2/2]

const BField & TrkRecoTrk::bField ( ) const
inline

Definition at line 82 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

82{return *_bField;}

◆ changeDefault() [1/2]

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}
void setUnusedHit()
void setUsedHit()
virtual TrkHotList * hotList()

◆ changeDefault() [2/2]

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

◆ clearStorageRequests() [1/2]

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

Definition at line 480 of file TrkRecoTrk.cxx.

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

◆ clearStorageRequests() [2/2]

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

◆ copyReps() [1/2]

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().

◆ copyReps() [2/2]

void TrkRecoTrk::copyReps ( const TrkRecoTrk rhs)
protected

◆ defaultType() [1/2]

◆ defaultType() [2/2]

PdtPid::PidType TrkRecoTrk::defaultType ( ) const
inline

Definition at line 78 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

78{return _defaultType;}

◆ fitNumber() [1/2]

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}

◆ fitNumber() [2/2]

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

◆ fitResult() [1/4]

◆ fitResult() [2/4]

const TrkFit * TrkRecoTrk::fitResult ( ) const

◆ fitResult() [3/4]

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}

◆ fitResult() [4/4]

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

◆ getRep() [1/4]

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}

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

◆ getRep() [2/4]

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

◆ getRep() [3/4]

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}

◆ getRep() [4/4]

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

◆ hits() [1/8]

◆ hits() [2/8]

TrkHitList * TrkRecoTrk::hits ( )
inline

Definition at line 107 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

107{return hits(defaultType());}

Referenced by hits().

◆ hits() [3/8]

const TrkHitList * TrkRecoTrk::hits ( ) const
inline

Definition at line 108 of file InstallArea/include/TrkBase/TrkBase/TrkRecoTrk.h.

108{return hits(defaultType());}

Referenced by hits().

◆ hits() [4/8]

const TrkHitList * TrkRecoTrk::hits ( ) const
inline

Definition at line 108 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

108{return hits(defaultType());}

Referenced by hits().

◆ hits() [5/8]

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() [6/8]

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

◆ hits() [7/8]

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}

◆ hits() [8/8]

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

◆ hots() [1/8]

TrkHotList * TrkRecoTrk::hots ( )
inline

◆ hots() [2/8]

TrkHotList * TrkRecoTrk::hots ( )
inline

Definition at line 113 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

113{return hots(defaultType());}

Referenced by hots().

◆ hots() [3/8]

const TrkHotList * TrkRecoTrk::hots ( ) const
inline

Definition at line 114 of file InstallArea/include/TrkBase/TrkBase/TrkRecoTrk.h.

114{return hots(defaultType());}

Referenced by hots().

◆ hots() [4/8]

const TrkHotList * TrkRecoTrk::hots ( ) const
inline

Definition at line 114 of file Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkRecoTrk.h.

114{return hots(defaultType());}

Referenced by hots().

◆ hots() [5/8]

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() [6/8]

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

◆ hots() [7/8]

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}

◆ hots() [8/8]

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

◆ id() [1/2]

const TrkId & TrkRecoTrk::id ( ) const

Definition at line 134 of file TrkRecoTrk.cxx.

135{
136 return _id;
137}

Referenced by MdcTrackListBase::arbitrateHits(), and HoughTrack::print().

◆ id() [2/2]

const TrkId & TrkRecoTrk::id ( ) const

◆ markForStore() [1/2]

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}

◆ markForStore() [2/2]

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

◆ operator<() [1/2]

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<() [2/2]

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

◆ operator=() [1/2]

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=() [2/2]

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

◆ operator==() [1/2]

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

Definition at line 261 of file TrkRecoTrk.cxx.

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

◆ operator==() [2/2]

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

◆ print() [1/2]

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

◆ print() [2/2]

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

◆ printAll() [1/2]

◆ printAll() [2/2]

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

◆ repointHypo() [1/2]

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}

◆ repointHypo() [2/2]

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

◆ resetT0() [1/2]

void TrkRecoTrk::resetT0 ( double  time)

Definition at line 244 of file TrkRecoTrk.cxx.

245{
246 _trackT0 = t;
247 updateReps();
248}
TTree * t
Definition: binning.cxx:23
void updateReps()
Definition: TrkRecoTrk.cxx:251

◆ resetT0() [2/2]

void TrkRecoTrk::resetT0 ( double  time)

◆ setBField() [1/2]

void TrkRecoTrk::setBField ( const BField field)
protected

Definition at line 449 of file TrkRecoTrk.cxx.

450{
451 _bField = field;
452}

Referenced by TrkFitMaker::setBField().

◆ setBField() [2/2]

void TrkRecoTrk::setBField ( const BField field)
protected

◆ setFitNumber() [1/2]

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

Definition at line 424 of file TrkRecoTrk.cxx.

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

◆ setFitNumber() [2/2]

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

◆ setIdManager() [1/2]

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().

◆ setIdManager() [2/2]

void TrkRecoTrk::setIdManager ( TrkIdManager idMan)
protected

◆ setRep() [1/2]

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().

◆ setRep() [2/2]

void TrkRecoTrk::setRep ( TrkRep )
protected

◆ status() [1/8]

TrkFitStatus * TrkRecoTrk::status ( )

Definition at line 412 of file TrkRecoTrk.cxx.

413{
414 return status(defaultType());
415}
const TrkFitStatus * status() const
Definition: TrkRecoTrk.cxx:400

◆ status() [2/8]

TrkFitStatus * TrkRecoTrk::status ( )

◆ status() [3/8]

const TrkFitStatus * TrkRecoTrk::status ( ) const

◆ status() [4/8]

const TrkFitStatus * TrkRecoTrk::status ( ) const

◆ status() [5/8]

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

Definition at line 418 of file TrkRecoTrk.cxx.

419{
420 return getRep(hypo);
421}

◆ status() [6/8]

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

◆ status() [7/8]

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

Definition at line 406 of file TrkRecoTrk.cxx.

407{
408 return getRep(hypo);
409}

◆ status() [8/8]

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

◆ storageLists() [1/2]

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}

◆ storageLists() [2/2]

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

◆ storageRequests() [1/2]

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}

◆ storageRequests() [2/2]

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

◆ testRep() [1/2]

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

Definition at line 219 of file InstallArea/include/TrkBase/TrkBase/TrkRecoTrk.h.

219{ return getRep(hypo);}

Referenced by TrkTypeUtil::getRep().

◆ testRep() [2/2]

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

◆ trackT0() [1/2]

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().

◆ trackT0() [2/2]

double TrkRecoTrk::trackT0 ( ) const

◆ uniqueReps() [1/2]

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().

◆ uniqueReps() [2/2]

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

◆ updateReps() [1/2]

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().

◆ updateReps() [2/2]

void TrkRecoTrk::updateReps ( )
protected

◆ whichFit() [1/2]

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().

◆ whichFit() [2/2]

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

Friends And Related Function Documentation

◆ KalMiniTrkK

KalMiniTrkK
friend

◆ TrkFitMaker

◆ TrkHitList

TrkHitList
friend

Definition at line 222 of file InstallArea/include/TrkBase/TrkBase/TrkRecoTrk.h.

Referenced by TrkRecoTrk().

◆ TrkHitOnTrk

◆ TrkKalMiniCompositeK

TrkKalMiniCompositeK
friend

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