CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HadronPhysicsFTFP.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/HadronPhysicsFTFP.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 HadronPhysicsFTFP::HadronPhysicsFTFP(G4int)
14  : G4VPhysicsConstructor("hInelastic FTFP")
15  , QuasiElastic(false)
16 {}
17 
18 HadronPhysicsFTFP::HadronPhysicsFTFP(const G4String& name, G4bool quasiElastic)
19  : G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
20 {}
21 
22 void HadronPhysicsFTFP::CreateModels()
23 {
24 
25  theNeutrons=new G4NeutronBuilder;
26  theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
27  theNeutrons->RegisterMe(theFTFPNeutron);
28  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
29  theLEPNeutron->SetMaxInelasticEnergy(5*GeV);
30 
31  thePro=new G4ProtonBuilder;
32  theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
33  thePro->RegisterMe(theFTFPPro);
34  thePro->RegisterMe(theLEPPro=new G4LEPProtonBuilder);
35  theLEPPro->SetMaxEnergy(5*GeV);
36 
37  thePiK=new G4PiKBuilder;
38  theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
39  thePiK->RegisterMe(theFTFPPiK);
40  thePiK->RegisterMe(theLEPPiK=new G4LEPPiKBuilder);
41  theLEPPiK->SetMaxEnergy(5*GeV);
42 
43  theMiscLHEP=new G4MiscLHEPBuilder;
44 }
45 
46 HadronPhysicsFTFP::~HadronPhysicsFTFP()
47 {
48  delete theNeutrons;
49  delete theLEPNeutron;
50  delete theFTFPNeutron;
51 
52  delete thePiK;
53  delete theLEPPiK;
54  delete theFTFPPiK;
55 
56  delete thePro;
57  delete theLEPPro;
58  delete theFTFPPro;
59 
60  delete theMiscLHEP;
61 }
62 
63 void HadronPhysicsFTFP::ConstructParticle()
64 {
65  G4MesonConstructor pMesonConstructor;
66  pMesonConstructor.ConstructParticle();
67 
68  G4BaryonConstructor pBaryonConstructor;
69  pBaryonConstructor.ConstructParticle();
70 
71  G4ShortLivedConstructor pShortLivedConstructor;
72  pShortLivedConstructor.ConstructParticle();
73 }
74 
75 #include "G4ProcessManager.hh"
76 void HadronPhysicsFTFP::ConstructProcess()
77 {
78  CreateModels();
79  theNeutrons->Build();
80  thePro->Build();
81  thePiK->Build();
82  theMiscLHEP->Build();
83 }
84