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

Adding the encapsulation and the properties of "Nakano" acrylic #143

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
adding encapsulation
Lilia Drakopoulou committed Dec 3, 2020
commit 3c75d72ad2837bd3599770fd99009d1165646cfa
2 changes: 1 addition & 1 deletion mac/positron_watchman.mac
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
/glg4debug/glg4param omit_hadronic_processes 1.0

/rat/db/set DETECTOR experiment "Watchman"
/rat/db/set GEO[inner_pmts] light_cone 0
#/rat/db/set GEO[inner_pmts] light_cone 1
/rat/db/set GEO[inner_pmts] encapsulation 1
#/rat/db/set GEO[inner_pmts] mu_metal 1
#/rat/db/set GEO[inner_pmts] orientation "manual" #can change to "point" to have PMTs point to center
3 changes: 2 additions & 1 deletion mac/positron_watchman2.mac
Original file line number Diff line number Diff line change
@@ -2,8 +2,9 @@
/glg4debug/glg4param omit_hadronic_processes 1.0

/rat/db/set DETECTOR experiment "Watchman"
/rat/db/set GEO[inner_pmts] light_cone 0
#/rat/db/set GEO[inner_pmts] light_cone 1
/rat/db/set GEO[inner_pmts] encapsulation 0
#/rat/db/set GEO[inner_pmts] mu_metal 1
#/rat/db/set GEO[inner_pmts] orientation "manual" #can change to "point" to have PMTs point to center

#light cone material parameters
16 changes: 9 additions & 7 deletions mac/watchman.mac
Original file line number Diff line number Diff line change
@@ -4,13 +4,15 @@

/rat/db/set DETECTOR experiment "Watchman"
# Turn on mu metal, change surface and material
/rat/db/set GEO[inner_pmts] light_cone 0
rat/db/set GEO[inner_pmts] light_cone_material "aluminum"
/rat/db/set GEO[inner_pmts] light_cone_surface "aluminum"
/rat/db/set GEO[inner_pmts] light_cone_length 11.5
/rat/db/set GEO[inner_pmts] light_cone_innerradius 12.65
/rat/db/set GEO[inner_pmts] light_cone_outerradius 26.0
/rat/db/set GEO[inner_pmts] light_cone_thickness 0.2
/rat/db/set GEO[inner_pmts] encapsulation 1
#/rat/db/set GEO[inner_pmts] mu_metal 1
#/rat/db/set GEO[inner_pmts] light_cone 1
#/rat/db/set GEO[inner_pmts] light_cone_material "aluminum"
#/rat/db/set GEO[inner_pmts] light_cone_surface "aluminum"
#/rat/db/set GEO[inner_pmts] light_cone_length 11.5
#/rat/db/set GEO[inner_pmts] light_cone_innerradius 12.65
#/rat/db/set GEO[inner_pmts] light_cone_outerradius 26.0
#/rat/db/set GEO[inner_pmts] light_cone_thickness 0.2

#can change black tarp offset and thickness
/rat/db/set GEO[inner_pmts] black_sheet_offset 300.0 #cm
6 changes: 6 additions & 0 deletions myenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source /Disk/ds-sopa-personal/edrakopo/software_WATCHMAN/root_install/bin/thisroot.sh
source /Disk/ds-sopa-personal/edrakopo/software_WATCHMAN/geant_install/bin/geant4.sh
export LD_LIBRARY_PATH=/Disk/ds-sopa-personal/edrakopo/software_WATCHMAN/software_WATCHMAN/geant_install/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/Disk/ds-sopa-personal/edrakopo/software_WATCHMAN/software_WATCHMAN/geant_install/lib:$DYLD_LIBRARY_PATH
source /Disk/ds-sopa-personal/edrakopo/software_WATCHMAN/rat-pac/ratpac.sh

53 changes: 25 additions & 28 deletions src/geo/src/GeoPMTFactoryBase.cc
Original file line number Diff line number Diff line change
@@ -33,9 +33,6 @@
#include <G4SubtractionSolid.hh>
#include <G4VisAttributes.hh>
#include <G4Sphere.hh>
#include <G4Box.hh>
#include <G4SubtractionSolid.hh>


using namespace std;

@@ -119,11 +116,11 @@ namespace RAT {
mumetal_log, //Logical Volume
mu_metal_surface); //Surface Property


//add PMT encapsulation : diameter=36cm
int encapsulation = 0; // default to no shields
//add PMT encapsulation : diameter=35cm
int encapsulation = 0; // default to no encapsualtion
try { encapsulation = table->GetI("encapsulation"); }
catch (DBNotFoundError &e) { }
if(encapsulation==1){G4cout <<"Your PMTs are inside an encapsulation! \n ";}
// Material Properties
G4Material* encapsulation_material = G4Material::GetMaterial("nakano_acrylic");
try { encapsulation_material = G4Material::GetMaterial( table->GetS("encapsulation_material") ); }
@@ -135,23 +132,22 @@ namespace RAT {
G4cout << "PMT encapsulation is added!! \n ";

//acrylic has 0.635cm thickness //the whole PMT height with base is 318mm, the encapsulation is: 36cm
G4Sphere* encapsulation_solid = new G4Sphere("encapsulation_solid",
17.5*CLHEP::cm, // rmin //acrylic has 0.635cm thickness
18.135*CLHEP::cm, // rmax //PMT diameter is 254mm r:127mm
0., CLHEP::twopi, //phi
0., CLHEP::pi); //theta

G4Sphere* encapsulation_solid = new G4Sphere("encapsulation_solid",
17.5*CLHEP::cm, // rmin //acrylic has 0.635cm thickness
18.135*CLHEP::cm, // rmax //PMT diameter is 254mm r:127mm
0., CLHEP::twopi, //phi
0., CLHEP::pi); //theta
G4LogicalVolume * encapsulation_log=new G4LogicalVolume(
encapsulation_solid, // G4VSolid
encapsulation_material, // G4Material
"encapsulation_log");

encapsulation_solid,// G4VSolid
encapsulation_material, // G4Material
"encapsulation_log");
G4LogicalSkinSurface* encapsulation_skin = new G4LogicalSkinSurface(
"encapsulation_surface",
encapsulation_log, //Logical Volume
encapsulation_surface); //Surface Property
"encapsulation_surface",
encapsulation_log, //Logical Volume
encapsulation_surface); //Surface Property

//----- add gel and nitrogen inside the encapsulation:
//----- add gel and nitrogen inside the encapsulation:
//Note: [0.,CLHEP::pi/2.] is the upper hemisphere & [CLHEP::pi/2., CLHEP::pi] is the lower hemisphere of the sphere
//____ optical grease ______ //V-788 Optical Grease from Rhodia Silicones,
G4Material* encapsulation_innermaterial1 = G4Material::GetMaterial("optical_grease");
@@ -162,7 +158,7 @@ namespace RAT {
catch (DBNotFoundError &e) { }

G4VSolid* encapsulation_innersolid1 = new G4Sphere("encapsulation_innersolid1",
12.65*CLHEP::cm, // rmin
13.0*CLHEP::cm, // rmin
17.5*CLHEP::cm, // rmax
0., CLHEP::twopi, //phi
0., CLHEP::pi/2.); //theta
@@ -369,14 +365,16 @@ namespace RAT {
} catch (DBNotFoundError &e) { }

// Build PMT
pmtParam.useEnvelope = false; // disable the use of envelope volume for now
pmtParam.useEnvelope = true; // enable the use of envelope volume for now (not used in standard rat-pac)
PMTConstruction pmtConstruct(pmtParam);

G4LogicalVolume *logiPMT = pmtConstruct.NewPMT(volume_name, vis_simple);
G4LogicalVolume *logiWg = 0;
G4ThreeVector offsetWg;




//G4VPhysicalVolume *mid_water_phys = FindPhysMother("mid_water");
//new G4PVPlacement
//( 0,
@@ -567,7 +565,7 @@ namespace RAT {
// id - the nth pmt that GeoPMTFactoryBase has built
for (int idx = start_idx, id = pmtinfo.GetPMTCount(); idx <= end_idx; idx++, id++) {

string pmtname = volume_name + ::to_string(id); //internally PMTs are represented by the nth pmt built, not pmtid
string pmtname = volume_name + "_pmtenv_" + ::to_string(id); //internally PMTs are represented by the nth pmt built, not pmtid

// position
G4ThreeVector pmtpos(pmt_x[idx], pmt_y[idx], pmt_z[idx]);
@@ -712,11 +710,11 @@ namespace RAT {
false,
id);
}

//place the encapsulation:
G4ThreeVector offsetencapsulation = G4ThreeVector(0.0, 0.0, 0.0*CLHEP::cm);
//G4cout << "pmtpos is " << pmtpos << "\n";
G4ThreeVector offsetencapsulation_rot = pmtrot->inverse()(offsetencapsulation);
G4ThreeVector offsetencapsulation_rot = pmtrot->inverse()(offsetencapsulation);
G4ThreeVector encapsulationpos = pmtpos + offsetencapsulation_rot;
if (encapsulation) {
new G4PVPlacement
@@ -727,7 +725,7 @@ namespace RAT {
phys_mother,
false,
id);

new G4PVPlacement
( pmtrot,
encapsulationpos,
@@ -745,8 +743,7 @@ namespace RAT {
phys_mother,
false,
id);

}
}

G4RotationMatrix* lightconerot = new G4RotationMatrix();
lightconerot->rotateY(angle_y);