Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:02

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // -------------------------------------------------------------------
0028 //      GEANT4 Class file
0029 //
0030 //
0031 //      File name:     G4Clebsch
0032 //
0033 //      Author:        Maria Grazia Pia (MariaGrazia.Pia@genova.infn.it)
0034 // 
0035 //      Creation date: 15 April 1999
0036 //
0037 //      Modifications: February 2015, Jason Detwiler (jasondet@gmail.com)
0038 //                     - Update variable names to clarify that twice 
0039 //                       the spin value is being used.
0040 //                     - Add function to obtain raw CG coeffients
0041 //                     - Speed up Wigner 3j evaluation by removing 
0042 //                       reallocation of vector<double>'s on every call
0043 //                     - Use G4Pow instead of internal logs variable
0044 //                     - Add functions for Wigner 6j and 9j symbols, 
0045 //                       Racah coefficients, and d-Matrices
0046 //                     - Make functions statically available
0047 //                     - Eliminate unnecessary constructors, destructors,
0048 //                       operators (class has no members, so default versions
0049 //                       are adequate)
0050 //                     11.06.2015 V.Ivanchenko adopted for Geant4 source 
0051 //      
0052 //      Clebsch-Gordan coefficient and related algebra
0053 //
0054 // -------------------------------------------------------------------
0055 
0056 #ifndef G4CLEBSCH_HH
0057 #define G4CLEBSCH_HH
0058 
0059 #include "globals.hh"
0060 #include <vector>
0061 
0062 class G4Clebsch 
0063 {
0064 public:
0065   // Calculates the standard Clebsch-Gordan coefficient with Condon-Shortley
0066   // phase convention.
0067   static 
0068   G4double ClebschGordanCoeff(G4int twoJ1, G4int twoM1, 
0069                   G4int twoJ2, G4int twoM2, 
0070                   G4int twoJ);
0071 
0072   // Calculates the square of the corresponding Clebsch-Gordan coefficient 
0073   static 
0074   G4double ClebschGordan(G4int twoJ1, G4int twoM1, 
0075              G4int twoJ2, G4int twoM2, 
0076              G4int twoJ);
0077 
0078   static 
0079   std::vector<G4double> GenerateIso3(G4int twoJ1, G4int twoM1, 
0080                      G4int twoJ2, G4int twoM2, 
0081                      G4int twoJOut1, G4int twoJOut2);
0082 
0083   static 
0084   G4double Weight(G4int twoJ1, G4int twoM1, 
0085           G4int twoJ2, G4int twoM2, 
0086           G4int twoJOut1, G4int twoJOut2);
0087 
0088   // Deprecated G4double version of Wigner3J that assumes user sent in half-int
0089   // values. Use G4int version instead, which guarantees validity of arguments.
0090   static 
0091   G4double Wigner3J(G4double j1, G4double j2, G4double j3, 
0092             G4double m1, G4double m2, G4double m3);
0093   
0094   // Wigner's 3J symbols (CG-coeffs with a different phase and normalization)
0095   static G4double Wigner3J(G4int twoJ1, G4int twoM1, 
0096                            G4int twoJ2, G4int twoM2, 
0097                            G4int twoJ3);
0098   static G4double Wigner3J(G4int twoJ1, G4int twoM1, 
0099                            G4int twoJ2, G4int twoM2, 
0100                            G4int twoJ3, G4int twoM3);
0101 
0102   // Calculates the normalized Clebsch-Gordan coefficient, that is the prob 
0103   // of isospin decomposition of (J,m) into J1, J2, m1, m2
0104   static 
0105   G4double NormalizedClebschGordan(G4int twoJ,  G4int twom, 
0106                    G4int twoJ1, G4int twoJ2,
0107                    G4int twom1, G4int twom2);
0108   
0109   // Triangle coefficient appearing in explicit calculation of CG-coeffs
0110   static G4double TriangleCoeff(G4int twoA, G4int twoB, G4int twoC);
0111 
0112   // Wigner's 6J symbols (generalization of CG's for coupling of 3 angular momenta). 
0113   static G4double Wigner6J(G4int twoJ1, G4int twoJ2, G4int twoJ3, 
0114                    G4int twoJ4, G4int twoJ5, G4int twoJ6);
0115 
0116   // Racah's W Coeffs (6J's with a different phase and normalization)
0117   static G4double RacahWCoeff(G4int twoJ1,  G4int twoJ2, 
0118                       G4int twoJ,   G4int twoJ3, 
0119                       G4int twoJ12, G4int twoJ23);
0120 
0121   // Wigner's 9J symbols (generalization of CG's for coupling of 4 angular momenta). 
0122   static G4double Wigner9J(G4int twoJ1, G4int twoJ2, G4int twoJ3, 
0123                    G4int twoJ4, G4int twoJ5, G4int twoJ6,
0124                    G4int twoJ7, G4int twoJ8, G4int twoJ9);
0125 
0126   // Wigner's little-d matrix
0127   static G4double WignerLittleD(G4int twoJ, G4int twoM, G4int twoN, 
0128                 G4double cosTheta);
0129 };
0130 
0131 #endif
0132