Skip to content
Snippets Groups Projects
Commit b50f9ce0 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* adding backing option to solid target for DSAM and supported target

parent ad528b71
No related branches found
No related tags found
No related merge requests found
Pipeline #46736 passed
...@@ -74,7 +74,8 @@ Target::Target(){ ...@@ -74,7 +74,8 @@ Target::Target(){
m_TargetAngle = 0 ; m_TargetAngle = 0 ;
m_TargetRadius = 0 ; m_TargetRadius = 0 ;
m_TargetDensity = 0 ; m_TargetDensity = 0 ;
m_TargetNbLayers = 5; // Number of steps by default m_TargetNbLayers = 5 ; // Number of steps by default
m_TargetBackingThickness = 0 ;
m_ReactionRegion=NULL; m_ReactionRegion=NULL;
m_TargetDensity = 0 ; m_TargetDensity = 0 ;
...@@ -98,6 +99,7 @@ Target::Target(){ ...@@ -98,6 +99,7 @@ Target::Target(){
m_ShieldFrontRadius = 0 ; m_ShieldFrontRadius = 0 ;
m_ShieldBackRadius = 0 ; m_ShieldBackRadius = 0 ;
m_ShieldMaterial = 0 ; m_ShieldMaterial = 0 ;
TargetInstance = this; TargetInstance = this;
} }
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...@@ -141,8 +143,15 @@ void Target::ReadConfiguration(NPL::InputParser parser){ ...@@ -141,8 +143,15 @@ void Target::ReadConfiguration(NPL::InputParser parser){
cout << "ERROR: Target token list incomplete, check your input file" << endl; cout << "ERROR: Target token list incomplete, check your input file" << endl;
exit(1); exit(1);
} }
if(starget[0]->HasToken("NBLAYERS")) if(starget[0]->HasToken("NBLAYERS"))
m_TargetNbLayers = starget[0]->GetInt("NBLAYERS"); m_TargetNbLayers = starget[0]->GetInt("NBLAYERS");
if(starget[0]->HasToken("BackingMaterial")&& starget[0]->HasToken("BackingThickness")){
m_TargetBackingMaterial=GetMaterialFromLibrary(starget[0]->GetString("BackingMaterial"));
m_TargetBackingThickness=starget[0]->GetDouble("BackingThickness","micrometer");
}
} }
...@@ -229,13 +238,30 @@ void Target::ConstructDetector(G4LogicalVolume* world){ ...@@ -229,13 +238,30 @@ void Target::ConstructDetector(G4LogicalVolume* world){
m_TargetLogic = m_TargetLogic =
new G4LogicalVolume(m_TargetSolid, m_TargetMaterial, "logicTarget"); new G4LogicalVolume(m_TargetSolid, m_TargetMaterial, "logicTarget");
if(m_TargetBackingThickness>0){
m_TargetBackingSolid =
new G4Tubs("solidTargetBacking", 0, m_TargetRadius,
0.5*m_TargetBackingThickness, 0*deg, 360*deg);
m_TargetBackingLogic =
new G4LogicalVolume(m_TargetBackingSolid, m_TargetBackingMaterial, "logicTargetBacking");
}
// rotation of target // rotation of target
G4RotationMatrix *rotation = new G4RotationMatrix(); G4RotationMatrix *rotation = new G4RotationMatrix();
rotation->rotateY(m_TargetAngle); rotation->rotateY(m_TargetAngle);
new G4PVPlacement(rotation, G4ThreeVector(m_TargetX, m_TargetY, m_TargetZ), new G4PVPlacement(rotation, G4ThreeVector(m_TargetX, m_TargetY, m_TargetZ),
m_TargetLogic, "Target", world, false, 0); m_TargetLogic, "Target", world, false, 0);
G4VisAttributes* TargetVisAtt = new G4VisAttributes(G4Colour(0., 0., 1.));
G4VisAttributes* TargetVisAtt = new G4VisAttributes(G4Colour(0.4, 0.4, 0.4));
m_TargetLogic->SetVisAttributes(TargetVisAtt); m_TargetLogic->SetVisAttributes(TargetVisAtt);
if(m_TargetBackingThickness>0){
new G4PVPlacement(rotation, G4ThreeVector(m_TargetX, m_TargetY, m_TargetZ+m_TargetThickness*0.5+m_TargetBackingThickness*0.5),
m_TargetBackingLogic, "TargetBacking", world, false, 0);
G4VisAttributes* TargetBackingVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0));
m_TargetBackingLogic->SetVisAttributes(TargetBackingVisAtt);
}
} }
} }
......
...@@ -105,6 +105,8 @@ private: ...@@ -105,6 +105,8 @@ private:
// Solid and Logic Volume // Solid and Logic Volume
G4Tubs* m_TargetSolid; G4Tubs* m_TargetSolid;
G4LogicalVolume* m_TargetLogic; G4LogicalVolume* m_TargetLogic;
G4Tubs* m_TargetBackingSolid;
G4LogicalVolume* m_TargetBackingLogic;
// Standard parameter // Standard parameter
G4double m_TargetThickness; G4double m_TargetThickness;
...@@ -112,6 +114,8 @@ private: ...@@ -112,6 +114,8 @@ private:
G4double m_TargetAngle; G4double m_TargetAngle;
G4Material* m_TargetMaterial; G4Material* m_TargetMaterial;
G4int m_TargetNbLayers; G4int m_TargetNbLayers;
G4Material* m_TargetBackingMaterial;
G4double m_TargetBackingThickness;
// For Cryo Target // For Cryo Target
// this fonction generate a deformed target window shape // this fonction generate a deformed target window shape
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "G4LevelManager.hh" #include "G4LevelManager.hh"
#include "G4PAIModel.hh" #include "G4PAIModel.hh"
#include "G4PAIPhotModel.hh" #include "G4PAIPhotModel.hh"
#include "G4RadioactiveDecay.hh"
#include "menate_R.hh" #include "menate_R.hh"
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
...@@ -419,13 +420,14 @@ void PhysicsList::ConstructProcess(){ ...@@ -419,13 +420,14 @@ void PhysicsList::ConstructProcess(){
for(it = m_PhysList.begin(); it!= m_PhysList.end(); it++){ for(it = m_PhysList.begin(); it!= m_PhysList.end(); it++){
it->second -> ConstructProcess(); it->second -> ConstructProcess();
} }
BiasCrossSectionByFactor(m_IonBinaryCascadePhysics); BiasCrossSectionByFactor(m_IonBinaryCascadePhysics);
em_parameters=G4EmParameters::Instance();
em_option.SetBuildCSDARange(true); em_parameters->SetFluo(true);
em_option.SetDEDXBinningForCSDARange(10*10); em_parameters->SetAuger(true);
em_option.SetFluo(true); em_parameters->SetDeexActiveRegion ("DefaultRegionForTheWorld", true, true,true);
em_option.SetAuger(true); em_parameters->SetDeexcitationIgnoreCut(true);
AddParametrisation(); AddParametrisation();
AddLevelData(); AddLevelData();
return; return;
...@@ -487,6 +489,8 @@ void PhysicsList::AddLevelData(){ ...@@ -487,6 +489,8 @@ void PhysicsList::AddLevelData(){
for(G4int j = 1; j < Nentries; j++){ // Excited states for(G4int j = 1; j < Nentries; j++){ // Excited states
cout << " - Level " << j cout << " - Level " << j
<< " energy = " << levelManager->LevelEnergy(j) << " energy = " << levelManager->LevelEnergy(j)
<< " MeV \t lifetime = " << levelManager->LifeTime(j)
<< " ns \t half-life = " << levelManager->LifeTime(j)*log(2) << " ns"
<< endl; << endl;
G4ParticleDefinition* excitedState G4ParticleDefinition* excitedState
= ionTable->GetIon(Z,A,levelManager->LevelEnergy(j)); = ionTable->GetIon(Z,A,levelManager->LevelEnergy(j));
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include "G4VUserPhysicsList.hh" #include "G4VUserPhysicsList.hh"
#include "G4EmConfigurator.hh" #include "G4EmConfigurator.hh"
#include "G4EmProcessOptions.hh"
#include "globals.hh" #include "globals.hh"
#include <string> #include <string>
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
#include "G4RadioactiveDecayPhysics.hh" #include "G4RadioactiveDecayPhysics.hh"
// EM // EM
#include "G4EmProcessOptions.hh" #include "G4EmParameters.hh"
#include "G4EmStandardPhysics.hh" #include "G4EmStandardPhysics.hh"
#include "G4EmLivermorePhysics.hh" #include "G4EmLivermorePhysics.hh"
#include "G4EmPenelopePhysics.hh" #include "G4EmPenelopePhysics.hh"
...@@ -92,8 +91,6 @@ class PhysicsList: public G4VUserPhysicsList{ ...@@ -92,8 +91,6 @@ class PhysicsList: public G4VUserPhysicsList{
void AddLevelData(); void AddLevelData();
private: private:
std::map<std::string,G4VPhysicsConstructor*> m_PhysList; std::map<std::string,G4VPhysicsConstructor*> m_PhysList;
G4EmConfigurator em_config;
G4EmProcessOptions em_option;
private: // Physics List private: // Physics List
G4OpticalPhysics* opticalPhysicsList; G4OpticalPhysics* opticalPhysicsList;
...@@ -102,6 +99,7 @@ class PhysicsList: public G4VUserPhysicsList{ ...@@ -102,6 +99,7 @@ class PhysicsList: public G4VUserPhysicsList{
G4VPhysicsConstructor* decay_List; G4VPhysicsConstructor* decay_List;
G4VPhysicsConstructor* radioactiveDecay_List; G4VPhysicsConstructor* radioactiveDecay_List;
G4EmConfigurator* emConfig; G4EmConfigurator* emConfig;
G4EmParameters* em_parameters;
private: // Physics option private: // Physics option
std::string m_EmList; std::string m_EmList;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment