BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkFitTypeKey.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkFitTypeKey.h,v 1.1.1.1 2005/04/21 06:01:42 zhangy Exp $
4//
5// Description:
6// Class TrkFitTypeKey
7//
8// Environment:
9// Software developed for BaBar expirment @ SLAC B-Factory
10//
11// Author List:
12// Eric A Charles
13//
14// Copyright Information:
15// Copyright (C) 1998 Univ. Wisconsin-Madsion
16//
17//------------------------------------------------------------------------
18
19#ifndef TRKFITTYPEKEY_HH
20#define TRKFITTYPEKEY_HH
21
22//-------------
23// C Headers --
24//-------------
25#include <vector>
26#include <iostream>
27#include "MdcRecoUtil/PdtPid.h"
28
29class IfdKey;
30
32
33 //--------------------
34 // static Members --
35 //--------------------
36
37public:
38 // methods
39 static int currentKey() { return _keys.size(); }
40
41 static void killFitType(const TrkFitTypeKey key);
42
43protected:
44 static int newFitType(const char* name=0);
45
46private:
47
48 // Data members
49 static std::vector<IfdKey*> _keys;
50 static std::vector<PdtPid::PidType> _pidTypes;
51 static const int _defaultValue;
52
53 //--------------------
54 // Instance Members --
55 //--------------------
56
57public:
58
59 // standard c'tor makes a new IfdKey from a char* and associates a PidType
60 TrkFitTypeKey( const char* name = 0,
61 const PdtPid::PidType pid = PdtPid::null );
62
63 // copy c'tor
65 TrkFitTypeKey( const int& );
66
67 // Destructor
68 virtual ~TrkFitTypeKey( );
69
70 // Operators
71 bool operator==( const TrkFitTypeKey& rhs ) const{
72 return _value == rhs.value();
73 }
74 bool operator< ( const TrkFitTypeKey& rhs ) const{
75 return _value < rhs.value();
76 }
78 _value = rhs.value();
79 return *this;
80 }
81
82 // Selectors (const)
83 const int& value() const { return _value; }
84
85 const IfdKey* ifdKey() const {
86 if ( _value < 0 || _value >= currentKey() ) return 0;
87 return _keys[_value];
88 }
89
91 if ( _value < 0 || _value >= currentKey() ) return PdtPid::null;
92 return _pidTypes[_value];
93 }
94
95 void printAll( std::ostream& os = std::cout ) const;
96
97private:
98
99 // Data members
100 int _value;
101
102};
103
104std::ostream& operator<<(std::ostream& os, const TrkFitTypeKey& key);
105
106#endif
*************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
std::ostream & operator<<(std::ostream &os, const TrkFitTypeKey &key)
Definition: IfdKey.h:48
PidType
Definition: PdtPid.h:11
@ null
Definition: PdtPid.h:12
const IfdKey * ifdKey() const
Definition: TrkFitTypeKey.h:85
const int & value() const
Definition: TrkFitTypeKey.h:83
virtual ~TrkFitTypeKey()
bool operator<(const TrkFitTypeKey &rhs) const
Definition: TrkFitTypeKey.h:74
void printAll(std::ostream &os=std::cout) const
static int currentKey()
Definition: TrkFitTypeKey.h:39
static int newFitType(const char *name=0)
TrkFitTypeKey & operator=(const TrkFitTypeKey &rhs)
Definition: TrkFitTypeKey.h:77
static void killFitType(const TrkFitTypeKey key)
bool operator==(const TrkFitTypeKey &rhs) const
Definition: TrkFitTypeKey.h:71
PdtPid::PidType pidType() const
Definition: TrkFitTypeKey.h:90