Import Geant4 11.4.1 source tree
This commit is contained in:
@@ -6,6 +6,10 @@ It must **not** be used as a substitute for writing good git commit messages!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
## 2026-01-21 Vladimir Ivanchenko (phys-ctor-helastic-V11-03-01)
|
||||
- G4ChargeExchangePhysics, G4ChargeExchangemessenger - added two
|
||||
different biasing factors for pions and kaons (urgent request of NA64).
|
||||
|
||||
## 2025-04-15 Vladimir Ivanchenko (phys-ctor-helastic-V11-03-00)
|
||||
- G4ChargeExchangePhysics - fixed usage of the messenger
|
||||
|
||||
|
||||
+3
-2
@@ -35,8 +35,8 @@
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4ChargeExchangeMessenger_h
|
||||
#define G4ChargeExchangeMessenger_h 1
|
||||
#ifndef G4CHARGEEXCHANGEMESSENGER_HH
|
||||
#define G4CHARGEEXCHANGEMESSENGER_HH
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
@@ -62,6 +62,7 @@ private:
|
||||
G4ChargeExchangePhysics* theB;
|
||||
|
||||
G4UIcmdWithADouble* fCmd;
|
||||
G4UIcmdWithADouble* fCmd1;
|
||||
G4UIcmdWithADoubleAndUnit* lCmd;
|
||||
G4UIdirectory* aDir;
|
||||
};
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4ChargeExchangePhysics_h
|
||||
#define G4ChargeExchangePhysics_h 1
|
||||
#ifndef G4CHARGEEXCHANGEPHYSICS_HH
|
||||
#define G4CHARGEEXCHANGEPHYSICS_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPhysicsConstructor.hh"
|
||||
@@ -55,8 +55,10 @@ public:
|
||||
|
||||
void SetLowEnergyLimit(G4double val) { fLowEnergyLimit = val; }
|
||||
|
||||
void SetCrossSectionFactor(G4double val) { fXSFactor = val; }
|
||||
void SetPionCrossSectionFactor(G4double val) { fXSFactorPi = val; }
|
||||
|
||||
void SetKaonCrossSectionFactor(G4double val) { fXSFactorK = val; }
|
||||
|
||||
G4ChargeExchangePhysics& operator=
|
||||
(const G4ChargeExchangePhysics& right) = delete;
|
||||
G4ChargeExchangePhysics(const G4ChargeExchangePhysics&) = delete;
|
||||
@@ -66,10 +68,10 @@ private:
|
||||
G4ChargeExchangeMessenger* theMessenger;
|
||||
|
||||
G4double fLowEnergyLimit;
|
||||
G4double fXSFactor{1.0};
|
||||
G4double fXSFactorPi{1.0};
|
||||
G4double fXSFactorK{1.0};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -77,5 +79,3 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,11 +45,16 @@ G4ChargeExchangeMessenger::G4ChargeExchangeMessenger(G4ChargeExchangePhysics* a)
|
||||
aDir = new G4UIdirectory("/physics_lists/cex/", false);
|
||||
aDir->SetGuidance("tailoring the hadronic charge exchange processes.");
|
||||
|
||||
fCmd = new G4UIcmdWithADouble("/physics_lists/cex/BiasFactor",this);
|
||||
fCmd->SetGuidance("Charge exchange cross section factor");
|
||||
fCmd = new G4UIcmdWithADouble("/physics_lists/cex/PionBiasFactor",this);
|
||||
fCmd->SetGuidance("Pion charge exchange cross section factor");
|
||||
fCmd->AvailableForStates(G4State_PreInit);
|
||||
fCmd->SetToBeBroadcasted(false);
|
||||
|
||||
fCmd1 = new G4UIcmdWithADouble("/physics_lists/cex/KaonBiasFactor",this);
|
||||
fCmd1->SetGuidance("Kaon charge exchange cross section factor");
|
||||
fCmd1->AvailableForStates(G4State_PreInit);
|
||||
fCmd1->SetToBeBroadcasted(false);
|
||||
|
||||
lCmd = new G4UIcmdWithADoubleAndUnit("/process/cex/LowEnergyLimit",this);
|
||||
lCmd->SetGuidance("Low-energy energy limit for charge exchange process");
|
||||
lCmd->SetParameterName("cexLowE",true);
|
||||
@@ -61,14 +66,18 @@ G4ChargeExchangeMessenger::G4ChargeExchangeMessenger(G4ChargeExchangePhysics* a)
|
||||
G4ChargeExchangeMessenger::~G4ChargeExchangeMessenger()
|
||||
{
|
||||
delete fCmd;
|
||||
delete fCmd1;
|
||||
delete lCmd;
|
||||
delete aDir;
|
||||
}
|
||||
|
||||
void G4ChargeExchangeMessenger::SetNewValue(G4UIcommand* aComm, G4String aS)
|
||||
{
|
||||
if (aComm == fCmd)
|
||||
theB->SetCrossSectionFactor(fCmd->GetNewDoubleValue(aS));
|
||||
else if (aComm == lCmd)
|
||||
if (aComm == fCmd) {
|
||||
theB->SetPionCrossSectionFactor(fCmd->GetNewDoubleValue(aS));
|
||||
} else if (aComm == fCmd1) {
|
||||
theB->SetKaonCrossSectionFactor(fCmd1->GetNewDoubleValue(aS));
|
||||
} else if (aComm == lCmd) {
|
||||
theB->SetLowEnergyLimit(lCmd->GetNewDoubleValue(aS));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,14 +96,15 @@ void G4ChargeExchangePhysics::ConstructProcess()
|
||||
{
|
||||
auto xs = new G4ChargeExchangeXS();
|
||||
xs->SetEnergyLimit(fLowEnergyLimit);
|
||||
xs->SetCrossSectionFactor(fXSFactor);
|
||||
|
||||
xs->SetPionCrossSectionFactor(fXSFactorPi);
|
||||
xs->SetKaonCrossSectionFactor(fXSFactorK);
|
||||
|
||||
auto model = new G4ChargeExchange(xs);
|
||||
|
||||
if (G4HadronicParameters::Instance()->GetVerboseLevel() > 1) {
|
||||
G4cout << "### ChargeExchangePhysics Construct Processes with the model <"
|
||||
<< model->GetModelName() << "> and x-section <"
|
||||
<< xs->GetName() << "> XSFactor=" << fXSFactor
|
||||
<< xs->GetName() << "> XSFactorPi=" << fXSFactorPi << ", XSFactorK=" << fXSFactorK
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user