129 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() started";
138 if (
gem || ghad || lowEnergyGem || gemHad || ghadHad) {
143 <<
"ParametrisedEMPhysics: GFlash Construct for e+-: " <<
gem <<
" " << ghad <<
" " << lowEnergyGem
144 <<
" for hadrons: " << gemHad <<
" " << ghadHad;
151 }
else if (lowEnergyGem) {
156 if (gemHad || ghadHad) {
158 G4AntiProton::AntiProton()->GetProcessManager()->AddDiscreteProcess(
166 if (
gem || gemHad || lowEnergyGem) {
167 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"EcalRegion",
false);
170 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: "
171 <<
"EcalRegion is not defined, GFlash will not be enabled for ECAL!";
177 std::make_unique<GFlashEMShowerModel>(
"GflashEcalEMShowerModel", aRegion,
theParSet);
178 }
else if (lowEnergyGem) {
181 std::make_unique<LowEnergyFastSimModel>(
"LowEnergyFastSimModel", aRegion,
theParSet);
187 std::make_unique<GFlashHadronShowerModel>(
"GflashEcalHadShowerModel", aRegion,
theParSet);
191 if (ghad || ghadHad) {
192 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
194 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: "
195 <<
"HcalRegion is not defined, GFlash will not be enabled for HCAL!";
201 std::make_unique<GFlashEMShowerModel>(
"GflashHcalEMShowerModel", aRegion,
theParSet);
206 std::make_unique<GFlashHadronShowerModel>(
"GflashHcalHadShowerModel", aRegion,
theParSet);
212 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
222 std::vector<std::string> regnames =
theParSet.
getParameter<std::vector<std::string> >(
"LimitsPerRegion");
227 int nlimits = regnames.size();
229 std::vector<const G4Region*> reg;
230 std::vector<G4double> rlimE;
231 std::vector<G4double> rlimH;
232 std::vector<G4double> factE;
233 std::vector<G4double> rmsvE;
235 G4RegionStore* store = G4RegionStore::GetInstance();
236 for (
int i = 0;
i < nlimits; ++
i) {
238 if (regnames[
i] ==
"all") {
244 reg.emplace_back(
nullptr);
247 factE.emplace_back(facE[
i]);
248 rmsvE.emplace_back(rmsE[
i]);
249 nlimitsH = (limitsH[
i] > 0) ? 1 : 0;
252 const G4Region*
r = store->GetRegion(regnames[
i],
false);
254 if (
r && (limitsE[
i] > 0.0 || limitsH[
i] > 0.0)) {
258 factE.emplace_back(facE[
i]);
259 rmsvE.emplace_back(rmsE[
i]);
260 if (limitsH[
i] > 0) {
265 nlimits = reg.size();
268 if (eLimiter || rLimiter || 0 < nlimits) {
276 if (pLimiter || 0 < nlimits) {
280 ph->RegisterProcess(plim, G4Positron::Positron());
282 if (0 < nlimits && 0 < nlimitsH) {
287 ph->RegisterProcess(plim, G4Proton::Proton());
293 ph->RegisterProcess(plim, G4PionPlus::PionPlus());
297 ph->RegisterProcess(plim, G4PionMinus::PionMinus());
302 if (fluo && !G4LossTableManager::Instance()->AtomDeexcitation()) {
303 G4VAtomDeexcitation* de =
new G4UAtomicDeexcitation();
304 G4LossTableManager::Instance()->SetAtomDeexcitation(de);
314 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() is done";