BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtComplex.hh File Reference
#include "EvtConst.hh"
#include <iostream>
#include <math.h>

Go to the source code of this file.

Classes

class  EvtComplex

Typedefs

typedef EvtComplexEvtComplexPtr
typedef EvtComplexPtrEvtComplexPtrPtr
typedef EvtComplexPtrPtrEvtComplexPtrPtrPtr

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 Documentation

◆ EvtComplexPtr

Definition at line 68 of file EvtComplex.hh.

◆ EvtComplexPtrPtr

Definition at line 69 of file EvtComplex.hh.

◆ EvtComplexPtrPtrPtr

Definition at line 70 of file EvtComplex.hh.

Function Documentation

◆ abs()

double abs ( const EvtComplex & c)

Definition at line 186 of file EvtComplex.hh.

186 {
187
188 double c2 = c._rpart * c._rpart + c._ipart * c._ipart;
189 if ( c2 <= 0.0 ) return 0.0;
190 return sqrt( c2 );
191}

◆ abs2()

double abs2 ( const EvtComplex & c)

◆ arg()

double arg ( const EvtComplex & c)

Definition at line 195 of file EvtComplex.hh.

195 { // added by FS
196 if ( ( c._rpart == 0 ) && ( c._ipart == 0 ) ) { return 0.0; }
197 if ( c._rpart == 0 )
198 {
199 if ( c._ipart > 0 ) { return EvtConst::pi / 2; }
200 else { return -EvtConst::pi / 2; }
201 }
202 else { return atan2( c._ipart, c._rpart ); }
203}
static const double pi
Definition EvtConst.hh:27

Referenced by MdcSegInfoSterO::calcStereo(), HepMcParticleLink_dict::constructor_2571(), HepMcParticleLink_dict::constructor_2572(), HepMcParticleLink_dict::constructor_2573(), HepMcParticleLink_dict::constructor_2574(), McEventCollection_dict::constructor_2586(), HepLorentzVector_dict::constructor_3161(), HepLorentzVector_dict::constructor_3162(), HepLorentzVector_dict::constructor_3163(), HepLorentzVector_dict::constructor_3165(), HepLorentzVector_dict::constructor_3166(), HepLorentzVector_dict::constructor_3167(), HepLorentzVector_dict::constructor_3256(), HepLorentzVector_dict::constructor_3258(), HepLorentzVector_dict::constructor_3261(), HepLorentzVector_dict::constructor_3263(), Hep3Vector_dict::constructor_3332(), Hep3Vector_dict::constructor_3333(), std__basic_string_char__dict::constructor_5274(), std__basic_string_char__dict::constructor_5275(), std__basic_string_char__dict::constructor_5276(), std__basic_string_char__dict::constructor_5277(), std__basic_string_char__dict::constructor_5278(), std__basic_string_char__dict::constructor_5279(), std__basic_string_char__dict::constructor_5280(), HepMcParticleLink__ExtendedBarCode_dict::constructor_5409(), HepMcParticleLink__ExtendedBarCode_dict::constructor_5410(), DataVector_HepMC__GenEvent__dict::constructor_5444(), DataVector_HepMC__GenEvent__dict::constructor_5445(), DataVector_HepMC__GenEvent__dict::constructor_5446(), HepMC__Polarization_dict::constructor_5535(), HepMC__Polarization_dict::constructor_5536(), HepMC__Polarization_dict::constructor_5537(), HepMC__Flow_dict::constructor_5555(), HepMC__Flow_dict::constructor_5556(), HepMC__GenVertex_dict::constructor_5590(), HepMC__GenVertex_dict::constructor_5591(), HepMC__GenEvent_dict::constructor_5641(), HepMC__GenEvent_dict::constructor_5642(), HepMC__GenParticle_dict::constructor_5694(), HepMC__GenParticle_dict::constructor_5695(), HepMC__WeightContainer_dict::constructor_5726(), HepMC__WeightContainer_dict::constructor_5727(), HepMC__WeightContainer_dict::constructor_5728(), std__vector_HepMC__GenEventp__dict::constructor_6687(), std__vector_HepMC__GenEventp__dict::constructor_6688(), std__vector_HepMC__GenEventp__dict::constructor_6689(), std__vector_HepMC__GenEventp__dict::constructor_6690(), std__map_int_int__dict::constructor_7189(), std__map_int_int__dict::constructor_7190(), std__set_HepMC__GenParticlep__dict::constructor_7246(), std__set_HepMC__GenParticlep__dict::constructor_7247(), std__vector_longsint__dict::constructor_7352(), std__vector_longsint__dict::constructor_7353(), std__vector_longsint__dict::constructor_7354(), std__vector_longsint__dict::constructor_7355(), std__map_int_HepMC__GenVertexp_std__greater_int_s__dict::constructor_7403(), std__map_int_HepMC__GenVertexp_std__greater_int_s__dict::constructor_7404(), std__map_int_HepMC__GenParticlep__dict::constructor_7462(), std__map_int_HepMC__GenParticlep__dict::constructor_7463(), std__vector_double__dict::constructor_7548(), std__vector_double__dict::constructor_7549(), std__vector_double__dict::constructor_7550(), std__vector_double__dict::constructor_7551(), EvtSSDCP::decay(), EvtVSSBMixCPT::decay(), dgausn_(), TrkCircleTraj::distTo1stError(), CountTheEntities::execute(), filemap(), parseRequest(), Dalitz::Phase(), MdcTrack::projectToR(), MdcTrack::projectToR(), TrkMomCalculator::ptMom(), MdcDedxTrk::SpaceChargeCorrec(), and SpaceChargeCorrec().

◆ conj()

EvtComplex conj ( const EvtComplex & c)

Definition at line 184 of file EvtComplex.hh.

184{ return EvtComplex( c._rpart, -c._ipart ); }

◆ exp()

EvtComplex exp ( const EvtComplex & c)

Definition at line 209 of file EvtComplex.hh.

209 {
210
211 return exp( c._rpart ) * EvtComplex( cos( c._ipart ), sin( c._ipart ) );
212}
EvtComplex exp(const EvtComplex &c)

Referenced by EmcRecShowerShape::A42Moment(), 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(), ChisqConsistency::ChisqConsistency(), EmcRecTofDigitCalib::Convert(), EvtBtoXsEtap::decay(), EvtD0mixDalitz::decay(), EvtDMix::decay(), EvtPBB1::decay(), EvtPBB2::decay(), EvtPhiDalitz::decay(), EvtS2GV::decay(), EvtSSDCP::decay(), EvtSVSCPLH::decay(), EvtSVVCPLH::decay(), EvtTauGamMu::decay(), EvtVectorIsr::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), dedx_pid_exp(), MdcDedxCorrection::dedx_pid_exp(), TofQElecSvc::EQTC(), EvtEvalHelAmp::evalAmp(), rb::TDFun::EvalSoft(), rb::TDFun::EvalSoft(), TDFun::EvalSoft(), TDFun::EvalSoft(), EvtVubdGamma::EvtVubdGamma(), EvtComplex::exp, EvtBtoXsgammaFermiUtil::FermiExpFunc(), EvtBtoXsgammaFermiUtil::FermiGaussFunc(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnB(), EvtBtoXsllUtil::FermiMomentumProb(), EvtBtoXsgammaFermiUtil::FermiRomanFunc(), EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot(), EvtBtoXsgammaFermiUtil::FermiRomanRootFcnA(), QCMCFilter::findD0Decay(), EvtBtoXsgammaFermiUtil::Gamma(), NumRecipes::gcf(), TPhoton::GetCosTheta(), rb::TPhoton::GetCosThetaF(), TPhoton::GetCosThetaF(), TPhoton::GetCosThetaF2(), rb::TPhoton::GetEnergy(), rb::TPhotonD::GetEnergy(), TPhotonD::GetEnergy(), TPhotonD::GetEnergy(), TPhotonF::GetEnergy(), TPhotonI::GetEnergy(), TPhotonS::GetEnergy(), EvtPFermi::getFPFermi(), EvtBtoXsgammaAliGreub::GetMass(), EvtbTosllAliFF::getScalarFF(), EvtbTosllBallFF::getScalarFF(), EvtbTosllAliFF::getVectorFF(), EvtbTosllBallFF::getVectorFF(), TPhotonS::GetXNorm(), NumRecipes::gser(), EvtCPUtil::incoherentMix(), EvtHelAmp::init(), EvtPartWave::init(), EvtSVSCPLH::init(), landaun(), BesEmcWaveform::makeWaveform(), EmcWaveform::makeWaveform(), EmcWaveform::makeWaveformTrg(), Mdcxprobab(), BesTofDigitizerEcV4::StripStruct::multiply(), mwAssert(), mwVerify(), mylan(), ParticleIDBase::pdfCalculate(), EmcRecShowerPosLoglin::Position(), MdcUtilitySvc::probab(), TRunge::Propagate_QC(), FTTrack::r_phiFit(), EvtHighSpinParticle::rotateToHelicityBasis(), FTTrack::s_zFit(), BesTofDigitizerBrV2::Scintillation(), BesTofDigitizerEcV2::Scintillation(), BesTofDigitizerEcV3::Scintillation(), EmcRecSplitWeighted::Split(), tau_mode(), BesTofDigitizerBrV1::TofPmtAccum(), BesTofDigitizerBrV2::TofPmtAccum(), BesTofDigitizerEcV1::TofPmtAccum(), BesTofDigitizerEcV2::TofPmtAccum(), BesTofDigitizerBrV2::TofPmtRspns(), BesTofDigitizerEcV2::TofPmtRspns(), BesTofDigitizerEcV3::TofPmtRspns(), calib_barrel_atten::updateData(), wignerD(), TofCaliSvc::ZADC1(), and TofCaliSvc::ZADC2().

◆ imag()

◆ operator*() [1/3]

EvtComplex operator* ( const EvtComplex & c,
double d )

Definition at line 115 of file EvtComplex.hh.

115 {
116
117 return EvtComplex( c._rpart * d, c._ipart * d );
118}

◆ operator*() [2/3]

EvtComplex operator* ( const EvtComplex & c1,
const EvtComplex & c2 )

Definition at line 156 of file EvtComplex.hh.

156 {
157
158 return EvtComplex( c1._rpart * c2._rpart - c1._ipart * c2._ipart,
159 c1._rpart * c2._ipart + c1._ipart * c2._rpart );
160}

◆ operator*() [3/3]

EvtComplex operator* ( double d,
const EvtComplex & c )

Definition at line 110 of file EvtComplex.hh.

110 {
111
112 return EvtComplex( c._rpart * d, c._ipart * d );
113}

◆ operator+()

EvtComplex operator+ ( const EvtComplex & c1,
const EvtComplex & c2 )

Definition at line 167 of file EvtComplex.hh.

167 {
168
169 return EvtComplex( c1._rpart + c2._rpart, c1._ipart + c2._ipart );
170}

◆ operator-() [1/2]

EvtComplex operator- ( const EvtComplex & c)

Definition at line 182 of file EvtComplex.hh.

182{ return EvtComplex( -c._rpart, -c._ipart ); }

◆ operator-() [2/2]

EvtComplex operator- ( const EvtComplex & c1,
const EvtComplex & c2 )

Definition at line 162 of file EvtComplex.hh.

162 {
163
164 return EvtComplex( c1._rpart - c2._rpart, c1._ipart - c2._ipart );
165}

◆ operator/() [1/3]

EvtComplex operator/ ( const EvtComplex & c,
double d )

Definition at line 120 of file EvtComplex.hh.

120 {
121
122 return EvtComplex( c._rpart / d, c._ipart / d );
123}

◆ operator/() [2/3]

EvtComplex operator/ ( const EvtComplex & c1,
const EvtComplex & c2 )

Definition at line 148 of file EvtComplex.hh.

148 {
149
150 double inv = 1.0 / ( c2._rpart * c2._rpart + c2._ipart * c2._ipart );
151
152 return EvtComplex( inv * ( c1._rpart * c2._rpart + c1._ipart * c2._ipart ),
153 inv * ( c1._ipart * c2._rpart - c1._rpart * c2._ipart ) );
154}

◆ operator/() [3/3]

EvtComplex operator/ ( double d,
const EvtComplex & c )

Definition at line 141 of file EvtComplex.hh.

141 {
142
143 double Num = d / ( c._rpart * c._rpart + c._ipart * c._ipart );
144
145 return EvtComplex( Num * c._rpart, -Num * c._ipart );
146}

◆ real()

double real ( const EvtComplex & c)

Definition at line 205 of file EvtComplex.hh.

205{ return c._rpart; }