Skip to content
Snippets Groups Projects
Commit f0382fb8 authored by audrey.chatillon's avatar audrey.chatillon
Browse files

[Epic] Build simplification

parent a9b32f05
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #378555 passed
......@@ -136,7 +136,7 @@ void Epic::ReadConfiguration(NPL::InputParser parser){
m_InterDistance_KK = blocks[i]->GetDouble("InterDistance_KK","mm");
m_nA = blocks[i]->GetInt("nAnodes");
m_nSamplesPerA = blocks[i]->GetVectorInt("nSamplesPerAnode");
m_SampleMaterial = blocks[i]->GetVectorString("SampleMaterial"," ");
m_SampleMaterial = blocks[i]->GetVectorString("SampleMaterialPerAnode"," ");
m_SampleThickness = blocks[i]->GetVectorDouble("SampleThickness","micrometer");
}
else{
......@@ -329,36 +329,31 @@ G4AssemblyVolume* Epic::BuildEpic(){
// - Cathodes with the actinide deposit
// - Anodes
// - gas volumes : active gas_AK and gas_KK
double posZ_first_cathode = -1.*(double)m_nA*m_Distance_AK*mm - (double)std::trunc(0.5*m_nA)*m_InterDistance_KK*mm;
int index_K = 0;
// Build the first cathode and the first anode
BuildCathode(posZ_first_cathode);
BuildSample(posZ_first_cathode+0.5*m_Thickness_K+0.5*m_SampleThickness.at(index_K),m_SampleThickness.at(index_K), m_SampleMaterial.at(index_K));
BuildAnode(posZ_first_cathode + m_Distance_AK*mm);
index_K++;
// Build the central pairs of cathodes back to back, the anodes and the gas_KK
// definition of the gas volume located @ pair of cathodes
G4Tubs* gas_KK_solid = new G4Tubs("gas_KK",0,37.*mm,0.5*m_InterDistance_KK,0,360*deg);
G4LogicalVolume* gas_KK_vol = new G4LogicalVolume(gas_KK_solid, gas_material,"logic_gas_KK",0,0,0);
gas_KK_vol->SetVisAttributes(m_VisGasKK);
for(int i=1; i<m_nA; i++){
double posZ_current_cathode = posZ_first_cathode + (double)i*2.*m_Distance_AK*mm + (double)(i-0.5)*m_InterDistance_KK*mm ;
BuildSample (posZ_current_cathode - 0.5*m_InterDistance_KK*mm - 0.5*m_Thickness_K-0.5*m_SampleThickness.at(index_K),m_SampleThickness.at(index_K), m_SampleMaterial.at(index_K));
index_K++;
BuildCathode(posZ_current_cathode - 0.5*m_InterDistance_KK*mm);
Tv.setY(0);
Tv.setZ(posZ_current_cathode);
m_EpicVolume->AddPlacedVolume(gas_KK_vol, Tv, Rv);
BuildCathode(posZ_current_cathode + 0.5*m_InterDistance_KK*mm);
BuildSample (posZ_current_cathode + 0.5*m_InterDistance_KK*mm + 0.5*m_Thickness_K+0.5*m_SampleThickness.at(index_K),m_SampleThickness.at(index_K), m_SampleMaterial.at(index_K));
index_K++;
BuildAnode(posZ_current_cathode + 0.5*m_InterDistance_KK*mm + m_Distance_AK*mm);
// position along the beam axis of the first anode
double posZ_anode = (double)(1-m_nA)*m_Distance_AK - (double)std::trunc(0.5*m_nA)*m_InterDistance_KK;
// build the stack of cathodes / actinide samples / anodes
for(int i=0; i<m_nA; i++){
BuildCathode(posZ_anode - m_Distance_AK*mm);
BuildSample(posZ_anode - m_Distance_AK + 0.5*m_Thickness_K + 0.5*m_SampleThickness.at(i),m_SampleThickness.at(i), m_SampleMaterial.at(i));
BuildAnode(posZ_anode);
if(m_nSamplesPerA.at(i)==2)
BuildSample(posZ_anode + m_Distance_AK - 0.5*m_Thickness_K - 0.5*m_SampleThickness.at(i),m_SampleThickness.at(i), m_SampleMaterial.at(i));
BuildCathode(posZ_anode + m_Distance_AK*mm);
if(i < m_nA-1) {
Tv.setY(0); Tv.setZ(posZ_anode + m_Distance_AK + 0.5*m_InterDistance_KK);
m_EpicVolume->AddPlacedVolume(gas_KK_vol, Tv, Rv);
}
posZ_anode += 2.*m_Distance_AK*mm + m_InterDistance_KK*mm;
}
// Build the last cathode
BuildSample(posZ_first_cathode + (double)m_nA*2.*m_Distance_AK*mm + (double)(m_nA-1)*m_InterDistance_KK*mm - 0.5*m_Thickness_K - 0.5*m_SampleThickness.at(index_K), m_SampleThickness.at(index_K), m_SampleMaterial.at(index_K));
BuildCathode(posZ_first_cathode + (double)m_nA*2.*m_Distance_AK*mm + (double)(m_nA-1)*m_InterDistance_KK*mm);
// --- UNACTIVE GAS VOLUME TO DO ?
......
......@@ -7,6 +7,6 @@ Epic
Distance_AK= 2.5 mm
InterDistance_KK= 0.8 mm
Thickness_K= 12 micrometer
nSamplesPerAnode= 2 2 2 2 2
SampleMaterial= 238U 238U 235U 235U 238U 238U 235U 235U 238U 238U
SampleThickness= 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. micrometer
nSamplesPerAnode= 2 2 2 2 2
SampleMaterialPerAnode= 238U 235U 238U 235U 238U
SampleThickness= 10. 10. 10. 10. 10. micrometer
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