CMS 3D CMS Logo

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

#include <ParametrisedEMPhysics.h>

Inheritance diagram for ParametrisedEMPhysics:

Public Member Functions

virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
 ParametrisedEMPhysics (std::string name, const edm::ParameterSet &p)
 
virtual ~ParametrisedEMPhysics ()
 

Private Attributes

GFlashEMShowerModeltheEcalEMShowerModel
 
GFlashHadronShowerModeltheEcalHadShowerModel
 
ElectronLimitertheElectronLimiter
 
GFlashEMShowerModeltheHcalEMShowerModel
 
GFlashHadronShowerModeltheHcalHadShowerModel
 
edm::ParameterSet theParSet
 
ElectronLimiterthePositronLimiter
 

Detailed Description

Definition at line 18 of file ParametrisedEMPhysics.h.

Constructor & Destructor Documentation

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

Definition at line 38 of file ParametrisedEMPhysics.cc.

References theEcalEMShowerModel, theEcalHadShowerModel, theHcalEMShowerModel, and theHcalHadShowerModel.

39  : G4VPhysicsConstructor(name), theParSet(p)
40 {
45 }
edm::ParameterSet theParSet
GFlashHadronShowerModel * theEcalHadShowerModel
GFlashHadronShowerModel * theHcalHadShowerModel
GFlashEMShowerModel * theHcalEMShowerModel
GFlashEMShowerModel * theEcalEMShowerModel
ParametrisedEMPhysics::~ParametrisedEMPhysics ( )
virtual

Definition at line 47 of file ParametrisedEMPhysics.cc.

References theEcalEMShowerModel, theEcalHadShowerModel, theHcalEMShowerModel, and theHcalHadShowerModel.

47  {
48  delete theEcalEMShowerModel;
49  delete theEcalHadShowerModel;
50  delete theHcalEMShowerModel;
51  delete theHcalHadShowerModel;
52 }
GFlashHadronShowerModel * theEcalHadShowerModel
GFlashHadronShowerModel * theHcalHadShowerModel
GFlashEMShowerModel * theHcalEMShowerModel
GFlashEMShowerModel * theEcalEMShowerModel

Member Function Documentation

void ParametrisedEMPhysics::ConstructParticle ( )
virtual

Definition at line 54 of file ParametrisedEMPhysics.cc.

55 {
56  G4LeptonConstructor pLeptonConstructor;
57  pLeptonConstructor.ConstructParticle();
58 
59  G4MesonConstructor pMesonConstructor;
60  pMesonConstructor.ConstructParticle();
61 
62  G4BaryonConstructor pBaryonConstructor;
63  pBaryonConstructor.ConstructParticle();
64 
65  G4ShortLivedConstructor pShortLivedConstructor;
66  pShortLivedConstructor.ConstructParticle();
67 
68  G4IonConstructor pConstructor;
69  pConstructor.ConstructParticle();
70 }
void ParametrisedEMPhysics::ConstructProcess ( )
virtual

Definition at line 72 of file ParametrisedEMPhysics.cc.

References configurableAnalysis::Electron, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), GeV, i, MeV, ElectronLimiter::SetFieldCheckFlag(), ElectronLimiter::SetRangeCheckFlag(), theEcalEMShowerModel, theEcalHadShowerModel, theElectronLimiter, theHcalEMShowerModel, theHcalHadShowerModel, theParSet, and thePositronLimiter.

72  {
73 
74  // GFlash part
75  bool gem = theParSet.getParameter<bool>("GflashEcal");
76  bool ghad = theParSet.getParameter<bool>("GflashHcal");
77  bool gemHad = theParSet.getParameter<bool>("GflashEcalHad");
78  bool ghadHad = theParSet.getParameter<bool>("GflashHcalHad");
79 
80  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
81  if(gem || ghad || gemHad || ghadHad) {
82  edm::LogInfo("SimG4CoreApplication")
83  << "ParametrisedEMPhysics: GFlash Construct for e+-: "
84  << gem << " " << ghad << " for hadrons: " << gemHad << " " << ghadHad;
85 
86  G4FastSimulationManagerProcess * theFastSimulationManagerProcess =
87  new G4FastSimulationManagerProcess();
88 
89  if(gem || ghad) {
90  ph->RegisterProcess(theFastSimulationManagerProcess, G4Electron::Electron());
91  ph->RegisterProcess(theFastSimulationManagerProcess, G4Positron::Positron());
92  }
93  if(gemHad || ghadHad) {
94  ph->RegisterProcess(theFastSimulationManagerProcess, G4Proton::Proton());
95  ph->RegisterProcess(theFastSimulationManagerProcess, G4AntiProton::AntiProton());
96  ph->RegisterProcess(theFastSimulationManagerProcess, G4PionPlus::PionPlus());
97  ph->RegisterProcess(theFastSimulationManagerProcess, G4PionMinus::PionMinus());
98  ph->RegisterProcess(theFastSimulationManagerProcess, G4KaonPlus::KaonPlus());
99  ph->RegisterProcess(theFastSimulationManagerProcess, G4KaonMinus::KaonMinus());
100  }
101 
102  if(gem || gemHad) {
103  G4Region* aRegion =
104  G4RegionStore::GetInstance()->GetRegion("EcalRegion");
105 
106  if(!aRegion){
107  edm::LogInfo("SimG4CoreApplication")
108  << "ParametrisedEMPhysics::ConstructProcess: "
109  << "EcalRegion is not defined, GFlash will not be enabled for ECAL!";
110 
111  } else {
112  if(gem) {
113 
114  //Electromagnetic Shower Model for ECAL
116  new GFlashEMShowerModel("GflashEcalEMShowerModel",aRegion,theParSet);
117  //std::cout << "GFlash is defined for EcalRegion" << std::endl;
118  }
119  if(gemHad) {
120 
121  //Electromagnetic Shower Model for ECAL
123  new GFlashHadronShowerModel("GflashEcalHadShowerModel",aRegion,theParSet);
124  //std::cout << "GFlash is defined for EcalRegion" << std::endl;
125  }
126  }
127  }
128  if(ghad || ghadHad) {
129  G4Region* aRegion =
130  G4RegionStore::GetInstance()->GetRegion("HcalRegion");
131  if(!aRegion) {
132  edm::LogInfo("SimG4CoreApplication")
133  << "ParametrisedEMPhysics::ConstructProcess: "
134  << "HcalRegion is not defined, GFlash will not be enabled for HCAL!";
135 
136  } else {
137  if(ghad) {
138 
139  //Electromagnetic Shower Model for HCAL
141  new GFlashEMShowerModel("GflashHcalEMShowerModel",aRegion,theParSet);
142  //std::cout << "GFlash is defined for HcalRegion" << std::endl;
143  }
144  if(ghadHad) {
145 
146  //Electromagnetic Shower Model for ECAL
148  new GFlashHadronShowerModel("GflashHcalHadShowerModel",aRegion,theParSet);
149  //std::cout << "GFlash is defined for EcalRegion" << std::endl;
150  }
151  }
152  }
153  }
154  // bremsstrahlung threshold and EM verbosity
155  G4EmProcessOptions opt;
156  G4int verb = theParSet.getUntrackedParameter<int>("Verbosity",0);
157  opt.SetVerbose(verb - 1);
158 
159  G4double bremth = theParSet.getParameter<double>("G4BremsstrahlungThreshold")*GeV;
160  edm::LogInfo("SimG4CoreApplication")
161  << "ParametrisedEMPhysics::ConstructProcess: bremsstrahlung threshold Eth= "
162  << bremth/GeV << " GeV";
163  opt.SetBremsstrahlungTh(bremth);
164 
165  // Russian roulette and tracking cut for e+-
166  const G4int NREG = 6;
167  const G4String rname[NREG] = {"EcalRegion", "HcalRegion", "MuonIron",
168  "PreshowerRegion","CastorRegion",
169  "DefaultRegionForTheWorld"};
170  G4double rrfact[NREG] = { 1.0 };
171 
172  double energyLim =
173  theParSet.getParameter<double>("RusRoElectronEnergyLimit")*MeV;
174  if(energyLim > 0.0) {
175  rrfact[0] = theParSet.getParameter<double>("RusRoEcalElectron");
176  rrfact[1] = theParSet.getParameter<double>("RusRoHcalElectron");
177  rrfact[2] = theParSet.getParameter<double>("RusRoMuonIronElectron");
178  rrfact[3] = theParSet.getParameter<double>("RusRoPreShowerElectron");
179  rrfact[4] = theParSet.getParameter<double>("RusRoCastorElectron");
180  rrfact[5] = theParSet.getParameter<double>("RusRoWorldElectron");
181  for(int i=0; i<NREG; ++i) {
182  if(rrfact[i] < 1.0) {
183  opt.ActivateSecondaryBiasing("eIoni",rname[i],rrfact[i],energyLim);
184  opt.ActivateSecondaryBiasing("hIoni",rname[i],rrfact[i],energyLim);
185  edm::LogInfo("SimG4CoreApplication")
186  << "ParametrisedEMPhysics: Russian Roulette"
187  << " for e- Prob= " << rrfact[i]
188  << " Elimit(MeV)= " << energyLim/CLHEP::MeV
189  << " inside " << rname[i];
190  }
191  }
192  }
193 
194  // Step limiters for e+-
195  bool eLimiter = theParSet.getParameter<bool>("ElectronStepLimit");
196  bool rLimiter = theParSet.getParameter<bool>("ElectronRangeTest");
197  bool pLimiter = theParSet.getParameter<bool>("PositronStepLimit");
198 
199  if(eLimiter || rLimiter) {
203  ph->RegisterProcess(theElectronLimiter, G4Electron::Electron());
204  }
205 
206  if(pLimiter){
209  ph->RegisterProcess(theElectronLimiter, G4Positron::Positron());
210  }
211  // enable fluorescence
212  bool fluo = theParSet.getParameter<bool>("FlagFluo");
213  if(fluo) {
214  G4VAtomDeexcitation* de = new G4UAtomicDeexcitation();
215  G4LossTableManager::Instance()->SetAtomDeexcitation(de);
216  de->SetFluo(true);
217  }
218 }
ElectronLimiter * theElectronLimiter
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const double GeV
Definition: MathUtil.h:16
void SetRangeCheckFlag(G4bool)
edm::ParameterSet theParSet
ElectronLimiter * thePositronLimiter
GFlashHadronShowerModel * theEcalHadShowerModel
const double MeV
void SetFieldCheckFlag(G4bool)
GFlashHadronShowerModel * theHcalHadShowerModel
GFlashEMShowerModel * theHcalEMShowerModel
GFlashEMShowerModel * theEcalEMShowerModel

Member Data Documentation

GFlashEMShowerModel* ParametrisedEMPhysics::theEcalEMShowerModel
private
GFlashHadronShowerModel* ParametrisedEMPhysics::theEcalHadShowerModel
private
ElectronLimiter* ParametrisedEMPhysics::theElectronLimiter
private

Definition at line 37 of file ParametrisedEMPhysics.h.

Referenced by ConstructProcess().

GFlashEMShowerModel* ParametrisedEMPhysics::theHcalEMShowerModel
private
GFlashHadronShowerModel* ParametrisedEMPhysics::theHcalHadShowerModel
private
edm::ParameterSet ParametrisedEMPhysics::theParSet
private

Definition at line 30 of file ParametrisedEMPhysics.h.

Referenced by ConstructProcess().

ElectronLimiter* ParametrisedEMPhysics::thePositronLimiter
private

Definition at line 38 of file ParametrisedEMPhysics.h.

Referenced by ConstructProcess().