Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4ExcitedDeltaConstructor.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 G4ExcitedDeltaConstructor_h
0033 #define G4ExcitedDeltaConstructor_h 1
0034 
0035 #include "G4ExcitedBaryonConstructor.hh"
0036 #include "globals.hh"
0037 
0038 class G4ExcitedDeltaConstructor : public G4ExcitedBaryonConstructor
0039 {
0040     // This class is a utility class for construction
0041     // short lived particles
0042   public:
0043     enum
0044     {
0045       NStates = 9
0046     };
0047 
0048     enum
0049     {
0050       NumberOfDecayModes = 5
0051     };
0052 
0053   public:
0054     G4ExcitedDeltaConstructor();
0055     ~G4ExcitedDeltaConstructor() 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 
0066     G4double GetMass(G4int state, G4int iso) override;
0067     G4double GetWidth(G4int state, G4int iso) override;
0068     G4int GetiSpin(G4int iState) override;
0069     G4int GetiParity(G4int iState) override;
0070     G4int GetEncodingOffset(G4int iState) override;
0071 
0072     G4DecayTable* CreateDecayTable(const G4String& name, G4int iIso3, G4int iState,
0073                                    G4bool fAnti = false) override;
0074 
0075   private:
0076     G4DecayTable* AddNGammaMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0077                                 G4bool fAnti);
0078     G4DecayTable* AddNPiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0079                              G4bool fAnti);
0080     G4DecayTable* AddNRhoMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0081                               G4bool fAnti);
0082     G4DecayTable* AddDeltaPiMode(G4DecayTable* table, const G4String& name, G4double br,
0083                                  G4int iIso3, G4bool fAnti);
0084     G4DecayTable* AddNStarPiMode(G4DecayTable* table, const G4String& name, G4double br,
0085                                  G4int iIso3, G4bool fAnti);
0086 
0087   private:
0088     enum
0089     {
0090       DeltaIsoSpin = 3
0091     };
0092 
0093     static const char* name[NStates];
0094     static const G4double mass[NStates];
0095     static const G4double width[NStates];
0096     static const G4int iSpin[NStates];
0097     static const G4int iParity[NStates];
0098     static const G4int encodingOffset[NStates];
0099 
0100     enum
0101     {
0102       NGamma = 0,
0103       NPi = 1,
0104       NRho = 2,
0105       DeltaPi = 3,
0106       NStarPi = 4
0107     };
0108 
0109     static const G4double bRatio[NStates][NumberOfDecayModes];
0110 };
0111 
0112 inline G4double G4ExcitedDeltaConstructor::GetMass(G4int iState, G4int)
0113 {
0114   return mass[iState];
0115 }
0116 
0117 inline G4double G4ExcitedDeltaConstructor::GetWidth(G4int iState, G4int)
0118 {
0119   return width[iState];
0120 }
0121 
0122 inline G4int G4ExcitedDeltaConstructor::GetiSpin(G4int iState)
0123 {
0124   return iSpin[iState];
0125 }
0126 
0127 inline G4int G4ExcitedDeltaConstructor::GetiParity(G4int iState)
0128 {
0129   return iParity[iState];
0130 }
0131 
0132 inline G4int G4ExcitedDeltaConstructor::GetEncodingOffset(G4int iState)
0133 {
0134   return encodingOffset[iState];
0135 }
0136 
0137 inline G4int G4ExcitedDeltaConstructor::GetQuarkContents(G4int iQ, G4int iIso3)
0138 {
0139   // Quark contents
0140   //    iIso3 = +3 : uuu
0141   //    iIso3 = +1 : uud
0142   //    iIso3 = -1 : udd
0143   //    iIso3 = -3 : ddd
0144   G4int quark = 0;
0145   if (iQ == 0) {
0146     if (iIso3 == -3) {
0147       // d-quark
0148       quark = 1;
0149     }
0150     else {
0151       // u-quark
0152       quark = 2;
0153     }
0154   }
0155   else if (iQ == 2) {
0156     if (iIso3 == +3) {
0157       // u-quark
0158       quark = 2;
0159     }
0160     else {
0161       // d-quark
0162       quark = 1;
0163     }
0164   }
0165   else {
0166     if ((iIso3 == -1) || (iIso3 == -3)) {
0167       // d-quark
0168       quark = 1;
0169     }
0170     else {
0171       // u-quark
0172       quark = 2;
0173     }
0174   }
0175   return quark;
0176 }
0177 
0178 inline G4String G4ExcitedDeltaConstructor::GetMultipletName(G4int iState)
0179 {
0180   return name[iState];
0181 }
0182 
0183 inline G4String G4ExcitedDeltaConstructor::GetName(G4int iIso3, G4int iState)
0184 {
0185   G4String particle = name[iState];
0186   if (iIso3 == -3) {
0187     particle += "-";
0188   }
0189   else if (iIso3 == -1) {
0190     particle += "0";
0191   }
0192   else if (iIso3 == +1) {
0193     particle += "+";
0194   }
0195   else {
0196     particle += "++";
0197   }
0198   return particle;
0199 }
0200 #endif