CMS 3D CMS Logo

HadronPhysicsCMS.cc

Go to the documentation of this file.
00001 #include "SimG4Core/PhysicsLists/interface/HadronPhysicsCMS.h"
00002 
00003 #include "globals.hh"
00004 #include "G4ios.hh"
00005 #include <iomanip>   
00006 #include "G4ParticleDefinition.hh"
00007 #include "G4ParticleTable.hh"
00008 
00009 #include "G4MesonConstructor.hh"
00010 #include "G4BaryonConstructor.hh"
00011 #include "G4ShortLivedConstructor.hh"
00012 
00013 HadronPhysicsCMS::HadronPhysicsCMS(const G4String& name, G4bool quasiElastic) :
00014   G4VPhysicsConstructor("hadron"), theNeutrons(0), theBertiniNeutron(0),
00015   theBinaryNeutron(0), theFTFCNeutron(0), theFTFPNeutron(0), theLEPNeutron(0),
00016   theLHEPNeutron(0), thePrecoNeutron(0), theQGSCEflowNeutron(0),
00017   theQGSCNeutron(0), theQGSPNeutron(0), thePiK(0), theBertiniPiK(0),
00018   theBinaryPiK(0), theFTFCPiK(0), theFTFPPiK(0), theLEPPiK(0), theLHEPPiK(0),
00019   theQGSCEflowPiK(0), theQGSCPiK(0), theQGSPPiK(0), thePro(0),theBertiniPro(0),
00020   theBinaryPro(0), theFTFCPro(0), theFTFPPro(0), theLEPPro(0), theLHEPPro(0),
00021   thePrecoPro(0),  theQGSCEflowPro(0), theQGSCPro(0), theQGSPPro(0),
00022   theMiscLHEP(), theFTFNeutron(0), theFTFPiK(0), theFTFPro(0), 
00023   theRPGNeutron(0), theRPGPiK(0), theRPGPro(0), modelName(name), 
00024   QuasiElastic(quasiElastic) {}
00025 
00026 void HadronPhysicsCMS::CreateModels() {
00027 
00028   theNeutrons = new G4NeutronBuilder;
00029   thePro      = new G4ProtonBuilder;
00030   thePiK      = new G4PiKBuilder;
00031 
00032   if (modelName == "Bertini") {
00033     theBertiniNeutron = new G4BertiniNeutronBuilder();
00034     theBertiniNeutron->SetMaxEnergy(30.0*GeV);
00035     theNeutrons->RegisterMe(theBertiniNeutron);
00036     theBertiniPro     = new G4BertiniProtonBuilder();
00037     theBertiniPro->SetMaxEnergy(30.0*GeV);
00038     thePro->RegisterMe(theBertiniPro);
00039     theBertiniPiK     = new G4BertiniPiKBuilder();
00040     theBertiniPiK->SetMaxEnergy(30.0*GeV);
00041     thePiK->RegisterMe(theBertiniPiK);
00042   } else if (modelName == "Binary") {
00043     theBinaryNeutron = new G4BinaryNeutronBuilder();
00044     theBinaryNeutron->SetMaxEnergy(30.0*GeV);
00045     theNeutrons->RegisterMe(theBinaryNeutron);
00046     theBinaryPro     = new G4BinaryProtonBuilder();
00047     theBinaryPro->SetMaxEnergy(30.0*GeV);
00048     thePro->RegisterMe(theBinaryPro);
00049     theBinaryPiK     = new G4BinaryPiKBuilder(); 
00050     theBinaryPiK->SetMaxEnergy(30.0*GeV);
00051     thePiK->RegisterMe(theBinaryPiK);
00052   } else if (modelName == "FTFC") {
00053     theFTFCNeutron = new G4FTFCNeutronBuilder();
00054     theFTFCNeutron->SetMinEnergy(0.1*GeV);
00055     theNeutrons->RegisterMe(theFTFCNeutron);
00056     theFTFCPro     = new G4FTFCProtonBuilder();
00057     theFTFCPro->SetMinEnergy(0.1*GeV);
00058     thePro->RegisterMe(theFTFCPro);
00059     theFTFCPiK     = new G4FTFCPiKBuilder();
00060     theFTFCPiK->SetMinEnergy(0.1*GeV);
00061     thePiK->RegisterMe(theFTFCPiK);
00062   } else if (modelName == "FTFP") {
00063     theFTFPNeutron = new G4FTFPNeutronBuilder();
00064     theFTFPNeutron->SetMinEnergy(0.1*GeV);
00065     theNeutrons->RegisterMe(theFTFPNeutron);
00066     theFTFPPro     = new G4FTFPProtonBuilder();
00067     theFTFPPro->SetMinEnergy(0.1*GeV);
00068     thePro->RegisterMe(theFTFPPro);
00069     theFTFPPiK     = new G4FTFPPiKBuilder();
00070     theFTFPPiK->SetMinEnergy(0.1*GeV);
00071     thePiK->RegisterMe(theFTFPPiK);
00072   }  else if (modelName == "LEP") {
00073     theLEPNeutron = new G4LEPNeutronBuilder();
00074     theNeutrons->RegisterMe(theLEPNeutron);
00075     theLEPPro     = new G4LEPProtonBuilder();
00076     thePro->RegisterMe(theLEPPro);
00077     theLEPPiK     = new G4LEPPiKBuilder();
00078     thePiK->RegisterMe(theLEPPiK);
00079   }  else if (modelName == "LHEP") {
00080     theLHEPNeutron = new G4LHEPNeutronBuilder();
00081     theNeutrons->RegisterMe(theLHEPNeutron);
00082     theLHEPPro     = new G4LHEPProtonBuilder();
00083     thePro->RegisterMe(theLHEPPro);
00084     theLHEPPiK     = new G4LHEPPiKBuilder();
00085     thePiK->RegisterMe(theLHEPPiK);
00086   }  else if (modelName == "Preco") {
00087     thePrecoNeutron = new G4PrecoNeutronBuilder();
00088     theNeutrons->RegisterMe(thePrecoNeutron);
00089     thePrecoPro     = new G4PrecoProtonBuilder();
00090     thePro->RegisterMe(thePrecoPro);
00091     theLHEPPiK      = new G4LHEPPiKBuilder();
00092     thePiK->RegisterMe(theLHEPPiK);
00093   }  else if (modelName == "QGSCEflow") {
00094     theQGSCEflowNeutron = new G4QGSCEflowNeutronBuilder();
00095     theQGSCEflowNeutron->SetMinEnergy(0.1*GeV);
00096     theNeutrons->RegisterMe(theQGSCEflowNeutron);
00097     theQGSCEflowPro     = new G4QGSCEflowProtonBuilder();
00098     theQGSCEflowPro->SetMinEnergy(0.1*GeV);
00099     thePro->RegisterMe(theQGSCEflowPro);
00100     theQGSCEflowPiK     = new G4QGSCEflowPiKBuilder();
00101     theQGSCEflowPiK->SetMinEnergy(0.1*GeV);
00102     thePiK->RegisterMe(theQGSCEflowPiK);
00103   }  else if (modelName == "QGSC") {
00104     theQGSCNeutron = new G4QGSCNeutronBuilder();
00105     theQGSCNeutron->SetMinEnergy(0.1*GeV);
00106     theNeutrons->RegisterMe(theQGSCNeutron);
00107     theQGSCPro     = new G4QGSCProtonBuilder();
00108     theQGSCPro->SetMinEnergy(0.1*GeV);
00109     thePro->RegisterMe(theQGSCPro);
00110     theQGSCPiK     = new G4QGSCPiKBuilder();
00111     theQGSCPiK->SetMinEnergy(0.1*GeV);
00112     thePiK->RegisterMe(theQGSCPiK);
00113   } else if (modelName == "RPG") {
00114     theRPGNeutron  = new G4RPGNeutronBuilder();
00115     theNeutrons->RegisterMe(theRPGNeutron);
00116     theRPGPro      = new G4RPGProtonBuilder();
00117     thePro->RegisterMe(theRPGPro);
00118     theRPGPiK      = new G4RPGPiKBuilder();
00119     thePiK->RegisterMe(theRPGPiK);
00120   } else if (modelName == "FTF") {
00121     theFTFNeutron  = new G4FTFBinaryNeutronBuilder();
00122     theNeutrons->RegisterMe(theFTFNeutron);
00123     theFTFPro      = new G4FTFBinaryProtonBuilder();
00124     thePro->RegisterMe(theFTFPro);
00125     theFTFPiK      = new G4FTFBinaryPiKBuilder();
00126     thePiK->RegisterMe(theFTFPiK);
00127   } else {
00128     theQGSPNeutron = new G4QGSPNeutronBuilder(QuasiElastic);
00129     theQGSPNeutron->SetMinEnergy(0.1*GeV);
00130     theNeutrons->RegisterMe(theQGSPNeutron);
00131     theQGSPPro     = new G4QGSPProtonBuilder(QuasiElastic);
00132     theQGSPPro->SetMinEnergy(0.1*GeV);
00133     thePro->RegisterMe(theQGSPPro);
00134     theQGSPPiK     = new G4QGSPPiKBuilder(QuasiElastic);
00135     theQGSPPiK->SetMinEnergy(0.1*GeV);
00136     thePiK->RegisterMe(theQGSPPiK);
00137   }
00138   
00139   theMiscLHEP=new G4MiscLHEPBuilder;
00140 }
00141 
00142 HadronPhysicsCMS::~HadronPhysicsCMS() {
00143   delete theMiscLHEP;
00144   if (theBertiniNeutron)   delete theBertiniNeutron;
00145   if (theBinaryNeutron)    delete theBinaryNeutron;
00146   if (theFTFCNeutron)      delete theFTFCNeutron;
00147   if (theFTFPNeutron)      delete theFTFPNeutron;
00148   if (theLEPNeutron)       delete theLEPNeutron;
00149   if (theLHEPNeutron)      delete theLHEPNeutron;
00150   if (thePrecoNeutron)     delete thePrecoNeutron;
00151   if (theQGSCEflowNeutron) delete theQGSCEflowNeutron;
00152   if (theQGSCNeutron)      delete theQGSCNeutron;
00153   if (theQGSPNeutron)      delete theQGSPNeutron;
00154   if (theFTFNeutron)       delete theFTFNeutron;
00155   if (theRPGNeutron)       delete theRPGNeutron;
00156   delete theNeutrons;
00157   if (theBertiniPro)       delete theBertiniPro;
00158   if (theBinaryPro)        delete theBinaryPro;
00159   if (theFTFCPro)          delete theFTFCPro;
00160   if (theFTFPPro)          delete theFTFPPro;
00161   if (theLEPPro)           delete theLEPPro;
00162   if (theLHEPPro)          delete theLHEPPro;
00163   if (thePrecoPro)         delete thePrecoPro;
00164   if (theQGSCEflowPro)     delete theQGSCEflowPro;
00165   if (theQGSCPro)          delete theQGSCPro;
00166   if (theQGSPPro)          delete theQGSPPro; 
00167   if (theFTFPro)           delete theFTFPro;
00168   if (theRPGPro)           delete theRPGPro;
00169   delete thePro;
00170   if (theBertiniPiK)       delete theBertiniPiK;
00171   if (theBinaryPiK)        delete theBinaryPiK;
00172   if (theFTFCPiK)          delete theFTFCPiK;
00173   if (theFTFPPiK)          delete theFTFPPiK;
00174   if (theLEPPiK)           delete theLEPPiK;
00175   if (theLHEPPiK)          delete theLHEPPiK;
00176   if (theQGSCEflowPiK)     delete theQGSCEflowPiK;
00177   if (theQGSPPiK)          delete theQGSPPiK;
00178   if (theFTFPiK)           delete theFTFPiK;
00179   if (theRPGPiK)           delete theRPGPiK;
00180   delete thePiK;
00181 }
00182 
00183 
00184 void HadronPhysicsCMS::ConstructParticle() {
00185 
00186   G4MesonConstructor pMesonConstructor;
00187   pMesonConstructor.ConstructParticle();
00188 
00189   G4BaryonConstructor pBaryonConstructor;
00190   pBaryonConstructor.ConstructParticle();
00191 
00192   G4ShortLivedConstructor pShortLivedConstructor;
00193   pShortLivedConstructor.ConstructParticle();  
00194 }
00195 
00196 #include "G4ProcessManager.hh"
00197 void HadronPhysicsCMS::ConstructProcess() {
00198 
00199   CreateModels();
00200   theNeutrons->Build();
00201   thePro->Build();
00202   thePiK->Build();
00203   theMiscLHEP->Build();
00204 }
00205 

Generated on Tue Jun 9 17:47:07 2009 for CMSSW by  doxygen 1.5.4