Skip to content

Commit

Permalink
added new and cleaned up existing PL
Browse files Browse the repository at this point in the history
  • Loading branch information
civanch committed Feb 6, 2019
1 parent 4082c37 commit bcb8db6
Show file tree
Hide file tree
Showing 10 changed files with 250 additions and 24 deletions.
1 change: 0 additions & 1 deletion SimG4Core/Application/src/RunManager.cc
Expand Up @@ -288,7 +288,6 @@ void RunManager::initG4(const edm::EventSetup & es)
// step limiters on top of any Physics Lists
phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));

m_physicsList->ResetStoredInAscii();
std::string tableDir = m_PhysicsTablesDir;
if (m_RestorePhysicsTables) {
m_physicsList->SetPhysicsTableRetrieved(tableDir);
Expand Down
1 change: 0 additions & 1 deletion SimG4Core/Application/src/RunManagerMT.cc
Expand Up @@ -162,7 +162,6 @@ void RunManagerMT::initG4(const DDCompactView *pDD, const MagneticField *pMF,
// step limiters on top of any Physics Lists
phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));

m_physicsList->ResetStoredInAscii();
if (m_RestorePhysicsTables) {
m_physicsList->SetPhysicsTableRetrieved(m_PhysicsTablesDir);
}
Expand Down
67 changes: 67 additions & 0 deletions SimG4Core/PhysicsLists/plugins/FTFPCMS_BERT_EMN.cc
@@ -0,0 +1,67 @@
#include "FTFPCMS_BERT_EMN.h"
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsXS.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "G4DecayPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4IonPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4HadronicProcessStore.hh"

#include "G4DataQuestionaire.hh"
#include "G4HadronPhysicsFTFP_BERT.hh"

FTFPCMS_BERT_EMN::FTFPCMS_BERT_EMN(const edm::ParameterSet & p)
: PhysicsList(p) {

G4DataQuestionaire it(photon);

int ver = p.getUntrackedParameter<int>("Verbosity",0);
bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
bool tracking= p.getParameter<bool>("TrackingCut");
double timeLimit = p.getParameter<double>("MaxTrackTime")*CLHEP::ns;
edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
<< "FTFP_BERT_EMN \n Flags for EM Physics "
<< emPhys << ", for Hadronic Physics "
<< hadPhys << " and tracking cut " << tracking
<< " t(ns)= " << timeLimit/CLHEP::ns;

if (emPhys) {
// EM Physics
RegisterPhysics( new CMSEmStandardPhysicsXS(ver));

// Synchroton Radiation & GN Physics
G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
RegisterPhysics(gn);
}

// Decays
this->RegisterPhysics( new G4DecayPhysics(ver) );

if (hadPhys) {
G4HadronicProcessStore::Instance()->SetVerbose(ver);

// Hadron Elastic scattering
RegisterPhysics( new G4HadronElasticPhysics(ver));

// Hadron Physics
RegisterPhysics( new G4HadronPhysicsFTFP_BERT(ver));

// Stopping Physics
RegisterPhysics( new G4StoppingPhysics(ver));

// Ion Physics
RegisterPhysics( new G4IonPhysics(ver));

// Neutron tracking cut
if (tracking) {
G4NeutronTrackingCut* ncut= new G4NeutronTrackingCut(ver);
ncut->SetTimeLimit(timeLimit);
RegisterPhysics(ncut);
}
}
}

16 changes: 16 additions & 0 deletions SimG4Core/PhysicsLists/plugins/FTFPCMS_BERT_EMN.h
@@ -0,0 +1,16 @@
#ifndef SimG4Core_PhysicsLists_FTFPCMS_BERT_EMN_H
#define SimG4Core_PhysicsLists_FTFPCMS_BERT_EMN_H

#include "SimG4Core/Physics/interface/PhysicsList.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

class FTFPCMS_BERT_EMN: public PhysicsList {

public:
FTFPCMS_BERT_EMN(const edm::ParameterSet & p);
};

#endif



67 changes: 67 additions & 0 deletions SimG4Core/PhysicsLists/plugins/QGSPCMS_FTFP_BERT_EMN.cc
@@ -0,0 +1,67 @@
#include "QGSPCMS_FTFP_BERT_EMN.h"
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsXS.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "G4DecayPhysics.hh"
#include "G4EmExtraPhysics.hh"
#include "G4IonPhysics.hh"
#include "G4StoppingPhysics.hh"
#include "G4HadronElasticPhysics.hh"
#include "G4NeutronTrackingCut.hh"
#include "G4HadronicProcessStore.hh"

#include "G4DataQuestionaire.hh"
#include "G4HadronPhysicsQGSP_FTFP_BERT.hh"

QGSPCMS_FTFP_BERT_EMN::QGSPCMS_FTFP_BERT_EMN(const edm::ParameterSet & p)
: PhysicsList(p) {

G4DataQuestionaire it(photon);

int ver = p.getUntrackedParameter<int>("Verbosity",0);
bool emPhys = p.getUntrackedParameter<bool>("EMPhysics",true);
bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics",true);
bool tracking= p.getParameter<bool>("TrackingCut");
double timeLimit = p.getParameter<double>("MaxTrackTime")*CLHEP::ns;
edm::LogInfo("PhysicsList") << "You are using the simulation engine: "
<< "QGSP_FTFP_BERT_EMN \n Flags for EM Physics "
<< emPhys << ", for Hadronic Physics "
<< hadPhys << " and tracking cut " << tracking
<< " t(ns)= " << timeLimit/CLHEP::ns;

if (emPhys) {
// EM Physics
RegisterPhysics(new CMSEmStandardPhysicsXS(ver));

// Synchroton Radiation & GN Physics
G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
RegisterPhysics(gn);
}

// Decays
RegisterPhysics(new G4DecayPhysics(ver) );

if (hadPhys) {
G4HadronicProcessStore::Instance()->SetVerbose(ver);

// Hadron Elastic scattering
RegisterPhysics(new G4HadronElasticPhysics(ver));

// Hadron Physics
RegisterPhysics(new G4HadronPhysicsQGSP_FTFP_BERT(ver));

// Stopping Physics
RegisterPhysics(new G4StoppingPhysics(ver));

// Ion Physics
RegisterPhysics(new G4IonPhysics(ver));

// Neutron tracking cut
if (tracking) {
G4NeutronTrackingCut* ncut= new G4NeutronTrackingCut(ver);
ncut->SetTimeLimit(timeLimit);
RegisterPhysics(ncut);
}
}
}

15 changes: 15 additions & 0 deletions SimG4Core/PhysicsLists/plugins/QGSPCMS_FTFP_BERT_EMN.h
@@ -0,0 +1,15 @@
#ifndef SimG4Core_PhysicsLists_QGSPCMS_FTFP_BERT_EMN_H
#define SimG4Core_PhysicsLists_QGSPCMS_FTFP_BERT_EMN_H

#include "SimG4Core/Physics/interface/PhysicsList.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

class QGSPCMS_FTFP_BERT_EMN: public PhysicsList {

public:
QGSPCMS_FTFP_BERT_EMN(const edm::ParameterSet & p);
};

#endif


6 changes: 6 additions & 0 deletions SimG4Core/PhysicsLists/plugins/module.cc
Expand Up @@ -6,6 +6,7 @@
#include "FTFPCMS_BERT_ATL_EMM.h"
#include "FTFPCMS_BERT_EML.h"
#include "FTFPCMS_BERT_EMM.h"
#include "FTFPCMS_BERT_EMN.h"
#include "FTFPCMS_BERT_EMM_TRK.h"
#include "FTFPCMS_BERT_HP_EMM.h"
#include "FTFPCMS_BERT_HP_EML.h"
Expand All @@ -23,6 +24,7 @@
#include "QGSPCMS_FTFP_BERT.h"
#include "QGSPCMS_FTFP_BERT_EML.h"
#include "QGSPCMS_FTFP_BERT_EMM.h"
#include "QGSPCMS_FTFP_BERT_EMN.h"
#include "QGSPCMS_FTFP_BERT_EMY.h"
#include "QGSPCMS_FTFP_BERT_EMZ.h"

Expand All @@ -37,6 +39,8 @@ typedef FTFPCMS_BERT_EML FTFP_BERT_EML;
DEFINE_PHYSICSLIST(FTFP_BERT_EML);
typedef FTFPCMS_BERT_EMM FTFP_BERT_EMM;
DEFINE_PHYSICSLIST(FTFP_BERT_EMM);
typedef FTFPCMS_BERT_EMN FTFP_BERT_EMN;
DEFINE_PHYSICSLIST(FTFP_BERT_EMN);
typedef FTFPCMS_BERT_EMM_TRK FTFP_BERT_EMM_TRK;
DEFINE_PHYSICSLIST(FTFP_BERT_EMM_TRK);
typedef FTFPCMS_BERT_HP_EMM FTFP_BERT_HP_EMM;
Expand Down Expand Up @@ -71,6 +75,8 @@ typedef QGSPCMS_FTFP_BERT_EML QGSP_FTFP_BERT_EML;
DEFINE_PHYSICSLIST(QGSP_FTFP_BERT_EML);
typedef QGSPCMS_FTFP_BERT_EMM QGSP_FTFP_BERT_EMM;
DEFINE_PHYSICSLIST(QGSP_FTFP_BERT_EMM);
typedef QGSPCMS_FTFP_BERT_EMN QGSP_FTFP_BERT_EMN;
DEFINE_PHYSICSLIST(QGSP_FTFP_BERT_EMN);
typedef QGSPCMS_FTFP_BERT_EMY QGSP_FTFP_BERT_EMY;
DEFINE_PHYSICSLIST(QGSP_FTFP_BERT_EMY);
typedef QGSPCMS_FTFP_BERT_EMZ QGSP_FTFP_BERT_EMZ;
Expand Down
14 changes: 6 additions & 8 deletions SimG4Core/PhysicsLists/src/CMSEmStandardPhysics.cc
@@ -1,5 +1,4 @@
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysics.h"
#include "SimG4Core/PhysicsLists/interface/UrbanMscModel93.h"
#include "SimG4Core/PhysicsLists/interface/EmParticleList.h"
#include "G4EmParameters.hh"
#include "G4ParticleTable.hh"
Expand All @@ -17,6 +16,7 @@
#include "G4CoulombScattering.hh"
#include "G4eCoulombScatteringModel.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel.hh"

#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
Expand Down Expand Up @@ -73,7 +73,7 @@
#include "G4SystemOfUnits.hh"

CMSEmStandardPhysics::CMSEmStandardPhysics(G4int ver) :
G4VPhysicsConstructor("CMSEmStandard_opt1"), verbose(ver) {
G4VPhysicsConstructor("CMSEmStandard_eml"), verbose(ver) {
G4EmParameters* param = G4EmParameters::Instance();
param->SetDefaults();
param->SetVerbose(verbose);
Expand Down Expand Up @@ -158,14 +158,12 @@ void CMSEmStandardPhysics::ConstructProcess() {
G4MuMultipleScattering* mumsc = nullptr;
G4hMultipleScattering* pimsc = nullptr;
G4hMultipleScattering* kmsc = nullptr;
G4hMultipleScattering* pmsc = nullptr;
G4hMultipleScattering* hmsc = nullptr;

// muon and hadron single scattering
G4CoulombScattering* muss = nullptr;
G4CoulombScattering* piss = nullptr;
G4CoulombScattering* kss = nullptr;
G4CoulombScattering* pss = nullptr;

// high energy limit for e+- scattering models and bremsstrahlung
G4double highEnergyLimit = 100*MeV;
Expand All @@ -186,7 +184,7 @@ void CMSEmStandardPhysics::ConstructProcess() {
G4eIonisation* eioni = new G4eIonisation();

G4eMultipleScattering* msc = new G4eMultipleScattering;
UrbanMscModel93* msc1 = new UrbanMscModel93();
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
Expand All @@ -210,7 +208,7 @@ void CMSEmStandardPhysics::ConstructProcess() {
G4eIonisation* eioni = new G4eIonisation();

G4eMultipleScattering* msc = new G4eMultipleScattering;
UrbanMscModel93* msc1 = new UrbanMscModel93();
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
Expand Down Expand Up @@ -298,10 +296,10 @@ void CMSEmStandardPhysics::ConstructProcess() {
if(nullptr == pb) {
pb = new G4hBremsstrahlung();
pp = new G4hPairProduction();
pmsc = new G4hMultipleScattering();
}
G4hMultipleScattering* pmsc = new G4hMultipleScattering();
pmsc->SetEmModel(new G4WentzelVIModel());
pss = new G4CoulombScattering();
G4CoulombScattering* pss = new G4CoulombScattering();

ph->RegisterProcess(pmsc, particle);
ph->RegisterProcess(new G4hIonisation(), particle);
Expand Down
2 changes: 2 additions & 0 deletions SimG4Core/PhysicsLists/src/CMSEmStandardPhysicsLPM.cc
Expand Up @@ -195,7 +195,9 @@ void CMSEmStandardPhysicsLPM::ConstructProcess() {
G4UrbanMscModel* msc1 = new G4UrbanMscModel();
G4WentzelVIModel* msc2 = new G4WentzelVIModel();
G4UrbanMscModel* msc3 = new G4UrbanMscModel();
//--- VI: these line should be moved down
msc3->SetLocked(true);
//---
msc1->SetHighEnergyLimit(highEnergyLimit);
msc2->SetLowEnergyLimit(highEnergyLimit);
msc3->SetHighEnergyLimit(highEnergyLimit);
Expand Down

0 comments on commit bcb8db6

Please sign in to comment.