CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/SimG4Core/PhysicsLists/src/CMSGlauberGribovXS.cc

Go to the documentation of this file.
00001 #include "SimG4Core/PhysicsLists/interface/CMSGlauberGribovXS.h"
00002 #include "G4ParticleDefinition.hh"
00003 #include "G4HadronicProcess.hh"
00004 #include "G4GlauberGribovCrossSection.hh"
00005 #include "G4BGGNucleonInelasticXS.hh"
00006 #include "G4BGGPionInelasticXS.hh"
00007 #include "G4ProcessManager.hh"
00008 #include "G4ProcessVector.hh"
00009 #include "G4HadronicProcessType.hh"
00010 
00011 #include "G4PionPlus.hh"
00012 #include "G4PionMinus.hh"
00013 #include "G4KaonPlus.hh"
00014 #include "G4KaonMinus.hh"
00015 #include "G4BMesonMinus.hh"
00016 #include "G4BMesonPlus.hh"
00017 #include "G4DMesonMinus.hh"
00018 #include "G4DMesonPlus.hh"
00019 #include "G4Proton.hh"
00020 #include "G4AntiProton.hh"
00021 #include "G4SigmaMinus.hh"
00022 #include "G4AntiSigmaMinus.hh"
00023 #include "G4SigmaPlus.hh"
00024 #include "G4AntiSigmaPlus.hh"
00025 #include "G4XiMinus.hh"
00026 #include "G4AntiXiMinus.hh"
00027 #include "G4OmegaMinus.hh"
00028 #include "G4AntiOmegaMinus.hh"
00029 #include "G4LambdacPlus.hh"
00030 #include "G4AntiLambdacPlus.hh"
00031 #include "G4XicPlus.hh"
00032 #include "G4AntiXicPlus.hh"
00033 #include "G4Deuteron.hh"
00034 #include "G4Triton.hh"
00035 #include "G4He3.hh"
00036 #include "G4Alpha.hh"
00037 #include "G4GenericIon.hh"
00038 
00039 CMSGlauberGribovXS::CMSGlauberGribovXS(G4int ver) :
00040   G4VPhysicsConstructor("GlauberGribov XS"), verbose(ver) 
00041 {}
00042 
00043 CMSGlauberGribovXS::~CMSGlauberGribovXS() {}
00044 
00045 void CMSGlauberGribovXS::ConstructParticle() {}
00046 
00047 void CMSGlauberGribovXS::ConstructProcess() 
00048 {
00049 
00050   G4GlauberGribovCrossSection* gg = new G4GlauberGribovCrossSection();
00051   gg->SetEnergyLowerLimit(90.*GeV);
00052 
00053   theParticleIterator->reset();
00054   while( (*theParticleIterator)() ){
00055     G4ParticleDefinition* particle = theParticleIterator->value();
00056     G4String particleName = particle->GetParticleName();
00057     if(verbose > 1) {
00058       G4cout << "### " << GetPhysicsName() << " instantiates for " 
00059              << particleName << G4endl;
00060     }
00061 
00062     if (particleName == "neutron" ||
00063         particleName == "pi+" ||
00064         particleName == "pi-" ||
00065         particleName == "proton") {
00066 
00067       G4ProcessVector*  pv = particle->GetProcessManager()->GetProcessList();
00068       G4int n = pv->size();
00069       G4HadronicProcess* had = 0;
00070       for(G4int i=0; i<n; i++) {
00071         if(fHadronInelastic == ((*pv)[i])->GetProcessSubType()) {
00072           had = static_cast<G4HadronicProcess*>((*pv)[i]);
00073           break;
00074         }
00075       }
00076         
00077       if(verbose > 0) {
00078         G4cout << "### CMSGlauberGribovXS::ConstructProcess for " << particleName;
00079       }
00080       if(had) {
00081         if(verbose > 0) {G4cout << " and  " << had->GetProcessName();}   
00082         if (particleName == "neutron") {
00083           had->AddDataSet(new G4BGGNucleonInelasticXS(particle));
00084         } else if(particleName == "proton") {
00085           had->AddDataSet(new G4BGGNucleonInelasticXS(particle));
00086         } else if(particleName == "pi+") {
00087           had->AddDataSet(new G4BGGPionInelasticXS(particle));
00088         } else if(particleName == "pi-") {
00089           had->AddDataSet(new G4BGGPionInelasticXS(particle));
00090         }
00091            //   had->AddDataSet(gg);
00092       }
00093       if(verbose > 0) {G4cout << G4endl;}   
00094     }
00095   }
00096 }