Commit 04e4cbaa authored by Cristina Cocho's avatar Cristina Cocho

Added specific frame and channelWidth properties in IN16BATSsettings for DiffDet

parent c9e1b561
......@@ -64,9 +64,12 @@ IN16bBATSSettings::IN16bBATSSettings(const string& controllerName) :
trigger.init(this, NOSAVE, "trigger");
t0.init(this, NOSAVE, "t0");
numberOfChannels.init(this, NOSAVE, "num_channels");
numberOfChannelsForDiffDet.init(this, NOSAVE, "diffdet_num_channels");
wChannel.init(this, NOSAVE, "w_channel");
wChannelForDiffDet.init(this, NOSAVE, "diffdet_w_channel");
framePercent.init(this, SAVE, "frame_percent");
framePercentForDiffDet.init(this, SAVE, "diffdet_frame_percent");
selectorType.init(this, SAVE, "selector_type");
analyserType.init(this, SAVE, "analyser_type");
lnvs.init(this, SAVE, "lnvs");
......@@ -178,9 +181,12 @@ IN16bBATSSettings::IN16bBATSSettings(const IN16bBATSSettings& controller) :
trigger.copy(this, controller.trigger);
t0.copy(this, controller.t0);
numberOfChannels.copy(this, controller.numberOfChannels);
numberOfChannelsForDiffDet.copy(this, controller.numberOfChannelsForDiffDet);
wChannel.copy(this, controller.wChannel);
wChannelForDiffDet.copy(this, controller.wChannelForDiffDet);
framePercent.copy(this, controller.framePercent);
framePercentForDiffDet.copy(this, controller.framePercentForDiffDet);
selectorType.copy(this, controller.selectorType);
analyserType.copy(this, controller.analyserType);
lnvs.copy(this, controller.lnvs);
......@@ -448,7 +454,9 @@ void IN16bBATSSettings::calculate() {
// Time between two pulses and channel width
timeBetweenPulses = bgPeriod() / 2;
float64 tFrame = (timeBetweenPulses() * framePercent()) / 100;
float64 tFrameDiffDet = (timeBetweenPulses() * framePercentForDiffDet()) / 100;
wChannel = division(tFrame, numberOfChannels());
wChannelForDiffDet = division(tFrame, numberOfChannelsForDiffDet());
// Chopper phases
float64 chosenC1C2Pos = getC1C2SlitPosition();
......@@ -517,7 +525,7 @@ void IN16bBATSSettings::calculate() {
t1Monitor = tCenMon() - (tFrame / 2);
t1SD = tCenSD() - (tFrame / 2);
t1PSD = tCenPSD() - (tFrame / 2);
t1DiffDet = tCenDiffDet() - (tFrame / 2);
t1DiffDet = tCenDiffDet() - (tFrameDiffDet / 2);
tCenMon = tCenMon() - timeBetweenPulses() * floor(t1Monitor() / timeBetweenPulses());
t1Monitor = t1Monitor() - timeBetweenPulses() * floor(t1Monitor() / timeBetweenPulses());
......@@ -574,23 +582,23 @@ void IN16bBATSSettings::setTofAcquisitionParameters() {
// We should use standard names...
if (tofControllerName == "Monitor") {
tofSettingsController->wantedDelay.set(i, t1Monitor());
tofSettingsController->wantedChannelWidth.set(i, wChannel()); //!!!
tofSettingsController->wantedNChannels.set(i, numberOfChannels()); //!!!
tofSettingsController->wantedChannelWidth.set(i, wChannel());
tofSettingsController->wantedNChannels.set(i, numberOfChannels());
} else if (tofControllerName == "Singles") {
tofSettingsController->wantedDelay.set(i, t1SD());
tofSettingsController->wantedChannelWidth.set(i, wChannel()); //!!!
tofSettingsController->wantedNChannels.set(i, numberOfChannels()); //!!!
tofSettingsController->wantedChannelWidth.set(i, wChannel());
tofSettingsController->wantedNChannels.set(i, numberOfChannels());
} else if (tofControllerName == "PSD") {
tofSettingsController->wantedDelay.set(i, t1PSD());
tofSettingsController->wantedChannelWidth.set(i, wChannel()); //!!!
tofSettingsController->wantedNChannels.set(i, numberOfChannels()); //!!!
tofSettingsController->wantedChannelWidth.set(i, wChannel());
tofSettingsController->wantedNChannels.set(i, numberOfChannels());
} else if (tofControllerName == "DiffDet") {
tofSettingsController->wantedDelay.set(i, t1DiffDet());
tofSettingsController->wantedChannelWidth.set(i, wChannel()); //!!!
tofSettingsController->wantedNChannels.set(i, numberOfChannels()); //!!!
tofSettingsController->wantedChannelWidth.set(i, wChannelForDiffDet());
tofSettingsController->wantedNChannels.set(i, numberOfChannelsForDiffDet());
}
}
}
......
......@@ -86,10 +86,13 @@ public:
Property<int32> c3c4SlitRatio;
Property<int32> trigger;
Property<float64> t0;
Property<int32> numberOfChannels; // number of channels for Monitor, PSD and SD?
Property<float64> wChannel; // width for Monitor, PSD and SD?
Property<int32> numberOfChannels; // number of channels for Monitor, PSD and SD
Property<int32> numberOfChannelsForDiffDet; // number of channels for DiffDet
Property<float64> wChannel; // channel width for Monitor, PSD and SD
Property<float64> wChannelForDiffDet; // channel width for DiffDet
Property<float64> framePercent;
Property<float64> framePercentForDiffDet;
Property<int32> selectorType;
Property<int32> analyserType;
Property<float64> lnvs; // Selector length?
......
......@@ -24,7 +24,9 @@ in16bbatssetting.triggerPrefix=Trigger
in16bbatssetting.channelWidthPrefix=Channel Width
in16bbatssetting.t0Prefix=t0
in16bbatssetting.numChannelsPrefix=Num. Channels
in16bbatssetting.numChannelsDiffDetPrefix=DiffDet Num. Channels
in16bbatssetting.framePercentPrefix=Frame
in16bbatssetting.framePercentDiffDetPrefix=DiffDet Frame
in16bbatssetting.c1c2DistancePrefix=C1-C2 distance
in16bbatssetting.c1c3DistancePrefix=C1-C3 distance
in16bbatssetting.c1c4DistancePrefix=C1-C4 distance
......@@ -78,6 +80,7 @@ in16bbatssetting.censdTimePrefix=tcen-sd
in16bbatssetting.cenpsdTimePrefix=tcen-psd
in16bbatssetting.cenDiffDetTimePrefix=tcen-DiffDet
in16bbatssetting.wChannelPrefix=Wchan
in16bbatssetting.wChannelDiffDetPrefix=DiffDet Wchan
in16bbatssetting.T1MonPrefix=T1-mon
in16bbatssetting.T1SDPrefix=T1-SD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment