CMS 3D CMS Logo

CMSFTFPPiKBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/CMSFTFPPiKBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4SystemOfUnits.hh"
6 
7 CMSFTFPPiKBuilder::CMSFTFPPiKBuilder(G4bool quasiElastic) {
8  thePiData = new G4PiNuclearCrossSection;
9  theMin = 4 * GeV;
10  theMax = 100 * TeV;
11  theModel = new G4TheoFSGenerator("FTFP");
12 
13  theStringModel = new G4FTFModel;
14  theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
15  theStringModel->SetFragmentationModel(theStringDecay);
16 
17  theCascade = new G4GeneratorPrecompoundInterface;
18  thePreEquilib = new G4PreCompoundModel(new G4ExcitationHandler);
19  theCascade->SetDeExcitation(thePreEquilib);
20 
21  theModel->SetHighEnergyGenerator(theStringModel);
22  if (quasiElastic) {
23  theQuasiElastic = new G4QuasiElasticChannel;
24  theModel->SetQuasiElasticChannel(theQuasiElastic);
25  } else {
26  theQuasiElastic = nullptr;
27  }
28 
29  theModel->SetTransport(theCascade);
30  theModel->SetMinEnergy(theMin);
31  theModel->SetMaxEnergy(100 * TeV);
32 }
33 
34 CMSFTFPPiKBuilder::~CMSFTFPPiKBuilder() {
35  delete theCascade;
36  delete theStringDecay;
37  delete theStringModel;
38  delete theModel;
39  if (theQuasiElastic)
40  delete theQuasiElastic;
41 }
42 
43 void CMSFTFPPiKBuilder::Build(G4HadronElasticProcess*) {}
44 
45 void CMSFTFPPiKBuilder::Build(G4PionPlusInelasticProcess* aP) {
46  theModel->SetMinEnergy(theMin);
47  theModel->SetMaxEnergy(theMax);
48  aP->AddDataSet(thePiData);
49  aP->RegisterMe(theModel);
50 }
51 
52 void CMSFTFPPiKBuilder::Build(G4PionMinusInelasticProcess* aP) {
53  theModel->SetMinEnergy(theMin);
54  theModel->SetMaxEnergy(theMax);
55  aP->AddDataSet(thePiData);
56  aP->RegisterMe(theModel);
57 }
58 
59 void CMSFTFPPiKBuilder::Build(G4KaonPlusInelasticProcess* aP) {
60  theModel->SetMinEnergy(theMin);
61  theModel->SetMaxEnergy(theMax);
62  aP->RegisterMe(theModel);
63 }
64 
65 void CMSFTFPPiKBuilder::Build(G4KaonMinusInelasticProcess* aP) {
66  theModel->SetMinEnergy(theMin);
67  theModel->SetMaxEnergy(theMax);
68  aP->RegisterMe(theModel);
69 }
70 
71 void CMSFTFPPiKBuilder::Build(G4KaonZeroLInelasticProcess* aP) {
72  theModel->SetMinEnergy(theMin);
73  theModel->SetMaxEnergy(theMax);
74  aP->RegisterMe(theModel);
75 }
76 
77 void CMSFTFPPiKBuilder::Build(G4KaonZeroSInelasticProcess* aP) {
78  theModel->SetMinEnergy(theMin);
79  theModel->SetMaxEnergy(theMax);
80  aP->RegisterMe(theModel);
81 }
GeV
const double GeV
Definition: MathUtil.h:16