CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HadronPhysicsQGSC.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/HadronPhysicsQGSC.hh"
2 
3 #include "globals.hh"
4 #include "G4ios.hh"
5 #include <iomanip>
6 #include "G4ParticleDefinition.hh"
7 #include "G4ParticleTable.hh"
8 
9 #include "G4MesonConstructor.hh"
10 #include "G4BaryonConstructor.hh"
11 #include "G4ShortLivedConstructor.hh"
12 
13 HadronPhysicsQGSC::HadronPhysicsQGSC(G4int)
14  : G4VPhysicsConstructor("hInelastic QGSC")
15  , QuasiElastic(true)
16 {}
17 
18 HadronPhysicsQGSC::HadronPhysicsQGSC(const G4String& name, G4bool quasiElastic)
19  : G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
20 {}
21 
22 void HadronPhysicsQGSC::CreateModels()
23 {
24  theNeutrons=new G4NeutronBuilder;
25  theNeutrons->RegisterMe(theQGSCNeutron=new G4QGSCNeutronBuilder(QuasiElastic));
26  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
27  theLEPNeutron->SetMaxInelasticEnergy(25*GeV);
28 
29  thePro=new G4ProtonBuilder;
30  thePro->RegisterMe(theQGSCPro=new G4QGSCProtonBuilder(QuasiElastic));
31  thePro->RegisterMe(theLEPPro=new G4LEPProtonBuilder);
32  theLEPPro->SetMaxEnergy(25*GeV);
33 
34  thePiK=new G4PiKBuilder;
35  thePiK->RegisterMe(theQGSCPiK=new G4QGSCPiKBuilder(QuasiElastic));
36  thePiK->RegisterMe(theLEPPiK=new G4LEPPiKBuilder);
37  theLEPPiK->SetMaxEnergy(25*GeV);
38 
39  theMiscLHEP=new G4MiscLHEPBuilder;
40 }
41 
42 HadronPhysicsQGSC::~HadronPhysicsQGSC()
43 {
44  delete theMiscLHEP;
45  delete theQGSCPro;
46  delete theLEPPro;
47  delete thePro;
48  delete theQGSCNeutron;
49  delete theNeutrons;
50  delete theQGSCPiK;
51  delete theLEPPiK;
52  delete thePiK;
53 }
54 
55 void HadronPhysicsQGSC::ConstructParticle()
56 {
57  G4MesonConstructor pMesonConstructor;
58  pMesonConstructor.ConstructParticle();
59 
60  G4BaryonConstructor pBaryonConstructor;
61  pBaryonConstructor.ConstructParticle();
62 
63  G4ShortLivedConstructor pShortLivedConstructor;
64  pShortLivedConstructor.ConstructParticle();
65 }
66 
67 #include "G4ProcessManager.hh"
68 void HadronPhysicsQGSC::ConstructProcess()
69 {
70  CreateModels();
71  theNeutrons->Build();
72  thePro->Build();
73  thePiK->Build();
74  theMiscLHEP->Build();
75 }
76