Back to home page

EIC code displayed by LXR

 
 

    


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

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