Skip to content

Commit

Permalink
Tuning and Timing fixes (#20)
Browse files Browse the repository at this point in the history
* tuning and timing fixes

* changed QEratioWB to 1.025 for safety

* Update WCSimPrimaryGeneratorAction.cc

correct comment to account for change

---------

Co-authored-by: James Minock <jminock@anniegpvm02.fnal.gov>
Co-authored-by: marc1uk <marc1uk_@hotmail.com>
  • Loading branch information
3 people authored Nov 18, 2024
1 parent 7cea580 commit e2ebb1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions macros/tuning_parameters.mac
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
/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/QEratio 1.025 #default: 1.40
/WCSim/tuning/rgcffr7081 0.32 #default: 0.32
/WCSim/tuning/QEratioWB 1.00 #default: 1.00
/WCSim/tuning/QEratioWB 1.025 #default: 1.00

#Turning holders on (1) or off (0)
/WCSim/tuning/holder 1
Expand Down
2 changes: 1 addition & 1 deletion src/WCSimPrimaryGeneratorAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ void WCSimPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)

particleGun->SetParticleEnergy(keval); // !!!kinetic!!! energy
particleGun->SetParticlePosition(thevtx);
//particleGun->SetParticleTime(vtxtval); // set event time t=0 for prompt trigger.
particleGun->SetParticleTime(vtxtval); // propagate entry time from upstream GENIE (t=0 at protons on target)
particleGun->SetParticleMomentumDirection(thepdir);
particleGun->GeneratePrimaryVertex(anEvent); //anEvent provided by G4 when invoking the method
//G4cout<<"Vertex set"<<G4endl;
Expand Down
12 changes: 6 additions & 6 deletions src/WCSimWCSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ G4bool WCSimWCSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
if (pmtwiseqe && detectorElement=="tank" && replicaNumber<133 && replicaNumber>0) pmtwiseratio = vector_pmtqe.at(replicaNumber-1);

G4double QEratio = tuning->GetQERatio();
G4double QEratioWB = tuning->GetQERatioWB();
//G4double QEratioWB = tuning->GetQERatioWB();
//G4cout <<"QERatio: "<<QEratio<<", QEratioWB: "<<QEratioWB<<G4endl;
//G4cout <<"volumeName: "<<volumeName<<", replicaNumber: "<<replicaNumber<<", pmtwiseratio: "<<pmtwiseratio<<G4endl;
if (volumeName == "ANNIEp2v7-glassFaceWCPMT_R7081" || volumeName == "ANNIEp2v7-glassFaceWCPMT_R7081HQE" || volumeName == "ANNIEp2v7-glassFaceWCPMT_D784KFLB"){
ratio = QEratioWB;
} else {
ratio = QEratio;
}
//if (volumeName == "ANNIEp2v7-glassFaceWCPMT_R7081" || volumeName == "ANNIEp2v7-glassFaceWCPMT_R7081HQE" || volumeName == "ANNIEp2v7-glassFaceWCPMT_D784KFLB"){
// ratio = QEratioWB;
//} else {
ratio = QEratio;
//}
ratio *= pmtwiseratio;
//G4cout <<"ratio: "<<ratio<<G4endl;
//G4cout <<"QEratio: "<<QEratio<<G4endl;
Expand Down

0 comments on commit e2ebb1d

Please sign in to comment.