#include <EvtVector4R.hh>
Public Member Functions | |
EvtVector4R () | |
EvtVector4R (double e, double px, double py, double pz) | |
void | set (int i, double d) |
void | set (double e, double px, double py, double pz) |
EvtVector4R & | operator *= (double c) |
EvtVector4R & | operator/= (double c) |
EvtVector4R & | operator= (const EvtVector4R &v2) |
EvtVector4R & | operator+= (const EvtVector4R &v2) |
EvtVector4R & | operator-= (const EvtVector4R &v2) |
double | get (int i) const |
double | cont (const EvtVector4R &v4) const |
double | mass2 () const |
double | mass () const |
void | applyRotateEuler (double alpha, double beta, double gamma) |
void | applyBoostTo (const EvtVector4R &p4) |
void | applyBoostTo (const EvtVector3R &boost) |
EvtVector4R | cross (const EvtVector4R &v2) |
double | dot (const EvtVector4R &v2) const |
double | d3mag () const |
double | scalartripler3 (const EvtVector4R &p1, const EvtVector4R &p2, const EvtVector4R &p3) const |
double | dotr3 (const EvtVector4R &p1, const EvtVector4R &p2) const |
double | mag2r3 (const EvtVector4R &p1) const |
double | magr3 (const EvtVector4R &p1) const |
double | theta () |
double | phi () |
Private Member Functions | |
double | Square (double x) const |
Private Attributes | |
double | v [4] |
Friends | |
EvtVector4R | rotateEuler (const EvtVector4R &rs, double alpha, double beta, double gamma) |
EvtVector4R | boostTo (const EvtVector4R &rs, const EvtVector4R &p4) |
EvtVector4R | boostTo (const EvtVector4R &rs, const EvtVector3R &boost) |
EvtVector4R | operator * (double d, const EvtVector4R &v2) |
EvtVector4R | operator * (const EvtVector4R &v2, double d) |
EvtVector4R | operator/ (const EvtVector4R &v2, double d) |
double | operator * (const EvtVector4R &v1, const EvtVector4R &v2) |
EvtVector4R | operator+ (const EvtVector4R &v1, const EvtVector4R &v2) |
EvtVector4R | operator- (const EvtVector4R &v1, const EvtVector4R &v2) |
std::ostream & | operator<< (std::ostream &s, const EvtVector4R &v) |
Definition at line 29 of file EvtVector4R.hh.
EvtVector4R::EvtVector4R | ( | ) | [inline] |
EvtVector4R::EvtVector4R | ( | double | e, | |
double | px, | |||
double | py, | |||
double | pz | |||
) |
void EvtVector4R::applyBoostTo | ( | const EvtVector3R & | boost | ) |
Definition at line 120 of file EvtVector4R.cc.
References EvtVector3R::get(), and v.
00120 { 00121 00122 double bx,by,bz,gamma,b2; 00123 00124 bx=boost.get(0); 00125 by=boost.get(1); 00126 bz=boost.get(2); 00127 00128 double bxx=bx*bx; 00129 double byy=by*by; 00130 double bzz=bz*bz; 00131 00132 b2=bxx+byy+bzz; 00133 00134 00135 if (b2==0.0){ 00136 return; 00137 } 00138 00139 assert(b2<1.0); 00140 00141 gamma=1.0/sqrt(1-b2); 00142 00143 00144 double gb2=(gamma-1.0)/b2; 00145 00146 double gb2xy=gb2*bx*by; 00147 double gb2xz=gb2*bx*bz; 00148 double gb2yz=gb2*by*bz; 00149 00150 double gbx=gamma*bx; 00151 double gby=gamma*by; 00152 double gbz=gamma*bz; 00153 00154 double e2=v[0]; 00155 double px2=v[1]; 00156 double py2=v[2]; 00157 double pz2=v[3]; 00158 00159 v[0]=gamma*e2+gbx*px2+gby*py2+gbz*pz2; 00160 00161 v[1]=gbx*e2+gb2*bxx*px2+px2+gb2xy*py2+gb2xz*pz2; 00162 00163 v[2]=gby*e2+gb2*byy*py2+py2+gb2xy*px2+gb2yz*pz2; 00164 00165 v[3]=gbz*e2+gb2*bzz*pz2+pz2+gb2yz*py2+gb2xz*px2; 00166 00167 return; 00168 00169 }
void EvtVector4R::applyBoostTo | ( | const EvtVector4R & | p4 | ) |
Definition at line 108 of file EvtVector4R.cc.
References get().
Referenced by boostTo(), and EvtPto3P::initDaughters().
00108 { 00109 00110 double e=p4.get(0); 00111 00112 EvtVector3R boost(p4.get(1)/e,p4.get(2)/e,p4.get(3)/e); 00113 00114 applyBoostTo(boost); 00115 00116 return; 00117 00118 }
void EvtVector4R::applyRotateEuler | ( | double | alpha, | |
double | beta, | |||
double | gamma | |||
) |
Definition at line 81 of file EvtVector4R.cc.
References cos(), sin(), v, and x.
Referenced by EvtPto3P::initDaughters(), EvtGenKine::PhaseSpace(), EvtGenKine::PhaseSpacePole(), and rotateEuler().
00081 { 00082 00083 double sp=sin(phi); 00084 double st=sin(theta); 00085 double sk=sin(ksi); 00086 double cp=cos(phi); 00087 double ct=cos(theta); 00088 double ck=cos(ksi); 00089 00090 double x=( ck*ct*cp-sk*sp)*v[1]+( -sk*ct*cp-ck*sp)*v[2]+st*cp*v[3]; 00091 double y=( ck*ct*sp+sk*cp)*v[1]+(-sk*ct*sp+ck*cp)*v[2]+st*sp*v[3]; 00092 double z=-ck*st*v[1]+sk*st*v[2]+ct*v[3]; 00093 00094 v[1]=x; 00095 v[2]=y; 00096 v[3]=z; 00097 00098 }
double EvtVector4R::cont | ( | const EvtVector4R & | v4 | ) | const [inline] |
EvtVector4R EvtVector4R::cross | ( | const EvtVector4R & | v2 | ) |
Definition at line 171 of file EvtVector4R.cc.
References subSeperate::temp, and v.
Referenced by EvtJTO3P::decay(), EvtHAngSam3::decay(), EvtAngSam3::decay(), and EvtDecayAngleChi().
00171 { 00172 00173 //Calcs the cross product. Added by djl on July 27, 1995. 00174 //Modified for real vectros by ryd Aug 28-96 00175 00176 EvtVector4R temp; 00177 00178 temp.v[0] = 0.0; 00179 temp.v[1] = v[2]*p2.v[3] - v[3]*p2.v[2]; 00180 temp.v[2] = v[3]*p2.v[1] - v[1]*p2.v[3]; 00181 temp.v[3] = v[1]*p2.v[2] - v[2]*p2.v[1]; 00182 00183 return temp; 00184 }
double EvtVector4R::d3mag | ( | ) | const |
Definition at line 186 of file EvtVector4R.cc.
References subSeperate::temp, and v.
Referenced by EvtMHelAmp::amplitude(), AngularSam::amps(), rhopifull::amps1(), VVS::amps1(), EvtHelSys::Angles(), EvtVVSPwave::decay(), EvtVSSMix::decay(), EvtVSSBMixCPT::decay(), EvtVSS::decay(), EvtVSPPwave::decay(), EvtTVSPwave::decay(), EvtTSS::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVSCPLH::decay(), EvtSVSCP::decay(), EvtSVS::decay(), EvtSVPHelAmp::decay(), EvtSVPCP::decay(), EvtSTSCP::decay(), EvtSTS::decay(), EvtSSDCP::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtMBody3::decay(), EvtJPE::decay(), EvtJ2BB1::decay(), EvtHypWK::decay(), EvtHAngSam3::decay(), EvtDeBD::decay(), EvtConExc::decay(), EvtCalHelAmp::decay(), EvtBody3::decay(), EvtAngSam3::decay(), EvtAngH2::decay(), EvtAmpA1(), EvtAmpA2(), EvtDecayAngleChi(), EvtConExc::findMaxXS(), EvtTauola::fixPolarizations(), EvtPythia::fixPolarizations(), EvtOpenCharm::fixPolarizations(), EvtLundCharm::fixPolarizations(), EvtLunda::fixPolarizations(), EvtJetSet::fixPolarizations(), EvtHelSys::getHelAng(), EvtConExc::Rad2difXs(), EvtDecay::SuperBody3decay_judge(), EvtDecay::SuperBody3decay_make(), and EvtSVVHelAmp::SVVHel().
00189 { 00190 double temp; 00191 00192 temp = v[1]*v[1]+v[2]*v[2]+v[3]*v[3]; 00193 00194 temp = sqrt( temp ); 00195 00196 return temp; 00197 } // r3mag
double EvtVector4R::dot | ( | const EvtVector4R & | v2 | ) | const |
Definition at line 199 of file EvtVector4R.cc.
References subSeperate::temp, and v.
Referenced by EvtHAngSam3::decay(), and EvtDecayAngleChi().
00199 { 00200 00201 //Returns the dot product of the 3 momentum. Added by 00202 //djl on July 27, 1995. for real!!! 00203 00204 double temp; 00205 00206 temp = v[1]*p2.v[1]; 00207 temp += v[2]*p2.v[2]; 00208 temp += v[3]*p2.v[3]; 00209 00210 return temp; 00211 00212 } //dot
double EvtVector4R::dotr3 | ( | const EvtVector4R & | p1, | |
const EvtVector4R & | p2 | |||
) | const |
Definition at line 229 of file EvtVector4R.cc.
References mass2().
Referenced by EvtDecayAnglePhi().
00230 { 00231 return 1/mass2() * ((*this) * p1) * ((*this) * p2) - p1 * p2; 00232 }
double EvtVector4R::get | ( | int | i | ) | const [inline] |
Definition at line 179 of file EvtVector4R.hh.
References v.
Referenced by EvtTensor4C::addDirProd(), EvtMHelAmp::amplitude(), AngularSam::amps(), EvtHelSys::Angles(), applyBoostTo(), EvtVector4C::applyBoostTo(), EvtTensor4C::applyBoostTo(), EvtRaritaSchwinger::applyBoostTo(), EvtDiracSpinor::applyBoostTo(), EvtDecay::callBesEvtGen(), EvtDecay::callEvtGen(), EvtTensor4C::cont1(), EvtTensor4C::cont2(), EvtVVSPwave::decay(), EvtTVSPwave::decay(), EvtTauola::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtOpenCharm::decay(), EvtOmegaDalitz::decay(), EvtMBody3::decay(), EvtLundCharm::decay(), EvtLunda::decay(), EvtLNuGamma::decay(), EvtKstarstargamma::decay(), EvtJTO3P::decay(), EvtJetSet::decay(), EvtJ2BB1::decay(), EvtHelPPJ::decay(), EvtHAngSam3::decay(), EvtFlatQ2::decay(), EvtEtaDalitz::decay(), EvtConExc::decay(), EvtBtoXsll::decay(), EvtBsquark::decay(), EvtBody3::decay(), EvtAngSam3::decay(), EvtAngH2::decay(), directProd(), EvtPHOTOS::doRadCorr(), EvtPhotonParticle::epsParentPhoton(), EvtAmpA1(), EvtAmpA2(), EvtEulerAngles::EvtEulerAngles(), EvtVector4C::EvtVector4C(), EvtDecay::FinalState_sort(), EvtConExc::findMaxXS(), EvtTauola::fixPolarizations(), EvtPythia::fixPolarizations(), EvtOpenCharm::fixPolarizations(), EvtLundCharm::fixPolarizations(), EvtLunda::fixPolarizations(), EvtJetSet::fixPolarizations(), EvtGen::generateEvent(), EvtConExc::hadron_angle_sampling(), EvtHelSys::Helrotate(), EvtTensorParticle::init(), EvtPhotonParticle::init(), EvtNeutrinoParticle::init(), EvtPto3P::initDaughters(), operator *(), operator<<(), EvtDecay::SuperBody3decay_judge(), EvtDecay::SuperBody3decay_make(), and EvtSVVHelAmp::SVVHel().
double EvtVector4R::mag2r3 | ( | const EvtVector4R & | p1 | ) | const |
Definition at line 236 of file EvtVector4R.cc.
References mass2(), and Square().
Referenced by EvtDecayAnglePhi(), and magr3().
double EvtVector4R::magr3 | ( | const EvtVector4R & | p1 | ) | const |
Definition at line 242 of file EvtVector4R.cc.
References mag2r3().
00243 { 00244 return sqrt(mag2r3(p1)); 00245 }
double EvtVector4R::mass | ( | ) | const |
Definition at line 39 of file EvtVector4R.cc.
References v.
Referenced by EvtSemiLeptonicTensorAmp::CalcAmp(), EvtDecay::callEvtGen(), EvtPsi3Sdecay::choseDecay(), EvtVPHOtoVISRHi::decay(), EvtVPHOtoVISR::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVSCPLH::decay(), EvtSVSCP::decay(), EvtSVPHelAmp::decay(), EvtSVPCP::decay(), EvtSTS::decay(), EvtSSDCP::decay(), EvtPhiDalitz::decay(), EvtmPhsp::decay(), EvtmH2::decay(), EvtKstarstargamma::decay(), EvtConExc::decay(), EvtBtoXsll::decay(), EvtGoityRoberts::DecayBDpilnuGR(), EvtGoityRoberts::DecayBDstarpilnuGR(), EvtConExc::difgamXs(), EvtDecayAnglePhi(), EvtConExc::findMaxXS(), EvtTauHadnu::Fpi(), EvtConExc::gamHXSection(), EvtGen::generateEvent(), EvtParticle::generateMassTree(), EvtParticle::mass(), EvtConExc::Rad1difXs(), EvtConExc::Rad2difXs(), EvtResonance::relBrWig(), EvtResonance2::resAmpl(), scalartripler3(), EvtMBreitWigner::shape(), EvtDecay::SuperBody3decay_judge(), and EvtDecay::SuperBody3decay_make().
00039 { 00040 00041 double m2=v[0]*v[0]-v[1]*v[1]-v[2]*v[2]-v[3]*v[3]; 00042 00043 if (m2>0.0) { 00044 return sqrt(m2); 00045 } 00046 else{ 00047 return 0.0; 00048 } 00049 }
double EvtVector4R::mass2 | ( | ) | const [inline] |
Definition at line 116 of file EvtVector4R.hh.
References v.
Referenced by rhopifull::amps1(), VVS::amps1(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtTauHadnu::decay(), EvtPi0Dalitz::decay(), EvtPhiDalitz::decay(), EvtOmegaDalitz::decay(), EvtBtoXsll::decay(), dotr3(), EvtDecayAngle(), EvtDecayPlaneNormalAngle(), EvtConExc::gamHXSection(), mag2r3(), and EvtResonance::relBrWig().
EvtVector4R & EvtVector4R::operator *= | ( | double | c | ) | [inline] |
EvtVector4R & EvtVector4R::operator+= | ( | const EvtVector4R & | v2 | ) | [inline] |
EvtVector4R & EvtVector4R::operator-= | ( | const EvtVector4R & | v2 | ) | [inline] |
EvtVector4R & EvtVector4R::operator/= | ( | double | c | ) | [inline] |
EvtVector4R & EvtVector4R::operator= | ( | const EvtVector4R & | v2 | ) | [inline] |
double EvtVector4R::phi | ( | ) |
double EvtVector4R::scalartripler3 | ( | const EvtVector4R & | p1, | |
const EvtVector4R & | p2, | |||
const EvtVector4R & | p3 | |||
) | const |
Definition at line 217 of file EvtVector4R.cc.
References EvtTensor4C::cont2(), directProd(), dual(), EvtVector4C::get(), and mass().
Referenced by EvtDecayAnglePhi().
00219 { 00220 EvtVector4C lc=dual(directProd(*this, p1)).cont2(p2); 00221 EvtVector4R l(real(lc.get(0)), real(lc.get(1)), real(lc.get(2)), 00222 real(lc.get(3))); 00223 00224 return -1.0/mass() * (l * p3); 00225 }
void EvtVector4R::set | ( | double | e, | |
double | px, | |||
double | py, | |||
double | pz | |||
) | [inline] |
void EvtVector4R::set | ( | int | i, | |
double | d | |||
) | [inline] |
Definition at line 183 of file EvtVector4R.hh.
References v.
Referenced by EvtbTosllVectorAmp::CalcAmp(), EvtbTosllScalarAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicScalarAmp::CalcAmp(), EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), EvtVubNLO::decay(), EvtVubHybrid::decay(), EvtVub::decay(), EvtVSPPwave::decay(), EvtTVSPwave::decay(), EvtSLN::decay(), EvtSll::decay(), EvtSinglePoint::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtPythia::decay(), EvtPyGaGa::decay(), EvtPycont::decay(), EvtPhokhara_ppbar::decay(), EvtPhokhara_pipipi0::decay(), EvtPhokhara_pipi::decay(), EvtPhokhara_pi0pi0pipi::decay(), EvtPhokhara_nnbar::decay(), EvtPhokhara_LLB::decay(), EvtPhokhara_KK::decay(), EvtPhokhara_K0K0::decay(), EvtPhokhara_4pi::decay(), EvtPhokhara::decay(), EvtLundCharm::decay(), EvtLunda::decay(), EvtJscont::decay(), EvtJetSet::decay(), EvtHelPPJ::decay(), EvtDDalitz::decay(), EvtCBTo3piP00::decay(), EvtCBTo3piMPP::decay(), EvtBToKpipiCP::decay(), EvtBTo3piCP::decay(), EvtBHadronic::decay(), EvtPHOTOS::doRadCorr(), EvtGen::generateEvent(), EvtConExc::hadron_angle_sampling(), EvtHelSys::Helrotate(), EvtPto3P::initDaughters(), EvtGenKine::PhaseSpace(), EvtGenKine::PhaseSpacePole(), EvtParticle::setp(), EvtConExc::SetP4(), and EvtConExc::SetP4Rvalue().
double EvtVector4R::Square | ( | double | x | ) | const [inline, private] |
double EvtVector4R::theta | ( | ) |
Definition at line 249 of file EvtVector4R.cc.
References v.
Referenced by EvtRexc::angularSampling(), EvtConExc::angularSampling(), EvtAngSamLab::decay(), and EvtConExc::photonSampling().
00249 { 00250 return (v[1]==0 && v[2]==0 && v[3]==0 )?0: atan2(sqrt(v[1]*v[1]+v[2]*v[2]),v[3]); 00251 }
EvtVector4R boostTo | ( | const EvtVector4R & | rs, | |
const EvtVector3R & | boost | |||
) | [friend] |
Definition at line 70 of file EvtVector4R.cc.
00071 { 00072 00073 EvtVector4R tmp(rs); 00074 tmp.applyBoostTo(boost); 00075 return tmp; 00076 00077 }
EvtVector4R boostTo | ( | const EvtVector4R & | rs, | |
const EvtVector4R & | p4 | |||
) | [friend] |
Definition at line 61 of file EvtVector4R.cc.
00062 { 00063 00064 EvtVector4R tmp(rs); 00065 tmp.applyBoostTo(p4); 00066 return tmp; 00067 00068 }
double operator * | ( | const EvtVector4R & | v1, | |
const EvtVector4R & | v2 | |||
) | [friend] |
EvtVector4R operator * | ( | const EvtVector4R & | v2, | |
double | d | |||
) | [friend] |
Definition at line 126 of file EvtVector4R.hh.
00126 { 00127 00128 return EvtVector4R(v2)*=c; 00129 }
EvtVector4R operator * | ( | double | d, | |
const EvtVector4R & | v2 | |||
) | [friend] |
Definition at line 121 of file EvtVector4R.hh.
00121 { 00122 00123 return EvtVector4R(v2)*=c; 00124 }
EvtVector4R operator+ | ( | const EvtVector4R & | v1, | |
const EvtVector4R & | v2 | |||
) | [friend] |
Definition at line 174 of file EvtVector4R.hh.
00174 { 00175 00176 return EvtVector4R(v1)+=v2; 00177 }
EvtVector4R operator- | ( | const EvtVector4R & | v1, | |
const EvtVector4R & | v2 | |||
) | [friend] |
Definition at line 169 of file EvtVector4R.hh.
00169 { 00170 00171 return EvtVector4R(v1)-=v2; 00172 }
EvtVector4R operator/ | ( | const EvtVector4R & | v2, | |
double | d | |||
) | [friend] |
Definition at line 131 of file EvtVector4R.hh.
00131 { 00132 00133 return EvtVector4R(v2)/=c; 00134 }
std::ostream& operator<< | ( | std::ostream & | s, | |
const EvtVector4R & | v | |||
) | [friend] |
EvtVector4R rotateEuler | ( | const EvtVector4R & | rs, | |
double | alpha, | |||
double | beta, | |||
double | gamma | |||
) | [friend] |
Definition at line 52 of file EvtVector4R.cc.
00053 { 00054 00055 EvtVector4R tmp(rs); 00056 tmp.applyRotateEuler(alpha,beta,gamma); 00057 return tmp; 00058 00059 }
double EvtVector4R::v[4] [private] |
Definition at line 79 of file EvtVector4R.hh.
Referenced by applyBoostTo(), applyRotateEuler(), cont(), cross(), d3mag(), dot(), EvtVector4R(), get(), mass(), mass2(), operator *(), operator *=(), operator+=(), operator-=(), operator/=(), operator=(), phi(), set(), and theta().