start implementing with the deadtime correction, if present
This commit is contained in:
@@ -3334,6 +3334,20 @@ Bool_t PMsrHandler::HandleGlobalEntry(PMsrLines &lines)
|
|||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (iter->fLine.BeginsWith("deadtime-cor", TString::kIgnoreCase)) { // deadtime correction
|
||||||
|
if (tokens->GetEntries() < 2) {
|
||||||
|
error = true;
|
||||||
|
} else {
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (!str.CompareTo("no", TString::kIgnoreCase) ||
|
||||||
|
!str.CompareTo("file", TString::kIgnoreCase) ||
|
||||||
|
!str.CompareTo("estimate", TString::kIgnoreCase)) {
|
||||||
|
global.SetDeadTimeCorrection(str);
|
||||||
|
} else {
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
@@ -3931,6 +3945,27 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deadtime-correction -----------------------------------
|
||||||
|
if (iter->fLine.BeginsWith("deadtime-cor", TString::kIgnoreCase)) { // deadtime correction
|
||||||
|
|
||||||
|
runLinePresent = false; // this is needed to make sure that a run line is present before and ADDRUN is following
|
||||||
|
|
||||||
|
if (tokens->GetEntries() < 2) {
|
||||||
|
error = true;
|
||||||
|
} else {
|
||||||
|
ostr = dynamic_cast<TObjString*>(tokens->At(1));
|
||||||
|
str = ostr->GetString();
|
||||||
|
if (!str.CompareTo("no", TString::kIgnoreCase) ||
|
||||||
|
!str.CompareTo("file", TString::kIgnoreCase) ||
|
||||||
|
!str.CompareTo("estimate", TString::kIgnoreCase)) {
|
||||||
|
param.SetDeadTimeCorrection(str);
|
||||||
|
} else {
|
||||||
|
error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// xy-data -----------------------------------------------
|
// xy-data -----------------------------------------------
|
||||||
if (line.BeginsWith("xy-data", TString::kIgnoreCase)) {
|
if (line.BeginsWith("xy-data", TString::kIgnoreCase)) {
|
||||||
|
|
||||||
|
|||||||
@@ -1056,6 +1056,7 @@ class PMsrGlobalBlock {
|
|||||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||||
virtual Int_t GetPacking() { return fPacking; }
|
virtual Int_t GetPacking() { return fPacking; }
|
||||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||||
|
virtual TString GetDeadTimeCorrection() { return fDeadTimeCorrection; }
|
||||||
|
|
||||||
virtual void SetGlobalPresent(Bool_t bval) { fGlobalPresent = bval; }
|
virtual void SetGlobalPresent(Bool_t bval) { fGlobalPresent = bval; }
|
||||||
virtual void SetRRFFreq(Double_t freq, const char *unit);
|
virtual void SetRRFFreq(Double_t freq, const char *unit);
|
||||||
@@ -1069,6 +1070,7 @@ class PMsrGlobalBlock {
|
|||||||
virtual void SetFitRange(Double_t dval, UInt_t idx);
|
virtual void SetFitRange(Double_t dval, UInt_t idx);
|
||||||
virtual void SetFitRangeOffset(Int_t ival, UInt_t idx);
|
virtual void SetFitRangeOffset(Int_t ival, UInt_t idx);
|
||||||
virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
||||||
|
virtual void SetDeadTimeCorrection(TString str) { fDeadTimeCorrection = str; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Bool_t fGlobalPresent; ///< flag showing if a GLOBAL block is present at all.
|
Bool_t fGlobalPresent; ///< flag showing if a GLOBAL block is present at all.
|
||||||
@@ -1085,6 +1087,7 @@ class PMsrGlobalBlock {
|
|||||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||||
Int_t fPacking; ///< packing/rebinning
|
Int_t fPacking; ///< packing/rebinning
|
||||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||||
|
TString fDeadTimeCorrection; ///< tells if deadtime correction (pulsed sources) should be applied. Possible value: 'no' (default), 'file', 'estimate'
|
||||||
};
|
};
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
@@ -1150,6 +1153,7 @@ class PMsrRunBlock {
|
|||||||
virtual Double_t GetFitRange(UInt_t idx);
|
virtual Double_t GetFitRange(UInt_t idx);
|
||||||
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
virtual Int_t GetFitRangeOffset(UInt_t idx);
|
||||||
virtual Int_t GetPacking() { return fPacking; }
|
virtual Int_t GetPacking() { return fPacking; }
|
||||||
|
virtual TString GetDeadTimeCorrection() { return fDeadTimeCorrection; }
|
||||||
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
virtual Double_t GetEstimatedAlpha() { return fAlpha; }
|
||||||
virtual Int_t GetXDataIndex() { return fXYDataIndex[0]; }
|
virtual Int_t GetXDataIndex() { return fXYDataIndex[0]; }
|
||||||
virtual Int_t GetYDataIndex() { return fXYDataIndex[1]; }
|
virtual Int_t GetYDataIndex() { return fXYDataIndex[1]; }
|
||||||
@@ -1183,6 +1187,7 @@ class PMsrRunBlock {
|
|||||||
virtual void SetFitRange(Double_t dval, UInt_t idx);
|
virtual void SetFitRange(Double_t dval, UInt_t idx);
|
||||||
virtual void SetFitRangeOffset(Int_t ival, UInt_t idx);
|
virtual void SetFitRangeOffset(Int_t ival, UInt_t idx);
|
||||||
virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
virtual void SetPacking(Int_t ival) { fPacking = ival; }
|
||||||
|
virtual void SetDeadTimeCorrection(TString str) { fDeadTimeCorrection = str; }
|
||||||
virtual void SetXDataIndex(Int_t ival) { fXYDataIndex[0] = ival; }
|
virtual void SetXDataIndex(Int_t ival) { fXYDataIndex[0] = ival; }
|
||||||
virtual void SetYDataIndex(Int_t ival) { fXYDataIndex[1] = ival; }
|
virtual void SetYDataIndex(Int_t ival) { fXYDataIndex[1] = ival; }
|
||||||
virtual void SetXDataLabel(TString& str) { fXYDataLabel[0] = str; }
|
virtual void SetXDataLabel(TString& str) { fXYDataLabel[0] = str; }
|
||||||
@@ -1216,6 +1221,7 @@ class PMsrRunBlock {
|
|||||||
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
|
||||||
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
Double_t fAlpha; ///< estimated alpha value from F/B counts
|
||||||
Int_t fPacking; ///< packing/rebinning
|
Int_t fPacking; ///< packing/rebinning
|
||||||
|
TString fDeadTimeCorrection; ///< tells if deadtime correction (pulsed sources) should be applied. Possible value: 'no' (default), 'file', 'estimate'
|
||||||
Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
|
Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
|
||||||
TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
|
TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user