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

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 212 of file EvtComplex.hh.

212 {
213
214 double c2=c._rpart*c._rpart+c._ipart*c._ipart;
215 if (c2<=0.0) return 0.0;
216 return sqrt(c2);
217
218}

◆ abs2()

double abs2 ( const EvtComplex c)

◆ arg()

double arg ( const EvtComplex c)

Definition at line 227 of file EvtComplex.hh.

227 { //added by FS
228 if ((c._rpart==0)&&(c._ipart==0)) {return 0.0;}
229 if (c._rpart==0){
230 if (c._ipart>0){
231 return EvtConst::pi/2;
232 } else {
233 return -EvtConst::pi/2;
234 }
235 } else {
236 return atan2(c._ipart,c._rpart);
237 }
238}
static const double pi
Definition: EvtConst.hh:28

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(), TrkCircleTraj::distTo1stError(), CountTheEntities::execute(), QCMCFilter::findD0Decay(), HadronSaturation::fitSaturation(), getaddr_(), main(), parseRequest(), Dalitz::Phase(), MdcTrack::projectToR(), PthrReaderBufPool< Reader, PoolSize >::PthrReaderBufPool(), PthrWriterBufPool< Writer, PoolSize >::PthrWriterBufPool(), TrkMomCalculator::ptMom(), SpaceChargeCorrec(), and MdcDedxTrk::SpaceChargeCorrec().

◆ conj()

EvtComplex conj ( const EvtComplex c)

Definition at line 206 of file EvtComplex.hh.

206 {
207
208 return EvtComplex(c._rpart,-c._ipart);
209
210}

◆ exp()

EvtComplex exp ( const EvtComplex c)

Definition at line 252 of file EvtComplex.hh.

252 {
253
254 return exp(c._rpart)*EvtComplex(cos(c._ipart),sin(c._ipart));
255
256}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:252

Referenced by EmcRecShowerShape::A42Moment(), VVS::amps(), EvtBtoXsgammaFermiUtil::BesselI1(), EvtBtoXsgammaFermiUtil::BesselK1(), WidgetCurve::bgCurve(), 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(), 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(), TDFun::EvalSoft(), rb::TDFun::EvalSoft(), EvtVubdGamma::EvtVubdGamma(), EvtBtoXsgammaFermiUtil::FermiExpFunc(), EvtBtoXsgammaFermiUtil::FermiGaussFunc(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnA(), EvtBtoXsgammaFermiUtil::FermiGaussRootFcnB(), EvtBtoXsllUtil::FermiMomentumProb(), EvtBtoXsgammaFermiUtil::FermiRomanFunc(), EvtBtoXsgammaFermiUtil::FermiRomanFuncRoot(), EvtBtoXsgammaFermiUtil::FermiRomanRootFcnA(), EvtBtoXsgammaFermiUtil::Gamma(), NumRecipes::gcf(), TPhoton::GetCosTheta(), TPhoton::GetCosThetaF(), rb::TPhoton::GetCosThetaF(), TPhoton::GetCosThetaF2(), TPhotonI::GetEnergy(), TPhotonF::GetEnergy(), TPhotonD::GetEnergy(), rb::TPhoton::GetEnergy(), rb::TPhotonD::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(), EmcWaveform::makeWaveform(), BesEmcWaveform::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(), BesTofDigitizerEcV1::TofPmtAccum(), BesTofDigitizerEcV2::TofPmtAccum(), BesTofDigitizerBrV2::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 117 of file EvtComplex.hh.

117 {
118
119 return EvtComplex(c._rpart*d,c._ipart*d);
120
121}

◆ operator*() [2/3]

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

Definition at line 168 of file EvtComplex.hh.

168 {
169
170 return EvtComplex(c1._rpart*c2._rpart-c1._ipart*c2._ipart,
171 c1._rpart*c2._ipart+c1._ipart*c2._rpart);
172
173}

◆ operator*() [3/3]

EvtComplex operator* ( double  d,
const EvtComplex c 
)

Definition at line 111 of file EvtComplex.hh.

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

◆ operator+()

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

Definition at line 181 of file EvtComplex.hh.

181 {
182
183 return EvtComplex(c1._rpart+c2._rpart,c1._ipart+c2._ipart);
184
185}

◆ operator-() [1/2]

EvtComplex operator- ( const EvtComplex c)

Definition at line 200 of file EvtComplex.hh.

200 {
201
202 return EvtComplex(-c._rpart,-c._ipart);
203
204}

◆ operator-() [2/2]

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

Definition at line 175 of file EvtComplex.hh.

175 {
176
177 return EvtComplex(c1._rpart-c2._rpart,c1._ipart-c2._ipart);
178
179}

◆ operator/() [1/3]

EvtComplex operator/ ( const EvtComplex c,
double  d 
)

Definition at line 125 of file EvtComplex.hh.

125 {
126
127 return EvtComplex(c._rpart/d,c._ipart/d);
128
129}

◆ operator/() [2/3]

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

Definition at line 159 of file EvtComplex.hh.

159 {
160
161 double inv=1.0/(c2._rpart*c2._rpart+c2._ipart*c2._ipart);
162
163 return EvtComplex(inv*(c1._rpart*c2._rpart+c1._ipart*c2._ipart),
164 inv*(c1._ipart*c2._rpart-c1._rpart*c2._ipart));
165
166}

◆ operator/() [3/3]

EvtComplex operator/ ( double  d,
const EvtComplex c 
)

Definition at line 149 of file EvtComplex.hh.

149 {
150
151double Num=d/(c._rpart*c._rpart+c._ipart*c._ipart);
152
153return EvtComplex( Num*c._rpart, -Num*c._ipart );
154
155}

◆ real()

double real ( const EvtComplex c)

Definition at line 240 of file EvtComplex.hh.

240 {
241
242 return c._rpart;
243
244}