Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-20 03:14:14

0001 
0002 #include "SimG4Core/CustomPhysics/interface/CMSSQ.h"
0003 #include "G4PhysicalConstants.hh"
0004 #include "G4SystemOfUnits.hh"
0005 #include "G4ParticleTable.hh"
0006 
0007 #include "G4PhaseSpaceDecayChannel.hh"
0008 #include "G4DecayTable.hh"
0009 
0010 // ######################################################################
0011 // ###                          SEXAQUARK                             ###
0012 // ######################################################################
0013 
0014 CMSSQ* CMSSQ::theInstance = nullptr;
0015 
0016 CMSSQ* CMSSQ::Definition(double mass) {
0017   if (theInstance != nullptr)
0018     return theInstance;
0019   const G4String name = "sexaq";
0020   // search in particle table]
0021   G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
0022   G4ParticleDefinition* anInstance = pTable->FindParticle(name);
0023   if (anInstance == nullptr) {
0024     // create particle
0025     //
0026     //    Arguments for constructor are as follows
0027     //               name             mass          width         charge
0028     //             2*spin           parity  C-conjugation
0029     //          2*Isospin       2*Isospin3       G-parity
0030     //               type    lepton number  baryon number   PDG encoding
0031     //             stable         lifetime    decay table
0032     //             shortlived      subType    anti_encoding
0033 
0034     anInstance = new G4ParticleDefinition(
0035         name, mass, 0, 0.0, 0, +1, 0, 0, 0, 0, "baryon", 0, +2, 1020000020, true, -1.0, nullptr, false, "sexaq");
0036   }
0037   theInstance = reinterpret_cast<CMSSQ*>(anInstance);
0038   return theInstance;
0039 }
0040 
0041 CMSSQ* CMSSQ::SQ(double mass) {
0042   return Definition(mass * GeV);  // will use correct mass if instance exists
0043 }