Skip to content

Commit 0d04290

Browse files
committed
Remove WCSimWCDigitizer (the old digitizer) and its WCSimDarkRateMessenger constructor
1 parent 4a311ac commit 0d04290

4 files changed

Lines changed: 14 additions & 653 deletions

File tree

include/WCSimDarkRateMessenger.hh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ class G4UIdirectory;
99
class G4UIcmdWithADoubleAndUnit;
1010
class G4UIcmdWithADouble;
1111
class G4UIcmdWithAnInteger;
12-
class WCSimWCDigitizer;
1312
class WCSimWCAddDarkNoise;
1413

1514
class WCSimDarkRateMessenger: public G4UImessenger
1615
{
1716
public:
18-
WCSimDarkRateMessenger(WCSimWCDigitizer*);
1917
WCSimDarkRateMessenger(WCSimWCAddDarkNoise*);
2018

2119
~WCSimDarkRateMessenger();
@@ -25,7 +23,6 @@ public:
2523
private:
2624
void Initialize();
2725

28-
WCSimWCDigitizer* WCSimDigitize;
2926
WCSimWCAddDarkNoise* WCSimAddDarkNoise;
3027

3128
G4UIdirectory* WCSimDir;
@@ -36,7 +33,6 @@ private:
3633
G4UIcmdWithADoubleAndUnit* SetDarkHigh;
3734
G4UIcmdWithADoubleAndUnit* SetDarkWindow;
3835

39-
G4int constructor;
4036
G4String initaliseString;
4137
};
4238

include/WCSimWCDigitizer.hh

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/WCSimDarkRateMessenger.cc

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "WCSimDarkRateMessenger.hh"
2-
#include "WCSimWCDigitizer.hh"
32
#include "WCSimWCAddDarkNoise.hh"
43

54
#include "G4UIdirectory.hh"
@@ -8,21 +7,9 @@
87
#include "G4UIcmdWithADouble.hh"
98
#include "G4UIcmdWithAnInteger.hh"
109

11-
WCSimDarkRateMessenger::WCSimDarkRateMessenger(WCSimWCDigitizer* darkratepoint)
12-
: WCSimDigitize(darkratepoint)
13-
{
14-
//inform the DarkRateMessenger which constructor was called
15-
constructor = 0;
16-
17-
Initialize();
18-
}
19-
2010
WCSimDarkRateMessenger::WCSimDarkRateMessenger(WCSimWCAddDarkNoise* darkratepoint)
2111
: WCSimAddDarkNoise(darkratepoint)
2212
{
23-
//inform the DarkRateMessenger which constructor was called
24-
constructor = 1;
25-
2613
Initialize();
2714
}
2815

@@ -110,56 +97,34 @@ void WCSimDarkRateMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
11097
// Since kHz is 10e-3 for this class we must multiply by a 10e6 factor
11198
// to make default units in kHz
11299
double const conversion_to_kHz = 1000000;
113-
if(constructor == 0)
114-
WCSimDigitize->SetDarkRate(conversion_to_kHz * SetFrequency->GetNewDoubleValue(newValue));
115-
else if(constructor == 1)
116-
WCSimAddDarkNoise->SetDarkRate(conversion_to_kHz * SetFrequency->GetNewDoubleValue(newValue));
100+
WCSimAddDarkNoise->SetDarkRate(conversion_to_kHz * SetFrequency->GetNewDoubleValue(newValue));
117101
G4cout << "Setting Dark Rate " << conversion_to_kHz * SetFrequency->GetNewDoubleValue(newValue)
118102
<< initaliseString.c_str() << G4endl;
119103
}
120104
else if(command == SetConversionRate){
121-
if(constructor == 0)
122-
WCSimDigitize->SetConversion(SetConversionRate->GetNewDoubleValue(newValue));
123-
else if(constructor == 1)
124-
WCSimAddDarkNoise->SetConversion(SetConversionRate->GetNewDoubleValue(newValue));
105+
WCSimAddDarkNoise->SetConversion(SetConversionRate->GetNewDoubleValue(newValue));
125106
G4cout << "Setting Dark Rate Conversion value " << SetConversionRate->GetNewDoubleValue(newValue)
126107
<< initaliseString.c_str() << G4endl;
127108
}
128109
else if(command == SetDarkMode){
129-
if(constructor == 0){
130-
}
131-
else if(constructor == 1) {
132-
WCSimAddDarkNoise->SetDarkMode(SetDarkMode->GetNewIntValue(newValue));
133-
G4cout << "Setting DarkMode value " << SetDarkMode->GetNewIntValue(newValue)
134-
<< initaliseString.c_str() << G4endl;
135-
}
110+
WCSimAddDarkNoise->SetDarkMode(SetDarkMode->GetNewIntValue(newValue));
111+
G4cout << "Setting DarkMode value " << SetDarkMode->GetNewIntValue(newValue)
112+
<< initaliseString.c_str() << G4endl;
136113
}
137114
else if(command == SetDarkLow){
138-
if(constructor == 0){
139-
}
140-
else if(constructor == 1) {
141-
WCSimAddDarkNoise->SetDarkLow(SetDarkLow->GetNewDoubleValue(newValue));
142-
G4cout << "Setting DarkLow value " << SetDarkLow->GetNewDoubleValue(newValue)
143-
<< initaliseString.c_str() << G4endl;
144-
}
115+
WCSimAddDarkNoise->SetDarkLow(SetDarkLow->GetNewDoubleValue(newValue));
116+
G4cout << "Setting DarkLow value " << SetDarkLow->GetNewDoubleValue(newValue)
117+
<< initaliseString.c_str() << G4endl;
145118
}
146119
else if(command == SetDarkHigh){
147-
if(constructor == 0) {
148-
}
149-
else if(constructor == 1) {
150-
WCSimAddDarkNoise->SetDarkHigh(SetDarkHigh->GetNewDoubleValue(newValue));
151-
G4cout << "Setting DarkHigh value " << SetDarkHigh->GetNewDoubleValue(newValue)
152-
<< initaliseString.c_str() << G4endl;
153-
}
120+
WCSimAddDarkNoise->SetDarkHigh(SetDarkHigh->GetNewDoubleValue(newValue));
121+
G4cout << "Setting DarkHigh value " << SetDarkHigh->GetNewDoubleValue(newValue)
122+
<< initaliseString.c_str() << G4endl;
154123
}
155124
else if(command == SetDarkWindow){
156-
if(constructor == 0){
157-
}
158-
else if(constructor == 1) {
159-
WCSimAddDarkNoise->SetDarkWindow(SetDarkWindow->GetNewDoubleValue(newValue));
160-
G4cout << "Setting DarkWindow value " << SetDarkWindow->GetNewDoubleValue(newValue)
161-
<< initaliseString.c_str() << G4endl;
162-
}
125+
WCSimAddDarkNoise->SetDarkWindow(SetDarkWindow->GetNewDoubleValue(newValue));
126+
G4cout << "Setting DarkWindow value " << SetDarkWindow->GetNewDoubleValue(newValue)
127+
<< initaliseString.c_str() << G4endl;
163128
}
164129

165130
}

0 commit comments

Comments
 (0)