CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
G4RPGPiKBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/G4RPGPiKBuilder.hh"
2 
3 #include "globals.hh"
4 #include "G4ios.hh"
5 #include "G4ParticleDefinition.hh"
6 #include "G4ParticleTable.hh"
7 #include "G4MesonConstructor.hh"
8 #include "G4BaryonConstructor.hh"
9 #include "G4ProcessManager.hh"
10 
11 G4RPGPiKBuilder::G4RPGPiKBuilder(): theRPGPiPlusModel(0),theRPGPiMinusModel(0),
12  theRPGKPlusModel(0), theRPGKMinusModel(0),
13  theRPGKLongModel(0), theRPGKShortModel(0) {
14  theMin = 0;
15  theMax = 55*GeV;
16 }
17 
18 G4RPGPiKBuilder::~G4RPGPiKBuilder() {
19  if (theRPGPiPlusModel) delete theRPGPiPlusModel;
20  if (theRPGPiMinusModel) delete theRPGPiMinusModel;
21  if (theRPGKPlusModel) delete theRPGKPlusModel;
22  if (theRPGKMinusModel) delete theRPGKMinusModel;
23  if (theRPGKLongModel) delete theRPGKShortModel;
24  if (theRPGKShortModel) delete theRPGKLongModel;
25 }
26 
27 void G4RPGPiKBuilder::Build(G4HadronElasticProcess *) {
28  G4cout << "Info - G4RPGPiKBuilder::Build() not adding elastic" << G4endl;
29 }
30 
31 void G4RPGPiKBuilder::Build(G4PionPlusInelasticProcess * aP) {
32  theRPGPiPlusModel = new G4RPGPiPlusInelastic();
33  theRPGPiPlusModel->SetMinEnergy(theMin);
34  theRPGPiPlusModel->SetMaxEnergy(theMax);
35  aP->RegisterMe(theRPGPiPlusModel);
36 }
37 
38 void G4RPGPiKBuilder::Build(G4PionMinusInelasticProcess * aP) {
39  theRPGPiMinusModel = new G4RPGPiMinusInelastic();
40  theRPGPiMinusModel->SetMinEnergy(theMin);
41  theRPGPiMinusModel->SetMaxEnergy(theMax);
42  aP->RegisterMe(theRPGPiMinusModel);
43 }
44 
45 void G4RPGPiKBuilder::Build(G4KaonPlusInelasticProcess * aP) {
46  theRPGKPlusModel = new G4RPGKPlusInelastic();
47  theRPGKPlusModel->SetMinEnergy(theMin);
48  theRPGKPlusModel->SetMaxEnergy(theMax);
49  aP->RegisterMe(theRPGKPlusModel);
50 }
51 
52 void G4RPGPiKBuilder::Build(G4KaonMinusInelasticProcess * aP) {
53  theRPGKMinusModel = new G4RPGKMinusInelastic();
54  theRPGKMinusModel->SetMaxEnergy(theMax);
55  theRPGKMinusModel->SetMinEnergy(theMin);
56  aP->RegisterMe(theRPGKMinusModel);
57 }
58 
59 void G4RPGPiKBuilder::Build(G4KaonZeroLInelasticProcess * aP) {
60  theRPGKLongModel = new G4RPGKLongInelastic();
61  theRPGKLongModel->SetMaxEnergy(theMax);
62  theRPGKLongModel->SetMinEnergy(theMin);
63  aP->RegisterMe(theRPGKLongModel);
64 }
65 
66 void G4RPGPiKBuilder::Build(G4KaonZeroSInelasticProcess * aP) {
67  theRPGKShortModel = new G4RPGKShortInelastic();
68  theRPGKShortModel->SetMaxEnergy(theMax);
69  theRPGKShortModel->SetMinEnergy(theMin);
70  aP->RegisterMe(theRPGKShortModel);
71 }