BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHotListFull Class Reference

#include <TrkHotListFull.h>

Inheritance diagram for TrkHotListFull:

Public Member Functions

 TrkHotListFull ()
 TrkHotListFull (const TrkHotList &inHots, TrkBase::Functors::cloneHot func)
 TrkHotListFull (TrkHotList &inHots, TrkBase::Functors::setParent func)
TrkHotListclone (TrkBase::Functors::cloneHot func) const
virtual ~TrkHotListFull ()
virtual bool hitCapable () const
virtual int nActive (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nMdc (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nSvt (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nHit (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual TrkView svtView (int layer) const
virtual unsigned firstMdcLayer () const
virtual unsigned lastMdcLayer () const
virtual double startFoundRange () const
virtual double endFoundRange () const
virtual bool isActive (unsigned ihot) const
void append (TrkHitOnTrk *)
void remove (TrkHitOnTrk *)
TrkHitOnTrkfindHot (const TrkFundHit *) const
void updateHots ()
 TrkHotListFull ()
 TrkHotListFull (const TrkHotList &inHots, TrkBase::Functors::cloneHot func)
 TrkHotListFull (TrkHotList &inHots, TrkBase::Functors::setParent func)
TrkHotListclone (TrkBase::Functors::cloneHot func) const
virtual ~TrkHotListFull ()
virtual bool hitCapable () const
virtual int nActive (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nMdc (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nSvt (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nHit (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual TrkView svtView (int layer) const
virtual unsigned firstMdcLayer () const
virtual unsigned lastMdcLayer () const
virtual double startFoundRange () const
virtual double endFoundRange () const
virtual bool isActive (unsigned ihot) const
void append (TrkHitOnTrk *)
void remove (TrkHitOnTrk *)
TrkHitOnTrkfindHot (const TrkFundHit *) const
void updateHots ()
 TrkHotListFull ()
 TrkHotListFull (const TrkHotList &inHots, TrkBase::Functors::cloneHot func)
 TrkHotListFull (TrkHotList &inHots, TrkBase::Functors::setParent func)
TrkHotListclone (TrkBase::Functors::cloneHot func) const
virtual ~TrkHotListFull ()
virtual bool hitCapable () const
virtual int nActive (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nMdc (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nSvt (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nHit (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual TrkView svtView (int layer) const
virtual unsigned firstMdcLayer () const
virtual unsigned lastMdcLayer () const
virtual double startFoundRange () const
virtual double endFoundRange () const
virtual bool isActive (unsigned ihot) const
void append (TrkHitOnTrk *)
void remove (TrkHitOnTrk *)
TrkHitOnTrkfindHot (const TrkFundHit *) const
void updateHots ()
Public Member Functions inherited from TrkHotList
 TrkHotList ()
virtual TrkHotListresetParent (TrkBase::Functors::setParent)
virtual ~TrkHotList ()
hot_iterator begin () const
hot_iterator end () const
nc_hot_iterator begin ()
nc_hot_iterator end ()
virtual bool hasSvtView (TrkEnums::TrkViewInfo view, int layer) const
virtual void sort ()
void print (std::ostream &o) const
void printAll (std::ostream &o) const
 TrkHotList ()
virtual TrkHotListresetParent (TrkBase::Functors::setParent)
virtual ~TrkHotList ()
hot_iterator begin () const
hot_iterator end () const
nc_hot_iterator begin ()
nc_hot_iterator end ()
virtual bool hasSvtView (TrkEnums::TrkViewInfo view, int layer) const
virtual void sort ()
void print (std::ostream &o) const
void printAll (std::ostream &o) const
 TrkHotList ()
virtual TrkHotListresetParent (TrkBase::Functors::setParent)
virtual ~TrkHotList ()
hot_iterator begin () const
hot_iterator end () const
nc_hot_iterator begin ()
nc_hot_iterator end ()
virtual bool hasSvtView (TrkEnums::TrkViewInfo view, int layer) const
virtual void sort ()
void print (std::ostream &o) const
void printAll (std::ostream &o) const

Protected Member Functions

virtual const std::vector< TrkHitOnTrk * > & hotlist () const
virtual std::vector< TrkHitOnTrk * > & hotlist ()
virtual const std::vector< TrkHitOnTrk * > & hotlist () const
virtual std::vector< TrkHitOnTrk * > & hotlist ()
virtual const std::vector< TrkHitOnTrk * > & hotlist () const
virtual std::vector< TrkHitOnTrk * > & hotlist ()

Additional Inherited Members

Public Types inherited from TrkHotList
typedef TrkHitOnTrkIter< TrkHotList::const_iterator_traitshot_iterator
typedef TrkHitOnTrkIter< TrkHotList::iterator_traitsnc_hot_iterator
typedef TrkHitOnTrkIter< TrkHotList::const_iterator_traitshot_iterator
typedef TrkHitOnTrkIter< TrkHotList::iterator_traitsnc_hot_iterator
typedef TrkHitOnTrkIter< TrkHotList::const_iterator_traitshot_iterator
typedef TrkHitOnTrkIter< TrkHotList::iterator_traitsnc_hot_iterator
Protected Types inherited from TrkHotList
typedef std::vector< TrkHitOnTrk * > hotlist_t
typedef std::vector< TrkHitOnTrk * > hotlist_t
typedef std::vector< TrkHitOnTrk * > hotlist_t

Detailed Description

Constructor & Destructor Documentation

◆ TrkHotListFull() [1/9]

TrkHotListFull::TrkHotListFull ( )

Definition at line 29 of file TrkHotListFull.cxx.

29{}

Referenced by clone(), and hotlist().

◆ TrkHotListFull() [2/9]

TrkHotListFull::TrkHotListFull ( const TrkHotList & inHots,
TrkBase::Functors::cloneHot func )

Definition at line 31 of file TrkHotListFull.cxx.

31 {
32 // TrkHotListFull::clone come here
33 _hotlist.reserve( dfltCapac() );
34 // Clones Hots, and makes each point at the new track.
35 for ( TrkHotList::hot_iterator i = inHots.begin(); i != inHots.end(); ++i )
36 {
37 // i->printAll(std::cout);//yzhang debug
38 _hotlist.push_back( f( *i ) );
39 }
40}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
TrkHitOnTrkIter< TrkHotList::const_iterator_traits > hot_iterator

◆ TrkHotListFull() [3/9]

TrkHotListFull::TrkHotListFull ( TrkHotList & inHots,
TrkBase::Functors::setParent func )

Definition at line 42 of file TrkHotListFull.cxx.

42 {
43 _hotlist.reserve( dfltCapac() );
44 // shallow copy the hots and remove from input hotList
45 for ( TrkHotList::nc_hot_iterator i = inHots.begin(); i != inHots.end(); ++i )
46 { _hotlist.push_back( f( *i ) ); }
47 inHots.hotlist().clear();
48}
TrkHitOnTrkIter< TrkHotList::iterator_traits > nc_hot_iterator

◆ ~TrkHotListFull() [1/3]

TrkHotListFull::~TrkHotListFull ( )
virtual

Definition at line 54 of file TrkHotListFull.cxx.

54 {
55 // std::cout << " ~TrkHotListFull" << std::endl;//yzhang debug
56 // turn the parents off before deleting hots. This avoids a cyclic delete error
57 // when deleting a track
58 // std::for_each(begin(),end(),setParent(0));
59 std::for_each( _hotlist.begin(), _hotlist.end(), bes::Collection::DeleteObject() );
60}

◆ TrkHotListFull() [4/9]

TrkHotListFull::TrkHotListFull ( )

◆ TrkHotListFull() [5/9]

TrkHotListFull::TrkHotListFull ( const TrkHotList & inHots,
TrkBase::Functors::cloneHot func )

◆ TrkHotListFull() [6/9]

TrkHotListFull::TrkHotListFull ( TrkHotList & inHots,
TrkBase::Functors::setParent func )

◆ ~TrkHotListFull() [2/3]

virtual TrkHotListFull::~TrkHotListFull ( )
virtual

◆ TrkHotListFull() [7/9]

TrkHotListFull::TrkHotListFull ( )

◆ TrkHotListFull() [8/9]

TrkHotListFull::TrkHotListFull ( const TrkHotList & inHots,
TrkBase::Functors::cloneHot func )

◆ TrkHotListFull() [9/9]

TrkHotListFull::TrkHotListFull ( TrkHotList & inHots,
TrkBase::Functors::setParent func )

◆ ~TrkHotListFull() [3/3]

virtual TrkHotListFull::~TrkHotListFull ( )
virtual

Member Function Documentation

◆ append() [1/3]

void TrkHotListFull::append ( TrkHitOnTrk * newHot)
virtual

Implements TrkHotList.

Definition at line 72 of file TrkHotListFull.cxx.

72{ _hotlist.push_back( newHot ); }

◆ append() [2/3]

void TrkHotListFull::append ( TrkHitOnTrk * )
virtual

Implements TrkHotList.

◆ append() [3/3]

void TrkHotListFull::append ( TrkHitOnTrk * )
virtual

Implements TrkHotList.

◆ clone() [1/3]

TrkHotList * TrkHotListFull::clone ( TrkBase::Functors::cloneHot func) const
virtual

Implements TrkHotList.

Definition at line 50 of file TrkHotListFull.cxx.

50 {
51 return new TrkHotListFull( *this, f );
52}

◆ clone() [2/3]

TrkHotList * TrkHotListFull::clone ( TrkBase::Functors::cloneHot func) const
virtual

Implements TrkHotList.

◆ clone() [3/3]

TrkHotList * TrkHotListFull::clone ( TrkBase::Functors::cloneHot func) const
virtual

Implements TrkHotList.

◆ endFoundRange() [1/3]

double TrkHotListFull::endFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 151 of file TrkHotListFull.cxx.

151 {
152 double maxFlt = -9999;
153 TrkBase::Predicates::isHotActive predicate;
156 while ( i-- != b )
157 {
158 if ( predicate( *i ) )
159 {
160 maxFlt = i->fltLen();
161 break;
162 }
163 }
164 return maxFlt;
165}

◆ endFoundRange() [2/3]

virtual double TrkHotListFull::endFoundRange ( ) const
virtual

Implements TrkHotList.

◆ endFoundRange() [3/3]

virtual double TrkHotListFull::endFoundRange ( ) const
virtual

Implements TrkHotList.

◆ findHot() [1/3]

TrkHitOnTrk * TrkHotListFull::findHot ( const TrkFundHit * theHit) const
virtual

Implements TrkHotList.

Definition at line 87 of file TrkHotListFull.cxx.

87 {
88 TrkBase::Predicates::hotMatchesFundHit match( theHit );
89 TrkHotList::hot_iterator i = std::find_if( begin(), end(), match );
90 return i == end() ? 0 : const_cast<TrkHitOnTrk*>( i.get() ); // FIXME: return (non)const
91 // TrkHitOnTrk from (non)const
92}

◆ findHot() [2/3]

TrkHitOnTrk * TrkHotListFull::findHot ( const TrkFundHit * ) const
virtual

Implements TrkHotList.

◆ findHot() [3/3]

TrkHitOnTrk * TrkHotListFull::findHot ( const TrkFundHit * ) const
virtual

Implements TrkHotList.

◆ firstMdcLayer() [1/3]

unsigned TrkHotListFull::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 178 of file TrkHotListFull.cxx.

178 {
179 unsigned firstlay( 50 );
180 bool activeOnly( true );
181 TrkBase::Predicates::isMdcHitOnTrack mdc( activeOnly );
182 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
183 {
184 if ( mdc( *i ) ) firstlay = std::min( firstlay, i->layerNumber() );
185 }
186 return firstlay < 50 ? firstlay : 0;
187}
std::string mdc

◆ firstMdcLayer() [2/3]

virtual unsigned TrkHotListFull::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ firstMdcLayer() [3/3]

virtual unsigned TrkHotListFull::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ hitCapable() [1/3]

bool TrkHotListFull::hitCapable ( ) const
virtual

Implements TrkHotList.

Definition at line 117 of file TrkHotListFull.cxx.

117{ return true; }

◆ hitCapable() [2/3]

virtual bool TrkHotListFull::hitCapable ( ) const
virtual

Implements TrkHotList.

◆ hitCapable() [3/3]

virtual bool TrkHotListFull::hitCapable ( ) const
virtual

Implements TrkHotList.

◆ hotlist() [1/6]

std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( )
protectedvirtual

Implements TrkHotList.

Definition at line 202 of file TrkHotListFull.cxx.

202{ return _hotlist; }

◆ hotlist() [2/6]

virtual std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( )
protectedvirtual

Implements TrkHotList.

◆ hotlist() [3/6]

virtual std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( )
protectedvirtual

Implements TrkHotList.

◆ hotlist() [4/6]

const std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( ) const
protectedvirtual

Implements TrkHotList.

Definition at line 200 of file TrkHotListFull.cxx.

200{ return _hotlist; }

◆ hotlist() [5/6]

virtual const std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( ) const
protectedvirtual

Implements TrkHotList.

◆ hotlist() [6/6]

virtual const std::vector< TrkHitOnTrk * > & TrkHotListFull::hotlist ( ) const
protectedvirtual

Implements TrkHotList.

◆ isActive() [1/3]

bool TrkHotListFull::isActive ( unsigned ihot) const
virtual

Implements TrkHotList.

Definition at line 204 of file TrkHotListFull.cxx.

204 {
205 if ( ihot < _hotlist.size() ) return _hotlist[ihot]->isActive();
206 else return false;
207}

◆ isActive() [2/3]

virtual bool TrkHotListFull::isActive ( unsigned ihot) const
virtual

Implements TrkHotList.

◆ isActive() [3/3]

virtual bool TrkHotListFull::isActive ( unsigned ihot) const
virtual

Implements TrkHotList.

◆ lastMdcLayer() [1/3]

unsigned TrkHotListFull::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 189 of file TrkHotListFull.cxx.

189 {
190 unsigned lastlay( 0 );
191 bool activeOnly( true );
192 TrkBase::Predicates::isMdcHitOnTrack mdc( activeOnly );
193 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
194 {
195 if ( mdc( *i ) ) lastlay = std::max( lastlay, i->layerNumber() );
196 }
197 return lastlay;
198}

◆ lastMdcLayer() [2/3]

virtual unsigned TrkHotListFull::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ lastMdcLayer() [3/3]

virtual unsigned TrkHotListFull::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ nActive() [1/3]

int TrkHotListFull::nActive ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

Definition at line 94 of file TrkHotListFull.cxx.

94 {
95 int nAct = 0;
96 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
97 {
98 if ( i->isActive() )
99 if ( view == TrkEnums::bothView || i->whatView() == view ) ++nAct;
100 }
101 return nAct;
102}

◆ nActive() [2/3]

virtual int TrkHotListFull::nActive ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nActive() [3/3]

virtual int TrkHotListFull::nActive ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nHit() [1/3]

int TrkHotListFull::nHit ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

Definition at line 104 of file TrkHotListFull.cxx.

104 {
105 if ( view == TrkEnums::bothView ) return end() - begin();
106 else
107 {
108 int nAct = 0;
109 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
110 {
111 if ( i->whatView() == view ) ++nAct;
112 }
113 return nAct;
114 }
115}

◆ nHit() [2/3]

virtual int TrkHotListFull::nHit ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nHit() [3/3]

virtual int TrkHotListFull::nHit ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nMdc() [1/3]

int TrkHotListFull::nMdc ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

Definition at line 119 of file TrkHotListFull.cxx.

119 {
120 bool activeOnly( true );
121 TrkBase::Predicates::isMdcHitOnTrack mdc( activeOnly );
122 TrkBase::Predicates::hasView v( view );
123 // FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!)
124 // FIXME: std::compose2 is an SGI extension...
125 // return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),mdc,v);
126 int n = 0;
127 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
128 if ( mdc( *i ) && v( *i ) ) ++n;
129 return n;
130}
const Int_t n
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35

◆ nMdc() [2/3]

virtual int TrkHotListFull::nMdc ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nMdc() [3/3]

virtual int TrkHotListFull::nMdc ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nSvt() [1/3]

int TrkHotListFull::nSvt ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

Definition at line 132 of file TrkHotListFull.cxx.

132 {
133 bool activeOnly( true );
134 TrkBase::Predicates::isSvtHitOnTrack svt( activeOnly );
135 TrkBase::Predicates::hasView v( view );
136 // FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!)
137 // FIXME: std::compose2 is an SGI extension...
138 // return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),svt,v);
139 int n = 0;
140 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
141 if ( svt( *i ) && v( *i ) ) ++n;
142 return n;
143}

◆ nSvt() [2/3]

virtual int TrkHotListFull::nSvt ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ nSvt() [3/3]

virtual int TrkHotListFull::nSvt ( TrkEnums::TrkViewInfo view = TrkEnums::bothView) const
virtual

Implements TrkHotList.

◆ remove() [1/3]

void TrkHotListFull::remove ( TrkHitOnTrk * deadHot)
virtual

Implements TrkHotList.

Definition at line 74 of file TrkHotListFull.cxx.

74 {
75 typedef std::vector<TrkHitOnTrk*>::iterator iter_t;
76 iter_t i = std::find( _hotlist.begin(), _hotlist.end(), deadHot );
77 if ( i != _hotlist.end() )
78 {
79 delete *i;
80 _hotlist.erase( i );
81 }
82 else
83 std::cout << "ErrMsg(error) "
84 << " you asked to remove a hit which I don't have! " << std::endl;
85}

◆ remove() [2/3]

void TrkHotListFull::remove ( TrkHitOnTrk * )
virtual

Implements TrkHotList.

◆ remove() [3/3]

void TrkHotListFull::remove ( TrkHitOnTrk * )
virtual

Implements TrkHotList.

◆ startFoundRange() [1/3]

double TrkHotListFull::startFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 145 of file TrkHotListFull.cxx.

145 {
146 TrkBase::Predicates::isHotActive active;
147 TrkHotList::hot_iterator i = std::find_if( begin(), end(), active );
148 return i == end() ? 9999 : i->fltLen();
149}

◆ startFoundRange() [2/3]

virtual double TrkHotListFull::startFoundRange ( ) const
virtual

Implements TrkHotList.

◆ startFoundRange() [3/3]

virtual double TrkHotListFull::startFoundRange ( ) const
virtual

Implements TrkHotList.

◆ svtView() [1/3]

TrkView TrkHotListFull::svtView ( int layer) const
virtual

Implements TrkHotList.

Definition at line 167 of file TrkHotListFull.cxx.

167 {
168 TrkView retval;
169 bool activeOnly( true );
170 TrkBase::Predicates::isSvtHitOnTrack svt( activeOnly );
171 TrkBase::Predicates::isLayer l( layer );
172 // FIXME: std::compose2 is an SGI extension...
173 for ( TrkHotList::hot_iterator i = begin(); i != end(); ++i )
174 if ( svt( *i ) && l( *i ) ) retval.addView( i->whatView() );
175 return retval;
176}
void addView(TrkEnums::TrkViewInfo view)
Definition TrkView.cxx:37

◆ svtView() [2/3]

virtual TrkView TrkHotListFull::svtView ( int layer) const
virtual

Implements TrkHotList.

◆ svtView() [3/3]

virtual TrkView TrkHotListFull::svtView ( int layer) const
virtual

Implements TrkHotList.

◆ updateHots() [1/3]

void TrkHotListFull::updateHots ( )
virtual

Implements TrkHotList.

Definition at line 67 of file TrkHotListFull.cxx.

67 {
68 std::for_each( begin(), end(), updateMeasurement( 0, false ) );
69 sort();
70}
TrkErrCode updateMeasurement(TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
virtual void sort()

◆ updateHots() [2/3]

void TrkHotListFull::updateHots ( )
virtual

Implements TrkHotList.

◆ updateHots() [3/3]

void TrkHotListFull::updateHots ( )
virtual

Implements TrkHotList.


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