Back to home page

EIC code displayed by LXR

 
 

    


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

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 //  GEANT 4 class implementation file
0028 //
0029 //      History: first implementation, based on object model of
0030 //      10 oct 1998  H.Kurashige
0031 // ---------------------------------------------------------------
0032 #ifndef G4ExcitedNucleonConstructor_h
0033 #define G4ExcitedNucleonConstructor_h 1
0034 
0035 #include "G4ExcitedBaryonConstructor.hh"
0036 #include "globals.hh"
0037 
0038 class G4ExcitedNucleonConstructor : public G4ExcitedBaryonConstructor
0039 {
0040     // This class is a utility class for construction
0041     // short lived particles
0042   public:
0043     enum
0044     {
0045       NStates = 15
0046     };
0047 
0048     enum
0049     {
0050       NumberOfDecayModes = 9
0051     };
0052 
0053   public:
0054     G4ExcitedNucleonConstructor();
0055     ~G4ExcitedNucleonConstructor() override = default;
0056 
0057   protected:
0058     G4int GetEncoding(G4int iIsoSpin3, G4int idxState) override;
0059 
0060     G4bool Exist(G4int) override { return true; }
0061 
0062     G4int GetQuarkContents(G4int, G4int) override;
0063     G4String GetName(G4int iIso3, G4int iState) override;
0064     G4String GetMultipletName(G4int iState) override;
0065     G4double GetMass(G4int state, G4int iso) override;
0066     G4double GetWidth(G4int state, G4int iso) override;
0067     G4int GetiSpin(G4int iState) override;
0068     G4int GetiParity(G4int iState) override;
0069     G4int GetEncodingOffset(G4int iState) override;
0070 
0071     G4DecayTable* CreateDecayTable(const G4String& name, G4int iIso3, G4int iState,
0072                                    G4bool fAnti = false) override;
0073 
0074   private:
0075     G4DecayTable* AddNGammaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0076                                 G4bool fAnti);
0077     G4DecayTable* AddNPiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0078                              G4bool fAnti);
0079     G4DecayTable* AddNEtaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0080                               G4bool fAnti);
0081     G4DecayTable* AddNOmegaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0082                                 G4bool fAnti);
0083     G4DecayTable* AddNRhoMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0084                               G4bool fAnti);
0085     G4DecayTable* AddN2PiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0086                               G4bool fAnti);
0087     G4DecayTable* AddDeltaPiMode(G4DecayTable* table, const G4String& name, G4double br,
0088                                  G4int iIso3, G4bool fAnti);
0089     G4DecayTable* AddNStarPiMode(G4DecayTable* table, const G4String& name, G4double br,
0090                                  G4int iIso3, G4bool fAnti);
0091     G4DecayTable* AddLambdaKMode(G4DecayTable* table, const G4String& name, G4double br,
0092                                  G4int iIso3, G4bool fAnti);
0093 
0094   private:
0095     enum
0096     {
0097       NucleonIsoSpin = 1
0098     };
0099 
0100     static const char* name[NStates];
0101     static const G4double mass[NStates];
0102     static const G4double width[NStates];
0103     static const G4int iSpin[NStates];
0104     static const G4int iParity[NStates];
0105     static const G4int encodingOffset[NStates];
0106 
0107     enum
0108     {
0109       NGamma = 0,
0110       NPi = 1,
0111       NEta = 2,
0112       NOmega = 3,
0113       NRho = 4,
0114       N2Pi = 5,
0115       DeltaPi = 6,
0116       NStarPi = 7,
0117       LambdaK = 8
0118     };
0119 
0120     static const G4double bRatio[NStates][NumberOfDecayModes];
0121 };
0122 
0123 inline G4double G4ExcitedNucleonConstructor::GetMass(G4int iState, G4int)
0124 {
0125   return mass[iState];
0126 }
0127 
0128 inline G4double G4ExcitedNucleonConstructor::GetWidth(G4int iState, G4int)
0129 {
0130   return width[iState];
0131 }
0132 
0133 inline G4int G4ExcitedNucleonConstructor::GetiSpin(G4int iState)
0134 {
0135   return iSpin[iState];
0136 }
0137 
0138 inline G4int G4ExcitedNucleonConstructor::GetiParity(G4int iState)
0139 {
0140   return iParity[iState];
0141 }
0142 
0143 inline G4int G4ExcitedNucleonConstructor::GetEncodingOffset(G4int iState)
0144 {
0145   return encodingOffset[iState];
0146 }
0147 
0148 inline G4int G4ExcitedNucleonConstructor::GetQuarkContents(G4int iQ, G4int iIso3)
0149 {
0150   // Quark contents
0151   //    iIso3 = -1 : udd
0152   //    iIso3 = +1 : uud
0153   G4int quark = 0;
0154   if (iQ == 0) {
0155     // u-quark
0156     quark = 2;
0157   }
0158   else if (iQ == 2) {
0159     // d-quark
0160     quark = 1;
0161   }
0162   else {
0163     if (iIso3 == -1) {
0164       // d-quark
0165       quark = 1;
0166     }
0167     else {
0168       // u-quark
0169       quark = 2;
0170     }
0171   }
0172   return quark;
0173 }
0174 
0175 inline G4String G4ExcitedNucleonConstructor::GetMultipletName(G4int iState)
0176 {
0177   return name[iState];
0178 }
0179 
0180 inline G4String G4ExcitedNucleonConstructor::GetName(G4int iIso3, G4int iState)
0181 {
0182   G4String particle = name[iState];
0183   if (iIso3 == -1) {
0184     particle += "0";
0185   }
0186   else {
0187     particle += "+";
0188   }
0189   return particle;
0190 }
0191 #endif