35 #include <TObjArray.h> 36 #include <TObjString.h> 75 fHandleTag(tag), fMsrInfo(msrInfo), fRawData(rawData)
79 fRunNo =
static_cast<Int_t
>(runNo);
90 std::cerr << std::endl <<
"**SEVERE ERROR** PRunBase::PRunBase: map and/or parameter out of range in FUNCTIONS." << std::endl;
104 std::cerr << std::endl <<
"**SEVERE ERROR** PRunBase::PRunBase: Couldn't create an instance of PTheory :-(, will quit" << std::endl;
108 std::cerr << std::endl <<
"**SEVERE ERROR** PRunBase::PRunBase: Theory is not valid :-(, will quit" << std::endl;
126 for (UInt_t i=0; i<
fAddT0s.size(); i++)
144 Double_t start=0.0, end=0.0;
146 assert(fitRange.size());
148 if (fitRange.size()==1) {
149 start = fitRange[0].first;
150 end = fitRange[0].second;
153 UInt_t idx=
static_cast<UInt_t
>(
fRunNo);
154 if (idx < fitRange.size()) {
155 start = fitRange[idx].first;
156 end = fitRange[idx].second;
158 std::cerr << std::endl <<
">> PRunBase::SetFitRange(): **ERROR** msr-file run entry " <<
fRunNo <<
" not present in fit range vector.";
159 std::cerr << std::endl <<
">> Will not do anything! Please check, this shouldn't happen." << std::endl;
166 std::cerr << std::endl <<
">> PRunBase::SetFitRange(): **WARNING** start=" << start <<
" is > as end=" << end;
167 std::cerr << std::endl <<
">> Will swap them, since otherwise chisq/logLH == 0.0" << std::endl;
208 beta = 0.1102*(A-8.7);
209 }
else if ((A >= 21.0) && (A <= 50.0)) {
210 beta = 0.5842*TMath::Power(A-21.0, 0.4) + 0.07886*(A-21.0);
215 m = TMath::FloorNint((A-8.0)/(2.285*dw*TMath::Pi()));
220 Double_t alpha =
static_cast<Double_t
>(m)/2.0;
223 for (Int_t i=0; i<=m; i++) {
224 dval = TMath::Sin(wc*(i-alpha)*dt)/(TMath::Pi()*(i-alpha)*dt);
225 dval *= TMath::BesselI0(beta*TMath::Sqrt(1.0-TMath::Power((i-alpha)*dt/alpha, 2.0)))/TMath::BesselI0(beta);
229 for (UInt_t i=0; i<=static_cast<UInt_t>(m); i++) {
246 for (UInt_t i=0; i<theo->size(); i++) {
253 theoFiltered.push_back(dval);
263 theoFiltered.clear();
Bool_t fValid
flag showing if the state of the class is valid
virtual void SetFitRange(PDoublePairVector fitRange)
virtual Int_t GetNoOfFuncs()
PRunDataHandler * fRawData
holds the raw run data
std::vector< PDoubleVector > fAddT0s
all t0 bins of all addrun's of a run! The derived classes will handle it.
virtual void SetTheoryTimeStart(Double_t dval)
PMsrHandler * fMsrInfo
msr-file handler
Double_t fTimeResolution
time resolution in (us)
virtual const PDoubleVector * GetTheory()
PMetaData fMetaData
keeps the meta data from the data file like field, temperature, energy, ...
PDoubleVector fKaiserFilter
stores the Kaiser filter vector (needed for the RRF).
virtual Double_t GetTheoryTimeStep()
PRunData fData
data to be fitted, viewed, i.e. binned data
virtual Double_t GetTheoryTimeStart()
std::vector< Double_t > PDoubleVector
virtual PMsrRunList * GetMsrRunList()
virtual UInt_t GetNoOfParams()
virtual void CalculateKaiserFilterCoeff(Double_t wc, Double_t A, Double_t dw)
PDoubleVector fT0s
all t0 bins of a run! The derived classes will handle it.
EPMusrHandleTag fHandleTag
tag telling whether this is used for fit, view, ...
PMsrRunBlock * fRunInfo
run info used to filter out needed infos of a run
Double_t fFitEndTime
fit end time
std::vector< PDoublePair > PDoublePairVector
Double_t fFitStartTime
fit start time
virtual PIntVector * GetMap()
virtual void FilterTheo()
std::unique_ptr< PTheory > fTheory
theory needed to calculate chi-square
virtual void ReplaceTheory(const PDoubleVector &theo)
Int_t fRunNo
number of the run within the msr-file
virtual Bool_t CheckMapAndParamRange(UInt_t mapSize, UInt_t paramSize)
PDoubleVector fFuncValues
is keeping the values of the functions from the FUNCTIONS block