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 
7 CMSFTFPProtonBuilder::
8 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=0;}
29 
30  theModel->SetTransport(theCascade);
31  theModel->SetMinEnergy(theMin);
32  theModel->SetMaxEnergy(100*TeV);
33 }
34 
35 void CMSFTFPProtonBuilder::
36 Build(G4ProtonInelasticProcess * aP)
37 {
38  theModel->SetMinEnergy(theMin);
39  theModel->SetMaxEnergy(theMax);
40  aP->RegisterMe(theModel);
41  aP->AddDataSet(new G4ProtonInelasticCrossSection);
42 }
43 
44 CMSFTFPProtonBuilder::
45 ~CMSFTFPProtonBuilder()
46 {
47  delete theStringDecay;
48  delete theStringModel;
49  delete theModel;
50  delete theCascade;
51  if ( theQuasiElastic ) delete theQuasiElastic;
52 }
53 
54 void CMSFTFPProtonBuilder::
55 Build(G4HadronElasticProcess * )
56 {
57 }
const double GeV
Definition: MathUtil.h:16