File indexing completed on 2025-07-09 05:00:33
0001
0002 #include "G4SystemOfUnits.hh"
0003 #include "G4DynamicParticle.hh"
0004 #include "G4NistManager.hh"
0005
0006 #include "SimG4Core/CustomPhysics/interface/CMSSQ.h"
0007 #include "SimG4Core/CustomPhysics/interface/CMSAntiSQ.h"
0008 #include "SimG4Core/CustomPhysics/interface/CMSSQInelasticCrossSection.h"
0009
0010 CMSSQInelasticCrossSection::CMSSQInelasticCrossSection(double mass) : G4VCrossSectionDataSet("SQ-neutron") {
0011 nist = G4NistManager::Instance();
0012 theSQ = CMSSQ::SQ(mass);
0013 theAntiSQ = CMSAntiSQ::AntiSQ(mass);
0014 }
0015
0016 G4bool CMSSQInelasticCrossSection::IsElementApplicable(const G4DynamicParticle* aPart, G4int Z, const G4Material*) {
0017 return true;
0018 }
0019
0020 G4double CMSSQInelasticCrossSection::GetElementCrossSection(const G4DynamicParticle* aPart,
0021 G4int Z,
0022 const G4Material*) {
0023
0024
0025 if (aPart->GetDefinition() != theAntiSQ)
0026 return 0;
0027
0028
0029 if (Z <= 1) {
0030 return 0.0;
0031 }
0032
0033
0034 G4double A = nist->GetAtomicMassAmu(Z);
0035
0036
0037
0038
0039 return (100. * (A - (G4double)Z) / (G4double)Z) * millibarn;
0040 }