CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSGlauberGribovXS.cc
Go to the documentation of this file.
2 #include "G4ParticleDefinition.hh"
3 #include "G4HadronicProcess.hh"
4 #include "G4GlauberGribovCrossSection.hh"
5 #include "G4BGGNucleonInelasticXS.hh"
6 #include "G4BGGPionInelasticXS.hh"
7 #include "G4ProcessManager.hh"
8 #include "G4ProcessVector.hh"
9 #include "G4HadronicProcessType.hh"
10 
11 #include "G4PionPlus.hh"
12 #include "G4PionMinus.hh"
13 #include "G4KaonPlus.hh"
14 #include "G4KaonMinus.hh"
15 #include "G4BMesonMinus.hh"
16 #include "G4BMesonPlus.hh"
17 #include "G4DMesonMinus.hh"
18 #include "G4DMesonPlus.hh"
19 #include "G4Proton.hh"
20 #include "G4AntiProton.hh"
21 #include "G4SigmaMinus.hh"
22 #include "G4AntiSigmaMinus.hh"
23 #include "G4SigmaPlus.hh"
24 #include "G4AntiSigmaPlus.hh"
25 #include "G4XiMinus.hh"
26 #include "G4AntiXiMinus.hh"
27 #include "G4OmegaMinus.hh"
28 #include "G4AntiOmegaMinus.hh"
29 #include "G4LambdacPlus.hh"
30 #include "G4AntiLambdacPlus.hh"
31 #include "G4XicPlus.hh"
32 #include "G4AntiXicPlus.hh"
33 #include "G4Deuteron.hh"
34 #include "G4Triton.hh"
35 #include "G4He3.hh"
36 #include "G4Alpha.hh"
37 #include "G4GenericIon.hh"
38 
40  G4VPhysicsConstructor("GlauberGribov XS"), verbose(ver)
41 {}
42 
44 
46 
48 {
49 
50  G4GlauberGribovCrossSection* gg = new G4GlauberGribovCrossSection();
51  gg->SetEnergyLowerLimit(90.*GeV);
52 
53  theParticleIterator->reset();
54  while( (*theParticleIterator)() ){
55  G4ParticleDefinition* particle = theParticleIterator->value();
56  G4String particleName = particle->GetParticleName();
57  if(verbose > 1) {
58  G4cout << "### " << GetPhysicsName() << " instantiates for "
59  << particleName << G4endl;
60  }
61 
62  if (particleName == "neutron" ||
63  particleName == "pi+" ||
64  particleName == "pi-" ||
65  particleName == "proton") {
66 
67  G4ProcessVector* pv = particle->GetProcessManager()->GetProcessList();
68  G4int n = pv->size();
69  G4HadronicProcess* had = 0;
70  for(G4int i=0; i<n; i++) {
71  if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) {
72  had = static_cast<G4HadronicProcess*>((*pv)[i]);
73  break;
74  }
75  }
76 
77  if(verbose > 0) {
78  G4cout << "### CMSGlauberGribovXS::ConstructProcess for " << particleName;
79  }
80  if(had) {
81  if(verbose > 0) {G4cout << " and " << had->GetProcessName();}
82  if (particleName == "neutron") {
83  had->AddDataSet(new G4BGGNucleonInelasticXS(particle));
84  } else if(particleName == "proton") {
85  had->AddDataSet(new G4BGGNucleonInelasticXS(particle));
86  } else if(particleName == "pi+") {
87  had->AddDataSet(new G4BGGPionInelasticXS(particle));
88  } else if(particleName == "pi-") {
89  had->AddDataSet(new G4BGGPionInelasticXS(particle));
90  }
91  // had->AddDataSet(gg);
92  }
93  if(verbose > 0) {G4cout << G4endl;}
94  }
95  }
96 }
virtual void ConstructParticle()
int i
Definition: DBlmapReader.cc:9
virtual void ConstructProcess()