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 G4ExcitedXiConstructor_h
0033 #define G4ExcitedXiConstructor_h 1
0034 
0035 #include "G4ExcitedBaryonConstructor.hh"
0036 #include "globals.hh"
0037 
0038 class G4ExcitedXiConstructor : public G4ExcitedBaryonConstructor
0039 {
0040     // This class is a utility class for construction
0041     // short lived particles
0042   public:
0043     enum
0044     {
0045       NStates = 5
0046     };
0047 
0048     enum
0049     {
0050       NumberOfDecayModes = 4
0051     };
0052 
0053   public:
0054     G4ExcitedXiConstructor();
0055     ~G4ExcitedXiConstructor() override = default;
0056 
0057   protected:
0058     G4bool Exist(G4int) override { return true; }
0059 
0060     G4int GetQuarkContents(G4int, G4int) override;
0061     G4String GetName(G4int iIso3, G4int iState) override;
0062     G4String GetMultipletName(G4int iState) override;
0063     G4double GetMass(G4int state, G4int iso) override;
0064     G4double GetWidth(G4int state, G4int iso) override;
0065     G4int GetiSpin(G4int iState) override;
0066     G4int GetiParity(G4int iState) override;
0067     G4int GetEncodingOffset(G4int iState) override;
0068 
0069     G4DecayTable* CreateDecayTable(const G4String& name, G4int iIso3, G4int iState,
0070                                    G4bool fAnti = false) override;
0071 
0072   private:
0073     G4DecayTable* AddXiPiMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0074                               G4bool fAnti);
0075     G4DecayTable* AddXiGammaMode(G4DecayTable* table, const G4String& name, G4double br,
0076                                  G4int iIso3, G4bool fAnti);
0077     G4DecayTable* AddLambdaKMode(G4DecayTable* table, const G4String& name, G4double br,
0078                                  G4int iIso3, G4bool fAnti);
0079     G4DecayTable* AddSigmaKMode(G4DecayTable* table, const G4String& name, G4double br, G4int iIso3,
0080                                 G4bool fAnti);
0081 
0082   private:
0083     enum
0084     {
0085       XiIsoSpin = 1
0086     };
0087 
0088     static const char* name[NStates];
0089     static const G4double mass[NStates];
0090     static const G4double width[NStates];
0091     static const G4int iSpin[NStates];
0092     static const G4int iParity[NStates];
0093     static const G4int encodingOffset[NStates];
0094 
0095     enum
0096     {
0097       XiPi = 0,
0098       XiGamma = 1,
0099       LambdaK = 2,
0100       SigmaK = 3
0101     };
0102 
0103     static const G4double bRatio[NStates][NumberOfDecayModes];
0104 };
0105 
0106 inline G4int G4ExcitedXiConstructor::GetiSpin(G4int iState)
0107 {
0108   return iSpin[iState];
0109 }
0110 
0111 inline G4int G4ExcitedXiConstructor::GetiParity(G4int iState)
0112 {
0113   return iParity[iState];
0114 }
0115 
0116 inline G4int G4ExcitedXiConstructor::GetEncodingOffset(G4int iState)
0117 {
0118   return encodingOffset[iState];
0119 }
0120 
0121 inline G4int G4ExcitedXiConstructor::GetQuarkContents(G4int iQ, G4int iIso3)
0122 {
0123   G4int quark = 0;
0124   if (iQ == 0) {
0125     // s-quark
0126     quark = 3;
0127   }
0128   else if (iQ == 1) {
0129     // s-quark
0130     quark = 3;
0131   }
0132   else if (iQ == 2) {
0133     if (iIso3 == +1) {
0134       // u-quark
0135       quark = 2;
0136     }
0137     else {
0138       // d-quark
0139       quark = 1;
0140     }
0141   }
0142   return quark;
0143 }
0144 
0145 inline G4String G4ExcitedXiConstructor::GetMultipletName(G4int iState)
0146 {
0147   return name[iState];
0148 }
0149 
0150 inline G4String G4ExcitedXiConstructor::GetName(G4int iIso3, G4int iState)
0151 {
0152   G4String particle = name[iState];
0153   if (iIso3 == +1) {
0154     particle += "0";
0155   }
0156   else if (iIso3 == -1) {
0157     particle += "-";
0158   }
0159   return particle;
0160 }
0161 #endif