BOSS 6.6.4.p03
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}

Referenced by EmcRecShowerShape::A42Moment(), EvtSpinAmp::allowed(), EvtMHelAmp::amplitude(), VVS::amps(), rhopifull::amps(), rhopi::amps1(), TofCalib::calculate(), calib_barrel_left_offset1_bunch0_3::calculate_funcs(), calib_barrel_left_offset1_bunch0_4::calculate_funcs(), calib_barrel_left_offset1_bunch1_3::calculate_funcs(), calib_barrel_left_offset1_bunch1_4::calculate_funcs(), calib_barrel_left_offset1_bunch2_3::calculate_funcs(), calib_barrel_left_offset1_bunch2_4::calculate_funcs(), calib_barrel_left_offset1_bunch3_4::calculate_funcs(), calib_barrel_left_offset2_bunch0_3::calculate_funcs(), calib_barrel_left_offset2_bunch0_4::calculate_funcs(), calib_barrel_left_offset2_bunch1_3::calculate_funcs(), calib_barrel_left_offset2_bunch1_4::calculate_funcs(), calib_barrel_left_offset2_bunch2_3::calculate_funcs(), calib_barrel_left_offset2_bunch2_4::calculate_funcs(), calib_barrel_left_offset2_bunch3_4::calculate_funcs(), calib_barrel_right_offset1_bunch0_3::calculate_funcs(), calib_barrel_right_offset1_bunch0_4::calculate_funcs(), calib_barrel_right_offset1_bunch1_3::calculate_funcs(), calib_barrel_right_offset1_bunch1_4::calculate_funcs(), calib_barrel_right_offset1_bunch2_3::calculate_funcs(), calib_barrel_right_offset1_bunch2_4::calculate_funcs(), calib_barrel_right_offset1_bunch3_4::calculate_funcs(), calib_barrel_right_offset2_bunch0_3::calculate_funcs(), calib_barrel_right_offset2_bunch0_4::calculate_funcs(), calib_barrel_right_offset2_bunch1_3::calculate_funcs(), calib_barrel_right_offset2_bunch1_4::calculate_funcs(), calib_barrel_right_offset2_bunch2_3::calculate_funcs(), calib_barrel_right_offset2_bunch2_4::calculate_funcs(), calib_barrel_right_offset2_bunch3_4::calculate_funcs(), calVirtualCircle(), EvtSpinDensity::Check(), MrpcTrack::chooseTofData(), TofTrack::chooseTofData(), MrpcTrack::chooseTofDataEndcap(), TofTrack::chooseTofDataEndcap(), MrpcTrack::compareTofData(), TofTrack::compareTofData(), BesMdcConstruction::Construct(), TMDCTsf::createTsf(), EvtdFunction::d(), EvtJetSet::decay(), EvtLunda::decay(), EvtLundCharm::decay(), EvtPythia::decay(), EvtSSDCP::decay(), EvtTauola::decay(), EvtVSSBMixCPT::decay(), EvtbTosllAmp::dGdsdupProb(), EvtbTosllAmp::dGdsProb(), BesGeoTrack::DistancetoPrimitive(), MdcHit::driftDist(), TMDC::driftDistance(), Emc_helix::Emc_Get(), TofShower::energyCalib(), EvtEvalHelAmp::evalAmp(), EvtMHelAmp::EvtMHelAmp(), Rhopi::execute(), FillEventTag::execute(), EFChargedTrack::execute(), EFFlightTime::execute(), EFGlobalEnergy::execute(), EFProcessCluster::execute(), BhabhaPreSelect::execute(), DigammaPreSelect::execute(), EventPreSelect::execute(), EsTimeAlg::execute(), EventAssemblyAlg::execute(), MdcDedxRecon::execute(), MdcTrkRecon::execute(), MdcxCosmicSewer::execute(), MrpcRec::execute(), SD0Tag::execute(), TofRec::execute(), MrpcCheckData::Fill(), TofCheckData::Fill(), MrpcCheckDigi::Fill_TofTrack(), TofCheckDigi::Fill_TofTrack(), MrpcCheckDigi::FillCol(), TofCheckDigi::FillCol(), MdcTrkRecon::fillMcTruth(), TofShower::findShower(), MrpcTrack::findTofDataBarrel(), TofTrack::findTofDataBarrel(), TRungeFitter::fit(), TLine0::fit2(), TMLine::fit2(), TLine0::fit2p(), TMLine::fit2p(), HltConfigSvc::GenFileFromDatabase(), SingleParticleGun::genInitialize(), DedxCalibEvent::genNtuple(), VertexFitBField::getBFieldZ(), VertexFitBField::getCBz(), EventTagSvc::getChainCode(), EventTagSvc::getCharmDecayType(), EventTagSvc::getDecayCode(), MucGeometron::GetIntersectionLinePlaneWithSigma(), MucGeometron::GetIntersectionQuadPlane(), MucGeometron::GetIntersectionQuadPlaneLocal(), MucRec3DRoad::GetLastGapDelta(), RecMucTrack::GetMdcExtTrack(), MrpcTrack::getMultiHit(), TofTrack::getMultiHit(), BesMucEfficiency::GetPad(), MrpcTrack::getTofData(), TofTrack::getTofData(), MrpcTrack::getTofDataEast(), TofTrack::getTofDataEast(), MrpcTrack::getTofDataWest(), TofTrack::getTofDataWest(), MucRec3DRoad::GetTotalHitsDelta(), G4HepMCInterface::HepMC2G4(), EvtCPUtil::incoherentMix(), TofCorrPID::init(), EvtHelAmp::init(), EvtPartWave::init(), EvtVSSBMixCPT::init(), EvtVub::init(), EvtVubHybrid::init(), EvtVubNLO::init(), EvtdFunctionSingle::init(), EvtHypNonLepton::initProbMax(), EvtSSDCP::initProbMax(), EvtSVSNONCPEIGEN::initProbMax(), EvtSVVNONCPEIGEN::initProbMax(), MdcCosGeom::initWire(), TofCorrPID::inputParameter(), intersection(), EvtSpinAmp::iterate(), MdcDedxRecon::kaltrackrec(), main(), Millepede::MakeGlobalFit(), TTrackManager::makeTds(), MdcDedxRecon::mdctrackrec(), K0kk::MTotal(), K0kpi::MTotal(), K0pipipi0::MTotal(), K3pi::MTotal(), K3pipi0::MTotal(), Kkpi0::MTotal(), Kpi::MTotal(), Kpipi0::MTotal(), Kpipi0pi0::MTotal(), Pipi::MTotal(), Pipipi0::MTotal(), TofCorrPID::offsetTof(), IsGenInteracting::operator()(), IsGenNonInteracting::operator()(), IsGenType::operator()(), MdcTrackList::pickHits(), MdcUtilitySvc::pointOnHelixPatPar(), EvtEvalHelAmp::probMax(), BesEmcSD::ProcessHits(), BesTofSD::ProcessHits(), KalmanKinematicFit::pull(), KinematicFit::pull(), VertexFit::pull(), MucCalibMgr::ReadEvent(), MrpcRecTDS::RegisterRecETofCalHitCol(), TofRecTDS::RegisterRecETofCalHitCol(), TLine0::removeChits(), TMLine::removeChits(), McTestAlg::RetrieveMcParticle(), Lpar::sd(), DedxCorrecSvc::set_flag(), TRunge::SetFirst(), TRunge::SetFlightLength(), TofRawDataProvider::tofDataMapFull(), TofRawDataProvider::tofDataMapOnlineMode(), TofFz_helix::TofFz_Get(), BesTofDigitizerEcV1::TofPmtAccum(), and MdcSegInfoSterO::zPosition().

◆ abs2()

double abs2 ( const EvtComplex c)

Definition at line 221 of file EvtComplex.hh.

221 {
222
223 return c._rpart*c._rpart+c._ipart*c._ipart;
224}

Referenced by EvtBtoXsllUtil::dGdsdupProb(), EvtBtoXsllUtil::dGdsProb(), EvtAmpFactory< T >::getTermCoeff(), EvtPto3PAmpFactory::processAmp(), and EvtXsection::setBW().

◆ 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(), getaddr_(), parseRequest(), 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(), BesTofDigitizerEcV4::adcsignal_get_n_electron(), BesTofDigitizerEcV4::adcsignal_get_sigma(), BesTofDigitizerEcV4::adcsignal_simulate_step(), VVS::amps(), EvtBtoXsgammaFermiUtil::BesselI1(), EvtBtoXsgammaFermiUtil::BesselK1(), TofQElecSvc::BQTC1(), TofQElecSvc::BQTC2(), 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(), EvtVectorIsr::decay(), EvtVPHOtoVISR::decay(), EvtVPHOtoVISRHi::decay(), EvtVSSBMixCPT::decay(), MdcDedxCorrection::dedx_pid_exp(), 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(), BesTofDigitizerEcV4::Get_NINO_leadingedge_resolution(), BesTofDigitizerEcV4::Get_NINO_pulselength_resolution(), 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(), mwAssert(), mwVerify(), mylan(), ParticleIDBase::pdfCalculate(), MdcUtilitySvc::probab(), TRunge::Propagate_QC(), FTTrack::r_phiFit(), EvtHighSpinParticle::rotateToHelicityBasis(), FTTrack::s_zFit(), BesTofDigitizerBrV2::Scintillation(), BesTofDigitizerEcV2::Scintillation(), BesTofDigitizerEcV3::Scintillation(), EmcRecSplitWeighted::Split(), 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}
TCanvas * c1
Definition: tau_mode.c:75

◆ 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()