Skip to content

Commit

Permalink
More cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
paolafer committed Jan 18, 2024
1 parent e9b433b commit 1e50a7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions source/generators/ElecPositronPairGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ geom_(0)

G4GenericMessenger::Command& min_energy =
msg_->DeclareProperty("min_energy", energy_min_,
"Set minimum total kinetic energy of the two particles.");
"Minimum total kinetic energy of the two particles.");
min_energy.SetUnitCategory("Energy");
min_energy.SetParameterName("min_energy", false);
min_energy.SetRange("min_energy>0.");

G4GenericMessenger::Command& max_energy =
msg_->DeclareProperty("max_energy", energy_max_,
"Set maximum total kinetic energy of the two particles.");
"Maximum total kinetic energy of the two particles.");
max_energy.SetUnitCategory("Energy");
max_energy.SetParameterName("max_energy", false);
max_energy.SetRange("max_energy>0.");

msg_->DeclareProperty("region", region_,
"Set the region of the geometry where the vertex will be generated.");
"Region of the geometry where the vertex will be generated.");

DetectorConstruction* detconst = (DetectorConstruction*) G4RunManager::GetRunManager()->GetUserDetectorConstruction();
geom_ = detconst->GetGeometry();
Expand Down Expand Up @@ -128,4 +128,4 @@ void ElecPositronPairGenerator::GeneratePrimaryVertex(G4Event* event)
// Add particle to the vertex and this to the event
vertex->SetPrimary(particle2);
event->AddPrimaryVertex(vertex);
}
}
15 changes: 9 additions & 6 deletions source/geometries/GenericPhotosensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,26 @@ void GenericPhotosensor::Construct()

G4double window_zpos = thickness_/2. - wls_thickness_ - window_thickness_/2.;

new G4PVPlacement(nullptr, G4ThreeVector(0., 0., window_zpos), window_logic_vol,
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., window_zpos),
window_logic_vol,
name, case_logic_vol, false, 0, false);


// PHOTOSENSITIVE AREA /////////////////////////////////////////////
name = name_ + "_SENSAREA";

G4Box* sensarea_solid_vol =
new G4Box(name, reduced_width_/2., reduced_height_/2., sensarea_thickness_/2.);
new G4Box(name, reduced_width_/2., reduced_height_/2.,
sensarea_thickness_/2.);

G4LogicalVolume* sensarea_logic_vol =
new G4LogicalVolume(sensarea_solid_vol, sensitive_mat_, name);

G4double sensarea_zpos = thickness_/2. - wls_thickness_ - window_thickness_ -
sensarea_thickness_/2.;

new G4PVPlacement(nullptr, G4ThreeVector(0., 0., sensarea_zpos), sensarea_logic_vol,
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., sensarea_zpos),
sensarea_logic_vol,
name, case_logic_vol, false, 0, false);


Expand All @@ -192,9 +195,9 @@ void GenericPhotosensor::Construct()
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., wls_zpos), wls_logic_vol,
name, case_logic_vol, false, 0, false);

G4OpticalSurface* wls_optSurf = new G4OpticalSurface(name + "_OPSURF",
glisur, ground,
dielectric_dielectric, .01);
G4OpticalSurface* wls_optSurf =
new G4OpticalSurface(name + "_OPSURF", glisur, ground,
dielectric_dielectric, .01);

new G4LogicalSkinSurface(name + "_OPSURF", wls_logic_vol, wls_optSurf);

Expand Down

0 comments on commit 1e50a7c

Please sign in to comment.