CMS 3D CMS Logo

CMSFTFPPiKBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/CMSFTFPPiKBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4SystemOfUnits.hh"
6 
7 CMSFTFPPiKBuilder::
8 CMSFTFPPiKBuilder(G4bool quasiElastic)
9  {
10  thePiData = new G4PiNuclearCrossSection;
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 CMSFTFPPiKBuilder:: ~CMSFTFPPiKBuilder()
37  {
38  delete theCascade;
39  delete theStringDecay;
40  delete theStringModel;
41  delete theModel;
42  if ( theQuasiElastic ) delete theQuasiElastic;
43  }
44 
45 void CMSFTFPPiKBuilder::
46 Build(G4HadronElasticProcess * ) {}
47 
48 void CMSFTFPPiKBuilder::
49 Build(G4PionPlusInelasticProcess * aP)
50  {
51  theModel->SetMinEnergy(theMin);
52  theModel->SetMaxEnergy(theMax);
53  aP->AddDataSet(thePiData);
54  aP->RegisterMe(theModel);
55  }
56 
57 void CMSFTFPPiKBuilder::
58 Build(G4PionMinusInelasticProcess * aP)
59  {
60  theModel->SetMinEnergy(theMin);
61  theModel->SetMaxEnergy(theMax);
62  aP->AddDataSet(thePiData);
63  aP->RegisterMe(theModel);
64  }
65 
66 void CMSFTFPPiKBuilder::
67 Build(G4KaonPlusInelasticProcess * aP)
68  {
69  theModel->SetMinEnergy(theMin);
70  theModel->SetMaxEnergy(theMax);
71  aP->RegisterMe(theModel);
72  }
73 
74 void CMSFTFPPiKBuilder::
75 Build(G4KaonMinusInelasticProcess * aP)
76  {
77  theModel->SetMinEnergy(theMin);
78  theModel->SetMaxEnergy(theMax);
79  aP->RegisterMe(theModel);
80  }
81 
82 void CMSFTFPPiKBuilder::
83 Build(G4KaonZeroLInelasticProcess * aP)
84  {
85  theModel->SetMinEnergy(theMin);
86  theModel->SetMaxEnergy(theMax);
87  aP->RegisterMe(theModel);
88  }
89 
90 void CMSFTFPPiKBuilder::
91 Build(G4KaonZeroSInelasticProcess * aP)
92  {
93  theModel->SetMinEnergy(theMin);
94  theModel->SetMaxEnergy(theMax);
95  aP->RegisterMe(theModel);
96  }
const double GeV
Definition: MathUtil.h:16