CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
ParametrisedPhysics Class Reference

#include <ParametrisedPhysics.h>

Inheritance diagram for ParametrisedPhysics:

Public Member Functions

 ParametrisedPhysics (std::string name, const edm::ParameterSet &p)
 
virtual ~ParametrisedPhysics ()
 

Protected Member Functions

virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 

Private Attributes

GflashEMShowerModeltheEMShowerModel
 
GflashHadronShowerModeltheHadronShowerModel
 
edm::ParameterSet theParSet
 

Detailed Description

Definition at line 13 of file ParametrisedPhysics.h.

Constructor & Destructor Documentation

ParametrisedPhysics::ParametrisedPhysics ( std::string  name,
const edm::ParameterSet p 
)

Definition at line 15 of file ParametrisedPhysics.cc.

15  :
16  G4VPhysicsConstructor(name), theParSet(p) {}
edm::ParameterSet theParSet
ParametrisedPhysics::~ParametrisedPhysics ( )
virtual

Definition at line 18 of file ParametrisedPhysics.cc.

References edm::ParameterSet::getParameter(), theEMShowerModel, theHadronShowerModel, and theParSet.

18  {
19  if(theParSet.getParameter<bool>("GflashEMShowerModel") && theEMShowerModel)
20  delete theEMShowerModel;
21  if(theParSet.getParameter<bool>("GflashHadronShowerModel") && theHadronShowerModel)
22  delete theHadronShowerModel;
23 }
T getParameter(std::string const &) const
edm::ParameterSet theParSet
GflashEMShowerModel * theEMShowerModel
GflashHadronShowerModel * theHadronShowerModel

Member Function Documentation

void ParametrisedPhysics::ConstructParticle ( )
protectedvirtual

Definition at line 25 of file ParametrisedPhysics.cc.

26 {
27  G4LeptonConstructor pLeptonConstructor;
28  pLeptonConstructor.ConstructParticle();
29 
30  G4MesonConstructor pMesonConstructor;
31  pMesonConstructor.ConstructParticle();
32 
33  G4BaryonConstructor pBaryonConstructor;
34  pBaryonConstructor.ConstructParticle();
35 
36  G4ShortLivedConstructor pShortLivedConstructor;
37  pShortLivedConstructor.ConstructParticle();
38 
39  G4IonConstructor pConstructor;
40  pConstructor.ConstructParticle();
41 }
void ParametrisedPhysics::ConstructProcess ( )
protectedvirtual

Definition at line 43 of file ParametrisedPhysics.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), ecalTB2006H4_GenSimDigiReco_cfg::GflashEMShowerModel, ecalTB2006H4_GenSimDigiReco_cfg::GflashHadronShowerModel, theEMShowerModel, theHadronShowerModel, and theParSet.

43  {
44 
45  G4FastSimulationManagerProcess * theFastSimulationManagerProcess = new G4FastSimulationManagerProcess();
46  theParticleIterator->reset();
47  while ((*theParticleIterator)()) {
48  G4ParticleDefinition * particle = theParticleIterator->value();
49  G4ProcessManager * pmanager = particle->GetProcessManager();
50  pmanager->AddProcess(theFastSimulationManagerProcess, -1, -1, 1);
51  }
52 
53  // GflashEnvelop definition as CaloRegion which includes EcalRegion & HcalRegion
54  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("CaloRegion");
55  if(aRegion == 0){
56  std::cout << "CaloRegion is not defined !!!" << std::endl;
57  std::cout << "This means that GFlash will not be turned on." << std::endl;
58  std::cout << "Take a look at cmsGflashGeometryXML.cfi if it includes gflashCaloProdCuts.xml." << std::endl;
59  }
60 
61  //Electromagnetic Shower Model
62  if(theParSet.getParameter<bool>("GflashEMShowerModel")) {
63  theEMShowerModel = new GflashEMShowerModel("GflashEMShowerModel",aRegion,theParSet);
64  }
65 
66  //Hadronic Shower Model
67  if(theParSet.getParameter<bool>("GflashHadronShowerModel")) {
68  theHadronShowerModel = new GflashHadronShowerModel("GflashHadronShowerModel",aRegion,theParSet);
69  }
70 }
T getParameter(std::string const &) const
edm::ParameterSet theParSet
GflashEMShowerModel * theEMShowerModel
GflashHadronShowerModel * theHadronShowerModel
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

GflashEMShowerModel* ParametrisedPhysics::theEMShowerModel
private

Definition at line 25 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().

GflashHadronShowerModel* ParametrisedPhysics::theHadronShowerModel
private

Definition at line 26 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().

edm::ParameterSet ParametrisedPhysics::theParSet
private

Definition at line 24 of file ParametrisedPhysics.h.

Referenced by ConstructProcess(), and ~ParametrisedPhysics().