Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-10 02:21:24

0001 #include "SimG4Core/CustomPhysics/interface/G4APrime.h"
0002 #include <CLHEP/Units/SystemOfUnits.h>
0003 
0004 G4APrime* G4APrime::theAPrime = nullptr;
0005 
0006 G4APrime::G4APrime(const G4String& aName,
0007                    G4double mass,
0008                    G4double width,
0009                    G4double charge,
0010                    G4int iSpin,
0011                    G4int iParity,
0012                    G4int iConjugation,
0013                    G4int iIsospin,
0014                    G4int iIsospin3,
0015                    G4int gParity,
0016                    const G4String& pType,
0017                    G4int lepton,
0018                    G4int baryon,
0019                    G4int encoding,
0020                    G4bool stable,
0021                    G4double lifetime,
0022                    G4DecayTable* decaytable)
0023     : G4ParticleDefinition(aName,
0024                            mass,
0025                            width,
0026                            charge,
0027                            iSpin,
0028                            iParity,
0029                            iConjugation,
0030                            iIsospin,
0031                            iIsospin3,
0032                            gParity,
0033                            pType,
0034                            lepton,
0035                            baryon,
0036                            encoding,
0037                            stable,
0038                            lifetime,
0039                            decaytable) {}
0040 
0041 G4APrime::~G4APrime() {}
0042 
0043 G4APrime* G4APrime::APrime(double apmass) {
0044   if (!theAPrime) {
0045     const G4String& name = "A^1";
0046     G4double mass = apmass * CLHEP::MeV;
0047     G4double width = 0.;
0048     G4double charge = 0;
0049     G4int iSpin = 0;
0050     G4int iParity = 0;
0051     G4int iConjugation = 0;
0052     G4int iIsospin = 0;
0053     G4int iIsospin3 = 0;
0054     G4int gParity = 0;
0055     const G4String& pType = "APrime";
0056     G4int lepton = 0;
0057     G4int baryon = 0;
0058     G4int encoding = 9994;
0059     G4bool stable = true;
0060     G4double lifetime = -1;
0061     G4DecayTable* decaytable = nullptr;
0062 
0063     theAPrime = new G4APrime(name,
0064                              mass,
0065                              width,
0066                              charge,
0067                              iSpin,
0068                              iParity,
0069                              iConjugation,
0070                              iIsospin,
0071                              iIsospin3,
0072                              gParity,
0073                              pType,
0074                              lepton,
0075                              baryon,
0076                              encoding,
0077                              stable,
0078                              lifetime,
0079                              decaytable);
0080   }
0081   return theAPrime;
0082 }