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
 
GflashEMShowerModeltheHadShowerModel
 
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.

References theEMShowerModel, theHadronShowerModel, and theHadShowerModel.

15  :
16  G4VPhysicsConstructor(name), theParSet(p)
17 {
18  theEMShowerModel = 0;
21 }
edm::ParameterSet theParSet
GflashEMShowerModel * theEMShowerModel
GflashHadronShowerModel * theHadronShowerModel
GflashEMShowerModel * theHadShowerModel
ParametrisedPhysics::~ParametrisedPhysics ( )
virtual

Definition at line 23 of file ParametrisedPhysics.cc.

References theEMShowerModel, theHadronShowerModel, and theHadShowerModel.

23  {
24  delete theEMShowerModel;
25  delete theHadShowerModel;
26  delete theHadronShowerModel;
27 }
GflashEMShowerModel * theEMShowerModel
GflashHadronShowerModel * theHadronShowerModel
GflashEMShowerModel * theHadShowerModel

Member Function Documentation

void ParametrisedPhysics::ConstructParticle ( )
protectedvirtual

Definition at line 29 of file ParametrisedPhysics.cc.

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

Definition at line 47 of file ParametrisedPhysics.cc.

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

47  {
48 
49  bool gem = theParSet.getParameter<bool>("GflashEcal");
50  bool ghad = theParSet.getParameter<bool>("GflashHcal");
51  std::cout << "GFlash Construct: " << gem << " " << ghad << std::endl;
52 
53  if(gem || ghad) {
54  G4FastSimulationManagerProcess * theFastSimulationManagerProcess =
55  new G4FastSimulationManagerProcess();
56  theParticleIterator->reset();
57  while ((*theParticleIterator)()) {
58  G4ParticleDefinition * particle = theParticleIterator->value();
59  G4ProcessManager * pmanager = particle->GetProcessManager();
60  G4String pname = particle->GetParticleName();
61  if(pname == "e-" || pname == "e+") {
62  pmanager->AddProcess(theFastSimulationManagerProcess, -1, -1, 1);
63  }
64  }
65 
66  if(gem) {
67  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("EcalRegion");
68 
69  if(!aRegion){
70  std::cout << "EcalRegion is not defined !!!" << std::endl;
71  std::cout << "This means that GFlash will not be turned on." << std::endl;
72 
73  } else {
74 
75  //Electromagnetic Shower Model for ECAL
77  new GflashEMShowerModel("GflashEMShowerModel",aRegion,theParSet);
78  std::cout << "GFlash is defined for EcalRegion" << std::endl;
79  }
80  }
81  if(ghad) {
82  G4Region* aRegion = G4RegionStore::GetInstance()->GetRegion("HcalRegion");
83  if(!aRegion) {
84  std::cout << "HcalRegion is not defined !!!" << std::endl;
85  std::cout << "This means that GFlash will not be turned on." << std::endl;
86 
87  } else {
88 
89  //Electromagnetic Shower Model for HCAL
91  new GflashEMShowerModel("GflashHadShowerModel",aRegion,theParSet);
92  std::cout << "GFlash is defined for HcalRegion" << std::endl;
93  }
94  }
95  }
96 }
T getParameter(std::string const &) const
edm::ParameterSet theParSet
GflashEMShowerModel * theEMShowerModel
GflashEMShowerModel * theHadShowerModel
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

GflashEMShowerModel* ParametrisedPhysics::theEMShowerModel
private
GflashHadronShowerModel* ParametrisedPhysics::theHadronShowerModel
private

Definition at line 27 of file ParametrisedPhysics.h.

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

GflashEMShowerModel* ParametrisedPhysics::theHadShowerModel
private
edm::ParameterSet ParametrisedPhysics::theParSet
private

Definition at line 24 of file ParametrisedPhysics.h.

Referenced by ConstructProcess().