CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSFTFPNeutronBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/CMSFTFPNeutronBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4NeutronInelasticCrossSection.hh"
6 
7 CMSFTFPNeutronBuilder::
8 CMSFTFPNeutronBuilder(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->SetTransport(theCascade);
23 
24  theModel->SetHighEnergyGenerator(theStringModel);
25  if (quasiElastic)
26  {
27  theQuasiElastic=new G4QuasiElasticChannel;
28  theModel->SetQuasiElasticChannel(theQuasiElastic);
29  } else
30  { theQuasiElastic=0;}
31 
32  theModel->SetMinEnergy(theMin);
33  theModel->SetMaxEnergy(100*TeV);
34 }
35 
36 CMSFTFPNeutronBuilder::
37 ~CMSFTFPNeutronBuilder()
38 {
39  delete theStringDecay;
40  delete theStringModel;
41  delete thePreEquilib;
42  delete theCascade;
43  if ( theQuasiElastic ) delete theQuasiElastic;
44 }
45 
46 void CMSFTFPNeutronBuilder::
47 Build(G4HadronElasticProcess * )
48 {
49 }
50 
51 void CMSFTFPNeutronBuilder::
52 Build(G4HadronFissionProcess * )
53 {
54 }
55 
56 void CMSFTFPNeutronBuilder::
57 Build(G4HadronCaptureProcess * )
58 {
59 }
60 
61 void CMSFTFPNeutronBuilder::
62 Build(G4NeutronInelasticProcess * aP)
63 {
64  theModel->SetMinEnergy(theMin);
65  theModel->SetMaxEnergy(theMax);
66  aP->RegisterMe(theModel);
67  aP->AddDataSet(new G4NeutronInelasticCrossSection);
68 }