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

include pairs of cathodes

parent d32bcedd
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #378446 passed
...@@ -130,14 +130,15 @@ void Epic::ReadConfiguration(NPL::InputParser parser){ ...@@ -130,14 +130,15 @@ void Epic::ReadConfiguration(NPL::InputParser parser){
G4ThreeVector Pos = NPS::ConvertVector(blocks[i]->GetTVector3("POS","mm")); G4ThreeVector Pos = NPS::ConvertVector(blocks[i]->GetTVector3("POS","mm"));
string GasMaterial = blocks[i]->GetString("GasMaterial"); string GasMaterial = blocks[i]->GetString("GasMaterial");
double Pressure = blocks[i]->GetDouble("Pressure","bar"); double Pressure = blocks[i]->GetDouble("Pressure","bar");
double Distance_AK = blocks[i]->GetDouble("Distance_AnodeCathode","mm"); double Distance_AK = blocks[i]->GetDouble("Distance_AK","mm");
int nA = blocks[i]->GetInt("nAnodes"); double InterDistance_KK = blocks[i]->GetDouble("InterDistance_KK","mm");
int nA = blocks[i]->GetInt("nAnodes");
AddDetector(Pos); AddDetector(Pos);
m_GasMaterial = GasMaterial; m_GasMaterial = GasMaterial;
m_Pressure = Pressure; m_Pressure = Pressure;
m_Distance_AK = Distance_AK; m_Distance_AK = Distance_AK;
m_InterDistance_KK = InterDistance_KK;
m_nA = nA; m_nA = nA;
m_nK = m_nA + 1;
} }
else{ else{
cout << "ERROR: check your input file formatting " << endl; cout << "ERROR: check your input file formatting " << endl;
...@@ -217,9 +218,9 @@ G4AssemblyVolume* Epic::BuildEpic(){ ...@@ -217,9 +218,9 @@ G4AssemblyVolume* Epic::BuildEpic(){
double flange_full_height = 5.*mm; double posY_flange = posY_PCB - 0.5*PCB_Cu_height - 0.5*flange_full_height ; double flange_full_height = 5.*mm; double posY_flange = posY_PCB - 0.5*PCB_Cu_height - 0.5*flange_full_height ;
double flange_open_width = 150.0*mm; double flange_open_width = 150.0*mm;
double flange_open_height = 5.1*mm; double flange_open_height = 5.1*mm;
double flange_open1_length = 42.0*mm; double posZ_open1 = -73.5*mm; double flange_open1_length = 74.5*mm; double posZ_open1 = -89.5*mm;
double flange_open2_length = 85.0*mm; double posZ_open2 = 0.0*mm; double flange_open2_length = 85.0*mm; double posZ_open2 = 0.0*mm;
double flange_open3_length = 74.5*mm; double posZ_open3 = 89.5*mm; double flange_open3_length = 42.0*mm; double posZ_open3 = 73.5*mm;
G4Box* flange_full = new G4Box("flange_full" , 0.5*flange_full_width , 0.5*flange_full_height, 0.5*flange_full_length); G4Box* flange_full = new G4Box("flange_full" , 0.5*flange_full_width , 0.5*flange_full_height, 0.5*flange_full_length);
G4Box* flange_open1 = new G4Box("flange_open1", 0.5*flange_open_width , 0.5*flange_open_height, 0.5*flange_open1_length); G4Box* flange_open1 = new G4Box("flange_open1", 0.5*flange_open_width , 0.5*flange_open_height, 0.5*flange_open1_length);
...@@ -287,15 +288,21 @@ G4AssemblyVolume* Epic::BuildEpic(){ ...@@ -287,15 +288,21 @@ G4AssemblyVolume* Epic::BuildEpic(){
m_EpicVolume->AddPlacedVolume(frame_final_vol, Tv, Rv); m_EpicVolume->AddPlacedVolume(frame_final_vol, Tv, Rv);
//--- Cathodes (simple: rajouter les depots) //--- Cathodes (TO DO : rajouter les depots)
double posY_first_cathode = -1.*(double)m_nA*m_Distance_AK*mm; double posZ_first_cathode = -1.*(double)m_nA*m_Distance_AK*mm - (double)std::trunc(0.5*m_nA)*m_InterDistance_KK*mm;
for(int i=0; i<1; i++){ // Build First Cathode
BuildCathode(posY_first_cathode+i*2.*m_Distance_AK*mm); BuildCathode(posZ_first_cathode);
// Build the central pairs of cathodes back to back
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 ;
BuildCathode(posZ_current_cathode - 0.5*m_InterDistance_KK*mm);
BuildCathode(posZ_current_cathode + 0.5*m_InterDistance_KK*mm);
} }
//double origine_anode = origine_cathode + m_Distance_AK; // Build Last Cathode
//for(int i=0; i<m_nA; i++){ BuildCathode(posZ_first_cathode + (double)m_nA*2.*m_Distance_AK*mm + (double)(m_nA-1)*m_InterDistance_KK*mm);
// BuildAnode(origine_anode+i*2.*m_Distance_AK*mm);
//}
// --- Anodes
......
...@@ -104,9 +104,9 @@ class Epic : public NPS::VDetector{ ...@@ -104,9 +104,9 @@ class Epic : public NPS::VDetector{
string m_GasMaterial; string m_GasMaterial;
double m_Pressure; double m_Pressure;
double m_Distance_AK; double m_Distance_AK;
int m_nA; double m_InterDistance_KK;
int m_nK; int m_nA; // number of anodes
// Visualisation Attribute // Visualisation Attribute
G4VisAttributes* m_VisFCWall; G4VisAttributes* m_VisFCWall;
G4VisAttributes* m_VisAl; G4VisAttributes* m_VisAl;
......
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