137 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() started";
146 if (gem || ghad || lowEnergyGem || gemHad || ghadHad) {
151 <<
"ParametrisedEMPhysics: GFlash Construct for e+-: " << gem <<
" " << ghad <<
" " << lowEnergyGem
152 <<
" for hadrons: " << gemHad <<
" " << ghadHad;
159 }
else if (lowEnergyGem) {
163 if (gemHad || ghadHad) {
165 G4AntiProton::AntiProton()->GetProcessManager()->AddDiscreteProcess(
173 if (gem || gemHad || lowEnergyGem) {
174 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"EcalRegion",
false);
177 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: " 178 <<
"EcalRegion is not defined, GFlash will not be enabled for ECAL!";
184 }
else if (lowEnergyGem) {
197 if (ghad || ghadHad) {
198 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
200 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: " 201 <<
"HcalRegion is not defined, GFlash will not be enabled for HCAL!";
217 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
227 std::vector<std::string> regnames =
theParSet.
getParameter<std::vector<std::string> >(
"LimitsPerRegion");
232 int nlimits = regnames.size();
234 std::vector<const G4Region*> reg;
235 std::vector<G4double> rlimE;
236 std::vector<G4double> rlimH;
237 std::vector<G4double> factE;
238 std::vector<G4double> rmsvE;
240 G4RegionStore* store = G4RegionStore::GetInstance();
241 for (
int i = 0;
i < nlimits; ++
i) {
243 if (regnames[
i] ==
"all") {
249 reg.emplace_back(
nullptr);
251 rlimH.emplace_back(limitsH[
i] * CLHEP::MeV);
252 factE.emplace_back(facE[
i]);
253 rmsvE.emplace_back(rmsE[i]);
254 nlimitsH = (limitsH[
i] > 0) ? 1 : 0;
257 const G4Region*
r = store->GetRegion(regnames[i],
false);
259 if (r && (limitsE[i] > 0.0 || limitsH[i] > 0.0)) {
261 rlimE.emplace_back(limitsE[i] * CLHEP::MeV);
262 rlimH.emplace_back(limitsH[i] * CLHEP::MeV);
263 factE.emplace_back(facE[i]);
264 rmsvE.emplace_back(rmsE[i]);
265 if (limitsH[i] > 0) {
270 nlimits = reg.size();
273 if (eLimiter || rLimiter || 0 < nlimits) {
281 if (pLimiter || 0 < nlimits) {
285 ph->RegisterProcess(plim, G4Positron::Positron());
287 if (0 < nlimits && 0 < nlimitsH) {
292 ph->RegisterProcess(plim, G4Proton::Proton());
298 ph->RegisterProcess(plim, G4PionPlus::PionPlus());
302 ph->RegisterProcess(plim, G4PionMinus::PionMinus());
307 if (fluo && !G4LossTableManager::Instance()->AtomDeexcitation()) {
308 G4VAtomDeexcitation* de =
new G4UAtomicDeexcitation();
309 G4LossTableManager::Instance()->SetAtomDeexcitation(de);
321 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() is done";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void SetRangeCheckFlag(G4bool)
edm::ParameterSet theParSet
static G4ThreadLocal TLSmod * m_tpmod
void ModifyTransportation(const G4ParticleDefinition *, int ntry, double th1, double th2)
std::unique_ptr< G4FastSimulationManagerProcess > theFastSimulationManagerProcess
std::unique_ptr< GFlashEMShowerModel > theEcalEMShowerModel
void SetFieldCheckFlag(G4bool)
std::unique_ptr< LowEnergyFastSimModel > theLowEnergyFastSimModel
std::unique_ptr< GFlashEMShowerModel > theHcalEMShowerModel
std::unique_ptr< GFlashHadronShowerModel > theHcalHadShowerModel
std::unique_ptr< GFlashHadronShowerModel > theEcalHadShowerModel
void SetTrackingCutPerRegion(std::vector< const G4Region * > &, std::vector< G4double > &, std::vector< G4double > &, std::vector< G4double > &)