BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExpectedHotSet Class Reference

#include <TrkExpectedHotSet.h>

Public Member Functions

 TrkExpectedHotSet (const TrkDetElemId &elemId, const int &maxFits)
 
virtual ~TrkExpectedHotSet ()
 
bool operator== (const TrkExpectedHotSet &rhs)
 
const TrkDetElemIdelemId () const
 
const TrkExpectedHotexHot (const TrkFitTypeKey &key) const
 
const TrkExpectedHotexHot () const
 
void getHots (std::vector< TrkHitOnTrk * > &hots) const
 
bool hasFitType (const TrkFitTypeKey &key) const
 
const std::vector< int > & fitTypeMap () const
 
std::vector< TrkExpectedHot * > theHots () const
 
bool addInfo (TrkExpectedHot *aHot, const TrkFitTypeKey &key)
 
void printFit (const TrkFitTypeKey &key, std::ostream &os=std::cout) const
 
bool isSvt () const
 
bool isMdc () const
 
const TrkExpectedTrkexTrk () const
 

Protected Member Functions

void setExTrk (const TrkExpectedTrk *anExTrk)
 

Friends

class TrkExpectedTrk
 
class TrkExpectedHotFactory
 

Detailed Description

Definition at line 39 of file TrkExpectedHotSet.h.

Constructor & Destructor Documentation

◆ TrkExpectedHotSet()

TrkExpectedHotSet::TrkExpectedHotSet ( const TrkDetElemId elemId,
const int &  maxFits 
)

Definition at line 64 of file TrkExpectedHotSet.cxx.

66 :_elemId(elemId),
67 _nFit(-1),
68 _fitTypeMap(maxFits,-1),
69 _exTrk(0)
70{
71}
const TrkDetElemId & elemId() const

◆ ~TrkExpectedHotSet()

TrkExpectedHotSet::~TrkExpectedHotSet ( )
virtual

Definition at line 77 of file TrkExpectedHotSet.cxx.

77 {
78 // owns the exHost
79 const int iEx = _theHots.size();
80 for ( int iKill(0); iKill < iEx; ++iKill ) {
81 TrkExpectedHot* exHot = _theHots[iKill];
82 delete exHot;
83 }
84}
const TrkExpectedHot * exHot() const

Member Function Documentation

◆ addInfo()

bool TrkExpectedHotSet::addInfo ( TrkExpectedHot aHot,
const TrkFitTypeKey key 
)

Definition at line 140 of file TrkExpectedHotSet.cxx.

141 {
142 if ( key.value() < 0 ) return false;
143 if ( key.value() >= _fitTypeMap.size() ) return false;
144 if ( aHot == 0 ) return false;
145 const int test = _fitTypeMap[key.value()];
146 if ( test != -1 ) {
147 TrkExpectedHot* myHot = _theHots[test];
148 if ( aHot->hasHot() ) { myHot->setHots(aHot); }
149 delete aHot;
150 return true;
151 }
152 ++_nFit;
153 _fitTypeMap[key.value()] = _nFit;
154 aHot->setExTrk(_exTrk);
155 _theHots.push_back(aHot);
156 return true;
157}
std::string test
Definition: CalibModel.cxx:43
*************DOUBLE PRECISION m_pi *DOUBLE PRECISION m_HvecTau2 DOUBLE PRECISION m_HvClone2 DOUBLE PRECISION m_gamma1 DOUBLE PRECISION m_gamma2 DOUBLE PRECISION m_thet1 DOUBLE PRECISION m_thet2 INTEGER m_IFPHOT *COMMON c_Taupair $ !Spin Polarimeter vector first Tau $ !Spin Polarimeter vector second Tau $ !Clone Spin Polarimeter vector first Tau $ !Clone Spin Polarimeter vector second Tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning st tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !Random Euler angle for cloning nd tau $ !phi of HvecTau1 $ !theta of HvecTau1 $ !phi of HvecTau2 $ !theta of HvecTau2 $ !super key
Definition: Taupair.h:42
virtual bool hasHot() const =0
virtual bool setHots(const TrkExpectedHot *aHot)=0
void setExTrk(const TrkExpectedTrk *anExTrk)

◆ elemId()

const TrkDetElemId & TrkExpectedHotSet::elemId ( ) const
inline

Definition at line 56 of file TrkExpectedHotSet.h.

56 {
57 return _elemId;
58 };

◆ exHot() [1/2]

const TrkExpectedHot * TrkExpectedHotSet::exHot ( ) const

Definition at line 102 of file TrkExpectedHotSet.cxx.

102 {
103 return _nFit < 0 ? 0 : _theHots[0];
104}

Referenced by hasFitType(), printFit(), and ~TrkExpectedHotSet().

◆ exHot() [2/2]

const TrkExpectedHot * TrkExpectedHotSet::exHot ( const TrkFitTypeKey key) const

Definition at line 95 of file TrkExpectedHotSet.cxx.

95 {
96 if ( key.value() < 0 || key.value() >= _fitTypeMap.size() ) return 0;
97 const int index = _fitTypeMap[key.value()];
98 return index < 0 ? 0 : _theHots[index];
99}

◆ exTrk()

const TrkExpectedTrk * TrkExpectedHotSet::exTrk ( ) const
inline

Definition at line 85 of file TrkExpectedHotSet.h.

85{ return _exTrk; }

◆ fitTypeMap()

const std::vector< int > & TrkExpectedHotSet::fitTypeMap ( ) const
inline

Definition at line 72 of file TrkExpectedHotSet.h.

72{ return _fitTypeMap; }

◆ getHots()

void TrkExpectedHotSet::getHots ( std::vector< TrkHitOnTrk * > &  hots) const

Definition at line 107 of file TrkExpectedHotSet.cxx.

107 {
108 const TrkExpectedHot* anExHot(0);
109 for ( int i(0); i < _theHots.size(); ++i ) {
110 anExHot = _theHots[i];
111 if ( anExHot->getHots(hots) ) break;
112 }
113}

◆ hasFitType()

bool TrkExpectedHotSet::hasFitType ( const TrkFitTypeKey key) const

Definition at line 116 of file TrkExpectedHotSet.cxx.

116 {
117 return ( exHot(key) != 0 );
118}

◆ isMdc()

bool TrkExpectedHotSet::isMdc ( ) const

Definition at line 175 of file TrkExpectedHotSet.cxx.

175 {
176 return _elemId.sysInd() == TrkDetElemId::mdc;
177}
const TrkDetElemId::systemIndex & sysInd() const
Definition: TrkDetElemId.h:96

◆ isSvt()

bool TrkExpectedHotSet::isSvt ( ) const

Definition at line 170 of file TrkExpectedHotSet.cxx.

170 {
171 return _elemId.sysInd() == TrkDetElemId::svt;
172}

◆ operator==()

bool TrkExpectedHotSet::operator== ( const TrkExpectedHotSet rhs)
inline

Definition at line 51 of file TrkExpectedHotSet.h.

51 {
52 return this == &rhs;
53 }

◆ printFit()

void TrkExpectedHotSet::printFit ( const TrkFitTypeKey key,
std::ostream &  os = std::cout 
) const

Definition at line 122 of file TrkExpectedHotSet.cxx.

123 {
124 os << " Intersects element ";
125 _elemId.printAll(os);
126 const TrkExpectedHot* theExHot = exHot(key);
127 if ( theExHot == 0 ) {
128 os << " _" << endl;
129 return;
130 }
131 theExHot->printAll(os);
132 os << endl;
133}
void printAll(std::ostream &os=std::cout) const
virtual void printAll(std::ostream &os) const =0

◆ setExTrk()

void TrkExpectedHotSet::setExTrk ( const TrkExpectedTrk anExTrk)
protected

Definition at line 160 of file TrkExpectedHotSet.cxx.

160 {
161 _exTrk = anExTrk;
162 const int nHot = _theHots.size();
163 for ( int iHot(0); iHot < nHot; ++iHot ) {
164 TrkExpectedHot* aHot = _theHots[iHot];
165 aHot->setExTrk(_exTrk);
166 }
167}

◆ theHots()

std::vector< TrkExpectedHot * > TrkExpectedHotSet::theHots ( ) const
inline

Definition at line 73 of file TrkExpectedHotSet.h.

73{ return _theHots; }

Friends And Related Function Documentation

◆ TrkExpectedHotFactory

friend class TrkExpectedHotFactory
friend

Definition at line 100 of file TrkExpectedHotSet.h.

◆ TrkExpectedTrk

friend class TrkExpectedTrk
friend

Definition at line 99 of file TrkExpectedHotSet.h.


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