Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/libraries/AMPTOOLS_AMPS/PiPiSWaveAMPK.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ void PiPiSWaveAMPK::setParametrization()



/////////////////////// Amplitude Calculation //////////////////////////
//////////////////Calculate user variables (CPU only)////////////////////

complex <GDouble> PiPiSWaveAMPK::calcAmplitude( GDouble** pKin ) const
void PiPiSWaveAMPK::calcUserVars( GDouble** pKin, GDouble* userVars ) const
{
TLorentzVector pion1_P4, pion2_P4, dipion_P4, temp_P4;

Expand Down Expand Up @@ -109,17 +109,28 @@ complex <GDouble> PiPiSWaveAMPK::calcAmplitude( GDouble** pKin ) const
//Now calculate the T_{11} matrix element using the T11 to M11 relation
T11 = 1./(M11 - imag*rho11);


userVars[uv_ampRe] = T11.real();
userVars[uv_ampIm] = T11.imag();

return;

return T11;
}


/////////////////////// Amplitude Calculation //////////////////////////

complex <GDouble> PiPiSWaveAMPK::calcAmplitude( GDouble** pKin, GDouble* userVars ) const
{
return complex <GDouble> ( userVars[uv_ampRe], userVars[uv_ampIm] );
}


//This function may be used instead of the separate amplitude ' breakupMomentumComplex'
template<typename mType> complex<GDouble> PiPiSWaveAMPK::breakupMom(mType m, GDouble mDec1, GDouble mDec2) const{
complex<GDouble> result = PiPiSWaveAMPK::phaseSpaceFac(m, mDec1, mDec2)*m/GDouble(2.);
return result;
//This function may be used instead of 'breakupMomentumComplex' from breakupMomentum.cc
template<typename mType> complex<GDouble> PiPiSWaveAMPK::breakupMom(mType m, GDouble mDec1, GDouble mDec2) const
{
complex<GDouble> sqrtval = std::sqrt((m*m-(mDec1+mDec2)*(mDec1+mDec2))*(m*m-(mDec1-mDec2)*(mDec1-mDec2)));
return sqrtval/GDouble(2.)/m;
}


Expand Down
14 changes: 9 additions & 5 deletions src/libraries/AMPTOOLS_AMPS/PiPiSWaveAMPK.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,17 @@ class PiPiSWaveAMPK : public UserAmplitude<PiPiSWaveAMPK>{
PiPiSWaveAMPK() : UserAmplitude <PiPiSWaveAMPK>() { }
PiPiSWaveAMPK( const vector<string> &args );
~PiPiSWaveAMPK(){}

string name() const { return "PiPiSWaveAMPK"; }

enum UserVars { uv_ampRe = 0, uv_ampIm = 0, kNumUserVars };
unsigned int numUserVars() const { return kNumUserVars; }
void calcUserVars( GDouble **pKin, GDouble *userVars ) const;
bool needsUserVarsOnly() const { return true; }

string name() const { return "PiPiSWaveAMPK"; }
void setParametrization();
complex <GDouble> calcAmplitude( GDouble** pKin ) const;
complex <GDouble> calcAmplitude( GDouble **pKin, GDouble *userVars ) const;


#ifdef GPU_ACCELERATION

void launchGPUKernel( dim3 dimGrid, dim3 dimBlock, GPU_AMP_PROTO ) const;
Expand All @@ -60,9 +66,7 @@ class PiPiSWaveAMPK : public UserAmplitude<PiPiSWaveAMPK>{
const GDouble _kaonNeutralMass = 0.5*(ParticleMass(KLong) + ParticleMass(KShort)); //0.49761400;
const GDouble _kaonMeanMass = 0.5*(_kaonChargedMass + _kaonNeutralMass); //0.5*(0.49367700 + 0.49761400);



complex<GDouble> phaseSpaceFac( GDouble m, GDouble mDec1, GDouble mDec2 ) const;
template<typename mType>
complex<GDouble> breakupMom( mType m, GDouble mDec1, GDouble mDec2 ) const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ int main( int argc, char* argv[] ){
bool singleData = irefl == reflname.size() && iamp == amphistname.size();
bool singleFlatWave = (irefl == 0 && iamp > 0) || (irefl > 0 && iamp == 0);

// if (iplot == PlotGenerator::kGenMC) continue; // no acceptance correction
if ( iplot == PlotGenerator::kGenMC) continue; // no acceptance correction
if ( iplot == PlotGenerator::kData && !singleData ) continue; // only plot data once
if ( iplot == PlotGenerator::kBkgnd && !singleData ) continue; // only plot background once
if ( iplot == PlotGenerator::kAccMC && singleFlatWave ) continue; // only plot Flat wave once
Expand Down