Skip to content

Commit 8e58b0f

Browse files
committed
Save the options from WCSimTuningParameters
1 parent f0b758f commit 8e58b0f

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

Diff for: WCSim.cc

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ int main(int argc,char** argv)
9191

9292

9393
WCSimRunAction* myRunAction = new WCSimRunAction(WCSimdetector);
94+
95+
//save all the options from WCSimTuningParameters, WCSimPhysicsListFactory
96+
tuningpars->SaveOptionsToOutput(myRunAction->GetRootOptions());
97+
9498
runManager->SetUserAction(myRunAction);
9599

96100
runManager->SetUserAction(new WCSimEventAction(myRunAction, WCSimdetector,

Diff for: include/WCSimRootOptions.hh

+26
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,22 @@ public:
8585
double GetSaveFailuresTime() {return SaveFailuresTime;}
8686
int GetSaveFailuresPreTriggerWindow() {return SaveFailuresPreTriggerWindow;}
8787
int GetSaveFailuresPostTriggerWindow() {return SaveFailuresPostTriggerWindow;}
88+
//WCSimTuningParameters sets
89+
void SetRayff(double iRayff) {Rayff = iRayff;}
90+
void SetBsrff(double iBsrff) {Bsrff = iBsrff;}
91+
void SetAbwff(double iAbwff) {Abwff = iAbwff;}
92+
void SetRgcff(double iRgcff) {Rgcff = iRgcff;}
93+
void SetMieff(double iMieff) {Mieff = iMieff;}
94+
void SetTvspacing(double iTvspacing) {Tvspacing = iTvspacing;}
95+
void SetTopveto(bool iTopveto) {Topveto = iTopveto;}
96+
//WCSimTuningParameters gets
97+
double GetRayff() {return Rayff;}
98+
double GetBsrff() {return Bsrff;}
99+
double GetAbwff() {return Abwff;}
100+
double GetRgcff() {return Rgcff;}
101+
double GetMieff() {return Mieff;}
102+
double GetTvspacing() {return Tvspacing;}
103+
bool GetTopveto() {return Topveto;}
88104

89105
private:
90106
//WCSimDetector*
@@ -120,6 +136,16 @@ private:
120136
double SaveFailuresTime; // ns
121137
int SaveFailuresPreTriggerWindow; // ns
122138
int SaveFailuresPostTriggerWindow; // ns
139+
140+
//WCSimTuningParameters
141+
double Rayff;
142+
double Bsrff;
143+
double Abwff;
144+
double Rgcff;
145+
double Mieff;
146+
double Tvspacing;
147+
bool Topveto;
148+
123149

124150
ClassDef(WCSimRootOptions,1) //WCSimRootEvent structure
125151
};

Diff for: include/WCSimTuningParameters.hh

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#ifndef WCSimTuningParameters_h
22
#define WCSimTuningParameters_h 1
33
#include "WCSimTuningMessenger.hh"
4+
#include "WCSimRootOptions.hh"
45
#include "globals.hh"
56

67
class WCSimTuningParameters
78
{
8-
public:
9-
WCSimTuningParameters();
10-
~WCSimTuningParameters();
9+
public:
10+
WCSimTuningParameters();
11+
~WCSimTuningParameters();
1112

1213

1314
// Setters and getters
@@ -33,7 +34,9 @@ class WCSimTuningParameters
3334
G4bool GetTopVeto() {return topveto;}
3435
void SetTopVeto(G4double tparam) {topveto=tparam;}
3536

36-
private:
37+
void SaveOptionsToOutput(WCSimRootOptions * wcopt);
38+
39+
private:
3740

3841
// The messenger
3942
WCSimTuningMessenger* TuningMessenger;

Diff for: src/WCSimRootOptions.cc

+8
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,13 @@ void WCSimRootOptions::Print()
5858
<< "\tSaveFailuresTime: " << SaveFailuresTime << " ns" << endl
5959
<< "\tSaveFailuresPreTriggerWindow: " << SaveFailuresPreTriggerWindow << " ns" << endl
6060
<< "\tSaveFailuresPostTriggerWindow: " << SaveFailuresPostTriggerWindow << " ns" << endl
61+
<< "Tuning parameters:" << endl
62+
<< "\tRayff: " << Rayff << endl
63+
<< "\tBsrff: " << Bsrff << endl
64+
<< "\tAbwff: " << Abwff << endl
65+
<< "\tRgcff: " << Rgcff << endl
66+
<< "\tMieff: " << Mieff << endl
67+
<< "\tTvspacing: " << Tvspacing << endl
68+
<< "\tTopveto: " << Topveto << endl
6169
<< endl;
6270
}

Diff for: src/WCSimTuningParameters.cc

+10
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ WCSimTuningParameters::~WCSimTuningParameters()
2727
TuningMessenger = 0;
2828
}
2929

30+
void WCSimTuningParameters::SaveOptionsToOutput(WCSimRootOptions * wcopt)
31+
{
32+
wcopt->SetRayff(rayff);
33+
wcopt->SetBsrff(bsrff);
34+
wcopt->SetAbwff(abwff);
35+
wcopt->SetRgcff(rgcff);
36+
wcopt->SetMieff(mieff);
37+
wcopt->SetTvspacing(tvspacing);
38+
wcopt->SetTopveto(topveto);
39+
}

0 commit comments

Comments
 (0)