128 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() started";
137 if (gem || ghad || lowEnergyGem || gemHad || ghadHad) {
142 <<
"ParametrisedEMPhysics: GFlash Construct for e+-: " << gem <<
" " << ghad <<
" " << lowEnergyGem
143 <<
" for hadrons: " << gemHad <<
" " << ghadHad;
150 }
else if (lowEnergyGem) {
155 if (gemHad || ghadHad) {
157 G4AntiProton::AntiProton()->GetProcessManager()->AddDiscreteProcess(
165 if (gem || gemHad || lowEnergyGem) {
166 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"EcalRegion",
false);
169 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: "
170 <<
"EcalRegion is not defined, GFlash will not be enabled for ECAL!";
176 std::make_unique<GFlashEMShowerModel>(
"GflashEcalEMShowerModel", aRegion,
theParSet);
177 }
else if (lowEnergyGem) {
180 std::make_unique<LowEnergyFastSimModel>(
"LowEnergyFastSimModel", aRegion,
theParSet);
186 std::make_unique<GFlashHadronShowerModel>(
"GflashEcalHadShowerModel", aRegion,
theParSet);
190 if (ghad || ghadHad) {
191 G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion(
"HcalRegion",
false);
193 edm::LogWarning(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess: "
194 <<
"HcalRegion is not defined, GFlash will not be enabled for HCAL!";
200 std::make_unique<GFlashEMShowerModel>(
"GflashHcalEMShowerModel", aRegion,
theParSet);
205 std::make_unique<GFlashHadronShowerModel>(
"GflashHcalHadShowerModel", aRegion,
theParSet);
211 G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
221 std::vector<std::string> regnames =
theParSet.
getParameter<std::vector<std::string> >(
"LimitsPerRegion");
226 int nlimits = regnames.size();
228 std::vector<const G4Region*> reg;
229 std::vector<G4double> rlimE;
230 std::vector<G4double> rlimH;
231 std::vector<G4double> factE;
232 std::vector<G4double> rmsvE;
234 G4RegionStore* store = G4RegionStore::GetInstance();
235 for (
int i = 0;
i < nlimits; ++
i) {
237 if (regnames[
i] ==
"all") {
243 reg.emplace_back(
nullptr);
245 rlimH.emplace_back(limitsH[
i] * CLHEP::MeV);
246 factE.emplace_back(facE[
i]);
247 rmsvE.emplace_back(rmsE[i]);
248 nlimitsH = (limitsH[
i] > 0) ? 1 : 0;
251 const G4Region*
r = store->GetRegion(regnames[i],
false);
253 if (r && (limitsE[i] > 0.0 || limitsH[i] > 0.0)) {
255 rlimE.emplace_back(limitsE[i] * CLHEP::MeV);
256 rlimH.emplace_back(limitsH[i] * CLHEP::MeV);
257 factE.emplace_back(facE[i]);
258 rmsvE.emplace_back(rmsE[i]);
259 if (limitsH[i] > 0) {
264 nlimits = reg.size();
267 if (eLimiter || rLimiter || 0 < nlimits) {
275 if (pLimiter || 0 < nlimits) {
279 ph->RegisterProcess(plim, G4Positron::Positron());
281 if (0 < nlimits && 0 < nlimitsH) {
286 ph->RegisterProcess(plim, G4Proton::Proton());
292 ph->RegisterProcess(plim, G4PionPlus::PionPlus());
296 ph->RegisterProcess(plim, G4PionMinus::PionMinus());
301 if (fluo && !G4LossTableManager::Instance()->AtomDeexcitation()) {
302 G4VAtomDeexcitation* de =
new G4UAtomicDeexcitation();
303 G4LossTableManager::Instance()->SetAtomDeexcitation(de);
313 edm::LogVerbatim(
"SimG4CoreApplication") <<
"ParametrisedEMPhysics::ConstructProcess() is done";
Log< level::Info, true > LogVerbatim
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
T getParameter(std::string const &) const
std::unique_ptr< GFlashHadronShowerModel > theEcalHadShowerModel
constexpr char Electron[]
Log< level::Warning, false > LogWarning
void SetTrackingCutPerRegion(std::vector< const G4Region * > &, std::vector< G4double > &, std::vector< G4double > &, std::vector< G4double > &)