test
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 17 of file ParametrisedPhysics.cc.

References theEMShowerModel, theHadronShowerModel, and theHadShowerModel.

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

Definition at line 25 of file ParametrisedPhysics.cc.

References theEMShowerModel, theHadronShowerModel, and theHadShowerModel.

25  {
26  delete theEMShowerModel;
27  delete theHadShowerModel;
28  delete theHadronShowerModel;
29 }
GflashEMShowerModel * theEMShowerModel
GflashHadronShowerModel * theHadronShowerModel
GflashEMShowerModel * theHadShowerModel

Member Function Documentation

void ParametrisedPhysics::ConstructParticle ( )
protectedvirtual

Definition at line 31 of file ParametrisedPhysics.cc.

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

Definition at line 49 of file ParametrisedPhysics.cc.

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

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