CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSHadronElasticPhysicsXS.cc
Go to the documentation of this file.
1 //
2 // CHIPS for sampling scattering for p and n
3 // Glauber model for samplimg of high energy pi+- (E > 1GeV)
4 // LHEP sampling model for the other particle
5 // BBG cross sections for p and pi+-
6 // XS cross sections for neutrons
7 // LHEP cross sections for other particles
8 
10 
11 #include "G4ParticleDefinition.hh"
12 #include "G4ProcessManager.hh"
13 
14 #include "G4MesonConstructor.hh"
15 #include "G4BaryonConstructor.hh"
16 #include "G4IonConstructor.hh"
17 #include "G4Neutron.hh"
18 
19 #include "G4WHadronElasticProcess.hh"
20 #include "G4VHadronElastic.hh"
21 #include "G4CHIPSElastic.hh"
22 #include "G4ElasticHadrNucleusHE.hh"
23 #include "G4BGGNucleonElasticXS.hh"
24 #include "G4BGGPionElasticXS.hh"
25 #include "G4NeutronElasticXS.hh"
26 
28  : G4VPhysicsConstructor("hElasticWEL_CHIPS_XS"), verbose(ver),
29  wasActivated(false)
30 {
31  if(verbose > 1) {
32  G4cout << "### G4HadronElasticPhysicsHP: " << GetPhysicsName()
33  << G4endl;
34  }
35 }
36 
38 {}
39 
41 {
42  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
43  G4MesonConstructor pMesonConstructor;
44  pMesonConstructor.ConstructParticle();
45 
46  G4BaryonConstructor pBaryonConstructor;
47  pBaryonConstructor.ConstructParticle();
48 
49  // Construct light ions
50  G4IonConstructor pConstructor;
51  pConstructor.ConstructParticle();
52 }
53 
55 {
56  if(wasActivated) return;
57  wasActivated = true;
58 
59  G4double elimit = 1.0*GeV;
60  if(verbose > 1) {
61  G4cout << "### HadronElasticPhysics Construct Processes with HE limit "
62  << elimit << " MeV" << G4endl;
63  }
64 
65  G4VHadronElastic* plep0 = new G4VHadronElastic();
66  G4VHadronElastic* plep1 = new G4VHadronElastic();
67  plep1->SetMaxEnergy(elimit);
68 
69  G4CHIPSElastic* chipsp = new G4CHIPSElastic();
70  G4CHIPSElastic* chipsn = new G4CHIPSElastic();
71 
72  G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
73  he->SetMinEnergy(elimit);
74 
75  theParticleIterator->reset();
76  while( (*theParticleIterator)() )
77  {
78  G4ParticleDefinition* particle = theParticleIterator->value();
79  G4String pname = particle->GetParticleName();
80  if(pname == "anti_lambda" ||
81  pname == "anti_neutron" ||
82  pname == "anti_omega-" ||
83  pname == "anti_proton" ||
84  pname == "anti_sigma-" ||
85  pname == "anti_sigma+" ||
86  pname == "anti_xi-" ||
87  pname == "anti_xi0" ||
88  pname == "kaon-" ||
89  pname == "kaon+" ||
90  pname == "kaon0S" ||
91  pname == "kaon0L" ||
92  pname == "lambda" ||
93  pname == "omega-" ||
94  pname == "pi-" ||
95  pname == "pi+" ||
96  pname == "proton" ||
97  pname == "sigma-" ||
98  pname == "sigma+" ||
99  pname == "xi-" ||
100  pname == "alpha" ||
101  pname == "deuteron" ||
102  pname == "triton") {
103 
104  G4ProcessManager* pmanager = particle->GetProcessManager();
105  G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
106  if(pname == "proton") {
107  hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
108  hel->RegisterMe(chipsp);
109  } else if (pname == "pi+" || pname == "pi-") {
110  hel->AddDataSet(new G4BGGPionElasticXS(particle));
111  hel->RegisterMe(plep1);
112  hel->RegisterMe(he);
113  } else {
114  hel->RegisterMe(plep0);
115  }
116  pmanager->AddDiscreteProcess(hel);
117  if(verbose > 1) {
118  G4cout << "### HadronElasticPhysicsXS: " << hel->GetProcessName()
119  << " added for " << particle->GetParticleName() << G4endl;
120  }
121 
122  // neutron case
123  } else if(pname == "neutron") {
124 
125  G4ProcessManager* pmanager = particle->GetProcessManager();
126  G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
127  hel->AddDataSet(new G4NeutronElasticXS());
128  hel->RegisterMe(chipsn);
129 
130  pmanager->AddDiscreteProcess(hel);
131 
132  if(verbose > 1) {
133  G4cout << "### HadronElasticPhysicsXS: " << hel->GetProcessName()
134  << " added for " << particle->GetParticleName() << G4endl;
135  }
136  }
137  }
138 }
139 
140