From c642d9c41214b624ceb228de50c2a1a1559a8834 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Fri, 21 May 2021 21:18:28 +0200 Subject: [PATCH 1/9] added v1 of ETEL+LUX holders --- include/WCSimDetectorConstruction.hh | 4 + include/WCSimRootOptions.hh | 3 + include/WCSimTuningMessenger.hh | 1 + include/WCSimTuningParameters.hh | 4 + macros/tuning_parameters.mac | 7 +- src/WCSimConstructANNIECylinderScan.cc | 132 ++++++++++++++++++++++++- src/WCSimConstructMaterials.cc | 42 ++++++-- src/WCSimRootOptions.cc | 1 + src/WCSimTuningMessenger.cc | 17 ++++ src/WCSimTuningParameters.cc | 2 + 10 files changed, 201 insertions(+), 12 deletions(-) diff --git a/include/WCSimDetectorConstruction.hh b/include/WCSimDetectorConstruction.hh index 2d3a40d8b..7e59ce1e7 100644 --- a/include/WCSimDetectorConstruction.hh +++ b/include/WCSimDetectorConstruction.hh @@ -288,6 +288,9 @@ private: // ANNIE Holder surface G4OpticalSurface * HolderOpSurface; + // LUX / ETEL Holder surface + G4OpticalSurface * LUXHolderOpSurface; + // The messenger we use to change the geometry. WCSimDetectorMessenger* messenger; @@ -305,6 +308,7 @@ private: void ConstructANNIECapsSheet(G4int zflip); //Only create the black sheet for top and bottom planes, no PMT placement void ConstructANNIEHolders(); //Construct ANNIE PMT holders + void ConstructLUXETELHolders(); //Construct LUX + ETEL PMT holders (top + bottom PMTs) void ConstructMaterials(); diff --git a/include/WCSimRootOptions.hh b/include/WCSimRootOptions.hh index 3c84572f9..1b8233cc1 100644 --- a/include/WCSimRootOptions.hh +++ b/include/WCSimRootOptions.hh @@ -114,6 +114,7 @@ public: void SetMieff(double iMieff) {Mieff = iMieff;} void SetTeflonrff(double iTeflonrff) {Teflonrff = iTeflonrff;} void SetHolderrff(double iHolderrff) {Holderrff = iHolderrff;} + void SetHolderrffLUX(double iHolderrffLUX) {HolderrffLUX = iHolderrffLUX;} void SetLinerrff(double iLinerrff) {Linerrff = iLinerrff;} void SetHolder(bool iHolder) {Holder = iHolder;} void SetTvspacing(double iTvspacing) {Tvspacing = iTvspacing;} @@ -127,6 +128,7 @@ public: double GetTeflonrff() {return Teflonrff;} double GetLinerrff() {return Linerrff;} double GetHolderrff() {return Holderrff;} + double GetHolderrffLUX() {return HolderrffLUX;} bool GetHolder() {return Holder;} double GetTvspacing() {return Tvspacing;} bool GetTopveto() {return Topveto;} @@ -200,6 +202,7 @@ private: double Teflonrff; double Linerrff; double Holderrff; + double HolderrffLUX; bool Holder; double Tvspacing; bool Topveto; diff --git a/include/WCSimTuningMessenger.hh b/include/WCSimTuningMessenger.hh index aaa3dc082..88a921cbc 100644 --- a/include/WCSimTuningMessenger.hh +++ b/include/WCSimTuningMessenger.hh @@ -37,6 +37,7 @@ private: G4UIcmdWithADouble* Teflonrff; G4UIcmdWithADouble* Linerrff; G4UIcmdWithADouble* Holderrff; + G4UIcmdWithADouble* HolderrffLUX; G4UIcmdWithABool *Holder; //For Top Veto - jl145 diff --git a/include/WCSimTuningParameters.hh b/include/WCSimTuningParameters.hh index 768f9183c..3f0888c0a 100644 --- a/include/WCSimTuningParameters.hh +++ b/include/WCSimTuningParameters.hh @@ -34,6 +34,9 @@ public: G4double GetHolderrff() {return holderrff;} void SetHolderrff(G4double rparam) {holderrff=rparam;} + G4double GetHolderrffLUX() {return holderrfflux;} + void SetHolderrffLUX(G4double rparam) {holderrfflux=rparam;} + G4double GetLinerrff() {return linerrff;} void SetLinerrff(G4double rparam) {linerrff=rparam;} @@ -66,6 +69,7 @@ private: // ANNIE-specfic tuning parameters G4double teflonrff; //Teflon-wrapped Inner Structure --> Reflectivity tuning factor G4double holderrff; //ANNIE holders --> Reflectivity tuning factor + G4double holderrfflux; //LUX/ETEL holders --> Reflectivity tuning factor G4double linerrff; //Liner --> Reflectivity tuning factor G4bool holder; //Should ANNIE PMT holders be implemented in the simulation? diff --git a/macros/tuning_parameters.mac b/macros/tuning_parameters.mac index 88efa5ffa..93a7c3d9b 100644 --- a/macros/tuning_parameters.mac +++ b/macros/tuning_parameters.mac @@ -7,9 +7,10 @@ /WCSim/tuning/mieff 0.0 # ANNIE tuning parameters -/WCSim/tuning/teflonrff 1.00 -/WCSim/tuning/holderrff 1.00 -/WCSim/tuning/linerrff 1.00 +/WCSim/tuning/teflonrff 0.90 +/WCSim/tuning/holderrff 0.90 +/WCSim/tuning/holderrfflux 0.70 +/WCSim/tuning/linerrff 0.90 #Turning holders on (1) or off (0) /WCSim/tuning/holder 1 diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index 2c29f42c4..38f619b03 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -338,6 +338,7 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIECylinderScan() if (HOLDER){ ConstructANNIEHolders(); + ConstructANNIEHoldersLUX(); } @@ -445,8 +446,10 @@ void WCSimDetectorConstruction::ConstructANNIEHolders(){ G4ThreeVector(0.,0.,0.)); //Check the material of the ANNIE holders somewhere! + //ANNIE holders should be made out of polyethylene + //Assume white acrylic since it should be similar G4LogicalVolume *logANNIEHolder = new G4LogicalVolume(solidANNIEHolder, - G4Material::GetMaterial("PVC"), + G4Material::GetMaterial("Acrylic"), "WCANNIEHolder", 0,0,0); @@ -517,3 +520,130 @@ void WCSimDetectorConstruction::ConstructANNIEHolders(){ pmt_position_file.close(); } + +void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ + + G4cout <<"Construct LUX/ETEL Holders"< Use PVC as material + G4LogicalVolume *logLUXHolder = new G4LogicalVolume(solidLUXHolder, + G4Material::GetMaterial("PVC"), + "WCLUXHolder", + 0,0,0); + + G4double dist_pmt_holder_lux = 6.0*cm; //LUX center is 11.7cm from glass front surface total distance glass surface-wings = 17.7cm, dist = 6.0cm + + G4LogicalVolume *logETELHolder = new G4LogicalVolume(solidETELHolder, + G4Material::GetMaterial("PVC"), + "WCETELHolder", + 0,0,0); + + G4double dist_pmt_holder_etel = 7.25*cm; //ETEL center is 11.8cm from glass front surface, total distance from glass surface to wings is 19.05cm (7.5") -> dist = 19.05cm-11.8cm = 7.25cm + + //Create Rotation matrix for PMT holders + G4RotationMatrix* WCPMTRotation = new G4RotationMatrix; + + //Select only ETEL + LUX PMTs and propagate their position up-/downwards to get central holder position + std::ifstream pmt_position_file("PMTPositions_Scan.txt"); + std::string next_pmt; + double pmt_x, pmt_y, pmt_z, pmt_dirx, pmt_diry, pmt_dirz; + double holder_x, holder_y, holder_z; + int panel_nr, pmt_type; + int HolderID; + while (!pmt_position_file.eof()){ + pmt_position_file >> HolderID >> panel_nr >> pmt_x >> pmt_y >> pmt_z >> pmt_dirx >> pmt_diry >> pmt_dirz >> pmt_type; + if (pmt_position_file.eof()) break; + G4cout << "Read in PMT "< AddElement(elH, 6); Acrylic -> AddElement(elC, 4); Acrylic -> AddElement(elO, 2); - + // **** END NCV additions **** //*****************SciBooNE integration @@ -1073,17 +1073,22 @@ void WCSimDetectorConstruction::ConstructMaterials() LinerOpSurface->SetSigmaAlpha(0.1); LinerOpSurface->SetMaterialPropertiesTable(linerSurfaceMatProps); + //ANNIE Holder are made out of polyethlene + //Should be close to acrylic white as defined in ratpac simulation + //Use refractive index for material 'acrylic_white' from ratpac G4double HOLDERRFF = WCSimTuningParams->GetHolderrff(); - G4double refHolder[] = {1.00*HOLDERRFF,1.00*HOLDERRFF}; - G4double rIndexHolder[] = {1.531,1.531}; + const G4int arrEntriesHolder = 62; + G4double refHolder[] = {1.00*HOLDERRFF}; + G4double photEneHolder[] = {1.55*CLHEP::eV, 1.569620253*CLHEP::eV, 1.58974359*CLHEP::eV, 1.61038961*CLHEP::eV, 1.631578947*CLHEP::eV, 1.653333333*CLHEP::eV, 1.675675676*CLHEP::eV, 1.698630137*CLHEP::eV, 1.722222222*CLHEP::eV, 1.746478873*CLHEP::eV, 1.771428571*CLHEP::eV, 1.797101449*CLHEP::eV, 1.823529412*CLHEP::eV, 1.850746269*CLHEP::eV, 1.878787879*CLHEP::eV, 1.907692308*CLHEP::eV, 1.9375*CLHEP::eV, 1.968253968*CLHEP::eV, 2*CLHEP::eV, 2.032786885*CLHEP::eV, 2.066666667*CLHEP::eV, 2.101694915*CLHEP::eV, 2.137931034*CLHEP::eV, 2.175438596*CLHEP::eV, 2.214285714*CLHEP::eV, 2.254545455*CLHEP::eV, 2.296296296*CLHEP::eV, 2.339622642*CLHEP::eV, 2.384615385*CLHEP::eV, 2.431372549*CLHEP::eV, 2.48*CLHEP::eV, 2.530612245*CLHEP::eV, 2.583333333*CLHEP::eV, 2.638297872*CLHEP::eV, 2.695652174*CLHEP::eV, 2.755555556*CLHEP::eV, 2.818181818*CLHEP::eV, 2.88372093*CLHEP::eV, 2.952380952*CLHEP::eV, 3.024390244*CLHEP::eV, 3.1*CLHEP::eV, 3.179487179*CLHEP::eV, 3.263157895*CLHEP::eV, 3.351351351*CLHEP::eV, 3.444444444*CLHEP::eV, 3.542857143*CLHEP::eV, 3.647058824*CLHEP::eV, 3.757575758*CLHEP::eV, 3.875*CLHEP::eV, 4*CLHEP::eV, 4.133333333*CLHEP::eV, 4.275862069*CLHEP::eV, 4.428571429*CLHEP::eV, 4.592592593*CLHEP::eV, 4.769230769*CLHEP::eV, 4.96*CLHEP::eV, 5.166666667*CLHEP::eV, 5.391304348*CLHEP::eV, 5.636363636*CLHEP::eV, 5.904761905*CLHEP::eV, 6.2*CLHEP::eV, 20.66666667*CLHEP::eV}; + G4double rIndexHolder[] = {1.485, 1.485, 1.485, 1.485, 1.486, 1.486, 1.486, 1.486, 1.487, 1.487, 1.487, 1.488, 1.488, 1.488, 1.488, 1.489, 1.489, 1.49, 1.49, 1.49, 1.491, 1.491, 1.492, 1.492, 1.493, 1.493, 1.494, 1.494, 1.495, 1.496, 1.496, 1.497, 1.498, 1.499, 1.499, 1.5, 1.501, 1.502, 1.503, 1.505, 1.506, 1.507, 1.509, 1.51, 1.512, 1.514, 1.516, 1.519, 1.521, 1.524, 1.527, 1.531, 1.534, 1.539, 1.544, 1.55, 1.556, 1.564, 1.573, 1.584, 1.597, 1.597}; G4MaterialPropertiesTable *holderSurfaceMatProps = new G4MaterialPropertiesTable(); - holderSurfaceMatProps->AddProperty("RINDEX", photEneSteel, rIndexHolder, arrEntries); + holderSurfaceMatProps->AddProperty("RINDEX", photEneHolder, rIndexHolder, arrEntriesHolder); holderSurfaceMatProps->AddProperty("ABSLENGTH",photEneSteel,absSteel,arrEntries); //This should probably be something else, check (TODO) holderSurfaceMatProps->AddProperty("REFLECTIVITY",photEneSteel, refHolder,arrEntries); - holderSurfaceMatProps->AddProperty("SPECULARLOBECONSTANT",photEneSteel,specularlobeSteel,arrEntries); - holderSurfaceMatProps->AddProperty("SPECULARSPIKECONSTANT",photEneSteel,specularspikeSteel,arrEntries); - holderSurfaceMatProps->AddProperty("BACKSCATTERCONSTANT",photEneSteel,backscatterSteel,arrEntries); + holderSurfaceMatProps->AddProperty("SPECULARLOBECONSTANT",photEneSteel,specularlobeSteel,arrEntries); // Do we need this? + holderSurfaceMatProps->AddProperty("SPECULARSPIKECONSTANT",photEneSteel,specularspikeSteel,arrEntries); // Do we need this? + holderSurfaceMatProps->AddProperty("BACKSCATTERCONSTANT",photEneSteel,backscatterSteel,arrEntries); // Do we need this? HolderOpSurface = new G4OpticalSurface("HolderOpSurface"); HolderOpSurface->SetType(dielectric_metal); // fine, reflection or absorption only. @@ -1092,7 +1097,28 @@ void WCSimDetectorConstruction::ConstructMaterials() HolderOpSurface->SetSigmaAlpha(0.1); HolderOpSurface->SetMaterialPropertiesTable(holderSurfaceMatProps); - + //LUX & ETEL Holders are made of Schedule 80 PVT + // Not completely black & has some kind of reflective surface + // --> Reflectivity is assumed to be > 0.5 + // Assume same refractive index as for the ANNIE holders + + G4double LUXHOLDERRFF = WCSimTuningParams->GetHolderrffLUX(); + G4double refHolderLUX[] = {1.00*LUXHOLDERRFF,1.00*LUXHOLDERRFF}; + + G4MaterialPropertiesTable *luxholderSurfaceMatProps= new G4MaterialPropertiesTable(); + luxholdersurfaceMatProps->AddProperty("RINDEX",photEneHolder, rIndexHolder, arrEntriesHolder); + luxholdersurfaceMatProps->AddProperty("ABSLENGTH",photEneSteel,absSteel,arrEntries); //This should probably be something else, check + luxholdersurfaceMatProps->AddProperty("REFLECTIVITY",photEneSteel, rIndexHolderLUX, arrEntries); + luxholdersurfaceMatProps->AddProperty("SPECULARLOBECONSTANT",photEneSteel,specularlobeSteel,arrEntries); //Do we need this? + luxholdersurfaceMatProps->AddProperty("SPECULARSPIKECONSTANT",photEneSteel,specularspikeSteel,arrEntries); // Do we need this? + luxholdersurfaceMatProps->AddProperty("BACKSCATTERCONSTANT",photEneSteel,backscatterSteel,arrEntries); //Do we need this? + + LUXHolderOpSurface = new G4OpticalSurface("LUXHolderOpSurface"); + LUXHolderOpSurface->SetType(dielectric_metal); //fine, reflection or absorption only + LUXHolderOpSurface->SetModel(unified); + LUXHolderOpSurface->SetFinish(ground); + LUXHolderOpSurface->SetSigmaAlpha(0.1); + LUXHolderOpSurface->SetMaterialPropertiesTable(luxholdersurfaceMatProps); // ------------- Surfaces -------------- diff --git a/src/WCSimRootOptions.cc b/src/WCSimRootOptions.cc index 2c04b2297..c27c62c6f 100644 --- a/src/WCSimRootOptions.cc +++ b/src/WCSimRootOptions.cc @@ -179,6 +179,7 @@ void WCSimRootOptions::Print(Option_t *) const << "\tTeflonrff: " << Teflonrff << endl << "\tLinerrff: " << Linerrff << endl << "\tHolderrff: " << Holderrff << endl + << "\tHolderrffLUX: " << HolderrffLUX << endl << "\tHolder: " << Holder << endl << "\tTvspacing: " << Tvspacing << endl << "\tTopveto: " << Topveto << endl diff --git a/src/WCSimTuningMessenger.cc b/src/WCSimTuningMessenger.cc index 4ed2d147e..216717e4b 100644 --- a/src/WCSimTuningMessenger.cc +++ b/src/WCSimTuningMessenger.cc @@ -47,6 +47,11 @@ WCSimTuningMessenger::WCSimTuningMessenger(WCSimTuningParameters* WCTuningPars): Holderrff->SetParameterName("Holderrff",true); Holderrff->SetDefaultValue(1.00); + HolderrffLUX = new G4UIcmdWithADouble("/WCSim/tuning/holderrfflux",this); + HolderrffLUX->SetGuidance("Set LUX/ETEL holder reflectivity parameter"); + HolderrffLUX->SetParameterName("HolderrffLUX",true); + HolderrffLUX->SetDefaultValue(1.00); + Linerrff = new G4UIcmdWithADouble("/WCSim/tuning/linerrff",this); Linerrff->SetGuidance("Set Liner reflectivity parameter"); Linerrff->SetParameterName("Linerrff",true); @@ -81,6 +86,7 @@ WCSimTuningMessenger::~WCSimTuningMessenger() //ANNIE-specific variables delete Teflonrff; delete Holderrff; + delete HolderrffLUX; delete Linerrff; delete Holder; @@ -166,6 +172,17 @@ void WCSimTuningMessenger::SetNewValue(G4UIcommand* command,G4String newValue) } + // ANNIE - ETEL/LUX Holder reflectivity + if (command == HolderrffLUX){ + // Set the LUX/ETEL holder reflectivity parameter + // printf("Input parameter %f\n",Holderrff->GetNewDoubleValue(newValue)); + + WCSimTuningParams->SetHolderrffLUX(HolderrffLUX->GetNewDoubleValue(newValue)); + + printf("Setting LUX/ETEL holder reflectivity parameter %f\n",HolderrffLUX->GetNewDoubleValue(newValue)); + + } + // ANNIE - Liner reflectivity if (command == Linerrff){ // Set the ANNIE liner reflectivity parameter diff --git a/src/WCSimTuningParameters.cc b/src/WCSimTuningParameters.cc index cb1b60a9e..afb50e45b 100644 --- a/src/WCSimTuningParameters.cc +++ b/src/WCSimTuningParameters.cc @@ -18,6 +18,7 @@ WCSimTuningParameters::WCSimTuningParameters() //ANNIE-default values teflonrff=1.00; holderrff=1.00; + holderrfflux=1.00; linerrff=1.00; holder=false; @@ -42,6 +43,7 @@ void WCSimTuningParameters::SaveOptionsToOutput(WCSimRootOptions * wcopt) wcopt->SetMieff(mieff); wcopt->SetTeflonrff(teflonrff); wcopt->SetHolderrff(holderrff); + wcopt->SetHolderrffLUX(holderrfflux); wcopt->SetLinerrff(linerrff); wcopt->SetHolder(holder); wcopt->SetTvspacing(tvspacing); From 2c7ebd952df2af75040de4597effd29de8dd5a20 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Tue, 25 May 2021 21:58:32 +0200 Subject: [PATCH 2/9] fixed rotation of ETEL/LUX holders --- macros/visOGLSX_p2v7.mac | 6 +++++ src/WCSimConstructANNIECylinderScan.cc | 36 +++++++++++++++++++------- src/WCSimConstructMaterials.cc | 2 +- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/macros/visOGLSX_p2v7.mac b/macros/visOGLSX_p2v7.mac index 6e60290d7..17a089e84 100644 --- a/macros/visOGLSX_p2v7.mac +++ b/macros/visOGLSX_p2v7.mac @@ -82,6 +82,12 @@ /vis/geometry/set/visibility WCANNIEHolder -1 1 /vis/geometry/set/forceSolid WCANNIEHolder -1 1 /vis/geometry/set/colour WCANNIEHolder -1 1 0 0 1 +/vis/geometry/set/visibility WCLUXHolder -1 1 +/vis/geometry/set/forceSolid WCLUXHolder -1 1 +/vis/geometry/set/colour WCLUXHolder -1 1 0 0 1 +/vis/geometry/set/visibility WCETELHolder -1 1 +/vis/geometry/set/forceSolid WCETELHolder -1 1 +/vis/geometry/set/colour WCETELHolder -1 1 0 0 1 ## MRD #/vis/geometry/set/forceSolid hpaddle_log -1 1 diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index 38f619b03..665815c71 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -338,7 +338,7 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIECylinderScan() if (HOLDER){ ConstructANNIEHolders(); - ConstructANNIEHoldersLUX(); + ConstructLUXETELHolders(); } @@ -521,7 +521,7 @@ void WCSimDetectorConstruction::ConstructANNIEHolders(){ } -void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ +void WCSimDetectorConstruction::ConstructLUXETELHolders(){ G4cout <<"Construct LUX/ETEL Holders"< dist = 19.05cm-11.8cm = 7.25cm + G4double dist_pmt_holder_etel = 7.25; //ETEL center is 11.8cm from glass front surface, total distance from glass surface to wings is 19.05cm (7.5") -> dist = 19.05cm-11.8cm = 7.25cm //Create Rotation matrix for PMT holders G4RotationMatrix* WCPMTRotation = new G4RotationMatrix; @@ -586,7 +586,8 @@ void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ //G4RotationMatrix *holder_rot = holder_rotation_matrices.at(panel_nr); //Shift the PMT position outwards - G4RotationMatrix *holder_rot = WCPMTRotation; + G4RotationMatrix *holder_rot = WCPMTRotation(*WCPMTRotation); + holder_rot->rotateZ((45_90)*deg); pmt_x -= (pmt_dirx*dist_pmt_holder_lux); pmt_y -= (pmt_diry*dist_pmt_holder_lux); pmt_z -= (pmt_dirz*dist_pmt_holder_lux); @@ -614,11 +615,10 @@ void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ } else if (fabs(pmt_diry+1.) < 0.00001) { //select only ETEL PMTs for the holders (pointing downwards) - G4RotationMatrix *holder_rot = WCPMTRotation; - pmt_x += (pmt_dirx*dist_pmt_holder_etel); - pmt_y += (pmt_diry*dist_pmt_holder_etel); - pmt_z += (pmt_dirz*dist_pmt_holder_etel); + pmt_x -= (pmt_dirx*dist_pmt_holder_etel); + pmt_y -= (pmt_diry*dist_pmt_holder_etel); + pmt_z -= (pmt_dirz*dist_pmt_holder_etel); holder_x = pmt_x*cm; holder_y = (168.1-pmt_z)*cm; @@ -626,6 +626,22 @@ void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ G4cout <<"Edited ETEL Holder position ("< 0)? phi : 2*pi+phi; + //There are 8 different rotations for the top PMT holders, depending on the phi positions of the PMTs + for (int i_phi = 0; i_phi < 8; i_phi++){ + double lower_phi = i_phi*pi/4.-pi/8.; + double upper_phi = i_phi*pi/4.+pi/8.; + if (lower_phi <= phi && phi <= upper_phi) holder_rot->rotateZ((i_phi*45)*deg); + else { + lower_phi += 2*pi; + upper_phi += 2*pi; + if (lower_phi <= phi && phi <= upper_phi) holder_rot->rotateZ((i_phi*45)*deg); + } + } + //4 holder in the inner ring are rotated by 90degrees w.r.t. the holders in the outer ring + if (sqrt(holder_x*holder_x+holder_y*holder_y)<320.) holder_rot->rotateZ(90*deg); G4ThreeVector HolderPosition(holder_x,holder_y,holder_z); G4VPhysicalVolume *physicalHolder = new G4PVPlacement(holder_rot, //its rotation HolderPosition, //its position @@ -636,7 +652,7 @@ void WCSimDetectorConstruction::ConstructANNIEHoldersLUX(){ HolderID, //ID for this PMT (=channelkey in data) true); //check overlaps*/ - G4LogicalBorderSurface* ETELHolderSurface = new G4LogicalBorderSurface("LUXHolderSurface", + G4LogicalBorderSurface* ETELHolderSurface = new G4LogicalBorderSurface("ETELHolderSurface", physiWCBarrel, physicalHolder, LUXHolderOpSurface); diff --git a/src/WCSimConstructMaterials.cc b/src/WCSimConstructMaterials.cc index b14808ce7..6adfbd1a8 100644 --- a/src/WCSimConstructMaterials.cc +++ b/src/WCSimConstructMaterials.cc @@ -1078,7 +1078,7 @@ void WCSimDetectorConstruction::ConstructMaterials() //Use refractive index for material 'acrylic_white' from ratpac G4double HOLDERRFF = WCSimTuningParams->GetHolderrff(); const G4int arrEntriesHolder = 62; - G4double refHolder[] = {1.00*HOLDERRFF}; + G4double refHolder[] = {1.00*HOLDERRFF,1.00*HOLDERRFF}; G4double photEneHolder[] = {1.55*CLHEP::eV, 1.569620253*CLHEP::eV, 1.58974359*CLHEP::eV, 1.61038961*CLHEP::eV, 1.631578947*CLHEP::eV, 1.653333333*CLHEP::eV, 1.675675676*CLHEP::eV, 1.698630137*CLHEP::eV, 1.722222222*CLHEP::eV, 1.746478873*CLHEP::eV, 1.771428571*CLHEP::eV, 1.797101449*CLHEP::eV, 1.823529412*CLHEP::eV, 1.850746269*CLHEP::eV, 1.878787879*CLHEP::eV, 1.907692308*CLHEP::eV, 1.9375*CLHEP::eV, 1.968253968*CLHEP::eV, 2*CLHEP::eV, 2.032786885*CLHEP::eV, 2.066666667*CLHEP::eV, 2.101694915*CLHEP::eV, 2.137931034*CLHEP::eV, 2.175438596*CLHEP::eV, 2.214285714*CLHEP::eV, 2.254545455*CLHEP::eV, 2.296296296*CLHEP::eV, 2.339622642*CLHEP::eV, 2.384615385*CLHEP::eV, 2.431372549*CLHEP::eV, 2.48*CLHEP::eV, 2.530612245*CLHEP::eV, 2.583333333*CLHEP::eV, 2.638297872*CLHEP::eV, 2.695652174*CLHEP::eV, 2.755555556*CLHEP::eV, 2.818181818*CLHEP::eV, 2.88372093*CLHEP::eV, 2.952380952*CLHEP::eV, 3.024390244*CLHEP::eV, 3.1*CLHEP::eV, 3.179487179*CLHEP::eV, 3.263157895*CLHEP::eV, 3.351351351*CLHEP::eV, 3.444444444*CLHEP::eV, 3.542857143*CLHEP::eV, 3.647058824*CLHEP::eV, 3.757575758*CLHEP::eV, 3.875*CLHEP::eV, 4*CLHEP::eV, 4.133333333*CLHEP::eV, 4.275862069*CLHEP::eV, 4.428571429*CLHEP::eV, 4.592592593*CLHEP::eV, 4.769230769*CLHEP::eV, 4.96*CLHEP::eV, 5.166666667*CLHEP::eV, 5.391304348*CLHEP::eV, 5.636363636*CLHEP::eV, 5.904761905*CLHEP::eV, 6.2*CLHEP::eV, 20.66666667*CLHEP::eV}; G4double rIndexHolder[] = {1.485, 1.485, 1.485, 1.485, 1.486, 1.486, 1.486, 1.486, 1.487, 1.487, 1.487, 1.488, 1.488, 1.488, 1.488, 1.489, 1.489, 1.49, 1.49, 1.49, 1.491, 1.491, 1.492, 1.492, 1.493, 1.493, 1.494, 1.494, 1.495, 1.496, 1.496, 1.497, 1.498, 1.499, 1.499, 1.5, 1.501, 1.502, 1.503, 1.505, 1.506, 1.507, 1.509, 1.51, 1.512, 1.514, 1.516, 1.519, 1.521, 1.524, 1.527, 1.531, 1.534, 1.539, 1.544, 1.55, 1.556, 1.564, 1.573, 1.584, 1.597, 1.597}; From 3d54701e42be52306f6a1f3c9857912819552823 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Tue, 25 May 2021 22:01:38 +0200 Subject: [PATCH 3/9] fixed typo in WCSimConstructANNIECylinderScan --- src/WCSimConstructANNIECylinderScan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index 665815c71..8a261f033 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -587,7 +587,7 @@ void WCSimDetectorConstruction::ConstructLUXETELHolders(){ //Shift the PMT position outwards G4RotationMatrix *holder_rot = WCPMTRotation(*WCPMTRotation); - holder_rot->rotateZ((45_90)*deg); + holder_rot->rotateZ((45+90)*deg); pmt_x -= (pmt_dirx*dist_pmt_holder_lux); pmt_y -= (pmt_diry*dist_pmt_holder_lux); pmt_z -= (pmt_dirz*dist_pmt_holder_lux); From 38cb70a017b13120ea326f510cc5c09e7acb88b1 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Wed, 26 May 2021 21:08:59 +0200 Subject: [PATCH 4/9] fixed typos in ConstructMaterials & ConstructANNIECylinderScan --- src/WCSimConstructANNIECylinderScan.cc | 4 ++-- src/WCSimConstructMaterials.cc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index 8a261f033..e60e77b8d 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -586,7 +586,7 @@ void WCSimDetectorConstruction::ConstructLUXETELHolders(){ //G4RotationMatrix *holder_rot = holder_rotation_matrices.at(panel_nr); //Shift the PMT position outwards - G4RotationMatrix *holder_rot = WCPMTRotation(*WCPMTRotation); + G4RotationMatrix *holder_rot = new G4RotationMatrix(*WCPMTRotation); holder_rot->rotateZ((45+90)*deg); pmt_x -= (pmt_dirx*dist_pmt_holder_lux); pmt_y -= (pmt_diry*dist_pmt_holder_lux); @@ -626,7 +626,7 @@ void WCSimDetectorConstruction::ConstructLUXETELHolders(){ G4cout <<"Edited ETEL Holder position ("< 0)? phi : 2*pi+phi; //There are 8 different rotations for the top PMT holders, depending on the phi positions of the PMTs diff --git a/src/WCSimConstructMaterials.cc b/src/WCSimConstructMaterials.cc index 6adfbd1a8..9f50b5924 100644 --- a/src/WCSimConstructMaterials.cc +++ b/src/WCSimConstructMaterials.cc @@ -1106,19 +1106,19 @@ void WCSimDetectorConstruction::ConstructMaterials() G4double refHolderLUX[] = {1.00*LUXHOLDERRFF,1.00*LUXHOLDERRFF}; G4MaterialPropertiesTable *luxholderSurfaceMatProps= new G4MaterialPropertiesTable(); - luxholdersurfaceMatProps->AddProperty("RINDEX",photEneHolder, rIndexHolder, arrEntriesHolder); - luxholdersurfaceMatProps->AddProperty("ABSLENGTH",photEneSteel,absSteel,arrEntries); //This should probably be something else, check - luxholdersurfaceMatProps->AddProperty("REFLECTIVITY",photEneSteel, rIndexHolderLUX, arrEntries); - luxholdersurfaceMatProps->AddProperty("SPECULARLOBECONSTANT",photEneSteel,specularlobeSteel,arrEntries); //Do we need this? - luxholdersurfaceMatProps->AddProperty("SPECULARSPIKECONSTANT",photEneSteel,specularspikeSteel,arrEntries); // Do we need this? - luxholdersurfaceMatProps->AddProperty("BACKSCATTERCONSTANT",photEneSteel,backscatterSteel,arrEntries); //Do we need this? + luxholderSurfaceMatProps->AddProperty("RINDEX",photEneHolder, rIndexHolder, arrEntriesHolder); + luxholderSurfaceMatProps->AddProperty("ABSLENGTH",photEneSteel,absSteel,arrEntries); //This should probably be something else, check + luxholderSurfaceMatProps->AddProperty("REFLECTIVITY",photEneSteel, refHolderLUX, arrEntries); + luxholderSurfaceMatProps->AddProperty("SPECULARLOBECONSTANT",photEneSteel,specularlobeSteel,arrEntries); //Do we need this? + luxholderSurfaceMatProps->AddProperty("SPECULARSPIKECONSTANT",photEneSteel,specularspikeSteel,arrEntries); // Do we need this? + luxholderSurfaceMatProps->AddProperty("BACKSCATTERCONSTANT",photEneSteel,backscatterSteel,arrEntries); //Do we need this? LUXHolderOpSurface = new G4OpticalSurface("LUXHolderOpSurface"); LUXHolderOpSurface->SetType(dielectric_metal); //fine, reflection or absorption only LUXHolderOpSurface->SetModel(unified); LUXHolderOpSurface->SetFinish(ground); LUXHolderOpSurface->SetSigmaAlpha(0.1); - LUXHolderOpSurface->SetMaterialPropertiesTable(luxholdersurfaceMatProps); + LUXHolderOpSurface->SetMaterialPropertiesTable(luxholderSurfaceMatProps); // ------------- Surfaces -------------- From bf52b496ed96e0cb2a7206f034aaedb5692fa827 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Thu, 27 May 2021 14:23:19 +0200 Subject: [PATCH 5/9] make linerreff consistent with other reflectivities --- macros/tuning_parameters.mac | 8 ++++---- src/WCSimConstructMaterials.cc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/macros/tuning_parameters.mac b/macros/tuning_parameters.mac index 93a7c3d9b..a53d3e203 100644 --- a/macros/tuning_parameters.mac +++ b/macros/tuning_parameters.mac @@ -7,10 +7,10 @@ /WCSim/tuning/mieff 0.0 # ANNIE tuning parameters -/WCSim/tuning/teflonrff 0.90 -/WCSim/tuning/holderrff 0.90 -/WCSim/tuning/holderrfflux 0.70 -/WCSim/tuning/linerrff 0.90 +/WCSim/tuning/teflonrff 0.90 #default: 0.90 +/WCSim/tuning/holderrff 0.90 #default: 0.90 +/WCSim/tuning/holderrfflux 0.70 #default: 0.70 +/WCSim/tuning/linerrff 0.87 #default: 0.87 #Turning holders on (1) or off (0) /WCSim/tuning/holder 1 diff --git a/src/WCSimConstructMaterials.cc b/src/WCSimConstructMaterials.cc index 9f50b5924..ce4ac5d32 100644 --- a/src/WCSimConstructMaterials.cc +++ b/src/WCSimConstructMaterials.cc @@ -1053,7 +1053,7 @@ void WCSimDetectorConstruction::ConstructMaterials() // =========================== // re-use the properties from steel, only reflectivity is important? G4double LINERRFF = WCSimTuningParams->GetLinerrff(); - G4double refLiner[] = {0.87*LINERRFF, 0.87*LINERRFF}; // from datasheet // add possibility to tune reflectivity value a little + G4double refLiner[] = {1.00*LINERRFF, 1.00*LINERRFF}; // from datasheet // add possibility to tune reflectivity value a little G4double rIndexLiner[] = { 1.5, 1.5}; // remaining reflection type (lambertian) is the remainder from 1 From 86c62c9120cca773cbe92ffb78231499cfc3282d Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Tue, 8 Jun 2021 09:48:52 +0200 Subject: [PATCH 6/9] slightly adjusted holder positions to remove geometry overlaps --- src/WCSimConstructANNIECylinderScan.cc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index e60e77b8d..28ccfd9e1 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -254,14 +254,14 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIECylinderScan() while (!pmt_position_file.eof()){ pmt_position_file >> PMTID >> panel_nr >> pmt_x >> pmt_y >> pmt_z >> pmt_dirx >> pmt_diry >> pmt_dirz >> pmt_type; if (pmt_position_file.eof()) break; - G4cout << "Read in PMT "< 10.84cm distance + //G4double dist_pmt_holder = 10.84; //Holder is 20cm away from the front face of the ANNIE PMTs, WCSim center is 9.16cm away from front --> 10.84cm distance + G4double dist_pmt_holder = 9.84; //Reduce distance by 1cm to prevent geometry overlaps //Read in PMT positions again, and project position of holder positions from the PMT positions @@ -485,7 +487,7 @@ void WCSimDetectorConstruction::ConstructANNIEHolders(){ while (!pmt_position_file.eof()){ pmt_position_file >> HolderID >> panel_nr >> pmt_x >> pmt_y >> pmt_z >> pmt_dirx >> pmt_diry >> pmt_dirz >> pmt_type; if (pmt_position_file.eof()) break; - G4cout << "Read in PMT "<> HolderID >> panel_nr >> pmt_x >> pmt_y >> pmt_z >> pmt_dirx >> pmt_diry >> pmt_dirz >> pmt_type; if (pmt_position_file.eof()) break; - G4cout << "Read in PMT "< Date: Fri, 28 May 2021 20:45:13 +0200 Subject: [PATCH 7/9] ANNIE p2v7 (#2) * added new PMT type positionings * fix inner structure rotation rotate gdml inner structure in line with rotation of bottom cap PMTs introduced in the last commit. * minor tidy ups; change colour of particles for white background, speed up drawing in visOGLSX.mac, make WCSimWCHit::SetMaxPE static (also used in drawing only). * Added ANNIEp2v7 (PMT positions from scan), ANNIE holders, reflectivity tuning parameters * removed some cout statements authored-by: Michael Nieslony --- include/WCSimRootOptions.hh | 1 - src/WCSimConstructMaterials.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/WCSimRootOptions.hh b/include/WCSimRootOptions.hh index 1b8233cc1..207da454c 100644 --- a/include/WCSimRootOptions.hh +++ b/include/WCSimRootOptions.hh @@ -202,7 +202,6 @@ private: double Teflonrff; double Linerrff; double Holderrff; - double HolderrffLUX; bool Holder; double Tvspacing; bool Topveto; diff --git a/src/WCSimConstructMaterials.cc b/src/WCSimConstructMaterials.cc index ce4ac5d32..48111ca69 100644 --- a/src/WCSimConstructMaterials.cc +++ b/src/WCSimConstructMaterials.cc @@ -1120,6 +1120,7 @@ void WCSimDetectorConstruction::ConstructMaterials() LUXHolderOpSurface->SetSigmaAlpha(0.1); LUXHolderOpSurface->SetMaterialPropertiesTable(luxholderSurfaceMatProps); + // ------------- Surfaces -------------- // Blacksheet From cde18b29e44ac616b01391a070172958ca01f0f8 Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Mon, 14 Jun 2021 11:57:26 +0200 Subject: [PATCH 8/9] Added LUX/ETEL housings, adjusted black sheet dimensions --- include/WCSimRootOptions.hh | 1 + src/WCSimConstructANNIECylinderScan.cc | 96 +++++++++++++++++++++----- 2 files changed, 79 insertions(+), 18 deletions(-) diff --git a/include/WCSimRootOptions.hh b/include/WCSimRootOptions.hh index 207da454c..1b8233cc1 100644 --- a/include/WCSimRootOptions.hh +++ b/include/WCSimRootOptions.hh @@ -202,6 +202,7 @@ private: double Teflonrff; double Linerrff; double Holderrff; + double HolderrffLUX; bool Holder; double Tvspacing; bool Topveto; diff --git a/src/WCSimConstructANNIECylinderScan.cc b/src/WCSimConstructANNIECylinderScan.cc index 28ccfd9e1..86135daaf 100644 --- a/src/WCSimConstructANNIECylinderScan.cc +++ b/src/WCSimConstructANNIECylinderScan.cc @@ -139,6 +139,7 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIECylinderScan() G4double annulusBlackSheetRmin[2] = {(WCIDRadius), WCIDRadius}; mainAnnulusHeight = WCIDHeight -2.*WCBarrelPMTOffset; + mainAnnulusHeight += 30*cm; //WCBlackSheet needs to extend to above ETEL holders and below LUX housings to match reality G4double mainAnnulusZ[2] = {-mainAnnulusHeight/2., mainAnnulusHeight/2}; G4Polyhedra* solidWCBarrelCellBlackSheet = new G4Polyhedra("WCBarrelCellBlackSheet", @@ -158,7 +159,7 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIECylinderScan() G4VPhysicalVolume* physiWCBarrelCellBlackSheet = new G4PVPlacement(0, - G4ThreeVector(0.,0.,InnerStructureCentreOffset), + G4ThreeVector(0.,0.,InnerStructureCentreOffset-5*cm), logicWCBarrelCellBlackSheet, "WCBarrelCellBlackSheet", logicWCBarrel, @@ -375,26 +376,76 @@ void WCSimDetectorConstruction::ConstructANNIECapsSheet(G4int zflip) // G4cout << *solidWCCapBlackSheet << G4endl; } - G4LogicalVolume* logicWCCapBlackSheet = + G4LogicalVolume* logicWCCapBlackSheet; + G4SubtractionSolid* solidWCCapBlackSheetHole = (G4SubtractionSolid*) solidWCCapBlackSheet; + G4bool HOLDER = WCSimTuningParams->GetHolder(); + if (HOLDER && zflip == 1){ + //Select only ETEL + LUX PMTs and propagate their position up-/downwards to get central holder position + std::ifstream pmt_position_file("PMTPositions_Scan.txt"); + std::string next_pmt; + double pmt_x, pmt_y, pmt_z, pmt_dirx, pmt_diry, pmt_dirz; + double hole_x, hole_y, hole_z; + int panel_nr, pmt_type; + int HolderID; + while (!pmt_position_file.eof()){ + pmt_position_file >> HolderID >> panel_nr >> pmt_x >> pmt_y >> pmt_z >> pmt_dirx >> pmt_diry >> pmt_dirz >> pmt_type; + if (pmt_position_file.eof()) break; + if (fabs(pmt_diry+1.) < 0.00001) { //select only ETEL PMTs for the holders (pointing downwards) + + hole_x = pmt_x*cm; + hole_y = (168.1-pmt_z)*cm; + hole_z = ((pmt_y+14.45))*cm; + + G4Tubs *WCCap_Hole = new G4Tubs("WCCap_Hole",0.0*cm,8.414*cm,WCBlackSheetThickness+0.1*cm,0*deg,360*deg); + + //Create combined logical volume of the Box + Tube to get holder with hole (Subtraction Solid) + + solidWCCapBlackSheetHole = new G4SubtractionSolid("WCCapBlackSheetHole", + solidWCCapBlackSheetHole, + WCCap_Hole, + 0, + G4ThreeVector(hole_x,hole_y,0.)); + + + } + + } + pmt_position_file.close(); + + logicWCCapBlackSheet = + new G4LogicalVolume(solidWCCapBlackSheetHole, + G4Material::GetMaterial("Blacksheet"), + "WCCapBlackSheet", + 0,0,0); + + } else { + + logicWCCapBlackSheet = new G4LogicalVolume(solidWCCapBlackSheet, G4Material::GetMaterial("Blacksheet"), "WCCapBlackSheet", 0,0,0); + + } capAssemblyHeight = mainAnnulusHeight/2+1*mm+WCBlackSheetThickness; + G4double AssemblyHeight = capAssemblyHeight*zflip + InnerStructureCentreOffset - 5*cm; + + G4VPhysicalVolume* physiWCCapBlackSheet = new G4PVPlacement(0, - G4ThreeVector(0.,0.,capAssemblyHeight*zflip+InnerStructureCentreOffset), + G4ThreeVector(0.,0.,AssemblyHeight), logicWCCapBlackSheet, "WCCapBlackSheet", logicWCBarrel, false, 0, true); - G4cout<<"constructed cap blacksheet at height "<0)]=(capAssemblyHeight*zflip+InnerStructureCentreOffset)/10.; - + + G4cout<<"constructed cap blacksheet at height "<0)]=(AssemblyHeight)/10.; + G4LogicalBorderSurface * WaterBSBottomCapSurface = new G4LogicalBorderSurface("WaterBSCapPolySurface", physiWCBarrel,physiWCCapBlackSheet, @@ -436,7 +487,7 @@ void WCSimDetectorConstruction::ConstructANNIEHolders(){ //Not really sure about the thickness, assume 2cm thickness for now (should not be super important) //G4Box *ANNIEHolder_Box = new G4Box("ANNIEHolder_Box",10.5*cm,17.75*cm,1.*cm); G4Box *ANNIEHolder_Box = new G4Box("ANNIEHolder_Box",10.5*cm,16.75*cm,1.*cm); // Make holder slightly less wide to prevent geometry overlaps - G4Tubs *ANNIEHolder_Tube = new G4Tubs("ANNIEHolder_Tube",0.0*cm,6.0*cm,1*cm,0*deg,360*deg); + G4Tubs *ANNIEHolder_Tube = new G4Tubs("ANNIEHolder_Tube",0.0*cm,6.0*cm,1.1*cm,0*deg,360*deg); //Create combined logical volume of the Box + Tube to get holder with hole (Subtraction Solid) @@ -537,22 +588,18 @@ void WCSimDetectorConstruction::ConstructLUXETELHolders(){ //G4Box *LUXHolder_Box = new G4Box("ANNIEHolder_Box",7.62*cm,25.4*cm,0.95*cm); G4Box *LUXHolder_Box = new G4Box("ANNIEHolder_Box",7.62*cm,21.4*cm,0.95*cm); //Make holders smaller to prevent geometry overlaps - G4Tubs *LUXHolder_Tube = new G4Tubs("ANNIEHolder_Tube",0.0*cm,8.41375*cm,0.95*cm,0*deg,360*deg); + //G4Tubs *LUXHolder_Tube = new G4Tubs("LUXHolder_Tube",0.0*cm,8.41375*cm,0.95*cm,0*deg,360*deg); + //G4Tubs *LUXHolder_Tube = new G4Tubs("LUXHolder_Tube",0.0*cm,8.41375*cm,2.74*cm,0*deg,360*deg); + //Distance between holder and PMT: 5.5cm (-> 2.75cm) + 18 cm housing height (->9cm): 11.75cm + G4Tubs *LUXHolder_Tube = new G4Tubs("LUXHolder_Tube",0.0*cm,8.41375*cm,11.74*cm,0*deg,360*deg); //Create combined logical volume of the Box + Tube to get holder with hole (Subtraction Solid) - G4SubtractionSolid *solidLUXHolder = new G4SubtractionSolid("LUXHolder", - LUXHolder_Box, - LUXHolder_Tube, - 0, - G4ThreeVector(0.,0.,0.)); - - //Do the same & name it ETEL - G4SubtractionSolid *solidETELHolder = new G4SubtractionSolid("ETELHolder", + G4UnionSolid *solidLUXHolder = new G4UnionSolid("LUXHolder", LUXHolder_Box, LUXHolder_Tube, 0, - G4ThreeVector(0.,0.,0.)); + G4ThreeVector(0.,0.,-6.25*cm)); //LUX & ETEL holders are made of Schedule 80 PVC --> Use PVC as material @@ -564,13 +611,26 @@ void WCSimDetectorConstruction::ConstructLUXETELHolders(){ //G4double dist_pmt_holder_lux = 6.0; //LUX center is 11.7cm from glass front surface total distance glass surface-wings = 17.7cm, dist = 6.0cm G4double dist_pmt_holder_lux = 5.5; //Slightly reduce distance from 6 to 5.5 cm to prevent geometry overlaps + //G4Tubs *ETELHolder_Tube = new G4Tubs("ETELHolder_Tube",0.0*cm,8.41375*cm,5.62*cm,0*deg,360*deg); + //Distance ETEL holder /PMT: 11.25cm (->5.625cm) + 18cm housing height (->9cm): 14.625cm + G4Tubs *ETELHolder_Tube = new G4Tubs("ETELHolder_Tube",0.0*cm,8.41375*cm,14.62*cm,0*deg,360*deg); + G4UnionSolid *solidETELHolder = new G4UnionSolid("ETELHolder", + LUXHolder_Box, + ETELHolder_Tube, + 0, + G4ThreeVector(0.,0.,3.375*cm)); + G4LogicalVolume *logETELHolder = new G4LogicalVolume(solidETELHolder, G4Material::GetMaterial("PVC"), "WCETELHolder", 0,0,0); - G4double dist_pmt_holder_etel = 7.25; //ETEL center is 11.8cm from glass front surface, total distance from glass surface to wings is 19.05cm (7.5") -> dist = 19.05cm-11.8cm = 7.25cm + + //G4double dist_pmt_holder_etel = 7.25; //ETEL center is 11.8cm from glass front surface, total distance from glass surface to wings is 19.05cm (7.5") -> dist = 19.05cm-11.8cm = 7.25cm + G4double dist_pmt_holder_etel = 11.25; //Try to get ETEL wings above the top part of the Inner Structure--> increase distance + + //Create Rotation matrix for PMT holders G4RotationMatrix* WCPMTRotation = new G4RotationMatrix; From 4bab9a911ca0114efa5fbe42f43d429d2d5d0eea Mon Sep 17 00:00:00 2001 From: Michael Nieslony Date: Tue, 24 Aug 2021 03:50:32 -0500 Subject: [PATCH 9/9] Added ANNIE-specific SPE PMT distributions --- setupenvsfnal | 29 +- src/ConstructANNIE.cc | 2 +- src/WCSimConstructANNIECylinderScan.cc | 18 +- src/WCSimDetectorConstruction.cc | 2 +- src/WCSimPMTObject.cc | 591 +++++++++++++++++++++++-- src/WCSimWCDigitizer.cc | 8 +- 6 files changed, 605 insertions(+), 45 deletions(-) diff --git a/setupenvsfnal b/setupenvsfnal index 94ee2c624..5992da61c 100644 --- a/setupenvsfnal +++ b/setupenvsfnal @@ -6,7 +6,10 @@ setup_annie_g410() source /grid/fermiapp/products/common/etc/setup - export PRODUCTS=${PRODUCTS}:/grid/fermiapp/products/larsoft + #export PRODUCTS=${PRODUCTS}:/grid/fermiapp/products/larsoft + export PRODUCTS=${PRODUCTS}:/grid/fermiapp/products/larsoft:/cvmfs/fermilab.opensciencegrid.org/products + + source /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setup # setup genie v2_8_6d -q e9:debug @@ -14,14 +17,17 @@ setup_annie_g410() # setup genie_phyopt v2_8_6 -q dkcharmtau - setup geant4 v4_10_1_p02a -q e9:debug:qt - + #setup geant4 v4_10_1_p02a -q e9:debug:qt + # setup geant4 v4_10_1_p02a + setup geant4 v4_10_1_p03a -q debug:e10:qt } # type at the command line (but NOT in .bashrc!) setup_annie_g410 -setup cmake #sets up 2_8_8 +setup cmake v3_0_1 + +#setup cmake #sets up 2_8_8 #setup -f Linux64bit+2.6-2.12 cmake v3_6_2a # sets compiler to gcc 4.4! doesn't support c++14... #setup -f Linux64bit+2.6-2.12 -q debug:e9:nu root v6_04_06 @@ -32,7 +38,8 @@ source /grid/fermiapp/products/larsoft/root/v6_06_08/Linux64bit+2.6-2.12-e10-nu- setup -f Linux64bit+2.6-2.12 -q debug:e10:r6 genie v2_12_0a #overwrite the clhep setup set by genie -setup -f Linux64bit+2.6-2.12 -q debug:e9 clhep v2_2_0_8 +#setup -f Linux64bit+2.6-2.12 -q debug:e9 clhep v2_2_0_8 +setup clhep v2_3_2_2 -q debug:e10 setup -f Linux64bit+2.6-2.12 -q debug:e10 xerces_c v3_1_3 export XERCESROOT=/grid/fermiapp/products/larsoft/xerces_c/v3_1_3/Linux64bit+2.6-2.12-e10-debug @@ -43,7 +50,15 @@ export G4SYSTEM=Linux-g++ #export ROOT_PATH=/grid/fermiapp/products/larsoft/root/v6_04_06/source/root-6.04.06/etc/cmake export ROOT_PATH=/grid/fermiapp/products/larsoft/root/v6_06_08/Linux64bit+2.6-2.12-e10-nu-debug/cmake -export GEANT4_PATH=/grid/fermiapp/products/larsoft/geant4/v4_10_1_p02a/Linux64bit+2.6-2.12-e9-qt-debug/lib64/Geant4-10.1.2 +#export GEANT4_PATH=/grid/fermiapp/products/larsoft/geant4/v4_10_1_p02a/Linux64bit+2.6-2.12-e9-qt-debug/lib64/Geant4-10.1.2 + +#export GEANT4_MAKEFULL_PATH=/grid/fermiapp/products/larsoft/geant4/v4_10_1_p02a/source/geant4.10.01.p02 + +export GEANT4_PATH=/cvmfs/larsoft.opensciencegrid.org/products/geant4/v4_10_1_p03a/Linux64bit+2.6-2.12-e10-qt-debug/lib64/Geant4-10.1.3 +export GEANT4_MAKEFULL_PATH=/cvmfs/larsoft.opensciencegrid.org/products/geant4/v4_10_1_p03a/source/geant4.10.01.p03 -export GEANT4_MAKEFULL_PATH=/grid/fermiapp/products/larsoft/geant4/v4_10_1_p02a/source/geant4.10.01.p02 +export LIBRARY_PATH=${LIBRARY_PATH}:/cvmfs/annie.opensciencegrid.org/products/toolanalysis/v0_0_0/extras_for_oasis_build +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/cvmfs/annie.opensciencegrid.org/products/toolanalysis/v0_0_0/extras_for_oasis_build +#export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/cvmfs/larsoft.opensciencegrid.org/products/qt/v5_10_1a/Linux64bit+2.6-2.12-e15/ +export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/cvmfs/larsoft.opensciencegrid.org/products/qt/v5_4_2a/Linux64bit+2.6-2.12-e9/ diff --git a/src/ConstructANNIE.cc b/src/ConstructANNIE.cc index 92bff39fd..69a5751b5 100644 --- a/src/ConstructANNIE.cc +++ b/src/ConstructANNIE.cc @@ -188,7 +188,7 @@ G4LogicalVolume* WCSimDetectorConstruction::ConstructANNIE() // General Tank Construction //============================================================ if(WCDetectorName=="ANNIEp2v6") waterTank_log = ConstructANNIECylinder(); - else if(WCDetectorName="ANNIEp2v7") waterTank_log = ConstructANNIECylinderScan(); + else if(WCDetectorName=="ANNIEp2v7") waterTank_log = ConstructANNIECylinderScan(); else waterTank_log = ConstructCylinder(); //rotm->rotateZ(22.5*deg); G4cout << "Putting tank at y_offset = "<<-tankyoffset<<", z_offset = "<datasheet float timingResolution = 0.33 + sqrt(timingConstant/Q); // looking at SK's jitter function for 20" tubes if (timingResolution < 0.58) timingResolution=0.58; @@ -2487,7 +2748,9 @@ float PMT_R7081::HitTimeSmearing(float Q) { G4float* PMT_R7081::Getqpe() //currently uses the same as 20inch { - static G4float qpe0[501]= { + //-----------OLD------------ + /* + static G4float qpe0[501]= { // 1 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, @@ -2599,27 +2862,163 @@ G4float* PMT_R7081::Getqpe() //currently uses the same as 20inch 0.999995, 0.999995, 0.999996, 0.999996, 0.999996, 0.999996, 0.999998, 0.999999, 1.000000, 1.000000, // Dummy element for noticing if the loop reached the end of the array - 0.0 + 0.0*/ + static G4float qpe0[501]= { + //---------NEW---------- (SPE distributions from calibration data) + // 1 + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + // 2 + 0.001516, 0.003584, 0.006364, 0.010024, 0.014804, + 0.020956, 0.02876, 0.038514, 0.050476, 0.065004, + 0.082393, 0.102903, 0.126746, 0.15398, 0.184738, + 0.218973, 0.256525, 0.297118, 0.340309, 0.38567, + 0.43262, 0.48051, 0.528653, 0.576365, 0.622963, + 0.667814, 0.710358, 0.750129, 0.786843, 0.820188, + 0.850033, 0.87636, 0.899246, 0.918924, 0.935545, + 0.949379, 0.960727, 0.969901, 0.977248, 0.983019, + 0.987485, 0.990893, 0.993454, 0.995365, 0.996761, + 0.997765, 0.998478, 0.998976, 0.999322, 0.999557, + // 3 + 0.999715, 0.999819, 0.999886, 0.999929, 0.999957, + 0.999974, 0.999985, 0.999991, 0.999995, 0.999997, + 0.999998, 0.999999, 0.999999, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 4 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 5 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 6 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 7 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 8 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 9 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 10 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // Dummy element for noticing if the loop reached the end of the array + 0.0 }; return qpe0; } G4float* PMT_R7081::GetQE(){ - static G4float QE[20] = - { 0.00, .0375, .13, .195, .22, .23, .24, .24, .225, .205, - .18, .16, .14, .085, .065, .05, .035, .02, .005, 0.0}; + //-----------OLD------------- + //static G4float QE[20] = + // { 0.00, .0375, .13, .195, .22, .23, .24, .24, .225, .205, + // .18, .16, .14, .085, .065, .05, .035, .02, .005, 0.0}; + // + + //----------NEW-------------- (taken from datasheet) + static G4float QE[20] = + {0.00189, 0.0305, 0.14996, 0.2155, 0.24718, 0.25151, 0.24914, 0.24543, 0.23098, 0.22083, + 0.19482, 0.17807, 0.14079, 0.11979, 0.08181, 0.05485, 0.03713, 0.01769, 0.00816, 0.00369}; + //--------------------------- + return QE; } -G4float* PMT_R7081::GetQEWavelength(){static G4float wavelength[20] = { 280., 300., 320., 340., 360., 380., 400., 420., 440., 460., 480., 500., 520., 540., 560., 580., 600., 620., 640., 660.}; +G4float* PMT_R7081::GetQEWavelength(){ + //----------OLD------------- + //static G4float wavelength[20] = { 280., 300., 320., 340., 360., 380., 400., 420., 440., 460., 480., 500., 520., 540., 560., 580., 600., 620., 640., 660.}; + // + + //---------NEW------------- + static G4float wavelength[20] = {280., 300., 320., 341., 367., 380., 406., 419., 445., 458., 484., 496., 522., 535., 558., 579., 597., 622., 642., 659.}; + //------------------------- return wavelength;} G4float PMT_R7081::GetmaxQE(){ - const G4float maxQE = 0.24; + //---------OLD--------------- + //const G4float maxQE = 0.24; + //--------------------------- + + //---------NEW-------------- + const G4float maxQE = 0.251505538; + //-------------------------- return maxQE; } G4float PMT_R7081::GetDarkRate(){ - const G4float rate = 3.*CLHEP::kilohertz; //R-7081?? + const G4float rate = 3.*CLHEP::kilohertz; //R-7081?? //TODO: Set PMT-wise dark rate values return rate; } @@ -2644,7 +3043,8 @@ G4double PMT_R7081HQE::GetExposeHeight() {return 117.*CLHEP::mm;} G4double PMT_R7081HQE::GetRadius() {return 127.*CLHEP::mm;} G4double PMT_R7081HQE::GetPMTGlassThickness() {return 0.55*CLHEP::cm;} G4float PMT_R7081HQE::HitTimeSmearing(float Q) { - float timingConstant = 2.0; + //float timingConstant = 2.0; //old + float timingConstant = 3.4; //new float timingResolution = 0.33 + sqrt(timingConstant/Q); // looking at SK's jitter function for 20" tubes if (timingResolution < 0.58) timingResolution=0.58; @@ -2654,6 +3054,8 @@ G4float PMT_R7081HQE::HitTimeSmearing(float Q) { G4float* PMT_R7081HQE::Getqpe() //currently uses the same as 20inch { + // --------- OLD ----------- + /* static G4float qpe0[501]= { // 1 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, @@ -2766,27 +3168,164 @@ G4float* PMT_R7081HQE::Getqpe() //currently uses the same as 20inch 0.999995, 0.999995, 0.999996, 0.999996, 0.999996, 0.999996, 0.999998, 0.999999, 1.000000, 1.000000, // Dummy element for noticing if the loop reached the end of the array - 0.0 + 0.0 */ + + // ------- NEW -------- + // Assume the same SPE distribution properties as for R7081 calibration + // -------------------- + + + static G4float qpe0[501]= { + // 1 + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, + // 2 + 0.001516, 0.003584, 0.006364, 0.010024, 0.014804, + 0.020956, 0.02876, 0.038514, 0.050476, 0.065004, + 0.082393, 0.102903, 0.126746, 0.15398, 0.184738, + 0.218973, 0.256525, 0.297118, 0.340309, 0.38567, + 0.43262, 0.48051, 0.528653, 0.576365, 0.622963, + 0.667814, 0.710358, 0.750129, 0.786843, 0.820188, + 0.850033, 0.87636, 0.899246, 0.918924, 0.935545, + 0.949379, 0.960727, 0.969901, 0.977248, 0.983019, + 0.987485, 0.990893, 0.993454, 0.995365, 0.996761, + 0.997765, 0.998478, 0.998976, 0.999322, 0.999557, + // 3 + 0.999715, 0.999819, 0.999886, 0.999929, 0.999957, + 0.999974, 0.999985, 0.999991, 0.999995, 0.999997, + 0.999998, 0.999999, 0.999999, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 4 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 5 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 6 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 7 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 8 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 9 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // 10 + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, + // Dummy element for noticing if the loop reached the end of the array + 0.0 + }; return qpe0; } G4float* PMT_R7081HQE::GetQE(){ - static G4float QE[20] = - { 0.00, .0502, .2017, .2933, .3306, .3396, .3320, .3168, .2915, .2655, - .2268, .1971, .1641, .1102, .0727, .0499, .0323, .0178, .0061, 0.00}; + //-----OLD------ + //static G4float QE[20] = + // { 0.00, .0502, .2017, .2933, .3306, .3396, .3320, .3168, .2915, .2655, + // .2268, .1971, .1641, .1102, .0727, .0499, .0323, .0178, .0061, 0.00}; + //--------------- + + //------NEW----- (from datasheet) + static G4float QE[20] = + { 0.01306, 0.1406, 0.26262, 0.33535, 0.34392, 0.34501, 0.34095, 0.31911, 0.28041, 0.25956, 0.21263, + 0.19314, 0.15488, 0.10354, 0.06958, 0.04832, 0.0327, 0.02236, 0.01239, 0.00542}; + //--------- return QE; } -G4float* PMT_R7081HQE::GetQEWavelength(){static G4float wavelength[20] = { 280., 300., 320., 340., 360., 380., 400., 420., 440., 460., 480., 500., 520., 540., 560., 580., 600., 620., 640., 660.}; +G4float* PMT_R7081HQE::GetQEWavelength(){ + //---OLD------- + //static G4float wavelength[20] = { 280., 300., 320., 340., 360., 380., 400., 420., 440., 460., 480., 500., 520., 540., 560., 580., 600., 620., 640., 660.}; + //------------ + + //----NEW------ (from datasheet) + static G4float wavelength[20] = {280., 301., 317., 341., 354., 380., 393., 419., 445., 458., 484., 496., 522., 541., 560., 583., 604., 620., 640., 660.}; + //------------ + return wavelength;} G4float PMT_R7081HQE::GetmaxQE(){ - const G4float maxQE = 0.3396; // datasheet says 35%, leave as-is as it might include other factors? + //const G4float maxQE = 0.3396; // datasheet says 35%, leave as-is as it might include other factors? + const G4float maxQE = 0.34501; return maxQE; } G4float PMT_R7081HQE::GetDarkRate(){ - const G4float rate = 8*CLHEP::kilohertz; // datasheet says 8kHz + const G4float rate = 8*CLHEP::kilohertz; // datasheet says 8kHz //TODO: Set PMT wise dark rates return rate; } diff --git a/src/WCSimWCDigitizer.cc b/src/WCSimWCDigitizer.cc index 8859d5e38..ee973edda 100644 --- a/src/WCSimWCDigitizer.cc +++ b/src/WCSimWCDigitizer.cc @@ -340,8 +340,9 @@ void WCSimWCDigitizerSKI::DigitizeHits(WCSimWCDigitsCollection* WCHCPMT) { //Make digit here if(MakeDigit) { int iflag; - WCSimWCDigitizerSKI::Threshold(peSmeared,iflag); - + //WCSimWCDigitizerSKI::Threshold(peSmeared,iflag); + //G4cout <<"peSmeared: "<GetTotalPe()) { int iflag; - WCSimWCDigitizerSKI::Threshold(peSmeared,iflag); + //WCSimWCDigitizerSKI::Threshold(peSmeared,iflag); + iflag=0; if(iflag == 0) { //digitize hit peSmeared *= efficiency;