Page MenuHomeHEPForge

TensorSpinInfo.icc
No OneTemporary

TensorSpinInfo.icc

// -*- C++ -*-
//
// TensorSpinInfo.icc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 2003-2007 Peter Richardson, Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the inlined member functions of
// the TensorSpinInfo class.
//
// Author: Peter Richardson
//
namespace ThePEG {
namespace Helicity {
inline TensorSpinInfo::TensorSpinInfo()
{
_productionstates.resize(5);
_currentstates.resize(5);
_decaystates.resize(5);
iSpin(PDT::Spin2);
_decaycalc = false;
}
inline TensorSpinInfo::TensorSpinInfo(const TensorSpinInfo & x)
: SpinInfo(x), _productionstates(x._productionstates),
_decaystates(x._decaystates), _currentstates(x._currentstates),
_decaycalc(x._decaycalc) {}
inline TensorSpinInfo::TensorSpinInfo(const Lorentz5Momentum & in,bool intime)
{
_productionstates.resize(5);
_currentstates.resize(5);
_decaystates.resize(5);
iSpin(PDT::Spin2);
setProductionMomentum(in);
_decaycalc=false;
setTimelike(intime);
}
inline EIPtr TensorSpinInfo::clone() const
{
tcSpinPtr temp=this;
return const_ptr_cast<SpinPtr>(temp);
}
inline void TensorSpinInfo::rebind(const EventTranslationMap & trans) {
SpinInfo::rebind(trans);
}
// set and get methods for the basis states
// set the basis state, this is production state
inline void TensorSpinInfo::setBasisState(unsigned int ihel, LorentzTensor<double> in) const
{
if (ihel<5)
{
_productionstates[ihel]=in;
_currentstates[ihel]=in;
}
else throw HelicityLogicalError()
<< "Tried to set invalid tensor basis state in TensorSpinInfo."
<< Exception::abortnow;
}
inline void TensorSpinInfo::setDecayState(unsigned int ihel,
LorentzTensor<double> in) const
{
if(ihel<5) {
_decaycalc=true;
_decaystates[ihel]=in;
} else throw HelicityLogicalError()
<< "Tried to set invalid tensor basis state in TensorSpinInfo."
<< Exception::abortnow;
}
// get the basis state for the production
inline LorentzTensor<double> TensorSpinInfo::getProductionBasisState(unsigned int ihel) const
{
if (ihel>4) throw HelicityLogicalError()
<< "Tried to get invalid tensor basis state in TensorSpinInfo."
<< Exception::abortnow;
return _productionstates[ihel];
}
// get the bassis state for the decay
inline LorentzTensor<double> TensorSpinInfo::getDecayBasisState(unsigned int ihel) const
{
// check this is a valid helicity
if (ihel>4) throw HelicityLogicalError()
<< "Tried to get invalid tensor basis state in TensorSpinInfo."
<< Exception::abortnow;
// calculate the decay basis states if needed
if(!_decaycalc)
{
for(unsigned int ix=0;ix<5;++ix)
{_decaystates[ix]=_currentstates[ix].conjugate();}
_decaycalc=true;
}
// return the basis function
return _decaystates[ihel];
}
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 23, 3:06 PM (53 m, 34 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486842
Default Alt Text
TensorSpinInfo.icc (2 KB)

Event Timeline