diff --git a/Helicity/RSFermionSpinInfo.h b/Helicity/RSFermionSpinInfo.h --- a/Helicity/RSFermionSpinInfo.h +++ b/Helicity/RSFermionSpinInfo.h @@ -1,178 +1,187 @@ // -*- C++ -*- // // RSFermionSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, Leif Lonnblad // // ThePEG is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef THEPEG_RSFermionSpinInfo_H #define THEPEG_RSFermionSpinInfo_H // This is the declaration of the RSFermionSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzRSSpinor.h" #include "RSFermionSpinInfo.fh" #include namespace ThePEG { namespace Helicity { /** * The RSFermionSpinInfo class inherits from the SpinInfo class and * implements the storage of the basis vector for a spin-3/2 particle. * The basis states are the vector u spinors for a particle and the vector * v-spinors for an antiparticle. The barred spinors can be obtained from these. * * These basis states should be set by either the matrixelements or decayers * which are capable of generating spin correlation information. * * The basis states in the rest frame of the particles can then be accessed by * the decayers to produce the correct correlations. * * N.B. in our convention 0 is the \f$-\frac32\f$ helicity state, * 1 is the \f$-\frac12\f$ helicity state, * 2 is the \f$+\frac12\f$ helicity state, * 3 is the \f$+\frac32\f$ helicity state. * * @see SpinInfo * * \author Peter Richardson * */ class RSFermionSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ RSFermionSpinInfo() : SpinInfo(PDT::Spin3Half), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ RSFermionSpinInfo(const Lorentz5Momentum & p,bool time) : SpinInfo(PDT::Spin3Half, p, time), _decaycalc(false) {} //@} public: /** @name Set and get methods for the basis state. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2,3 as described above.) * @param in the LorentzRSSpinor for the given helicity. */ void setBasisState(unsigned int hel, const LorentzRSSpinor & in) const { assert(hel<4); _productionstates[hel] = in; _currentstates [hel] = in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2,3 as described above.) * @param in the LorentzRSSpinor for the given helicity. */ void setDecayState(unsigned int hel, const LorentzRSSpinor & in) const { assert(hel<4); _decaycalc = true; _decaystates[hel] = in; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2,3 as described above.) */ const LorentzRSSpinor & getProductionBasisState(unsigned int hel) const { assert(hel<4); return _productionstates[hel]; } + + /** + * Get the basis state for the current for the given helicity, \a + * hel (0,1,2,3 as described above.) + */ + const LorentzRSSpinor & getCurrentBasisState(unsigned int hel) const { + assert(hel<4); + return _currentstates[hel]; + } /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2,3 as described above.) */ const LorentzRSSpinor & getDecayBasisState(unsigned int hel) const { assert(hel<4); if(!_decaycalc) { for(unsigned int ix=0;ix<4;++ix) _decaystates[ix]=_currentstates[ix]; _decaycalc=true; } return _decaystates[hel]; } /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); //@} /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ RSFermionSpinInfo & operator=(const RSFermionSpinInfo &); private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array,4> _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array,4> _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array,4> _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_RSFermionSpinInfo_H */ diff --git a/Helicity/TensorSpinInfo.h b/Helicity/TensorSpinInfo.h --- a/Helicity/TensorSpinInfo.h +++ b/Helicity/TensorSpinInfo.h @@ -1,176 +1,185 @@ // -*- C++ -*- // // TensorSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, Leif Lonnblad // // ThePEG is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef THEPEG_TensorSpinInfo_H #define THEPEG_TensorSpinInfo_H // This is the declaration of the TensorSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzTensor.h" #include "TensorSpinInfo.fh" // #include "TensorSpinInfo.xh" #include namespace ThePEG { namespace Helicity { /** * The TensorSpinInfo class is the implementation of the spin * information for tensor particles. It inherits from the SpinInfo * class and implements the storage of the basis tensors. * * These basis states should be set by either matrix elements or * decayers which are capable of generating spin correlation * information. * * The basis states in the rest frame of the particles can then be * accessed by decayers to produce the correct correlation. * * N.B. in our convention 0 is the \f$-2\f$ helicity state, * 1 is the \f$-1\f$ helicity state, * 2 is the \f$0\f$ helicity state, * 3 is the \f$+1\f$ helicity state and * 4 is the \f$+2\f$ helicity state. * * @author Peter Richardson * */ class TensorSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ TensorSpinInfo() : SpinInfo(PDT::Spin2), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ TensorSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin2, p, time), _decaycalc(false) {} //@} public: /** @name Access the basis states. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2,3,4 as described above.) * @param in the LorentzTensor for the given helicity. */ void setBasisState(unsigned int hel, LorentzTensor in) const { assert(hel<5); _productionstates[hel]=in; _currentstates [hel]=in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2,3,4 as described above.) * @param in the LorentzTensor for the given helicity. */ void setDecayState(unsigned int hel, LorentzTensor in) const { assert(hel<5); _decaycalc = true; _decaystates[hel] = in; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2,3,4 as described above.) */ const LorentzTensor & getProductionBasisState(unsigned int hel) const { assert(hel<5); return _productionstates[hel]; } + + /** + * Get the basis state for the current for the given helicity, \a + * hel (0,1,2,3,4 as described above.) + */ + const LorentzTensor & getCurrentBasisState(unsigned int hel) const { + assert(hel<5); + return _currentstates[hel]; + } /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2,3,4 as described above.) */ const LorentzTensor & getDecayBasisState(unsigned int hel) const { assert(hel<5); if(!_decaycalc) { for(unsigned int ix=0;ix<5;++ix) _decaystates[ix]=_currentstates[ix].conjugate(); _decaycalc=true; } return _decaystates[hel]; } //@} /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } public: /** * Standard Init function. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ TensorSpinInfo & operator=(const TensorSpinInfo &); private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array,5> _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array,5> _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array,5> _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_TensorSpinInfo_H */ diff --git a/Helicity/VectorSpinInfo.h b/Helicity/VectorSpinInfo.h --- a/Helicity/VectorSpinInfo.h +++ b/Helicity/VectorSpinInfo.h @@ -1,175 +1,184 @@ // -*- C++ -*- // // VectorSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, Leif Lonnblad // // ThePEG is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef THEPEG_VectorSpinInfo_H #define THEPEG_VectorSpinInfo_H // This is the declaration of the VectorSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzPolarizationVector.h" #include "VectorSpinInfo.fh" namespace ThePEG { namespace Helicity { /** * The VectorSpinInfo class is the implementation of the spin * information for vector particles. It inherits from the SpinInfo * class and implements the storage of the basis vectors. * * These basis states should be set by either matrixelements or * decayers which are capable of generating spin correlation * information. * * The basis states in the rest frame of the particles can then be * accessed by decayers to produce the correct correlation. * * N.B. in our convention 0 is the \f$-1\f$ helicity state, * 1 is the \f$0\f$ helicity state and * 2 is the \f$+1\f$ helicity state. * * @author Peter Richardson * */ class VectorSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ VectorSpinInfo() : SpinInfo(PDT::Spin1), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ VectorSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin1, p, time), _decaycalc(false) {} //@} public: /** @name Set and get methods for the basis state. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2 as described above.) * @param in the LorentzPolarizationVector for the given helicity. */ void setBasisState(unsigned int hel, const LorentzPolarizationVector & in) const { assert(hel<3); _productionstates[hel] = in; _currentstates [hel] = in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2 as described above.) * @param in the LorentzPolarizationVector for the given helicity. */ void setDecayState(unsigned int hel, const LorentzPolarizationVector & in) const { assert(hel<3); _decaycalc = true; _decaystates[hel] = in;; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2 as described above.) */ const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const { assert(hel<3); return _productionstates[hel]; } /** + * Get the basis state for the current for the given helicity, \a + * hel (0,1,2 as described above.) + */ + const LorentzPolarizationVector & getCurrentBasisState(unsigned int hel) const { + assert(hel<3); + return _currentstates[hel]; + } + + /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2 as described above.) */ const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const { assert(hel<3); if(!_decaycalc) { for(unsigned int ix=0;ix<3;++ix) _decaystates[ix]=_currentstates[ix].conjugate(); _decaycalc=true; } // return the basis function return _decaystates[hel]; } //@} /** * Perform a Lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation & ); /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ VectorSpinInfo & operator=(const VectorSpinInfo &); private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_VectorSpinInfo_H */