CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
6 CMSFTFPPiKBuilder::
7 CMSFTFPPiKBuilder(G4bool quasiElastic)
8  {
9  thePiData = new G4PiNuclearCrossSection;
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 CMSFTFPPiKBuilder:: ~CMSFTFPPiKBuilder()
36  {
37  delete theCascade;
38  delete theStringDecay;
39  delete theStringModel;
40  delete theModel;
41  if ( theQuasiElastic ) delete theQuasiElastic;
42  }
43 
44 void CMSFTFPPiKBuilder::
45 Build(G4HadronElasticProcess * ) {}
46 
47 void CMSFTFPPiKBuilder::
48 Build(G4PionPlusInelasticProcess * aP)
49  {
50  theModel->SetMinEnergy(theMin);
51  theModel->SetMaxEnergy(theMax);
52  aP->AddDataSet(thePiData);
53  aP->RegisterMe(theModel);
54  }
55 
56 void CMSFTFPPiKBuilder::
57 Build(G4PionMinusInelasticProcess * aP)
58  {
59  theModel->SetMinEnergy(theMin);
60  theModel->SetMaxEnergy(theMax);
61  aP->AddDataSet(thePiData);
62  aP->RegisterMe(theModel);
63  }
64 
65 void CMSFTFPPiKBuilder::
66 Build(G4KaonPlusInelasticProcess * aP)
67  {
68  theModel->SetMinEnergy(theMin);
69  theModel->SetMaxEnergy(theMax);
70  aP->RegisterMe(theModel);
71  }
72 
73 void CMSFTFPPiKBuilder::
74 Build(G4KaonMinusInelasticProcess * aP)
75  {
76  theModel->SetMinEnergy(theMin);
77  theModel->SetMaxEnergy(theMax);
78  aP->RegisterMe(theModel);
79  }
80 
81 void CMSFTFPPiKBuilder::
82 Build(G4KaonZeroLInelasticProcess * aP)
83  {
84  theModel->SetMinEnergy(theMin);
85  theModel->SetMaxEnergy(theMax);
86  aP->RegisterMe(theModel);
87  }
88 
89 void CMSFTFPPiKBuilder::
90 Build(G4KaonZeroSInelasticProcess * aP)
91  {
92  theModel->SetMinEnergy(theMin);
93  theModel->SetMaxEnergy(theMax);
94  aP->RegisterMe(theModel);
95  }