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 {
10  theMin = 4*GeV;
11  theMax = 100.*TeV;
12  theModel = new G4TheoFSGenerator("FTFP");
13 
14  theStringModel = new G4FTFModel;
15  theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
16  theStringModel->SetFragmentationModel(theStringDecay);
17 
18  theCascade = new G4GeneratorPrecompoundInterface;
19  thePreEquilib = new G4PreCompoundModel(new G4ExcitationHandler);
20  theCascade->SetDeExcitation(thePreEquilib);
21 
22  theModel->SetHighEnergyGenerator(theStringModel);
23  if (quasiElastic)
24  {
25  theQuasiElastic=new G4QuasiElasticChannel;
26  theModel->SetQuasiElasticChannel(theQuasiElastic);
27  } else
28  { theQuasiElastic=nullptr;}
29 
30  theModel->SetTransport(theCascade);
31  theModel->SetMinEnergy(theMin);
32  theModel->SetMaxEnergy(100*TeV);
33 }
34 
35 void CMSFTFPProtonBuilder::Build(G4ProtonInelasticProcess * aP)
36 {
37  theModel->SetMinEnergy(theMin);
38  theModel->SetMaxEnergy(theMax);
39  aP->RegisterMe(theModel);
40  aP->AddDataSet(new G4ProtonInelasticCrossSection);
41 }
42 
43 CMSFTFPProtonBuilder::
44 ~CMSFTFPProtonBuilder()
45 {
46  delete theStringDecay;
47  delete theStringModel;
48  delete theModel;
49  delete theCascade;
50  if ( theQuasiElastic ) delete theQuasiElastic;
51 }
52 
53 void CMSFTFPProtonBuilder::
54 Build(G4HadronElasticProcess * )
55 {
56 }
const double GeV
Definition: MathUtil.h:16