Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:24:50

0001 
0002 #include "SimG4Core/CustomPhysics/interface/CMSQGSPSIMPBuilder.h"
0003 #include "SimG4Core/CustomPhysics/interface/CMSSIMPInelasticProcess.h"
0004 
0005 #include "G4SystemOfUnits.hh"
0006 #include "G4ParticleDefinition.hh"
0007 #include "G4TheoFSGenerator.hh"
0008 #include "G4PreCompoundModel.hh"
0009 #include "G4GeneratorPrecompoundInterface.hh"
0010 #include "G4QGSParticipants.hh"
0011 #include "G4QGSMFragmentation.hh"
0012 #include "G4ExcitedStringDecay.hh"
0013 
0014 CMSQGSPSIMPBuilder::CMSQGSPSIMPBuilder() {
0015   theStringModel = new G4QGSModel<G4QGSParticipants>;
0016   theStringDecay = new G4ExcitedStringDecay(theQGSM = new G4QGSMFragmentation);
0017   theStringModel->SetFragmentationModel(theStringDecay);
0018 }
0019 
0020 CMSQGSPSIMPBuilder::~CMSQGSPSIMPBuilder() {
0021   delete theStringDecay;
0022   delete theStringModel;
0023   delete theQGSM;
0024 }
0025 
0026 void CMSQGSPSIMPBuilder::Build(CMSSIMPInelasticProcess* aP) {
0027   G4GeneratorPrecompoundInterface* theCascade = new G4GeneratorPrecompoundInterface;
0028   G4PreCompoundModel* thePreEquilib = new G4PreCompoundModel();
0029   theCascade->SetDeExcitation(thePreEquilib);
0030 
0031   G4TheoFSGenerator* theModel = new G4TheoFSGenerator("QGSP");
0032   theModel->SetTransport(theCascade);
0033   theModel->SetHighEnergyGenerator(theStringModel);
0034   theModel->SetMinEnergy(0.0);
0035   theModel->SetMaxEnergy(100 * CLHEP::TeV);
0036   aP->RegisterMe(theModel);
0037 }