simhadteam team mailing list archive
-
simhadteam team
-
Mailing list archive
-
Message #00007
[Branch ~simhadteam/simulationshadrontherapie/G4LPC] Rev 9: Ajout d'une methode "G4LPCDetectorConstruction::SetUpperStepLimit" pour limiter
------------------------------------------------------------
revno: 9
committer: Daniel Cussol <cussol@xxxxxxxx>
branch nick: G4LPC
timestamp: Thu 2010-04-08 13:30:31 +0200
message:
Ajout d'une methode "G4LPCDetectorConstruction::SetUpperStepLimit" pour limiter
la longueur des Steps (passage de 4.9.1 a 4.9.2).
Changement dans la prise en compte des processus elastiques dans
"G4LPCPhysicsList::ConstructElastic()".
modified:
include/G4LPCDetectorConstruction.hh
src/G4LPCDetectorConstruction.cc
src/G4LPCPhysicsList.cc
--
lp:simulationshadrontherapie/g4lpc
https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC
Your team Simulateurs pour la Hadronthérapie is subscribed to branch lp:simulationshadrontherapie/g4lpc.
To unsubscribe from this branch go to https://code.launchpad.net/~simhadteam/simulationshadrontherapie/G4LPC/+edit-subscription
=== modified file 'include/G4LPCDetectorConstruction.hh'
--- include/G4LPCDetectorConstruction.hh 2009-10-21 09:27:24 +0000
+++ include/G4LPCDetectorConstruction.hh 2010-04-08 11:30:31 +0000
@@ -64,6 +64,9 @@
G4Material **layerMaterial;
// Materiaux de l'aire experimentale
G4Material *aireExpMaterial;
+
+ // Limite superieure des Step
+ G4double upperStepLimit;
public:
@@ -107,6 +110,9 @@
virtual G4int GetCT(const G4Material *m);
virtual void MakeCTFile(const char *nomf="CTnumbers.txt");
+
+ virtual void SetUpperStepLimit(G4double usl=-1.){upperStepLimit=usl;}
+ virtual G4double GetUpperStepLimit(void){return upperStepLimit;}
};
#endif
=== modified file 'src/G4LPCDetectorConstruction.cc'
--- src/G4LPCDetectorConstruction.cc 2009-12-07 12:31:26 +0000
+++ src/G4LPCDetectorConstruction.cc 2010-04-08 11:30:31 +0000
@@ -52,7 +52,7 @@
nbLayers(0),
layerThickness(0),
layerMaterial(0),
- aireExpMaterial(0)
+ aireExpMaterial(0),upperStepLimit(-1.)
{
this->SetConfigFile();
}
@@ -1795,11 +1795,17 @@
G4String physName;
char tmp[80];
- //=============> NEW <=====================//
- G4double upperStepLimit=2.*mm;
+ //Handling upper step limits
G4UserLimits *ul=0;
- if(upperStepLimit > 0) ul=new G4UserLimits(upperStepLimit);
- //=============> NEW <=====================//
+ if(upperStepLimit > 0)
+ {
+ G4cout << "Upper Step Limit : " << upperStepLimit/mm << " mm." << G4endl;
+ ul=new G4UserLimits(upperStepLimit);
+ }
+ else
+ {
+ G4cout << "No Upper Step Limit." << G4endl;
+ }
for(G4int i=0;i<nbLayers;i++)
{
@@ -1815,9 +1821,8 @@
layers_log[i] = new G4LogicalVolume(layer_box,
GetLayerMaterial(i),logName,0,0,0);
- //=============> NEW <=====================//
- if(ul) layers_log[i]->SetUserLimits(ul);
- //=============> NEW <=====================//
+ if(ul) layers_log[i]->SetUserLimits(ul); // the upper step limit is applied
+ // on each layer if needed
sprintf(tmp,"PhysicalLayer%d",i+1);
physName=tmp;
=== modified file 'src/G4LPCPhysicsList.cc'
--- src/G4LPCPhysicsList.cc 2009-12-07 12:31:26 +0000
+++ src/G4LPCPhysicsList.cc 2010-04-08 11:30:31 +0000
@@ -452,7 +452,12 @@
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pManager = particle->GetProcessManager();
- if (particle->GetPDGMass() > 110.*MeV && theElasticProcess.IsApplicable(*particle)) {
+
+ if (theElasticProcess.IsApplicable(*particle) ||
+ particle->GetParticleType() == "nucleus" ||
+ particle->GetParticleType() == "He3" ||
+ particle->GetParticleSubType() == "neucleon" ||
+ particle->GetParticleSubType() == "nucleon") {
pManager->AddDiscreteProcess(&theElasticProcess);
G4cout << "### Elastic model are registered for "