// -*- C++ -*- #include "FinalStateBreit.hh" #include "Rivet/Cmp.hh" #include "Rivet/Projections/DISKinematics.hh" #include "Rivet/Rivet.hh" #include "Rivet/Math/Constants.hh" #include "Rivet/Tools/ParticleIdUtils.hh" namespace Rivet { int FinalStateBreit::compare(const Projection& p) const { return mkNamedPCmp(p, "Kinematics"); } void FinalStateBreit::project(const Event& e) { const DISKinematics& diskin = applyProjection(e, "Kinematics"); const LorentzTransform breitboost = diskin.boostBreit(); const DISLepton& dislep = diskin.applyProjection(e, "Lepton"); const GenParticle& dislepGP = dislep.out().genParticle(); const FinalState& fs = dislep.applyProjection(e, "FS"); // Fill the particle list with all particles _other_ than the DIS scattered // lepton, with momenta boosted into the Breit frame. _theParticles.clear(); _theParticles.reserve(fs.particles().size()); for (ParticleVector::const_iterator p = fs.particles().begin(); p != fs.particles().end(); ++p) { const GenParticle& loopGP = p->genParticle(); if (&loopGP != &dislepGP) { //< Ensure that we skip the DIS lepton Particle temp = *p; const FourMomentum breitMom = breitboost.transform(temp.momentum()); temp.setMomentum(breitMom); _theParticles.push_back(temp); } } } }