//-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Information: See EvtGen/COPYRIGHT // Copyright (C) 1998 Caltech, UCSB // // Module: EvtHelAmp.cc // // Description: Decay model for implementation of generic 2 body // decay specified by the helicity amplitudes // // // Modification history: // // RYD March 14, 1999 Module created // //------------------------------------------------------------------------ // #include "EvtGenBase/EvtPatches.hh" #include #include "EvtGenBase/EvtParticle.hh" #include "EvtGenBase/EvtGenKine.hh" #include "EvtGenBase/EvtPDL.hh" #include "EvtGenBase/EvtReport.hh" #include "EvtGenModels/EvtHelAmp.hh" #include "EvtGenBase/EvtId.hh" #include #include "EvtGenBase/EvtConst.hh" #include "EvtGenBase/EvtEvalHelAmp.hh" using std::endl; EvtHelAmp::~EvtHelAmp() { delete _evalHelAmp; } std::string EvtHelAmp::getName(){ return "HELAMP"; } EvtDecayBase* EvtHelAmp::clone(){ return new EvtHelAmp; } void EvtHelAmp::init(){ checkNDaug(2); //find out how many states each particle have int _nA=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getParentId())); int _nB=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getDaug(0))); int _nC=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getDaug(1))); if (verbose()){ report(INFO,"EvtGen")<<"_nA,_nB,_nC:" <<_nA<<","<<_nB<<","<<_nC<initializePhaseSpace(getNDaug(),getDaugs()); _evalHelAmp->evalAmp(p,_amp2); return ; } void EvtHelAmp::fillHelicity(int* lambda2,int n,int J2, EvtId id){ int i; //photon is special case! if (n==2&&J2==2) { lambda2[0]=2; lambda2[1]=-2; return; } //and so is the neutrino! if (n==1&&J2==1) { if (EvtPDL::getStdHep(id)>0){ //particle i.e. lefthanded lambda2[0]=-1; }else{ //anti particle i.e. righthanded lambda2[0]=1; } return; } assert(n==J2+1); for(i=0;i