Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-26 22:25:33

0001 #include "SimG4Core/CustomPhysics/interface/APrimePhysics.h"
0002 #include "SimG4Core/CustomPhysics/interface/G4APrime.h"
0003 #include "SimG4Core/CustomPhysics/interface/G4muDarkBremsstrahlung.h"
0004 // Geant 4
0005 #include "G4Electron.hh"
0006 #include "G4MuonMinus.hh"
0007 #include "G4MuonPlus.hh"
0008 #include "G4ProcessManager.hh"
0009 #include "G4SystemOfUnits.hh"
0010 
0011 APrimePhysics::APrimePhysics(double APMass, const G4String& scalefile, const G4double cxBias, const G4String& name)
0012     : G4VPhysicsConstructor(name), aprimeDef_(nullptr) {
0013   apmass = APMass;
0014   mgfile = scalefile;
0015   biasFactor = cxBias;
0016 }
0017 
0018 APrimePhysics::~APrimePhysics() {}
0019 
0020 void APrimePhysics::ConstructParticle() {
0021   /**
0022         * Insert A-prime into the Geant4 particle table.
0023         * For now we flag it as stable.
0024         */
0025   aprimeDef_ = G4APrime::APrime(apmass);
0026   //aprimeDef->SetProcessManager(new G4ProcessManager(aprimeDef));
0027 }
0028 
0029 void APrimePhysics::ConstructProcess() {
0030   G4ParticleDefinition* muonminus = G4MuonMinus::MuonMinusDefinition();
0031   G4ParticleDefinition* muonplus = G4MuonPlus::MuonPlusDefinition();
0032   G4ProcessManager* pmplus = muonplus->GetProcessManager();
0033   G4ProcessManager* pmminus = muonminus->GetProcessManager();
0034   pmplus->AddDiscreteProcess(new G4muDarkBremsstrahlung(mgfile, biasFactor), 6);
0035   pmminus->AddDiscreteProcess(new G4muDarkBremsstrahlung(mgfile, biasFactor), 6);
0036 }