#include <iostream>
#include <math.h>
#include "EvtGenBase/EvtConst.hh"
Go to the source code of this file.
Classes | |
class | EvtComplex |
Typedefs | |
typedef EvtComplex * | EvtComplexPtr |
typedef EvtComplexPtr * | EvtComplexPtrPtr |
typedef EvtComplexPtrPtr * | EvtComplexPtrPtrPtr |
Functions | |
EvtComplex | operator * (double d, const EvtComplex &c) |
EvtComplex | operator * (const EvtComplex &c, double d) |
EvtComplex | operator/ (const EvtComplex &c, double d) |
EvtComplex | operator/ (double d, const EvtComplex &c) |
EvtComplex | operator/ (const EvtComplex &c1, const EvtComplex &c2) |
EvtComplex | operator * (const EvtComplex &c1, const EvtComplex &c2) |
EvtComplex | operator- (const EvtComplex &c1, const EvtComplex &c2) |
EvtComplex | operator+ (const EvtComplex &c1, const EvtComplex &c2) |
EvtComplex | operator- (const EvtComplex &c) |
EvtComplex | conj (const EvtComplex &c) |
double | abs (const EvtComplex &c) |
double | abs2 (const EvtComplex &c) |
double | arg (const EvtComplex &c) |
double | real (const EvtComplex &c) |
double | imag (const EvtComplex &c) |
EvtComplex | exp (const EvtComplex &c) |
typedef EvtComplex* EvtComplexPtr |
Definition at line 68 of file EvtComplex.hh.
typedef EvtComplexPtr* EvtComplexPtrPtr |
Definition at line 69 of file EvtComplex.hh.
typedef EvtComplexPtrPtr* EvtComplexPtrPtrPtr |
Definition at line 70 of file EvtComplex.hh.
double abs | ( | const EvtComplex & | c | ) |
Definition at line 212 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00212 { 00213 00214 double c2=c._rpart*c._rpart+c._ipart*c._ipart; 00215 if (c2<=0.0) return 0.0; 00216 return sqrt(c2); 00217 00218 }
double abs2 | ( | const EvtComplex & | c | ) |
Definition at line 221 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
Referenced by EvtCalHelAmp::decay(), EvtBtoXsllUtil::dGdsdupProb(), EvtBtoXsllUtil::dGdsProb(), EvtCalHelAmp::firstder(), EvtAmpFactory< EvtDalitzPoint >::getTermCoeff(), EvtPto3PAmpFactory::processAmp(), and EvtXsection::setBW().
double arg | ( | const EvtComplex & | c | ) |
Definition at line 227 of file EvtComplex.hh.
References EvtComplex::_ipart, EvtComplex::_rpart, and EvtConst::pi.
Referenced by TrkMomCalculator::calcCurvAllCovsOLD(), TrkMomCalculator::calcCurvAllWeightsOLD(), TrkMomCalculator::calcCurvErrMom(), TrkMomCalculator::calcCurvPosmomCov(), TrkMomCalculator::calcCurvVecMom(), MdcSegInfoSterO::calcStereo(), EvtVSSBMixCPT::decay(), EvtSSDCP::decay(), TrkCircleTraj::distTo1stError(), CountTheEntities::execute(), QCMCFilter::findD0Decay(), EvtMTree::parseArg(), parseRequest(), Dalitz::Phase(), MdcTrack::projectToR(), TrkMomCalculator::ptMom(), MdcDedxTrk::SpaceChargeCorrec(), and SpaceChargeCorrec().
00227 { //added by FS 00228 if ((c._rpart==0)&&(c._ipart==0)) {return 0.0;} 00229 if (c._rpart==0){ 00230 if (c._ipart>0){ 00231 return EvtConst::pi/2; 00232 } else { 00233 return -EvtConst::pi/2; 00234 } 00235 } else { 00236 return atan2(c._ipart,c._rpart); 00237 } 00238 }
EvtComplex conj | ( | const EvtComplex & | c | ) |
Definition at line 206 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00206 { 00207 00208 return EvtComplex(c._rpart,-c._ipart); 00209 00210 }
EvtComplex exp | ( | const EvtComplex & | c | ) |
Definition at line 252 of file EvtComplex.hh.
References EvtComplex::_ipart, EvtComplex::_rpart, cos(), and sin().
Referenced by EmcRecShowerShape::A42Moment(), Amp(), VVS::amps(), EvtBtoXsgammaFermiUtil::BesselI1(), EvtBtoXsgammaFermiUtil::BesselK1(), TofQElecSvc::BQTC1(), TofQElecSvc::BQTC2(), BesTofDigitizerEcV4::calAdcRes_charge(), BesTofDigitizerEcV4::calAdcRes_charge1(), BesTofDigitizerEcV4::StripStruct::calNextN(), BesTofDigitizerEcV4::StripStruct::calSigma(), BesTofDigitizerEcV4::calTdcRes_charge(), BesTofDigitizerEcV4::calTdcRes_charge1(), chisq2confLevel(), ChisqConsistency::ChisqConsistency(), EmcRecTofDigitCalib::Convert(), FTFinder::CorrectEvtTiming(), EvtVSSBMixCPT::decay(), EvtVPHOtoVISRHi::decay(), EvtVPHOtoVISR::decay(), EvtVectorIsr::decay(), EvtTauGamMu::decay(), EvtSVVCPLH::decay(), EvtSVSCPLH::decay(), EvtSSDCP::decay(), EvtS2GV::decay(), EvtPhiDalitz::decay(), EvtPBB2::decay(), EvtPBB1::decay(), EvtDMix::decay(), EvtD0mixDalitz::decay(), EvtBtoXsEtap::decay(), EvtGoityRoberts::DecayBDpilnuGR(), EvtGoityRoberts::DecayBDstarpilnuGR(), MdcDedxCorrection::dedx_pid_exp(), dedx_pid_exp(), EvtBtoXsgammaKagan::Delta(), EvtVubNLO::dgamma(), TofQElecSvc::EQTC(), TMuKFun::Eval_Coloumb_Factor(), EvtEvalHelAmp::evalAmp(), rb::TDFun::EvalSoft(), TDFun::EvalSoft(), EvtISGWFF::EvtISGW1FF1P1(), EvtISGWFF::EvtISGW1FF1S0(), EvtISGWFF::EvtISGW1FF21S0(), EvtISGWFF::EvtISGW1FF23S1(), EvtISGWFF::EvtISGW1FF3P0(), EvtISGWFF::EvtISGW1FF3P1(), EvtISGWFF::EvtISGW1FF3P2(), EvtISGWFF::EvtISGW1FF3S1(), EvtVubdGamma::EvtVubdGamma(), EvtVubNLO::expShapeFunction(), EvtBtoXsgammaFermiUtil::FermiExpFunc(), EvtBtoXsgammaFermiUtil::FermiGaussFunc(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnB(), EvtBtoXsllUtil::FermiMomentumProb(), EvtBtoXsgammaFermiUtil::FermiRomanFunc(), EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot(), EvtBtoXsgammaFermiUtil::FermiRomanRootFcnA(), PreT0MdcCalib::funTmax(), IniMdcCalib::funTmax(), PreT0Calib::funTmax(), IniCalib::funTmax(), PreT0MdcCalib::funTmin(), IniMdcCalib::funTmin(), PreT0Calib::funTmin(), IniCalib::funTmin(), EvtVubNLO::Gamma(), EvtBtoXsgammaFermiUtil::Gamma(), EvtVubNLO::gausShapeFunction(), NumRecipes::gcf(), TPhoton::GetCosTheta(), rb::TPhoton::GetCosThetaF(), TPhoton::GetCosThetaF(), TPhoton::GetCosThetaF2(), rb::TPhotonD::GetEnergy(), rb::TPhoton::GetEnergy(), TPhotonD::GetEnergy(), TPhotonS::GetEnergy(), TPhotonF::GetEnergy(), TPhotonI::GetEnergy(), EvtPFermi::getFPFermi(), EvtBtoXsgammaAliGreub::GetMass(), EvtbTosllBallFF::getScalarFF(), EvtbTosllAliFF::getScalarFF(), BesMdcSD::GetValDedxCurve(), EvtbTosllBallFF::getVectorFF(), EvtbTosllAliFF::getVectorFF(), TPhotonS::GetXNorm(), NumRecipes::gser(), EvtD0mixDalitz::h1(), EvtD0mixDalitz::h2(), EvtCPUtil::incoherentMix(), EvtSVSCPLH::init(), EvtPartWave::init(), EvtHelAmp::init(), landaun(), BesEmcWaveform::makeWaveform(), EmcWaveform::makeWaveform(), EmcWaveform::makeWaveformTrg(), Mdcxprobab(), BesTofDigitizerEcV4::StripStruct::multiply(), mylan(), EvtMTree::parseAmps(), ParticleIDBase::pdfCalculate(), EventAssemblyAlg::phiCut(), EmcRecShowerPosLoglin::Position(), MdcNavigation::probab(), MdcUtilitySvc::probab(), TRunge::Propagate_QC(), EvtDalitzReso::propGauss(), FTTrack::r_phiFit(), EvtHighSpinParticle::rotateToHelicityBasis(), FTTrack::s_zFit(), BesTofDigitizerEcV3::Scintillation(), BesTofDigitizerEcV2::Scintillation(), BesTofDigitizerBrV2::Scintillation(), TPiFormFactor::SetFFParameters(), EmcRecSplitWeighted::Split(), tau_mode(), EventAssemblyAlg::thetaCut(), BesTofDigitizerEcV2::TofPmtAccum(), BesTofDigitizerEcV1::TofPmtAccum(), BesTofDigitizerBrV2::TofPmtAccum(), BesTofDigitizerBrV1::TofPmtAccum(), BesTofDigitizerEcV3::TofPmtRspns(), BesTofDigitizerEcV2::TofPmtRspns(), BesTofDigitizerBrV2::TofPmtRspns(), EvtVubNLO::U1(), calib_barrel_atten::updateData(), calib_endcap_atten::updateData(), FTFinder::VertexFit(), FTFinder::VertexFit2D(), and wignerD().
double imag | ( | const EvtComplex & | c | ) |
Definition at line 246 of file EvtComplex.hh.
References EvtComplex::_ipart.
Referenced by EvtSpinDensity::Check(), EvtSSSCPpng::decay(), BesTrigL1::execute(), EvtCPUtil::fractB0CP(), EvtCPUtil::fractB0nonCP(), EvtAmpFactory< EvtDalitzPoint >::getTermCoeff(), TFormFactor::Init(), QCMCFilter::initialize(), EvtSpinDensity::NormalizedProb(), EvtAmpPdf< T >::pdf(), EvtAmpAmpPdf< T >::pdf(), EvtAmplitudeSum< EvtDalitzPoint >::print(), and TVacuumPol::ReadVacuumPolData().
00246 { 00247 00248 return c._ipart; 00249 00250 }
EvtComplex operator * | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) |
Definition at line 168 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00168 { 00169 00170 return EvtComplex(c1._rpart*c2._rpart-c1._ipart*c2._ipart, 00171 c1._rpart*c2._ipart+c1._ipart*c2._rpart); 00172 00173 }
EvtComplex operator * | ( | const EvtComplex & | c, | |
double | d | |||
) |
Definition at line 117 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00117 { 00118 00119 return EvtComplex(c._rpart*d,c._ipart*d); 00120 00121 }
EvtComplex operator * | ( | double | d, | |
const EvtComplex & | c | |||
) |
Definition at line 111 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00111 { 00112 00113 return EvtComplex(c._rpart*d,c._ipart*d); 00114 00115 }
EvtComplex operator+ | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) |
Definition at line 181 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00181 { 00182 00183 return EvtComplex(c1._rpart+c2._rpart,c1._ipart+c2._ipart); 00184 00185 }
EvtComplex operator- | ( | const EvtComplex & | c | ) |
Definition at line 200 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00200 { 00201 00202 return EvtComplex(-c._rpart,-c._ipart); 00203 00204 }
EvtComplex operator- | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) |
Definition at line 175 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00175 { 00176 00177 return EvtComplex(c1._rpart-c2._rpart,c1._ipart-c2._ipart); 00178 00179 }
EvtComplex operator/ | ( | const EvtComplex & | c1, | |
const EvtComplex & | c2 | |||
) |
Definition at line 159 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00159 { 00160 00161 double inv=1.0/(c2._rpart*c2._rpart+c2._ipart*c2._ipart); 00162 00163 return EvtComplex(inv*(c1._rpart*c2._rpart+c1._ipart*c2._ipart), 00164 inv*(c1._ipart*c2._rpart-c1._rpart*c2._ipart)); 00165 00166 }
EvtComplex operator/ | ( | double | d, | |
const EvtComplex & | c | |||
) |
Definition at line 149 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00149 { 00150 00151 double Num=d/(c._rpart*c._rpart+c._ipart*c._ipart); 00152 00153 return EvtComplex( Num*c._rpart, -Num*c._ipart ); 00154 00155 }
EvtComplex operator/ | ( | const EvtComplex & | c, | |
double | d | |||
) |
Definition at line 125 of file EvtComplex.hh.
References EvtComplex::_ipart, and EvtComplex::_rpart.
00125 { 00126 00127 return EvtComplex(c._rpart/d,c._ipart/d); 00128 00129 }
double real | ( | const EvtComplex & | c | ) |
Definition at line 240 of file EvtComplex.hh.
References EvtComplex::_rpart.
00240 { 00241 00242 return c._rpart; 00243 00244 }