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
CMSHadronElasticPhysicsXS Class Reference

#include <CMSHadronElasticPhysicsXS.h>

Inheritance diagram for CMSHadronElasticPhysicsXS:

Public Member Functions

 CMSHadronElasticPhysicsXS (G4int ver=1)
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
virtual ~CMSHadronElasticPhysicsXS ()
 

Private Attributes

G4int verbose
 
G4bool wasActivated
 

Detailed Description

Definition at line 7 of file CMSHadronElasticPhysicsXS.h.

Constructor & Destructor Documentation

CMSHadronElasticPhysicsXS::CMSHadronElasticPhysicsXS ( G4int  ver = 1)

Definition at line 27 of file CMSHadronElasticPhysicsXS.cc.

28  : G4VPhysicsConstructor("hElasticWEL_CHIPS_XS"), verbose(ver),
29  wasActivated(false)
30 {
31  if(verbose > 1) {
32  G4cout << "### G4HadronElasticPhysicsHP: " << GetPhysicsName()
33  << G4endl;
34  }
35 }
CMSHadronElasticPhysicsXS::~CMSHadronElasticPhysicsXS ( )
virtual

Definition at line 37 of file CMSHadronElasticPhysicsXS.cc.

38 {}

Member Function Documentation

void CMSHadronElasticPhysicsXS::ConstructParticle ( )
virtual

Definition at line 40 of file CMSHadronElasticPhysicsXS.cc.

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 }
void CMSHadronElasticPhysicsXS::ConstructProcess ( )
virtual

Definition at line 54 of file CMSHadronElasticPhysicsXS.cc.

References wasActivated.

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 }

Member Data Documentation

G4int CMSHadronElasticPhysicsXS::verbose
private

Definition at line 26 of file CMSHadronElasticPhysicsXS.h.

G4bool CMSHadronElasticPhysicsXS::wasActivated
private

Definition at line 27 of file CMSHadronElasticPhysicsXS.h.

Referenced by ConstructProcess().