Skip to content

Commit

Permalink
moved EM parameter definition from SetCuts to ConstructProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
civanch committed Dec 15, 2014
1 parent 49252ef commit bf3e4fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
12 changes: 11 additions & 1 deletion SimG4Core/Application/src/ParametrisedEMPhysics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,18 @@ void ParametrisedEMPhysics::ConstructProcess() {
}
}
}
// Russian Roulette part
// bremsstrahlung threshold
G4EmProcessOptions opt;
G4int verb = theParSet.getUntrackedParameter<int>("Verbosity",0);
opt.SetVerbose(verb - 1);

G4double bremth = theParSet.getParameter<double>("G4BremsstrahlungThreshold")*GeV;
edm::LogInfo("SimG4CoreApplication")
<< "ParametrisedEMPhysics::ConstructProcess: bremsstrahlung threshold Eth= "
<< bremth/GeV << " GeV";
opt.SetBremsstrahlungTh(bremth);
// (m_pPhysics.getParameter<double>("G4BremsstrahlungThreshold")*GeV);
// Russian Roulette part
const G4int NREG = 6;
const G4String rname[NREG] = {"EcalRegion", "HcalRegion", "MuonIron",
"PreshowerRegion","CastorRegion",
Expand Down
9 changes: 6 additions & 3 deletions SimG4Core/Physics/src/PhysicsList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ PhysicsList::PhysicsList(G4LogicalVolumeToDDLogicalPartMap & map,
}

PhysicsList::~PhysicsList() {
/*
if (m_Verbosity > 1)
LogDebug("Physics") << " G4BremsstrahlungThreshold was "
<< G4LossTableManager::Instance()->BremsstrahlungTh()/GeV
<< " GeV ";
*/
if (prodCuts!=0) delete prodCuts;
}

Expand All @@ -27,15 +29,16 @@ void PhysicsList::SetCuts() {
SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue")*cm);
SetCutsWithDefault();

G4LossTableManager::Instance()->SetBremsstrahlungTh
(m_pPhysics.getParameter<double>("G4BremsstrahlungThreshold")*GeV);
// VI potentially unsafe to set bremsstrahlung threashold here
//G4LossTableManager::Instance()->SetBremsstrahlungTh
// (m_pPhysics.getParameter<double>("G4BremsstrahlungThreshold")*GeV);

if ( m_pPhysics.getParameter<bool>("CutsPerRegion") ) {
prodCuts->update();
}

if ( m_Verbosity > 1) {
G4LossTableManager::Instance()->SetVerbose(m_Verbosity-1);
//G4LossTableManager::Instance()->SetVerbose(m_Verbosity-1);
G4VUserPhysicsList::DumpCutValuesTable();
}

Expand Down

0 comments on commit bf3e4fa

Please sign in to comment.