Skip to content

Commit

Permalink
Fix compiler warning of EL Gap
Browse files Browse the repository at this point in the history
  • Loading branch information
kvjmistry committed Feb 7, 2024
1 parent 9e2aa6f commit 44c4a5c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions source/geometries/Next100FieldCage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -592,22 +592,7 @@ void Next100FieldCage::BuildELRegion()
G4Tubs* el_gap_solid;
G4LogicalVolume* el_gap_logic;


if (elfield_) {
/// Define EL electric field
UniformElectricDriftField* el_field = new UniformElectricDriftField();
G4double global_el_gap_zpos = el_gap_zpos_ - GetCoordOrigin().z();
el_field->SetCathodePosition(global_el_gap_zpos + el_gap_length_/2. + grid_thickn_);
el_field->SetAnodePosition (global_el_gap_zpos - el_gap_length_/2. - grid_thickn_);
el_field->SetDriftVelocity(2.5 * mm/microsecond);
el_field->SetTransverseDiffusion(ELtransv_diff_);
el_field->SetLongitudinalDiffusion(ELlong_diff_);
el_field->SetLightYield(XenonELLightYield(ELelectric_field_, pressure_));
G4Region* el_region = new G4Region("EL_REGION");
el_region->SetUserInformation(el_field);
el_region->AddRootLogicalVolume(el_gap_logic);
}

// Logical Volumes
G4LogicalVolume *el_grid_logic;
G4LogicalVolume *el_hex_logic;

Expand Down Expand Up @@ -753,6 +738,21 @@ void Next100FieldCage::BuildELRegion()
el_grid_logic, gas_mesh_opsur);
}

if (elfield_) {
/// Define EL electric field
UniformElectricDriftField* el_field = new UniformElectricDriftField();
G4double global_el_gap_zpos = el_gap_zpos_ - GetCoordOrigin().z();
el_field->SetCathodePosition(global_el_gap_zpos + el_gap_length_/2. + grid_thickn_);
el_field->SetAnodePosition (global_el_gap_zpos - el_gap_length_/2. - grid_thickn_);
el_field->SetDriftVelocity(2.5 * mm/microsecond);
el_field->SetTransverseDiffusion(ELtransv_diff_);
el_field->SetLongitudinalDiffusion(ELlong_diff_);
el_field->SetLightYield(XenonELLightYield(ELelectric_field_, pressure_));
G4Region* el_region = new G4Region("EL_REGION");
el_region->SetUserInformation(el_field);
el_region->AddRootLogicalVolume(el_gap_logic);
}

// Vertex generator
if (el_gap_gen_disk_zmin_ > el_gap_gen_disk_zmax_)
G4Exception("[Next100FieldCage]", "Next100FieldCage()",
Expand Down

0 comments on commit 44c4a5c

Please sign in to comment.