Skip to content

Commit

Permalink
Merge pull request #235 from paolafer/fix-vertices
Browse files Browse the repository at this point in the history
Fix vertices
  • Loading branch information
paolafer authored Jan 26, 2024
2 parents 3c3a8c8 + f991dc4 commit 9ff3d6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
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

0 comments on commit 9ff3d6e

Please sign in to comment.