BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkFitTypeKey Class Reference

#include <TrkFitTypeKey.h>

Public Member Functions

 TrkFitTypeKey (const char *name=0, const PdtPid::PidType pid=PdtPid::null)
 
 TrkFitTypeKey (const TrkFitTypeKey &)
 
 TrkFitTypeKey (const int &)
 
virtual ~TrkFitTypeKey ()
 
bool operator== (const TrkFitTypeKey &rhs) const
 
bool operator< (const TrkFitTypeKey &rhs) const
 
TrkFitTypeKeyoperator= (const TrkFitTypeKey &rhs)
 
const int & value () const
 
const IfdKeyifdKey () const
 
PdtPid::PidType pidType () const
 
void printAll (std::ostream &os=std::cout) const
 

Static Public Member Functions

static int currentKey ()
 
static void killFitType (const TrkFitTypeKey key)
 

Static Protected Member Functions

static int newFitType (const char *name=0)
 

Detailed Description

Definition at line 31 of file TrkFitTypeKey.h.

Constructor & Destructor Documentation

◆ TrkFitTypeKey() [1/3]

TrkFitTypeKey::TrkFitTypeKey ( const char * name = 0,
const PdtPid::PidType pid = PdtPid::null )

Definition at line 86 of file TrkFitTypeKey.cxx.

88 :_value(newFitType(name))
89{
90 if ( _value >= 0 ) _pidTypes.push_back(pid);
91}
static int newFitType(const char *name=0)

◆ TrkFitTypeKey() [2/3]

TrkFitTypeKey::TrkFitTypeKey ( const TrkFitTypeKey & rhs)

Definition at line 93 of file TrkFitTypeKey.cxx.

94 :_value(rhs.value())
95{
96}
const int & value() const

◆ TrkFitTypeKey() [3/3]

TrkFitTypeKey::TrkFitTypeKey ( const int & val)

Definition at line 98 of file TrkFitTypeKey.cxx.

99 :_value(val)
100{
101}

◆ ~TrkFitTypeKey()

TrkFitTypeKey::~TrkFitTypeKey ( )
virtual

Definition at line 107 of file TrkFitTypeKey.cxx.

108{
109}

Member Function Documentation

◆ currentKey()

static int TrkFitTypeKey::currentKey ( )
inlinestatic

Definition at line 39 of file TrkFitTypeKey.h.

39{ return _keys.size(); }

Referenced by ifdKey(), killFitType(), newFitType(), and pidType().

◆ ifdKey()

const IfdKey * TrkFitTypeKey::ifdKey ( ) const
inline

Definition at line 85 of file TrkFitTypeKey.h.

85 {
86 if ( _value < 0 || _value >= currentKey() ) return 0;
87 return _keys[_value];
88 }
static int currentKey()

Referenced by printAll().

◆ killFitType()

void TrkFitTypeKey::killFitType ( const TrkFitTypeKey key)
static

Definition at line 72 of file TrkFitTypeKey.cxx.

73{
74 const int i = key.value();
75 if ( i < 0 || i >= currentKey() ) return;
76 IfdKey* theKey = _keys[i];
77 assert(theKey != 0 );
78 delete theKey;
79 theKey = 0;
80}
*************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

◆ newFitType()

int TrkFitTypeKey::newFitType ( const char * name = 0)
staticprotected

Definition at line 64 of file TrkFitTypeKey.cxx.

65{
66 if ( name == 0 ) return _defaultValue;
67 _keys.push_back( new IfdStrKey(name) );
68 return (currentKey()-1);
69}

◆ operator<()

bool TrkFitTypeKey::operator< ( const TrkFitTypeKey & rhs) const
inline

Definition at line 74 of file TrkFitTypeKey.h.

74 {
75 return _value < rhs.value();
76 }

◆ operator=()

TrkFitTypeKey & TrkFitTypeKey::operator= ( const TrkFitTypeKey & rhs)
inline

Definition at line 77 of file TrkFitTypeKey.h.

77 {
78 _value = rhs.value();
79 return *this;
80 }

◆ operator==()

bool TrkFitTypeKey::operator== ( const TrkFitTypeKey & rhs) const
inline

Definition at line 71 of file TrkFitTypeKey.h.

71 {
72 return _value == rhs.value();
73 }

◆ pidType()

PdtPid::PidType TrkFitTypeKey::pidType ( ) const
inline

Definition at line 90 of file TrkFitTypeKey.h.

90 {
91 if ( _value < 0 || _value >= currentKey() ) return PdtPid::null;
92 return _pidTypes[_value];
93 }
@ null
Definition PdtPid.h:12

Referenced by printAll().

◆ printAll()

void TrkFitTypeKey::printAll ( std::ostream & os = std::cout) const

Definition at line 113 of file TrkFitTypeKey.cxx.

114{
115 char* pidName(0);
116 switch ( pidType() ) {
117 case PdtPid::electron:
118 pidName = "Electron";
119 break;
120 case PdtPid::muon:
121 pidName = "Muon";
122 break;
123 case PdtPid::pion:
124 pidName = "Pion";
125 break;
126 case PdtPid::kaon:
127 pidName = "Kaon";
128 break;
129 case PdtPid::proton:
130 pidName = "Proton";
131 break;
132 case PdtPid::null:
133 default:
134 pidName = "Unknown";
135 break;
136 }
137 os << ifdKey() << ' ' << pidName << " key: " << _value << endl;
138}
@ pion
Definition PdtPid.h:15
@ proton
Definition PdtPid.h:17
@ electron
Definition PdtPid.h:13
@ muon
Definition PdtPid.h:14
@ kaon
Definition PdtPid.h:16
const IfdKey * ifdKey() const
PdtPid::PidType pidType() const

◆ value()

const int & TrkFitTypeKey::value ( ) const
inline

Definition at line 83 of file TrkFitTypeKey.h.

83{ return _value; }

Referenced by operator<(), operator=(), and operator==().


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