sherpa is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/sherpa does not appear to be a Subversion repository.). Look in the Trac log for more information.

Ticket #74: spin-correlations.patch

File spin-correlations.patch, 1.4 KB (added by Frank Siegert, 15 years ago)
  • SHERPA/Single_Events/Signal_Processes.C

     
    44#include "PHASIC++/Scales/Scale_Setter_Base.H"
    55#include "PHASIC++/Main/Process_Integrator.H"
    66#include "ATOOLS/Org/Run_Parameter.H"
     7#include "METOOLS/Main/Spin_Structure.H"
     8#include "AMEGIC++/Main/Single_Process.H"
    79
    810using namespace SHERPA;
    911using namespace ATOOLS;
     
    9395
    9496  PHASIC::NLO_subevtlist* nlos=proc->GetSubevtList();
    9597  if (nlos) blob->AddData("NLO_subeventlist",new Blob_Data<PHASIC::NLO_subevtlist*>(nlos));
     98 
     99  if (rpa.gen.SpinCorrelation()) {
     100    Particle_Vector inparticles = blob->GetInParticles();
     101    Particle_Vector outparticles = blob->GetOutParticles();
     102    Particle_Vector particles(inparticles.begin(),inparticles.end());
     103    particles.insert(particles.end(),outparticles.begin(),outparticles.end());
     104    METOOLS::Amplitude_Tensor* amps = new METOOLS::Amplitude_Tensor(particles);
     105   
     106    AMEGIC::Single_Process* aproc = dynamic_cast<AMEGIC::Single_Process*>(proc);
     107    if (!aproc) {
     108      THROW(fatal_error, "Spin correlations can only be enabled when using "+
     109            std::string("Amegic as matrix element generator."));
     110    }
     111    aproc->FillAmplitudes(amps);
     112    blob->AddData("amps",new Blob_Data<METOOLS::Amplitude_Tensor*>(amps));
     113  }
    96114
    97115  return success;
    98116}