File indexing completed on 2024-04-06 12:30:21
0001 #include "SimG4Core/CustomPhysics/interface/G4muDarkBremsstrahlung.h"
0002 #include "SimG4Core/CustomPhysics/interface/G4muDarkBremsstrahlungModel.h"
0003 #include "SimG4Core/CustomPhysics/interface/G4APrime.h"
0004
0005
0006 #include "G4MuonMinus.hh"
0007 #include "G4MuonPlus.hh"
0008 #include "G4LossTableManager.hh"
0009
0010 using namespace std;
0011
0012 G4muDarkBremsstrahlung::G4muDarkBremsstrahlung(const G4String& scalefile,
0013 const G4double biasFactor,
0014 const G4String& name)
0015 : G4VEmProcess(name), isInitialised(false), mgfile(scalefile), cxBias(biasFactor) {
0016 G4int subtype = 40;
0017 SetProcessSubType(subtype);
0018 SetSecondaryParticle(G4APrime::APrime());
0019 }
0020
0021 G4muDarkBremsstrahlung::~G4muDarkBremsstrahlung() {}
0022
0023 G4bool G4muDarkBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) {
0024 return (&p == G4MuonPlus::MuonPlus() || &p == G4MuonMinus::MuonMinus());
0025 }
0026
0027 void G4muDarkBremsstrahlung::InitialiseProcess(const G4ParticleDefinition*) {
0028 if (!isInitialised) {
0029 AddEmModel(0, new G4muDarkBremsstrahlungModel(mgfile, cxBias));
0030
0031 isInitialised = true;
0032 isEnabled = true;
0033 }
0034 }
0035
0036 void G4muDarkBremsstrahlung::SetMethod(std::string method_in) {
0037 ((G4muDarkBremsstrahlungModel*)EmModel(1))->SetMethod(method_in);
0038 return;
0039 }
0040
0041 G4bool G4muDarkBremsstrahlung::IsEnabled() { return isEnabled; }
0042
0043 void G4muDarkBremsstrahlung::SetEnable(bool state) {
0044 isEnabled = state;
0045 return;
0046 }