File indexing completed on 2025-01-30 10:11:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef QQCHANNEL_HH
0011 #define QQCHANNEL_HH
0012
0013 #include <string>
0014 #include <vector>
0015 #include <sstream>
0016
0017 namespace HepPDT {
0018
0019
0020
0021
0022 struct QQhelicity {
0023
0024 double prob;
0025 std::vector<int> hel;
0026 };
0027
0028
0029 struct QQAngularHelicity {
0030 int hel;
0031 double a0;
0032 double a1;
0033 double a2;
0034 double a3;
0035 double a4;
0036 double a5;
0037 double a6;
0038 };
0039
0040
0041 struct QQmatrix {
0042 double a;
0043 double b;
0044 double c;
0045 };
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 class QQChannel {
0057
0058 public:
0059
0060 typedef std::vector<std::string> SringVect;
0061 typedef std::vector<QQhelicity> HelVect;
0062 typedef std::vector<QQAngularHelicity> AngHelVect;
0063
0064
0065 QQChannel();
0066 ~QQChannel();
0067
0068
0069
0070 void swap ( QQChannel & rhs );
0071 QQChannel( const QQChannel & orig );
0072 QQChannel & operator = ( const QQChannel & rhs );
0073
0074
0075
0076
0077 void addDaughter( std::string nm ) { itsDaughters.push_back( nm ); }
0078
0079 void addHelicity( QQhelicity hel ) { itsHelicity.push_back( hel ); }
0080
0081 void addAngHelicity( QQAngularHelicity hel ) { itsAngularHelicity.push_back( hel ); }
0082
0083 void setMatrixCode( std::string & m ) { itsMatrixCode = m; }
0084
0085 void setBranchingFraction( double bf ) { itsBranchingFraction = bf; }
0086
0087 void setSinPhi( double s ) { itsSinPhi = s; }
0088
0089 void setMatrix( QQmatrix m ) { itsMatrix = m; }
0090
0091 void setCPTag( ) { itsCPTag = true; }
0092
0093 void clear();
0094
0095 void addHelicity( std::istringstream & thisline );
0096
0097 void addAngHelicity( std::istringstream & thisline );
0098
0099 void parse( std::istringstream & thisline );
0100
0101
0102
0103
0104 bool cpt( ) const { return itsCPTag; }
0105
0106 std::string matrixCode( ) const { return itsMatrixCode; }
0107
0108 double branchingFraction( ) const { return itsBranchingFraction; }
0109
0110 double sinPhi( ) const { return itsSinPhi; }
0111
0112 std::string daughter( int i ) const { return itsDaughters[i]; }
0113
0114 QQhelicity helicity( int i ) const { return itsHelicity[i]; }
0115
0116 QQAngularHelicity angHelicity( int i ) const { return itsAngularHelicity[i]; }
0117
0118 int sizeDtr() const { return itsDaughters.size(); }
0119
0120 int sizeHel() const { return itsHelicity.size(); }
0121
0122 int sizeAngHel() const { return itsAngularHelicity.size(); }
0123
0124
0125 void write( std::ostream & os ) const;
0126
0127
0128 private:
0129
0130 std::string itsMatrixCode;
0131 double itsBranchingFraction;
0132 double itsSinPhi;
0133 QQmatrix itsMatrix;
0134 SringVect itsDaughters;
0135 HelVect itsHelicity;
0136 AngHelVect itsAngularHelicity;
0137 bool itsCPTag;
0138
0139 };
0140
0141 inline void swap( QQChannel & first, QQChannel & second ) {
0142 first.swap( second );
0143 }
0144
0145 }
0146
0147 #endif