BOSS 7.0.2
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 ()
 
- Public Member Functions inherited from TrkHotList
 TrkHotList ()
 
virtual TrkHotListclone (TrkBase::Functors::cloneHot) const =0
 
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 hitCapable () const =0
 
virtual int nActive (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nMdc (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nSvt (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nHit (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual bool hasSvtView (TrkEnums::TrkViewInfo view, int layer) const
 
virtual TrkView svtView (int layer) const =0
 
virtual unsigned firstMdcLayer () const =0
 
virtual unsigned lastMdcLayer () const =0
 
virtual double startFoundRange () const =0
 
virtual double endFoundRange () const =0
 
virtual bool isActive (unsigned ihot) const =0
 
virtual void append (TrkHitOnTrk *)=0
 
virtual void remove (TrkHitOnTrk *)=0
 
virtual void updateHots ()=0
 
virtual TrkHitOnTrkfindHot (const TrkFundHit *) const =0
 
virtual void sort ()
 
void print (std::ostream &o) const
 
void printAll (std::ostream &o) const
 
 TrkHotList ()
 
virtual TrkHotListclone (TrkBase::Functors::cloneHot) const =0
 
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 hitCapable () const =0
 
virtual int nActive (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nMdc (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nSvt (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual int nHit (TrkEnums::TrkViewInfo view=TrkEnums::bothView) const =0
 
virtual bool hasSvtView (TrkEnums::TrkViewInfo view, int layer) const
 
virtual TrkView svtView (int layer) const =0
 
virtual unsigned firstMdcLayer () const =0
 
virtual unsigned lastMdcLayer () const =0
 
virtual double startFoundRange () const =0
 
virtual double endFoundRange () const =0
 
virtual bool isActive (unsigned ihot) const =0
 
virtual void append (TrkHitOnTrk *)=0
 
virtual void remove (TrkHitOnTrk *)=0
 
virtual void updateHots ()=0
 
virtual TrkHitOnTrkfindHot (const TrkFundHit *) const =0
 
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 ()
 

Additional Inherited Members

- Public Types inherited from TrkHotList
typedef TrkHitOnTrkIter< TrkHotList::const_iterator_traits > hot_iterator
 
typedef TrkHitOnTrkIter< TrkHotList::iterator_traits > nc_hot_iterator
 
typedef TrkHitOnTrkIter< TrkHotList::const_iterator_traits > hot_iterator
 
typedef TrkHitOnTrkIter< TrkHotList::iterator_traits > nc_hot_iterator
 
- Protected Types inherited from TrkHotList
typedef std::vector< TrkHitOnTrk * > hotlist_t
 
typedef std::vector< TrkHitOnTrk * > hotlist_t
 

Detailed Description

Constructor & Destructor Documentation

◆ TrkHotListFull() [1/6]

TrkHotListFull::TrkHotListFull ( )

Definition at line 29 of file TrkHotListFull.cxx.

30{
31}

Referenced by clone().

◆ TrkHotListFull() [2/6]

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

Definition at line 34 of file TrkHotListFull.cxx.

35{
36 //TrkHotListFull::clone come here
37 _hotlist.reserve(dfltCapac());
38//Clones Hots, and makes each point at the new track.
39 for (TrkHotList::hot_iterator i = inHots.begin();i!=inHots.end();++i) {
40// i->printAll(std::cout);//yzhang debug
41 _hotlist.push_back(f(*i));
42 }
43}

◆ TrkHotListFull() [3/6]

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

Definition at line 46 of file TrkHotListFull.cxx.

47{
48 _hotlist.reserve(dfltCapac());
49// shallow copy the hots and remove from input hotList
50 for (TrkHotList::nc_hot_iterator i = inHots.begin();i!=inHots.end();++i) {
51 _hotlist.push_back(f(*i));
52 }
53 inHots.hotlist().clear();
54}

◆ ~TrkHotListFull() [1/2]

TrkHotListFull::~TrkHotListFull ( )
virtual

Definition at line 63 of file TrkHotListFull.cxx.

64{
65// std::cout << " ~TrkHotListFull" << std::endl;//yzhang debug
66// turn the parents off before deleting hots. This avoids a cyclic delete error
67// when deleting a track
68// std::for_each(begin(),end(),setParent(0));
69 std::for_each(_hotlist.begin(),_hotlist.end(),bes::Collection::DeleteObject());
70}

◆ TrkHotListFull() [4/6]

TrkHotListFull::TrkHotListFull ( )

◆ TrkHotListFull() [5/6]

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

◆ TrkHotListFull() [6/6]

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

◆ ~TrkHotListFull() [2/2]

virtual TrkHotListFull::~TrkHotListFull ( )
virtual

Member Function Documentation

◆ append() [1/2]

void TrkHotListFull::append ( TrkHitOnTrk newHot)
virtual

Implements TrkHotList.

Definition at line 87 of file TrkHotListFull.cxx.

88{
89 _hotlist.push_back(newHot);
90}

◆ append() [2/2]

void TrkHotListFull::append ( TrkHitOnTrk )
virtual

Implements TrkHotList.

◆ clone() [1/2]

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

Implements TrkHotList.

Definition at line 58 of file TrkHotListFull.cxx.

59{
60 return new TrkHotListFull(*this, f);
61}

◆ clone() [2/2]

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

Implements TrkHotList.

◆ endFoundRange() [1/2]

double TrkHotListFull::endFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 182 of file TrkHotListFull.cxx.

183{
184 double maxFlt = -9999;
188 while (i-- != b) {
189 if (predicate(*i)) {
190 maxFlt = i->fltLen();
191 break;
192 }
193 }
194 return maxFlt;
195}

◆ endFoundRange() [2/2]

virtual double TrkHotListFull::endFoundRange ( ) const
virtual

Implements TrkHotList.

◆ findHot() [1/2]

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

Implements TrkHotList.

Definition at line 105 of file TrkHotListFull.cxx.

106{
108 TrkHotList::hot_iterator i = std::find_if(begin(),end(),match);
109 return i==end()?0:const_cast<TrkHitOnTrk*>( i.get() ); // FIXME: return (non)const TrkHitOnTrk from (non)const
110}

◆ findHot() [2/2]

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

Implements TrkHotList.

◆ firstMdcLayer() [1/2]

unsigned TrkHotListFull::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 212 of file TrkHotListFull.cxx.

213{
214 unsigned firstlay(50);
215 bool activeOnly(true);
217 for (TrkHotList::hot_iterator i = begin();i!=end();++i) {
218 if (mdc(*i)) firstlay = std::min(firstlay,i->layerNumber());
219 }
220 return firstlay<50?firstlay:0;
221}
std::string mdc
Definition: CalibModel.cxx:45

◆ firstMdcLayer() [2/2]

virtual unsigned TrkHotListFull::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ hitCapable() [1/2]

bool TrkHotListFull::hitCapable ( ) const
virtual

Implements TrkHotList.

Definition at line 138 of file TrkHotListFull.cxx.

139{
140 return true;
141}

◆ hitCapable() [2/2]

virtual bool TrkHotListFull::hitCapable ( ) const
virtual

Implements TrkHotList.

◆ hotlist() [1/4]

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

Implements TrkHotList.

Definition at line 242 of file TrkHotListFull.cxx.

243{
244 return _hotlist;
245}

◆ hotlist() [2/4]

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

Implements TrkHotList.

◆ hotlist() [3/4]

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

Implements TrkHotList.

Definition at line 236 of file TrkHotListFull.cxx.

237{
238 return _hotlist;
239}

◆ hotlist() [4/4]

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

Implements TrkHotList.

◆ isActive() [1/2]

bool TrkHotListFull::isActive ( unsigned  ihot) const
virtual

Implements TrkHotList.

Definition at line 248 of file TrkHotListFull.cxx.

248 {
249 if(ihot<_hotlist.size())
250 return _hotlist[ihot]->isActive();
251 else
252 return false;
253}

◆ isActive() [2/2]

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

Implements TrkHotList.

◆ lastMdcLayer() [1/2]

unsigned TrkHotListFull::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 224 of file TrkHotListFull.cxx.

225{
226 unsigned lastlay(0);
227 bool activeOnly(true);
229 for (TrkHotList::hot_iterator i = begin();i!=end();++i) {
230 if (mdc(*i)) lastlay = std::max(lastlay,i->layerNumber());
231 }
232 return lastlay;
233}

◆ lastMdcLayer() [2/2]

virtual unsigned TrkHotListFull::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ nActive() [1/2]

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

Implements TrkHotList.

Definition at line 113 of file TrkHotListFull.cxx.

114{
115 int nAct = 0;
116 for (TrkHotList::hot_iterator i = begin();i!=end();++i) {
117 if (i->isActive())
118 if(view == TrkEnums::bothView || i->whatView() == view)++nAct;
119 }
120 return nAct;
121}

◆ nActive() [2/2]

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

Implements TrkHotList.

◆ nHit() [1/2]

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

Implements TrkHotList.

Definition at line 124 of file TrkHotListFull.cxx.

125{
126 if(view == TrkEnums::bothView)
127 return end()-begin();
128 else {
129 int nAct = 0;
130 for (TrkHotList::hot_iterator i = begin();i!=end();++i) {
131 if(i->whatView() == view)++nAct;
132 }
133 return nAct;
134 }
135}

◆ nHit() [2/2]

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

Implements TrkHotList.

◆ nMdc() [1/2]

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

Implements TrkHotList.

Definition at line 144 of file TrkHotListFull.cxx.

145{
146 bool activeOnly(true);
149// FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!)
150// FIXME: std::compose2 is an SGI extension...
151// return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),mdc,v);
152 int n = 0;
153 for (TrkHotList::hot_iterator i = begin();i!=end();++i)
154 if(mdc(*i)&&v(*i)) ++n;
155 return n;
156}
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/2]

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

Implements TrkHotList.

◆ nSvt() [1/2]

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

Implements TrkHotList.

Definition at line 159 of file TrkHotListFull.cxx.

160{
161 bool activeOnly(true);
164// FIXME: W6U1 doesn't have std::count (at least, not in the config used by BaBar!)
165// FIXME: std::compose2 is an SGI extension...
166// return std::count(begin(),end(),std::compose2(std::logical_and<bool>(),svt,v);
167 int n = 0;
168 for (TrkHotList::hot_iterator i = begin();i!=end();++i)
169 if (svt(*i)&&v(*i)) ++n;
170 return n;
171}

◆ nSvt() [2/2]

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

Implements TrkHotList.

◆ remove() [1/2]

void TrkHotListFull::remove ( TrkHitOnTrk deadHot)
virtual

Implements TrkHotList.

Definition at line 93 of file TrkHotListFull.cxx.

94{
95 typedef std::vector<TrkHitOnTrk*>::iterator iter_t;
96 iter_t i = std::find(_hotlist.begin(),_hotlist.end(),deadHot);
97 if (i!=_hotlist.end()) {
98 delete *i;
99 _hotlist.erase(i);
100 } else
101 std::cout<<"ErrMsg(error) "<< " you asked to remove a hit which I don't have! " << std::endl;
102}

◆ remove() [2/2]

void TrkHotListFull::remove ( TrkHitOnTrk )
virtual

Implements TrkHotList.

◆ startFoundRange() [1/2]

double TrkHotListFull::startFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 174 of file TrkHotListFull.cxx.

175{
177 TrkHotList::hot_iterator i = std::find_if(begin(),end(),active);
178 return i == end() ? 9999 : i->fltLen();
179}

◆ startFoundRange() [2/2]

virtual double TrkHotListFull::startFoundRange ( ) const
virtual

Implements TrkHotList.

◆ svtView() [1/2]

TrkView TrkHotListFull::svtView ( int  layer) const
virtual

Implements TrkHotList.

Definition at line 199 of file TrkHotListFull.cxx.

200{
201 TrkView retval;
202 bool activeOnly(true);
205 // FIXME: std::compose2 is an SGI extension...
206 for(TrkHotList::hot_iterator i=begin();i!=end();++i)
207 if (svt(*i)&&l(*i)) retval.addView(i->whatView());
208 return retval;
209}
void addView(TrkEnums::TrkViewInfo view)
Definition: TrkView.cxx:53

◆ svtView() [2/2]

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

Implements TrkHotList.

◆ updateHots() [1/2]

void TrkHotListFull::updateHots ( )
virtual

Implements TrkHotList.

Definition at line 80 of file TrkHotListFull.cxx.

81{
82 std::for_each(begin(),end(),updateMeasurement(0,false));
83 sort();
84}
TrkErrCode updateMeasurement(TrkHitOnTrk &hot, const TrkDifTraj *traj=0, bool maintainAmbiguity=false) const
virtual void sort()
Definition: TrkHotList.cxx:71

◆ updateHots() [2/2]

void TrkHotListFull::updateHots ( )
virtual

Implements TrkHotList.


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