CMS 3D CMS Logo

CMSFTFPProtonBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/CMSFTFPProtonBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4ProtonInelasticCrossSection.hh"
6 #include "G4SystemOfUnits.hh"
7 
8 CMSFTFPProtonBuilder::CMSFTFPProtonBuilder(G4bool quasiElastic) {
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 void CMSFTFPProtonBuilder::Build(G4ProtonInelasticProcess* aP) {
35  theModel->SetMinEnergy(theMin);
36  theModel->SetMaxEnergy(theMax);
37  aP->RegisterMe(theModel);
38  aP->AddDataSet(new G4ProtonInelasticCrossSection);
39 }
40 
41 CMSFTFPProtonBuilder::~CMSFTFPProtonBuilder() {
42  delete theStringDecay;
43  delete theStringModel;
44  delete theModel;
45  delete theCascade;
46  if (theQuasiElastic)
47  delete theQuasiElastic;
48 }
49 
50 void CMSFTFPProtonBuilder::Build(G4HadronElasticProcess*) {}
const double GeV
Definition: MathUtil.h:16