CMS 3D CMS Logo

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