Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:26

0001 // -*- C++ -*-
0002 //
0003 // RSFermionSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 2003-2019 Peter Richardson, Leif Lonnblad
0005 //
0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef THEPEG_RSFermionSpinInfo_H
0010 #define THEPEG_RSFermionSpinInfo_H
0011 // This is the declaration of the RSFermionSpinInfo class.
0012 
0013 #include "ThePEG/EventRecord/SpinInfo.h"
0014 #include "ThePEG/Helicity/LorentzRSSpinor.h"
0015 #include "RSFermionSpinInfo.fh"
0016 #include <array>
0017 
0018 namespace ThePEG {
0019 namespace Helicity {
0020 
0021 /**
0022  *  The RSFermionSpinInfo class inherits from the SpinInfo class and
0023  *  implements the storage of the basis vector for a spin-3/2 particle.
0024  *  The basis states are the vector u spinors for a particle and the vector
0025  *  v-spinors for an antiparticle. The barred spinors can be obtained from these.
0026  *
0027  *  These basis states should be set by either the matrixelements or decayers
0028  *  which are capable of generating spin correlation information.
0029  *
0030  *  The basis states in the rest frame of the particles can then be accessed by
0031  *  the decayers to produce the correct correlations.
0032  *
0033  *  N.B. in our convention 0 is the \f$-\frac32\f$ helicity state,
0034  *  1 is the \f$-\frac12\f$ helicity state,
0035  *  2 is the \f$+\frac12\f$ helicity state,
0036  *  3 is the \f$+\frac32\f$ helicity state.
0037  *
0038  * @see SpinInfo
0039  *
0040  * \author Peter Richardson
0041  *
0042  */
0043 class RSFermionSpinInfo: public SpinInfo {
0044 
0045 public:
0046 
0047   /** @name Standard constructors and destructors. */
0048   //@{
0049   /**
0050    * Default constructor.
0051    */
0052   RSFermionSpinInfo()  : SpinInfo(PDT::Spin3Half), _decaycalc(false) {}
0053 
0054   /**
0055    * Standard Constructor.
0056    * @param p the production momentum.
0057    * @param time true if the particle is time-like.
0058    */
0059   RSFermionSpinInfo(const Lorentz5Momentum & p,bool time)
0060     : SpinInfo(PDT::Spin3Half, p, time), _decaycalc(false) {}
0061   //@}
0062 
0063 public:
0064 
0065   /** @name Set and get methods for the basis state. */
0066   //@{
0067   /**
0068    * Set the basis state, this is production state.
0069    * @param hel the helicity (0,1,2,3 as described above.)
0070    * @param in the LorentzRSSpinor for the given helicity.
0071    */
0072   void setBasisState(unsigned int hel,
0073              const LorentzRSSpinor<SqrtEnergy> & in) const {
0074     assert(hel<4);
0075     _productionstates[hel] = in;
0076     _currentstates   [hel] = in;
0077   }
0078 
0079   /**
0080    * Set the basis state for the decay.
0081    * @param hel the helicity (0,1,2,3 as described above.)
0082    * @param in the LorentzRSSpinor for the given helicity.
0083    */
0084   void setDecayState(unsigned int hel,
0085              const LorentzRSSpinor<SqrtEnergy> & in) const {
0086     assert(hel<4);
0087     _decaycalc = true;
0088     _decaystates[hel] = in;
0089   }
0090 
0091   /**
0092    * Get the basis state for the production for the given helicity, \a
0093    * hel (0,1,2,3 as described above.)
0094    */
0095   const LorentzRSSpinor<SqrtEnergy> & getProductionBasisState(unsigned int hel) const {
0096     assert(hel<4);
0097     return _productionstates[hel];
0098   }
0099   
0100   /**
0101    * Get the basis state for the current for the given helicity, \a
0102    * hel (0,1,2,3 as described above.)
0103    */
0104   const LorentzRSSpinor<SqrtEnergy> & getCurrentBasisState(unsigned int hel) const {
0105     assert(hel<4);
0106     return _currentstates[hel];
0107   }
0108 
0109   /**
0110    * Get the basis state for the decay for the given helicity, \a hel
0111    * (0,1,2,3 as described above.)
0112    */
0113   const LorentzRSSpinor<SqrtEnergy> & getDecayBasisState(unsigned int hel) const {
0114     assert(hel<4);
0115     if(!_decaycalc) {
0116       for(unsigned int ix=0;ix<4;++ix) _decaystates[ix]=_currentstates[ix];
0117       _decaycalc=true;
0118     }
0119     return _decaystates[hel];
0120   }
0121 
0122   /**
0123    * Perform a lorentz rotation of the spin information
0124    */
0125   virtual void transform(const LorentzMomentum &,const LorentzRotation &);
0126   //@}
0127 
0128   /**
0129    *  Undecay
0130    */
0131   virtual void undecay() const {
0132     _decaycalc=false;
0133     SpinInfo::undecay();
0134   }
0135 
0136   /**
0137    *  Reset
0138    */
0139   virtual void reset() {
0140     undecay();
0141     _currentstates = _productionstates;
0142     SpinInfo::reset();
0143   }
0144 
0145 public:
0146 
0147   /**
0148    * Standard Init function used to initialize the interfaces.
0149    */
0150   static void Init();
0151 
0152   /**
0153    * Standard clone method.
0154    */
0155   virtual EIPtr clone() const;
0156 
0157 private:
0158 
0159   /**
0160    * Private and non-existent assignment operator.
0161    */
0162   RSFermionSpinInfo & operator=(const RSFermionSpinInfo &) = delete;
0163 
0164 private:
0165 
0166   /**
0167    * Basis states in the frame in which the particle was produced.
0168    */
0169   mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _productionstates;
0170 
0171   /**
0172    * Basis states in the frame in which the particle decays.
0173    */
0174   mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _decaystates;
0175 
0176   /**
0177    * Basis states in the current frame of the particle
0178    */
0179   mutable std::array<LorentzRSSpinor<SqrtEnergy>,4> _currentstates;
0180 
0181   /**
0182    * True if the decay state has been set.
0183    */
0184   mutable bool _decaycalc;
0185 
0186 };
0187 
0188 }
0189 }
0190 
0191 
0192 
0193 namespace ThePEG {
0194 
0195 }
0196 #endif /* THEPEG_RSFermionSpinInfo_H */