Skip to content

PMT encapsulation #256

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

Merged
merged 57 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6b1f7d4
updated for encapsulation
LSexton2396 Apr 1, 2025
245c290
updated for encapsulation
LSexton2396 Apr 1, 2025
2df4412
updated for encapsulation
LSexton2396 Apr 1, 2025
5a88089
updated for encapsulation
LSexton2396 Apr 1, 2025
b14a2b7
updated for encapsulation
LSexton2396 Apr 1, 2025
a255a2a
updated for encapsulation
LSexton2396 Apr 1, 2025
75c8a9f
Tidied up code to ready for pull request
LSexton2396 Apr 15, 2025
f811677
Tidy up for pull request
LSexton2396 Apr 15, 2025
20c73a8
Merge branch 'rat-pac:main' into main
LSexton2396 Apr 15, 2025
01a62cf
Added encapsulation
LSexton2396 Apr 15, 2025
bc1bddc
Merge branch 'main' of github.com:LSexton2396/ratpac-two
LSexton2396 Apr 15, 2025
065e51a
Added encapsulation
LSexton2396 Apr 15, 2025
553b896
Added encapsulation
LSexton2396 Apr 15, 2025
ac0c996
Added encapsulation
LSexton2396 Apr 15, 2025
20edfe9
Added encapsulation
LSexton2396 Apr 15, 2025
5cb7ab1
Added encapsulations
LSexton2396 Apr 15, 2025
f40ef74
Added encapsulations
LSexton2396 Apr 15, 2025
45399c7
clang formatting for pull request
LSexton2396 Apr 16, 2025
ea25a6f
removed clang-format for cmake file
LSexton2396 Apr 16, 2025
c909120
New encapsulation methodsimilar to PMTConstruction
LSexton2396 May 7, 2025
af752a7
New encapsulation method similar to PMTConstruction
LSexton2396 May 7, 2025
d19bfe7
updated line 146 which caused warning, missing =0
LSexton2396 May 12, 2025
5e681c3
small changes to remove warnings
LSexton2396 May 14, 2025
b0e6adc
small changes to remove warnings
LSexton2396 May 14, 2025
9d408c1
added extra offset to pmt position for when PMT is not centre of enca…
LSexton2396 May 14, 2025
5b5c540
changed units from cm to mm to keep consistent
LSexton2396 May 14, 2025
aa34f40
format update
LSexton2396 May 19, 2025
4accae0
removed cout lines for offset check
LSexton2396 May 19, 2025
aaf7adf
format changes
LSexton2396 May 19, 2025
0d63785
created pmt encapsulation documentation
LSexton2396 May 20, 2025
113f1d7
created pmt encapsulation documentation
LSexton2396 May 20, 2025
f369959
created pmt encapsulation documentation
LSexton2396 May 20, 2025
d2b35e2
created pmt encapsulation documentation
LSexton2396 May 20, 2025
efc0ae9
created pmt encapsulation documentation
LSexton2396 May 20, 2025
813e308
Delete doc/users_guide/pmt.rst to resolve conflict
LSexton2396 May 20, 2025
d5d379a
added original pmt.rst back
LSexton2396 May 21, 2025
78c289b
Merge branch 'main' into main
MarcFBergevin May 23, 2025
ca32b0a
removed old encapsulated pmt entry, no longer used
LSexton2396 Jun 3, 2025
c70c691
Merge branch 'main' of github.com:LSexton2396/ratpac-two
LSexton2396 Jun 3, 2025
fab4563
changes to encapsulation index and run_range
LSexton2396 Jun 3, 2025
31c07db
changed naming of pmtencapsulationconstruction to pmtencapsulation, m…
LSexton2396 Jun 4, 2025
eb8ccbc
changed naming of pmtencapsulationconstruction to pmtencapsulation, m…
LSexton2396 Jun 4, 2025
efe4323
added optical gel check so that it can only be used if pmt constructi…
LSexton2396 Jun 4, 2025
36d8dd9
clang formatting
LSexton2396 Jun 4, 2025
ef18669
updated nakano acrylic
LSexton2396 Jun 4, 2025
08b804c
updated nakano acrylic
LSexton2396 Jun 5, 2025
5d3d95d
changed line 85 so that pmt index name (volume name variable line 32)…
LSexton2396 Jun 5, 2025
40e2ac1
changed line 85 so that pmt index name (volume name variable line 32)…
LSexton2396 Jun 5, 2025
426fd4c
pmt.rst readded to remove conflict
LSexton2396 Jun 5, 2025
6c54d22
removed pmt.rst
LSexton2396 Jun 5, 2025
edef212
old pmt.rst, should show no changes in diff
LSexton2396 Jun 5, 2025
f96c7f2
up to date pmt.rst
LSexton2396 Jun 5, 2025
9f7d0e0
Merge branch 'rat-pac:main' into main
LSexton2396 Jun 5, 2025
be5c53b
removed nakano acrylic, will use acrylic_uvt_good instead, and keep n…
LSexton2396 Jun 5, 2025
1b67f5f
minor changes to remove diffs
LSexton2396 Jun 5, 2025
eb1e32e
Remove PMT statement line, 0s to nullptrs
LSexton2396 Jun 11, 2025
d0a1fd3
changed 0s to nullptrs for initiallising objects
LSexton2396 Jun 11, 2025
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
30 changes: 30 additions & 0 deletions ratdb/ENCAPSULATION.ratdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
name: "ENCAPSULATION",
index: "BUTTON_r7081pe",
run_range: [0, 0],

construction: "hemisphere",
envelope_radius: 244.0, // should be large enough to fit all objects (>flange_rmax)
front_encapsulation_material: "acrylic_uvt_good",
rear_encapsulation_material: "acrylic_black",
flange_rmax: 243.0, // applies to acrylic and metal flange
encap_radius: 200.0,
encap_thickness: 8.0,
use_metal_flange: 1,
metal_flange_material: "stainless_steel",
metal_flange_dimensions: [ 220.0, 243.0, 4.0 ], // G4Tubs dimensions rmin, rmax, z
inside_encapsulation_material: "air",
use_optical_gel: 1,
optical_gel_material: "optical_grease",
optical_gel_sub_height: 150.0, // start from a dome full of gel of size encap_radius, e.g. height of ...
// gel dome left is (encap_radius - optical_gel_sub_height)
pmtposoffset: [ 0.0, 0.0, 98.0 ],
use_silica_bag: 1,
silica_bag_material: "acrylic_white",
silica_bag_dimensions: [ 18.0, 33.0, 3.0 ], // G4Box dimensions x, y, z
silica_bag_position: [ 0.0, 135.0, -74.0 ], // x, y, z
use_cable: 1,
cable_material: "acrylic_black",
cable_dimensions: [ 0.0, 6.5, 45.0 ], // G4Tubs dimensions rmin, rmax, z
cable_position: [ 0.0, 0.0, -152.0 ], // x, y, z
}
2 changes: 2 additions & 0 deletions src/geo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ add_library(geo OBJECT
src/pmt/RevolutionPMTConstruction.cc
src/pmt/ToroidalPMTConstruction.cc
src/pmt/CylindricalPMTConstruction.cc
src/pmt/PMTEncapsulation.cc
src/pmt/HemisphereEncapsulation.cc
)

# Set our include directories
Expand Down
106 changes: 106 additions & 0 deletions src/geo/include/RAT/HemisphereEncapsulation.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// This is the encapsulation model that is used for BUTTON.
// The 96 Hamamatsu r7081pe PMTs are encapsulated by two acryilic domes that are held together with metal flanges.
// Created by Lewis Sexton (Sheffield) and Adam Tarrant (Liverpool)

#ifndef __RAT_HemisphereEncapsulation__
#define __RAT_HemisphereEncapsulation__

#include <G4Box.hh>
#include <G4GenericPolycone.hh>
#include <G4LogicalVolume.hh>
#include <G4Material.hh>
#include <G4OpticalSurface.hh>
#include <G4PVPlacement.hh>
#include <G4Paraboloid.hh>
#include <G4Sphere.hh>
#include <G4SubtractionSolid.hh>
#include <G4UnionSolid.hh>
#include <G4VSensitiveDetector.hh>
#include <G4VSolid.hh>
#include <G4VisAttributes.hh>
#include <RAT/DB.hh>
#include <RAT/Factory.hh>
#include <RAT/GLG4TorusStack.hh>
#include <RAT/PMTEncapsulation.hh>
#include <string>
#include <vector>
namespace RAT {

struct HemisphereEncapsulationParams {
int useMetalFlange;
int useGel;
int useSilicaBag;
int useCable;

// encapsulation object dimensions
double envelope_radius;
double encap_radius;
double encap_thickness;
double flange_rmax;
double dome_flange_thickness;
double metal_flange_thickness;
double optical_gel_sub_height;
std::vector<double> metal_flange_dimensions;
std::vector<double> silica_bag_dimensions;
std::vector<double> silica_bag_position;
std::vector<double> cable_dimensions;
std::vector<double> cable_position;

// PMT Body
std::vector<double> zEdge; // n+1
std::vector<double> rhoEdge; // n+1
std::vector<double> zOrigin; // n
G4ThreeVector pmtposvec;
std::vector<double> posvec;

G4Material *exterior_material;
G4Material *inner_encapsulation_material;
G4Material *front_encapsulation_material;
G4Material *rear_encapsulation_material;
G4Material *metal_flange_material;
G4Material *silica_bag_material;
G4Material *cable_material;
G4Material *optical_gel_material;

G4OpticalSurface *inner_encapsulation_surface;
G4OpticalSurface *front_encapsulation_surface;
G4OpticalSurface *rear_encapsulation_surface;
G4OpticalSurface *metal_flange_surface;
G4OpticalSurface *cable_surface;
G4OpticalSurface *silica_bag_surface;
G4OpticalSurface *optical_gel_surface;
};

class HemisphereEncapsulation : public PMTEncapsulation {
public:
HemisphereEncapsulation(DBLinkPtr encaptable, DBLinkPtr pmttable, G4LogicalVolume *mother);
virtual ~HemisphereEncapsulation() {}

virtual G4LogicalVolume *BuildVolume(const std::string &prefix);
virtual G4VSolid *BuildSolid(const std::string &prefix);
virtual G4PVPlacement *PlaceEncap(G4RotationMatrix *pmtrot, G4ThreeVector pmtpos, const std::string &name,
G4LogicalVolume *logi_pmt, G4VPhysicalVolume *mother_phys, bool booleanSolid,
int copyNo);

protected:
G4VSolid *NewEnvelopeSolid(const std::string &name);
G4VSolid *NewEncapsulationSolid(const std::string &name);
G4VSolid *optical_gel_height_subtraction(const std::string &_name);
G4VSolid *optical_gel_pmt_subtraction(const std::string &_name, GLG4TorusStack *body);

// phyiscal volumes
G4PVPlacement *inner_encapsulation_phys;
G4PVPlacement *optical_gel_encapsulation_phys;
G4PVPlacement *front_encapsulation_phys;
G4PVPlacement *rear_encapsulation_phys;
G4PVPlacement *front_metal_encapsulaion_flange_phys;
G4PVPlacement *rear_metal_encapsulation_flange_phys;
G4PVPlacement *silica_bag_encapsulation_phys;
G4PVPlacement *cable_encapsulation_phys;

HemisphereEncapsulationParams fParams;
};

} // namespace RAT

#endif
35 changes: 35 additions & 0 deletions src/geo/include/RAT/PMTEncapsulation.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef __RAT_PMTEncapsulation__
#define __RAT_PMTEncapsulation__

#include <G4LogicalVolume.hh>
#include <G4PVPlacement.hh>
#include <G4RotationMatrix.hh>
#include <G4VSolid.hh>
#include <RAT/DB.hh>
#include <string>

namespace RAT {

class PMTEncapsulation {
public:
static PMTEncapsulation *NewConstruction(DBLinkPtr encaptable, DBLinkPtr pmttable, G4LogicalVolume *mother);

PMTEncapsulation(std::string _name) : name(_name) {}

virtual ~PMTEncapsulation() {}

virtual G4VSolid *BuildSolid(const std::string &prefix) = 0;

virtual G4LogicalVolume *BuildVolume(const std::string &prefix) = 0;

virtual G4PVPlacement *PlaceEncap(G4RotationMatrix *pmtrot, G4ThreeVector pmtpos, const std::string &name,
G4LogicalVolume *logi_pmt, G4VPhysicalVolume *mother_phys, bool booleanSolid,
int copyNo) = 0;

protected:
std::string name;
};

} // namespace RAT

#endif
Loading