Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vertices #235

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions source/geometries/Next100.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// ----------------------------------------------------------------------------

#include "Next100.h"
#include "BoxPointSampler.h"
#include "MuonsPointSampler.h"
#include "LSCHallA.h"
#include "Next100Shielding.h"
#include "Next100Vessel.h"
Expand Down Expand Up @@ -88,7 +86,6 @@ namespace nexus {
delete ics_;
delete vessel_;
delete shielding_;
delete lab_gen_;
delete hallA_walls_;
}

Expand Down Expand Up @@ -200,33 +197,22 @@ namespace nexus {
}
}

//// VERTEX GENERATORS
lab_gen_ =
new BoxPointSampler(lab_size_ - 1.*m, lab_size_ - 1.*m,
lab_size_ - 1.*m, 1.*m,
G4ThreeVector(0., 0., 0.), 0);

}


G4ThreeVector Next100::GenerateVertex(const G4String& region) const
{
G4ThreeVector vertex(0.,0.,0.);

// Air around shielding
if (region == "LAB") {
vertex = lab_gen_->GenerateVertex("INSIDE");
}

// Shielding regions
else if ((region == "SHIELDING_LEAD") ||
(region == "SHIELDING_STEEL") ||
(region == "INNER_AIR") ||
(region == "EXTERNAL") ||
(region == "SHIELDING_STRUCT") ||
(region == "PEDESTAL") ||
(region == "BUBBLE_SEAL") ||
(region == "EDPM_SEAL")) {
if ((region == "SHIELDING_LEAD") ||
(region == "SHIELDING_STEEL") ||
(region == "INNER_AIR") ||
(region == "EXTERNAL") ||
(region == "SHIELDING_STRUCT") ||
(region == "PEDESTAL") ||
(region == "BUBBLE_SEAL") ||
(region == "EDPM_SEAL")) {
vertex = shielding_->GenerateVertex(region);
}

Expand Down Expand Up @@ -262,7 +248,6 @@ namespace nexus {
(region == "TP_COPPER_PLATE") ||
(region == "SIPM_BOARD") ||
(region == "DB_PLUG") ||
(region == "EL_TABLE") ||
(region == "FIELD_RING") ||
(region == "GATE_RING") ||
(region == "ANODE_RING") ||
Expand Down
4 changes: 0 additions & 4 deletions source/geometries/Next100.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
class G4LogicalVolume;
class G4GenericMessenger;

namespace nexus {class BoxPointSampler;}


namespace nexus {

Expand Down Expand Up @@ -73,8 +71,6 @@ namespace nexus {
Next100Ics* ics_;
Next100InnerElements* inner_elements_;

BoxPointSampler* lab_gen_; ///< Vertex generator

/// Messenger for the definition of control commands
G4GenericMessenger* msg_;

Expand Down
3 changes: 2 additions & 1 deletion source/geometries/Next100FieldCage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@ G4ThreeVector Next100FieldCage::GenerateVertex(const G4String& region) const
G4ThreeVector vertex(0., 0., 0.);

if (region == "CENTER") {
vertex = G4ThreeVector(0., 0., active_zpos_);
vertex = G4ThreeVector(GetCoordOrigin().x(), GetCoordOrigin().y(),
active_zpos_);
}

else if (region == "ACTIVE") {
Expand Down
Loading