Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-07-09 05:00:33

0001 #include "SimG4Core/CustomPhysics/interface/CMSmuDarkBremsstrahlung.h"
0002 #include "SimG4Core/CustomPhysics/interface/CMSmuDarkBremsstrahlungModel.h"
0003 #include "SimG4Core/CustomPhysics/interface/CMSAPrime.h"
0004 
0005 //Geant 4
0006 #include "G4MuonMinus.hh"
0007 #include "G4MuonPlus.hh"
0008 #include "G4LossTableManager.hh"
0009 
0010 using namespace std;
0011 
0012 CMSmuDarkBremsstrahlung::CMSmuDarkBremsstrahlung(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(CMSAPrime::APrime());
0019 }
0020 
0021 G4bool CMSmuDarkBremsstrahlung::IsApplicable(const G4ParticleDefinition& p) {
0022   return (&p == G4MuonPlus::MuonPlus() || &p == G4MuonMinus::MuonMinus());
0023 }
0024 
0025 void CMSmuDarkBremsstrahlung::InitialiseProcess(const G4ParticleDefinition*) {
0026   if (!isInitialised) {
0027     AddEmModel(0, new CMSmuDarkBremsstrahlungModel(mgfile, cxBias));
0028 
0029     isInitialised = true;
0030     isEnabled = true;
0031   }
0032 }
0033 
0034 void CMSmuDarkBremsstrahlung::SetMethod(std::string method_in) {
0035   ((CMSmuDarkBremsstrahlungModel*)EmModel(1))->SetMethod(method_in);
0036   return;
0037 }
0038 
0039 G4bool CMSmuDarkBremsstrahlung::IsEnabled() { return isEnabled; }
0040 
0041 void CMSmuDarkBremsstrahlung::SetEnable(bool state) {
0042   isEnabled = state;
0043   return;
0044 }