CMS 3D CMS Logo

CMSThermalNeutrons.cc
Go to the documentation of this file.
2 
3 #include "G4ParticleDefinition.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4HadronicProcess.hh"
6 
7 #include "G4ParticleHPThermalScattering.hh"
8 #include "G4ParticleHPThermalScatteringData.hh"
9 
10 #include "G4BuilderType.hh"
11 
12 #include "G4SystemOfUnits.hh"
13 
14 CMSThermalNeutrons::CMSThermalNeutrons(G4int ver) : G4VHadronPhysics("CMSThermalNeutrons"), verbose(ver) {}
15 
17 
19  if (verbose > 0) {
20  G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl;
21  }
22  G4Neutron* part = G4Neutron::Neutron();
23  G4HadronicProcess* hpel = FindElasticProcess(part);
24  if (!hpel) {
25  G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add thermal neutron scattering" << G4endl;
26  return;
27  }
28 
29  G4int ni = (hpel->GetHadronicInteractionList()).size();
30  if (ni < 1) {
31  G4cout << "### " << GetPhysicsName() << " WARNING: Fail to add thermal neutron scattering - Nint= " << ni << G4endl;
32  return;
33  }
34  (hpel->GetHadronicInteractionList())[ni - 1]->SetMinEnergy(4 * CLHEP::eV);
35 
36  hpel->RegisterMe(new G4ParticleHPThermalScattering());
37  hpel->AddDataSet(new G4ParticleHPThermalScatteringData());
38 }
CMSThermalNeutrons::~CMSThermalNeutrons
~CMSThermalNeutrons() override
Definition: CMSThermalNeutrons.cc:16
part
part
Definition: HCALResponse.h:20
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
CMSThermalNeutrons::ConstructProcess
void ConstructProcess() override
Definition: CMSThermalNeutrons.cc:18
CMSThermalNeutrons::CMSThermalNeutrons
CMSThermalNeutrons(G4int ver)
Definition: CMSThermalNeutrons.cc:14
CMSThermalNeutrons.h
ecalTB2006H4_GenSimDigiReco_cfg.G4cout
G4cout
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:303
CMSThermalNeutrons::verbose
G4int verbose
Definition: CMSThermalNeutrons.h:15
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443