Skip to content

Commit

Permalink
Merge pull request #8 from mnieslony/tuning_factors
Browse files Browse the repository at this point in the history
Tuning factors
  • Loading branch information
marc1uk authored Oct 13, 2021
2 parents f919a6e + 61f7805 commit 9d0ca66
Show file tree
Hide file tree
Showing 14 changed files with 385 additions and 35 deletions.
4 changes: 3 additions & 1 deletion include/WCSimDetectorConstruction.hh
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ public:
G4String GetIDCollectionName(){return WCIDCollectionName;} //
G4String GetIDCollectionName2(){return WCIDCollectionName2;}


WCSimTuningParameters* Get_TuningParams(){return WCSimTuningParams;}

private:

// Tuning parameters
Expand All @@ -275,6 +276,7 @@ private:
//Glass, Cathode surface in PMTs

G4OpticalSurface * OpGlassCathodeSurface;
G4OpticalSurface * OpGlassCathodeSurface_R7081;

//Tyvek surface - jl145
G4OpticalSurface * OpWaterTySurface;
Expand Down
12 changes: 12 additions & 0 deletions include/WCSimRootOptions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,33 @@ public:
void SetBsrff(double iBsrff) {Bsrff = iBsrff;}
void SetAbwff(double iAbwff) {Abwff = iAbwff;}
void SetRgcff(double iRgcff) {Rgcff = iRgcff;}
void SetRgcffR7081(double iRgcffR7081) {RgcffR7081 = iRgcffR7081;}
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 SetQERatio(double iQERatio) {QERatio = iQERatio;}
void SetQERatioWB(double iQERatioWB) {QERatioWB = iQERatioWB;}
void SetPMTWiseQE(bool iPMTWiseQE) {PMTWiseQE = iPMTWiseQE;}
void SetTvspacing(double iTvspacing) {Tvspacing = iTvspacing;}
void SetTopveto(bool iTopveto) {Topveto = iTopveto;}
//WCSimTuningParameters gets
double GetRayff() {return Rayff;}
double GetBsrff() {return Bsrff;}
double GetAbwff() {return Abwff;}
double GetRgcff() {return Rgcff;}
double GetRgcffR7081() {return RgcffR7081;}
double GetMieff() {return Mieff;}
double GetTeflonrff() {return Teflonrff;}
double GetLinerrff() {return Linerrff;}
double GetHolderrff() {return Holderrff;}
double GetHolderrffLUX() {return HolderrffLUX;}
bool GetHolder() {return Holder;}
double GetQERatio() {return QERatio;}
double GetQERatioWB() {return QERatioWB;}
double GetPMTWiseQE() {return PMTWiseQE;}
double GetTvspacing() {return Tvspacing;}
bool GetTopveto() {return Topveto;}
//WCSimPhysicsListFactory sets
Expand Down Expand Up @@ -198,12 +206,16 @@ private:
double Bsrff;
double Abwff;
double Rgcff;
double RgcffR7081;
double Mieff;
double Teflonrff;
double Linerrff;
double Holderrff;
double HolderrffLUX;
bool Holder;
double QERatio;
double QERatioWB;
bool PMTWiseQE;
double Tvspacing;
bool Topveto;

Expand Down
4 changes: 4 additions & 0 deletions include/WCSimTuningMessenger.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ private:
G4UIcmdWithADouble* Bsrff;
G4UIcmdWithADouble* Abwff;
G4UIcmdWithADouble* Rgcff;
G4UIcmdWithADouble* RgcffR7081;
G4UIcmdWithADouble* Mieff;

//ANNIE commands
Expand All @@ -39,6 +40,9 @@ private:
G4UIcmdWithADouble* Holderrff;
G4UIcmdWithADouble* HolderrffLUX;
G4UIcmdWithABool *Holder;
G4UIcmdWithADouble* Qeratio;
G4UIcmdWithADouble* QeratioWB;
G4UIcmdWithABool *PMTwiseQE;

//For Top Veto - jl145
G4UIcmdWithADouble* TVSpacing;
Expand Down
17 changes: 17 additions & 0 deletions include/WCSimTuningParameters.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public:
G4double GetRgcff() {return rgcff;}
void SetRgcff(G4double rparam) {rgcff=rparam;}

G4double GetRgcffR7081() {return rgcffr7081;}
void SetRgcffR7081(G4double rparam) {rgcffr7081 = rparam;}

G4double GetMieff() {return mieff;}
void SetMieff(G4double rparam) {mieff=rparam;}

Expand All @@ -43,6 +46,16 @@ public:
G4bool GetHolder() {return holder;}
void SetHolder(G4double hparam) {holder=hparam;}

G4double GetQERatio() {return QEratio;}
void SetQERatio(G4double qeratio) {QEratio = qeratio;}

G4double GetQERatioWB() {return QEratioWB;}
void SetQERatioWB(G4double qeratiowb) {QEratioWB = qeratiowb;}

G4bool GetPMTwiseQE() {return PMTWiseQE;}
void SetPMTwiseQE(G4double pmtwiseqe) {PMTWiseQE = pmtwiseqe;}


//For Top Veto - jl145
G4double GetTVSpacing() {return tvspacing;}
void SetTVSpacing(G4double tparam) {tvspacing=tparam;}
Expand All @@ -64,6 +77,7 @@ private:
G4double bsrff;
G4double abwff;
G4double rgcff;
G4double rgcffr7081;
G4double mieff;

// ANNIE-specfic tuning parameters
Expand All @@ -72,6 +86,9 @@ private:
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?
G4double QEratio; //Factor by which the PMT Q.E. can be scaled
G4double QEratioWB; //Factor by which the WB PMT Q.E. can be scaled
G4bool PMTWiseQE; //Should each PMT have its own Q.E. scaling?

//For Top Veto - jl145
G4double tvspacing;
Expand Down
7 changes: 6 additions & 1 deletion include/WCSimWCSD.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class WCSimWCSD : public G4VSensitiveDetector

G4bool ProcessHits(G4Step*, G4TouchableHistory*);
void EndOfEvent(G4HCofThisEvent*);


void ReadInPMTWiseQE();

private:

G4int HCID;
Expand All @@ -27,6 +29,9 @@ class WCSimWCSD : public G4VSensitiveDetector
G4String detectorElement;
std::map<int,int> PMTHitMap; // Whether a PMT was hit already

std::vector<double> vector_pmtqe; //Individual PMT tuning factors


};

#endif
Expand Down
8 changes: 7 additions & 1 deletion macros/tuning_parameters.mac
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@
/WCSim/tuning/mieff 0.0

# ANNIE tuning parameters
/WCSim/tuning/teflonrff 0.90 #default: 0.90
/WCSim/tuning/teflonrff 1.00 #default: 1.00
/WCSim/tuning/holderrff 0.90 #default: 0.90
/WCSim/tuning/holderrfflux 0.70 #default: 0.70
/WCSim/tuning/linerrff 0.87 #default: 0.87
/WCSim/tuning/QEratio 1.40 #default: 1.40
/WCSim/tuning/rgcffr7081 0.32 #default: 0.32
/WCSim/tuning/QEratioWB 1.00 #default: 1.00

#Turning holders on (1) or off (0)
/WCSim/tuning/holder 1

#Turning PMT-wise Q.E. on (1) or off (0)
/WCSim/tuning/PMTwiseQE 1

# Parameters to set up Top Veto - jl145
# Set to "1" to turn on top veto.
/WCSim/tuning/topveto 0
Expand Down
132 changes: 132 additions & 0 deletions pmt_qe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
1.04917
1
0.798177
0.942263
1
1
1.07916
1
1.06756
1.04386
1
1
1.66074
1
1
1.02334
1.09023
1
0.946442
0.954495
1
0.854175
0.889195
0.935805
1.12105
1.71891
1.8253
0.627527
1.38071
1.1811
1.14201
1.09737
0.931037
0.787083
0.71121
1.13057
0.979524
1.62918
1.07831
1.33913
0.873306
0.919956
1.06385
0.989897
0.952358
0.988304
0.980244
0.949444
0.915575
0.864607
1.18171
1.31154
1.30086
1.04012
1.36219
1.45382
1.1095
0.999691
1.1576
1.15716
1.23937
1.27858
1.67152
1.14691
1.22981
1.27146
1.16961
1.08779
1.22566
1.08745
1.20144
1.174
1.08923
0.74365
0.886566
0.971824
1.07672
1.18623
1.05377
1.22465
1.1165
1.00162
1.03114
1.19746
1
1.39554
1.62423
1.28882
2.09995
1.38537
1.40142
0.555373
0.839273
0.963735
1.41757
1.77251
0.695767
1.31771
0.41895
1
1.29032
1.56555
1.36072
0.987516
1.92534
1.81387
1.24928
1.24579
1.01025
0.895154
0.942562
0.679465
1
1
0.522334
1.11533
0.566948
1.20963
1.35207
1.09087
1.18449
1.67963
1.44741
1.42225
0.607537
0.814002
1.11266
0.406661
0.905179
0.776474
0.762519
0.892001
Loading

0 comments on commit 9d0ca66

Please sign in to comment.