BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkHotListEmpty Class Reference

#include <TrkHotListEmpty.h>

+ Inheritance diagram for TrkHotListEmpty:

Public Member Functions

 TrkHotListEmpty (int nActive, int nSvt, int nMdc, double startFoundRange, double endFoundRange)
 
 TrkHotListEmpty (unsigned nPhi, unsigned nZ, unsigned nAxial, unsigned nStereo, double startFoundRange, double endFoundRange, unsigned firstmdclay, unsigned lastmdclay, TrkView svtpattern[5], const std::vector< unsigned > &inactive)
 
 TrkHotListEmpty (const TrkHotList &other)
 
TrkHotListEmptyoperator= (const TrkHotList &)
 
virtual TrkHotListclone (TrkBase::Functors::cloneHot) const
 
virtual ~TrkHotListEmpty ()
 
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
 
virtual void append (TrkHitOnTrk *)
 
virtual void remove (TrkHitOnTrk *)
 
TrkHitOnTrkfindHot (const TrkFundHit *) const
 
virtual void updateHots ()
 
 TrkHotListEmpty (int nActive, int nSvt, int nMdc, double startFoundRange, double endFoundRange)
 
 TrkHotListEmpty (unsigned nPhi, unsigned nZ, unsigned nAxial, unsigned nStereo, double startFoundRange, double endFoundRange, unsigned firstmdclay, unsigned lastmdclay, TrkView svtpattern[5], const std::vector< unsigned > &inactive)
 
 TrkHotListEmpty (const TrkHotList &other)
 
TrkHotListEmptyoperator= (const TrkHotList &)
 
virtual TrkHotListclone (TrkBase::Functors::cloneHot) const
 
virtual ~TrkHotListEmpty ()
 
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
 
virtual void append (TrkHitOnTrk *)
 
virtual void remove (TrkHitOnTrk *)
 
TrkHitOnTrkfindHot (const TrkFundHit *) const
 
virtual 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 ()
 

Friends

class KalMiniTrkK
 

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

◆ TrkHotListEmpty() [1/6]

TrkHotListEmpty::TrkHotListEmpty ( int  nActive,
int  nSvt,
int  nMdc,
double  startFoundRange,
double  endFoundRange 
)

Definition at line 20 of file TrkHotListEmpty.cxx.

22{
23 _nPhi = nsv/2; _nZ = nsv-_nPhi;
24 _nAxial = ndc/3; _nStereo = ndc-_nAxial;
25 _stFndRng = sfr;
26 _endFndRng = efr;
27 _firstmdc = _lastmdc = 0;
28 for(unsigned isvt=0;isvt<5;isvt++)
29 _svtpat[isvt] = TrkView(TrkEnums::noView);
30}

◆ TrkHotListEmpty() [2/6]

TrkHotListEmpty::TrkHotListEmpty ( unsigned  nPhi,
unsigned  nZ,
unsigned  nAxial,
unsigned  nStereo,
double  startFoundRange,
double  endFoundRange,
unsigned  firstmdclay,
unsigned  lastmdclay,
TrkView  svtpattern[5],
const std::vector< unsigned > &  inactive 
)

Definition at line 32 of file TrkHotListEmpty.cxx.

37 :
38 _nAxial(nAxial),_nStereo(nStereo),_nPhi(nPhi),_nZ(nZ),
39 _stFndRng(sfr),_endFndRng(efr),_firstmdc(firstmdc),_lastmdc(lastmdc),
40 _inactive(inactive)
41{
42 for(unsigned j=0;j<5;j++)
43 _svtpat[j] = svtpattern[j];
44}

◆ TrkHotListEmpty() [3/6]

TrkHotListEmpty::TrkHotListEmpty ( const TrkHotList other)

Definition at line 96 of file TrkHotListEmpty.cxx.

96 :
97 _nAxial(other.nMdc(TrkEnums::xyView)),
98 _nStereo(other.nMdc(TrkEnums::zView)),
99 _nPhi(other.nSvt(TrkEnums::xyView)),
100 _nZ(other.nSvt(TrkEnums::zView)),
101 _stFndRng(other.startFoundRange()),
102 _endFndRng(other.endFoundRange()),
103 _firstmdc(other.firstMdcLayer()),
104 _lastmdc(other.lastMdcLayer())
105{
106 for(unsigned ilay=0;ilay<5;ilay++)
107 _svtpat[ilay] = other.svtView(ilay+1);// layer numbering starts at 1
108 unsigned nhit = other.nHit();
109 for(unsigned ihit=0;ihit<nhit;ihit++)
110 if(!isActive(ihit))
111 _inactive.push_back(ihit);
112}
virtual bool isActive(unsigned ihot) const
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~TrkHotListEmpty() [1/2]

TrkHotListEmpty::~TrkHotListEmpty ( )
virtual

Definition at line 86 of file TrkHotListEmpty.cxx.

87{
88}

◆ TrkHotListEmpty() [4/6]

TrkHotListEmpty::TrkHotListEmpty ( int  nActive,
int  nSvt,
int  nMdc,
double  startFoundRange,
double  endFoundRange 
)

◆ TrkHotListEmpty() [5/6]

TrkHotListEmpty::TrkHotListEmpty ( unsigned  nPhi,
unsigned  nZ,
unsigned  nAxial,
unsigned  nStereo,
double  startFoundRange,
double  endFoundRange,
unsigned  firstmdclay,
unsigned  lastmdclay,
TrkView  svtpattern[5],
const std::vector< unsigned > &  inactive 
)

◆ TrkHotListEmpty() [6/6]

TrkHotListEmpty::TrkHotListEmpty ( const TrkHotList other)

◆ ~TrkHotListEmpty() [2/2]

virtual TrkHotListEmpty::~TrkHotListEmpty ( )
virtual

Member Function Documentation

◆ append() [1/2]

void TrkHotListEmpty::append ( TrkHitOnTrk )
virtual

Implements TrkHotList.

Definition at line 192 of file TrkHotListEmpty.cxx.

193{
194}

◆ append() [2/2]

virtual void TrkHotListEmpty::append ( TrkHitOnTrk )
virtual

Implements TrkHotList.

◆ clone() [1/2]

TrkHotList * TrkHotListEmpty::clone ( TrkBase::Functors::cloneHot  ) const
virtual

Implements TrkHotList.

Definition at line 91 of file TrkHotListEmpty.cxx.

◆ clone() [2/2]

virtual TrkHotList * TrkHotListEmpty::clone ( TrkBase::Functors::cloneHot  ) const
virtual

Implements TrkHotList.

◆ endFoundRange() [1/2]

double TrkHotListEmpty::endFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 168 of file TrkHotListEmpty.cxx.

169{
170 return _endFndRng;
171}

◆ endFoundRange() [2/2]

virtual double TrkHotListEmpty::endFoundRange ( ) const
virtual

Implements TrkHotList.

◆ findHot() [1/2]

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

Implements TrkHotList.

Definition at line 202 of file TrkHotListEmpty.cxx.

203{
204 return 0;
205}

◆ findHot() [2/2]

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

Implements TrkHotList.

◆ firstMdcLayer() [1/2]

unsigned TrkHotListEmpty::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 226 of file TrkHotListEmpty.cxx.

227{
228 return _firstmdc;
229}

◆ firstMdcLayer() [2/2]

virtual unsigned TrkHotListEmpty::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ hitCapable() [1/2]

bool TrkHotListEmpty::hitCapable ( ) const
virtual

Implements TrkHotList.

Definition at line 208 of file TrkHotListEmpty.cxx.

209{
210 return false;
211}

◆ hitCapable() [2/2]

virtual bool TrkHotListEmpty::hitCapable ( ) const
virtual

Implements TrkHotList.

◆ hotlist() [1/4]

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

Implements TrkHotList.

Definition at line 184 of file TrkHotListEmpty.cxx.

185{
186 static std::vector<TrkHitOnTrk*> dummy;
187 assert(dummy.empty());
188 return dummy;
189}

◆ hotlist() [2/4]

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

Implements TrkHotList.

◆ hotlist() [3/4]

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

Implements TrkHotList.

Definition at line 175 of file TrkHotListEmpty.cxx.

176{
177 static const std::vector<TrkHitOnTrk*> dummy;
178 assert(dummy.empty());
179 return dummy;
180
181}

◆ hotlist() [4/4]

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

Implements TrkHotList.

◆ isActive() [1/2]

bool TrkHotListEmpty::isActive ( unsigned  ihot) const
virtual

Implements TrkHotList.

Definition at line 238 of file TrkHotListEmpty.cxx.

238 {
239 std::vector<unsigned>::const_iterator ifound =
240 std::find(_inactive.begin(),_inactive.end(),ihot);
241 return ifound == _inactive.end();
242}

Referenced by TrkHotListEmpty().

◆ isActive() [2/2]

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

Implements TrkHotList.

◆ lastMdcLayer() [1/2]

unsigned TrkHotListEmpty::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 232 of file TrkHotListEmpty.cxx.

233{
234 return _lastmdc;
235}

◆ lastMdcLayer() [2/2]

virtual unsigned TrkHotListEmpty::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

◆ nActive() [1/2]

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

Implements TrkHotList.

Definition at line 115 of file TrkHotListEmpty.cxx.

116{
117 return nSvt(view)+nMdc(view);
118}
virtual int nMdc(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const
virtual int nSvt(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const

Referenced by nHit().

◆ nActive() [2/2]

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

Implements TrkHotList.

◆ nHit() [1/2]

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

Implements TrkHotList.

Definition at line 151 of file TrkHotListEmpty.cxx.

152{
153 unsigned nhit = nActive(view);
154 if(view == TrkEnums::bothView)
155 nhit += _inactive.size();
156 else
157 nhit += _inactive.size()/2;
158 return nhit;
159}
virtual int nActive(TrkEnums::TrkViewInfo view=TrkEnums::bothView) const

◆ nHit() [2/2]

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

Implements TrkHotList.

◆ nMdc() [1/2]

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

Implements TrkHotList.

Definition at line 136 of file TrkHotListEmpty.cxx.

137{
138 switch (view) {
139 case TrkEnums::zView:
140 return _nStereo;
141 case TrkEnums::xyView:
142 return _nAxial;
144 return _nStereo + _nAxial;
145 default:
146 return -1;
147 }
148}

Referenced by nActive().

◆ nMdc() [2/2]

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

Implements TrkHotList.

◆ nSvt() [1/2]

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

Implements TrkHotList.

Definition at line 121 of file TrkHotListEmpty.cxx.

122{
123 switch (view) {
125 return _nPhi + _nZ;
126 case TrkEnums::xyView:
127 return _nPhi;
128 case TrkEnums::zView:
129 return _nZ;
130 default:
131 return -1;
132 }
133}

Referenced by nActive().

◆ nSvt() [2/2]

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

Implements TrkHotList.

◆ operator=() [1/2]

TrkHotListEmpty & TrkHotListEmpty::operator= ( const TrkHotList other)

Definition at line 63 of file TrkHotListEmpty.cxx.

63 {
64 if(this != &other){
65 _nPhi = other.nSvt(TrkEnums::xyView);
66 _nZ = other.nSvt(TrkEnums::zView);
67 _nAxial = other.nMdc(TrkEnums::xyView);
68 _nStereo = other.nMdc(TrkEnums::zView);
69 _stFndRng = other.startFoundRange();
70 _endFndRng = other.endFoundRange();
71 _firstmdc = other.firstMdcLayer();
72 _lastmdc = other.lastMdcLayer();
73 for(unsigned ilay=0;ilay<5;ilay++)
74 _svtpat[ilay] = other.svtView(ilay+1);// layer numbering starts at 1
75 unsigned nhits = other.nHit();
76 std::vector<unsigned> inactive;
77 for(unsigned ihit=0;ihit<nhits;ihit++)
78 if(!other.isActive(ihit))
79 inactive.push_back(ihit);
80 _inactive = inactive;
81 }
82 return *this;
83}

◆ operator=() [2/2]

TrkHotListEmpty & TrkHotListEmpty::operator= ( const TrkHotList )

◆ remove() [1/2]

void TrkHotListEmpty::remove ( TrkHitOnTrk )
virtual

Implements TrkHotList.

Definition at line 197 of file TrkHotListEmpty.cxx.

198{
199}

◆ remove() [2/2]

virtual void TrkHotListEmpty::remove ( TrkHitOnTrk )
virtual

Implements TrkHotList.

◆ startFoundRange() [1/2]

double TrkHotListEmpty::startFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 162 of file TrkHotListEmpty.cxx.

163{
164 return _stFndRng;
165}

◆ startFoundRange() [2/2]

virtual double TrkHotListEmpty::startFoundRange ( ) const
virtual

Implements TrkHotList.

◆ svtView() [1/2]

TrkView TrkHotListEmpty::svtView ( int  layer) const
virtual

Implements TrkHotList.

Definition at line 220 of file TrkHotListEmpty.cxx.

221{
222 return (ilay>=1 && ilay<=5)?_svtpat[ilay-1]:TrkView(TrkEnums::noView);
223}

◆ svtView() [2/2]

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

Implements TrkHotList.

◆ updateHots() [1/2]

void TrkHotListEmpty::updateHots ( )
virtual

Implements TrkHotList.

Definition at line 214 of file TrkHotListEmpty.cxx.

215{
216 return;
217}

◆ updateHots() [2/2]

virtual void TrkHotListEmpty::updateHots ( )
virtual

Implements TrkHotList.

Friends And Related Function Documentation

◆ KalMiniTrkK

KalMiniTrkK
friend

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