#include "TChannel_Basic.h" TChannel_Basic::TChannel_Basic(const vector& locArguments) : UserAmplitude(locArguments) { // Helicity Sum //Unused // string locHelicityString = locArguments[0]; // Particle indices vector locParticleIndexVector; ExtractInts_SingleUnderscore(locArguments[1], locParticleIndexVector); dNumParticleIndices = BuildArray(locParticleIndexVector, dParticleIndices); // T-Slope dTSlope = AmpParameter(locArguments[2]); // need to register any free parameters so the framework knows about them registerParameter(dTSlope); } complex TChannel_Basic::calcAmplitude(GDouble** locKinematics) const { // Get Beam TLorentzVector locBeamP4 = TLorentzVector(locKinematics[0][1], locKinematics[0][2], locKinematics[0][3], locKinematics[0][0]); // Get/Build Product 1 TLorentzVector locP4; for(int loc_i = 0; loc_i < dNumParticleIndices; ++loc_i) { int locIndex = dParticleIndices[loc_i]; locP4 += TLorentzVector(locKinematics[locIndex][1], locKinematics[locIndex][2], locKinematics[locIndex][3], locKinematics[locIndex][0]); } double locT = locP4.M2() - 2.0*locP4.E()*locBeamP4.E() + 2.0*locP4.Vect().Dot(locBeamP4.Vect()) + locBeamP4.M2(); return exp(-1.0*fabs(locT)*dTSlope); }