CGEM BOSS 6.6.5.g
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 ()
 
- 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
 

Protected Member Functions

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
 
- Protected Types inherited from TrkHotList
typedef std::vector< TrkHitOnTrk * > hotlist_t
 

Detailed Description

Definition at line 25 of file TrkHotListEmpty.h.

Constructor & Destructor Documentation

◆ TrkHotListEmpty() [1/3]

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}
@ noView
Definition: TrkEnums.h:22

◆ TrkHotListEmpty() [2/3]

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}
const int nPhi
const int nZ

◆ TrkHotListEmpty() [3/3]

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
@ xyView
Definition: TrkEnums.h:22
@ zView
Definition: TrkEnums.h:22

◆ ~TrkHotListEmpty()

TrkHotListEmpty::~TrkHotListEmpty ( )
virtual

Definition at line 86 of file TrkHotListEmpty.cxx.

87{
88}

Member Function Documentation

◆ append()

void TrkHotListEmpty::append ( TrkHitOnTrk )
virtual

Implements TrkHotList.

Definition at line 192 of file TrkHotListEmpty.cxx.

193{
194}

◆ clone()

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

Implements TrkHotList.

Definition at line 91 of file TrkHotListEmpty.cxx.

92{
93 return new TrkHotListEmpty(*this);
94}

◆ endFoundRange()

double TrkHotListEmpty::endFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 168 of file TrkHotListEmpty.cxx.

169{
170 return _endFndRng;
171}

◆ findHot()

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

Implements TrkHotList.

Definition at line 202 of file TrkHotListEmpty.cxx.

203{
204 return 0;
205}

◆ firstMdcLayer()

unsigned TrkHotListEmpty::firstMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 226 of file TrkHotListEmpty.cxx.

227{
228 return _firstmdc;
229}

◆ hitCapable()

bool TrkHotListEmpty::hitCapable ( ) const
virtual

Implements TrkHotList.

Definition at line 208 of file TrkHotListEmpty.cxx.

209{
210 return false;
211}

◆ hotlist() [1/2]

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/2]

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}

◆ isActive()

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

◆ lastMdcLayer()

unsigned TrkHotListEmpty::lastMdcLayer ( ) const
virtual

Implements TrkHotList.

Definition at line 232 of file TrkHotListEmpty.cxx.

233{
234 return _lastmdc;
235}

◆ nActive()

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

◆ nHit()

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
@ bothView
Definition: TrkEnums.h:22

◆ nMdc()

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

◆ nSvt()

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

◆ operator=()

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}

◆ remove()

void TrkHotListEmpty::remove ( TrkHitOnTrk )
virtual

Implements TrkHotList.

Definition at line 197 of file TrkHotListEmpty.cxx.

198{
199}

◆ startFoundRange()

double TrkHotListEmpty::startFoundRange ( ) const
virtual

Implements TrkHotList.

Definition at line 162 of file TrkHotListEmpty.cxx.

163{
164 return _stFndRng;
165}

◆ svtView()

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}

◆ updateHots()

void TrkHotListEmpty::updateHots ( )
virtual

Implements TrkHotList.

Definition at line 214 of file TrkHotListEmpty.cxx.

215{
216 return;
217}

Friends And Related Function Documentation

◆ KalMiniTrkK

friend class KalMiniTrkK
friend

Definition at line 78 of file TrkHotListEmpty.h.


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