added asymmetry plot
This commit is contained in:
@ -55,7 +55,6 @@ PMusrCanvas::PMusrCanvas()
|
|||||||
fDataTheoryPad = 0;
|
fDataTheoryPad = 0;
|
||||||
fParameterTheoryPad = 0;
|
fParameterTheoryPad = 0;
|
||||||
fInfoPad = 0;
|
fInfoPad = 0;
|
||||||
fKeyboardHandlerText = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -95,11 +94,8 @@ PMusrCanvas::~PMusrCanvas()
|
|||||||
{
|
{
|
||||||
cout << "~PMusrCanvas() called" << endl;
|
cout << "~PMusrCanvas() called" << endl;
|
||||||
// cleanup
|
// cleanup
|
||||||
if (fKeyboardHandlerText) {
|
|
||||||
delete fKeyboardHandlerText;
|
|
||||||
fKeyboardHandlerText = 0;
|
|
||||||
}
|
|
||||||
if (fTitlePad) {
|
if (fTitlePad) {
|
||||||
|
fTitlePad->Clear();
|
||||||
delete fTitlePad;
|
delete fTitlePad;
|
||||||
fTitlePad = 0;
|
fTitlePad = 0;
|
||||||
}
|
}
|
||||||
@ -108,10 +104,12 @@ cout << "~PMusrCanvas() called" << endl;
|
|||||||
fDataTheoryPad = 0;
|
fDataTheoryPad = 0;
|
||||||
}
|
}
|
||||||
if (fParameterTheoryPad) {
|
if (fParameterTheoryPad) {
|
||||||
|
fParameterTheoryPad->Clear();
|
||||||
delete fParameterTheoryPad;
|
delete fParameterTheoryPad;
|
||||||
fParameterTheoryPad = 0;
|
fParameterTheoryPad = 0;
|
||||||
}
|
}
|
||||||
if (fInfoPad) {
|
if (fInfoPad) {
|
||||||
|
fInfoPad->Clear();
|
||||||
delete fInfoPad;
|
delete fInfoPad;
|
||||||
fInfoPad = 0;
|
fInfoPad = 0;
|
||||||
}
|
}
|
||||||
@ -147,7 +145,6 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
|
|||||||
fDataTheoryPad = 0;
|
fDataTheoryPad = 0;
|
||||||
fParameterTheoryPad = 0;
|
fParameterTheoryPad = 0;
|
||||||
fInfoPad = 0;
|
fInfoPad = 0;
|
||||||
fKeyboardHandlerText = 0;
|
|
||||||
|
|
||||||
// invoke canvas
|
// invoke canvas
|
||||||
TString canvasName = TString("fMainCanvas");
|
TString canvasName = TString("fMainCanvas");
|
||||||
@ -203,18 +200,6 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
|
|||||||
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fInfoPad->SetTextAlign(12); // middle, left
|
fInfoPad->SetTextAlign(12); // middle, left
|
||||||
|
|
||||||
// fKeyboardHandlerText Pad init
|
|
||||||
fDataTheoryPad->cd();
|
|
||||||
fKeyboardHandlerText = new TPaveText(0.1, 0.1, 0.3, 0.2, "rb");
|
|
||||||
if (fKeyboardHandlerText == 0) {
|
|
||||||
cout << endl << "PMusrCanvas::PMusrCanvas: **PANIC ERROR**: Couldn't invoke fKeyboardHandlerText";
|
|
||||||
cout << endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fKeyboardHandlerText->AddText("none");
|
|
||||||
fKeyboardHandlerText->Draw();
|
|
||||||
fDataTheoryPad->Modified();
|
|
||||||
|
|
||||||
fValid = true;
|
fValid = true;
|
||||||
|
|
||||||
fMainCanvas->cd();
|
fMainCanvas->cd();
|
||||||
@ -228,7 +213,6 @@ void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, In
|
|||||||
// cout << "fDataTheoryPad " << fDataTheoryPad << endl;
|
// cout << "fDataTheoryPad " << fDataTheoryPad << endl;
|
||||||
// cout << "fParameterTheoryPad " << fParameterTheoryPad << endl;
|
// cout << "fParameterTheoryPad " << fParameterTheoryPad << endl;
|
||||||
// cout << "fInfoPad " << fInfoPad << endl;
|
// cout << "fInfoPad " << fInfoPad << endl;
|
||||||
// cout << "fKeyboardHandlerText " << fKeyboardHandlerText << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -265,15 +249,7 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
|||||||
if (x == 'q') {
|
if (x == 'q') {
|
||||||
Done(0);
|
Done(0);
|
||||||
} else {
|
} else {
|
||||||
if (fKeyboardHandlerText) {
|
// do all the necessary stuff **TO BE DONE**
|
||||||
fDataTheoryPad->cd();
|
|
||||||
delete fKeyboardHandlerText;
|
|
||||||
fKeyboardHandlerText = 0;
|
|
||||||
fKeyboardHandlerText = new TPaveText(0.1, 0.1, 0.3, 0.2, "rb");
|
|
||||||
fKeyboardHandlerText->AddText(str.Data());
|
|
||||||
fKeyboardHandlerText->Draw();
|
|
||||||
fMainCanvas->cd();
|
|
||||||
}
|
|
||||||
fMainCanvas->Update();
|
fMainCanvas->Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -427,7 +403,7 @@ cout << endl;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// handle data
|
// handle data
|
||||||
HandleSingleHistoDataSet(runNo, data);
|
HandleDataSet(runNo, data);
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM:
|
case MSR_FITTYPE_ASYM:
|
||||||
data = fRunList->GetAsymmetry(runNo, PRunListCollection::kRunNo);
|
data = fRunList->GetAsymmetry(runNo, PRunListCollection::kRunNo);
|
||||||
@ -439,7 +415,7 @@ cout << endl;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// handle data
|
// handle data
|
||||||
HandleAsymmetryDataSet(runNo, data);
|
HandleDataSet(runNo, data);
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_ASYM_RRF:
|
case MSR_FITTYPE_ASYM_RRF:
|
||||||
data = fRunList->GetRRF(runNo, PRunListCollection::kRunNo);
|
data = fRunList->GetRRF(runNo, PRunListCollection::kRunNo);
|
||||||
@ -451,7 +427,7 @@ cout << endl;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// handle data
|
// handle data
|
||||||
HandleRRFDataSet(runNo, data);
|
HandleDataSet(runNo, data);
|
||||||
break;
|
break;
|
||||||
case MSR_FITTYPE_NO_MUSR:
|
case MSR_FITTYPE_NO_MUSR:
|
||||||
data = fRunList->GetNonMusr(runNo, PRunListCollection::kRunNo);
|
data = fRunList->GetNonMusr(runNo, PRunListCollection::kRunNo);
|
||||||
@ -463,7 +439,7 @@ cout << endl;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// handle data
|
// handle data
|
||||||
HandleNoneMusrDataSet(runNo, data);
|
HandleDataSet(runNo, data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fValid = false;
|
fValid = false;
|
||||||
@ -703,7 +679,7 @@ void PMusrCanvas::CleanupDataSet(PMusrCanvasDataSet &dataSet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// HandleSingleHistoDataSet
|
// HandleDataSet
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@ -711,7 +687,7 @@ void PMusrCanvas::CleanupDataSet(PMusrCanvasDataSet &dataSet)
|
|||||||
* \param runNo
|
* \param runNo
|
||||||
* \param data
|
* \param data
|
||||||
*/
|
*/
|
||||||
void PMusrCanvas::HandleSingleHistoDataSet(unsigned int runNo, PRunData *data)
|
void PMusrCanvas::HandleDataSet(unsigned int runNo, PRunData *data)
|
||||||
{
|
{
|
||||||
PMusrCanvasDataSet dataSet;
|
PMusrCanvasDataSet dataSet;
|
||||||
TH1F *dataHisto;
|
TH1F *dataHisto;
|
||||||
@ -721,7 +697,7 @@ void PMusrCanvas::HandleSingleHistoDataSet(unsigned int runNo, PRunData *data)
|
|||||||
double start;
|
double start;
|
||||||
double end;
|
double end;
|
||||||
|
|
||||||
InitDataSet(dataSet);
|
InitDataSet(dataSet);
|
||||||
|
|
||||||
// dataHisto -------------------------------------------------------------
|
// dataHisto -------------------------------------------------------------
|
||||||
// create histo specific infos
|
// create histo specific infos
|
||||||
@ -791,43 +767,3 @@ void PMusrCanvas::HandleSingleHistoDataSet(unsigned int runNo, PRunData *data)
|
|||||||
|
|
||||||
fData.push_back(dataSet);
|
fData.push_back(dataSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// HandleAsymmetryDataSet
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*
|
|
||||||
* \param runNo
|
|
||||||
* \param data
|
|
||||||
*/
|
|
||||||
void PMusrCanvas::HandleAsymmetryDataSet(unsigned int runNo, PRunData *data)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// HandleRRFDataSet
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*
|
|
||||||
* \param runNo
|
|
||||||
* \param data
|
|
||||||
*/
|
|
||||||
void PMusrCanvas::HandleRRFDataSet(unsigned int runNo, PRunData *data)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// HandleNoneMusrDataSet
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
*
|
|
||||||
* \param runNo
|
|
||||||
* \param data
|
|
||||||
*/
|
|
||||||
void PMusrCanvas::HandleNoneMusrDataSet(unsigned int runNo, PRunData *data)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -542,17 +542,17 @@ bool PRunAsymmetry::PrepareFitData(PRawRunData* runData, unsigned int histoNo[2]
|
|||||||
}
|
}
|
||||||
// 2nd check if start is within proper bounds
|
// 2nd check if start is within proper bounds
|
||||||
if ((start[i] < 0) || (start[i] > runData->fDataBin[histoNo[i]].size())) {
|
if ((start[i] < 0) || (start[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
cout << endl << "PRunAsymmetry::PrepareData(): start data bin doesn't make any sense!";
|
cout << endl << "PRunAsymmetry::PrepareFitData(): **ERROR** start data bin doesn't make any sense!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 3rd check if end is within proper bounds
|
// 3rd check if end is within proper bounds
|
||||||
if ((end[i] < 0) || (end[i] > runData->fDataBin[histoNo[i]].size())) {
|
if ((end[i] < 0) || (end[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
cout << endl << "PRunAsymmetry::PrepareData(): end data bin doesn't make any sense!";
|
cout << endl << "PRunAsymmetry::PrepareFitData(): **ERROR** end data bin doesn't make any sense!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 4th check if t0 is within proper bounds
|
// 4th check if t0 is within proper bounds
|
||||||
if ((t0[i] < 0) || (t0[i] > runData->fDataBin[histoNo[i]].size())) {
|
if ((t0[i] < 0) || (t0[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
cout << endl << "PRunAsymmetry::PrepareData(): t0 data bin doesn't make any sense!";
|
cout << endl << "PRunAsymmetry::PrepareFitData(): **ERROR** t0 data bin doesn't make any sense!";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -599,7 +599,7 @@ bool PRunAsymmetry::PrepareFitData(PRawRunData* runData, unsigned int histoNo[2]
|
|||||||
|
|
||||||
// check if packed forward and backward hist have the same size, otherwise something is wrong
|
// check if packed forward and backward hist have the same size, otherwise something is wrong
|
||||||
if (forwardPacked.fValue.size() != backwardPacked.fValue.size()) {
|
if (forwardPacked.fValue.size() != backwardPacked.fValue.size()) {
|
||||||
cout << endl << "PRunAsymmetry::PrepareData(): **PANIC ERROR**:";
|
cout << endl << "PRunAsymmetry::PrepareFitData(): **PANIC ERROR**:";
|
||||||
cout << endl << " packed forward and backward histo should have the same number of bins!";
|
cout << endl << " packed forward and backward histo should have the same number of bins!";
|
||||||
cout << endl << " however found (f/b) : " << forwardPacked.fValue.size() << "/" << backwardPacked.fValue.size();
|
cout << endl << " however found (f/b) : " << forwardPacked.fValue.size() << "/" << backwardPacked.fValue.size();
|
||||||
return false;
|
return false;
|
||||||
@ -672,5 +672,165 @@ return false;
|
|||||||
*/
|
*/
|
||||||
bool PRunAsymmetry::PrepareViewData(PRawRunData* runData, unsigned int histoNo[2])
|
bool PRunAsymmetry::PrepareViewData(PRawRunData* runData, unsigned int histoNo[2])
|
||||||
{
|
{
|
||||||
|
// transform raw histo data. This is done the following way (for details see the manual):
|
||||||
|
// first rebin the data, than calculate the asymmetry
|
||||||
|
// first get start data, end data, and t0
|
||||||
|
unsigned int start[2] = {(int)fT0s[0]-fRunInfo->fPacking*((int)fT0s[0]/fRunInfo->fPacking),
|
||||||
|
(int)fT0s[1]-fRunInfo->fPacking*((int)fT0s[1]/fRunInfo->fPacking)};
|
||||||
|
unsigned int end[2];
|
||||||
|
double t0[2] = {fT0s[0], fT0s[1]};
|
||||||
|
|
||||||
|
// make sure that there are equal number of rebinned bins in forward and backward
|
||||||
|
unsigned int noOfBins0 = (runData->fDataBin[histoNo[0]].size()-start[0])/fRunInfo->fPacking;
|
||||||
|
unsigned int noOfBins1 = (runData->fDataBin[histoNo[1]].size()-start[1])/fRunInfo->fPacking;
|
||||||
|
if (noOfBins0 > noOfBins1)
|
||||||
|
noOfBins0 = noOfBins1;
|
||||||
|
end[0] = start[0] + noOfBins0 * fRunInfo->fPacking;
|
||||||
|
end[1] = start[1] + noOfBins0 * fRunInfo->fPacking;
|
||||||
|
|
||||||
|
// check if start, end, and t0 make any sense
|
||||||
|
// 1st check if start and end are in proper order
|
||||||
|
for (unsigned int i=0; i<2; i++) {
|
||||||
|
if (end[i] < start[i]) { // need to swap them
|
||||||
|
int keep = end[i];
|
||||||
|
end[i] = start[i];
|
||||||
|
start[i] = keep;
|
||||||
|
}
|
||||||
|
// 2nd check if start is within proper bounds
|
||||||
|
if ((start[i] < 0) || (start[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
|
cout << endl << "PRunAsymmetry::PrepareViewData(): **ERROR** start data bin doesn't make any sense!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 3rd check if end is within proper bounds
|
||||||
|
if ((end[i] < 0) || (end[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
|
cout << endl << "PRunAsymmetry::PrepareViewData(): **ERROR** end data bin doesn't make any sense!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 4th check if t0 is within proper bounds
|
||||||
|
if ((t0[i] < 0) || (t0[i] > runData->fDataBin[histoNo[i]].size())) {
|
||||||
|
cout << endl << "PRunAsymmetry::PrepareViewData(): **ERROR** t0 data bin doesn't make any sense!";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// everything looks fine, hence fill packed forward and backward histo
|
||||||
|
PRunData forwardPacked;
|
||||||
|
PRunData backwardPacked;
|
||||||
|
double value = 0.0;
|
||||||
|
double error = 0.0;
|
||||||
|
// forward
|
||||||
|
for (unsigned i=start[0]; i<end[0]; i++) {
|
||||||
|
if (((i-start[0]) % fRunInfo->fPacking == 0) && (i != start[0])) { // fill data
|
||||||
|
// in order that after rebinning the fit does not need to be redone (important for plots)
|
||||||
|
// the value is normalize to per bin
|
||||||
|
value /= fRunInfo->fPacking;
|
||||||
|
forwardPacked.fValue.push_back(value);
|
||||||
|
if (value == 0.0)
|
||||||
|
forwardPacked.fError.push_back(1.0);
|
||||||
|
else
|
||||||
|
forwardPacked.fError.push_back(TMath::Sqrt(error)/fRunInfo->fPacking);
|
||||||
|
value = 0.0;
|
||||||
|
error = 0.0;
|
||||||
|
}
|
||||||
|
value += fForward[i];
|
||||||
|
error += fForwardErr[i]*fForwardErr[i];
|
||||||
|
}
|
||||||
|
// backward
|
||||||
|
for (unsigned i=start[1]; i<end[1]; i++) {
|
||||||
|
if (((i-start[1]) % fRunInfo->fPacking == 0) && (i != start[1])) { // fill data
|
||||||
|
// in order that after rebinning the fit does not need to be redone (important for plots)
|
||||||
|
// the value is normalize to per bin
|
||||||
|
value /= fRunInfo->fPacking;
|
||||||
|
backwardPacked.fValue.push_back(value);
|
||||||
|
if (value == 0.0)
|
||||||
|
backwardPacked.fError.push_back(1.0);
|
||||||
|
else
|
||||||
|
backwardPacked.fError.push_back(TMath::Sqrt(error)/fRunInfo->fPacking);
|
||||||
|
value = 0.0;
|
||||||
|
error = 0.0;
|
||||||
|
}
|
||||||
|
value += fBackward[i];
|
||||||
|
error += fBackwardErr[i]*fBackwardErr[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if packed forward and backward hist have the same size, otherwise something is wrong
|
||||||
|
if (forwardPacked.fValue.size() != backwardPacked.fValue.size()) {
|
||||||
|
cout << endl << "PRunAsymmetry::PrepareViewData(): **PANIC ERROR**:";
|
||||||
|
cout << endl << " packed forward and backward histo should have the same number of bins!";
|
||||||
|
cout << endl << " however found (f/b) : " << forwardPacked.fValue.size() << "/" << backwardPacked.fValue.size();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// form asymmetry including error propagation
|
||||||
|
double asym;
|
||||||
|
double f, b, ef, eb;
|
||||||
|
// fill data time start, and step
|
||||||
|
// data start at data_start-t0
|
||||||
|
fData.fDataTimeStart = fTimeResolution*(((double)start[0]-t0[0])+(double)fRunInfo->fPacking/2.0);
|
||||||
|
fData.fDataTimeStep = fTimeResolution*(double)fRunInfo->fPacking;
|
||||||
|
for (unsigned int i=0; i<forwardPacked.fValue.size(); i++) {
|
||||||
|
// to make the formulae more readable
|
||||||
|
f = forwardPacked.fValue[i];
|
||||||
|
b = backwardPacked.fValue[i];
|
||||||
|
ef = forwardPacked.fError[i];
|
||||||
|
eb = backwardPacked.fError[i];
|
||||||
|
// check that there are indeed bins
|
||||||
|
if (f+b != 0.0)
|
||||||
|
asym = (f-b) / (f+b);
|
||||||
|
else
|
||||||
|
asym = 0.0;
|
||||||
|
fData.fValue.push_back(asym);
|
||||||
|
// calculate the error
|
||||||
|
if (f+b != 0.0)
|
||||||
|
error = 2.0/((f+b)*(f+b))*TMath::Sqrt(b*b*ef*ef+eb*eb*f*f);
|
||||||
|
else
|
||||||
|
error = 1.0;
|
||||||
|
fData.fError.push_back(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// count the number of bins to be fitted
|
||||||
|
double time;
|
||||||
|
fNoOfFitBins=0;
|
||||||
|
for (unsigned int i=0; i<fData.fValue.size(); i++) {
|
||||||
|
time = fData.fDataTimeStart + (double)i * fData.fDataTimeStep;
|
||||||
|
if ((time >= fFitStartTime) && (time <= fFitStopTime))
|
||||||
|
fNoOfFitBins++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
forwardPacked.fValue.clear();
|
||||||
|
forwardPacked.fError.clear();
|
||||||
|
backwardPacked.fValue.clear();
|
||||||
|
backwardPacked.fError.clear();
|
||||||
|
fForward.clear();
|
||||||
|
fForwardErr.clear();
|
||||||
|
fBackward.clear();
|
||||||
|
fBackwardErr.clear();
|
||||||
|
|
||||||
|
// fill theory vector for kView
|
||||||
|
// feed the parameter vector
|
||||||
|
std::vector<double> par;
|
||||||
|
PMsrParamList *paramList = fMsrInfo->GetMsrParamList();
|
||||||
|
for (unsigned int i=0; i<paramList->size(); i++)
|
||||||
|
par.push_back((*paramList)[i].fValue);
|
||||||
|
|
||||||
|
// calculate functions
|
||||||
|
for (int i=0; i<fMsrInfo->GetNoOfFuncs(); i++) {
|
||||||
|
fFuncValues[i] = fMsrInfo->EvalFunc(fMsrInfo->GetFuncNo(i), fRunInfo->fMap, par);
|
||||||
|
}
|
||||||
|
|
||||||
|
// calculate theory
|
||||||
|
unsigned int size = runData->fDataBin[histoNo[0]].size();
|
||||||
|
double startTime = -fT0s[0]*fTimeResolution;
|
||||||
|
fData.fTheoryTimeStart = startTime;
|
||||||
|
fData.fTheoryTimeStep = fTimeResolution;
|
||||||
|
for (unsigned int i=0; i<size; i++) {
|
||||||
|
time = startTime + (double)i*fTimeResolution;
|
||||||
|
fData.fTheory.push_back(fTheory->Func(time, par, fFuncValues));
|
||||||
|
}
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
par.clear();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,8 @@ using namespace std;
|
|||||||
#define PRUN_RRF 4
|
#define PRUN_RRF 4
|
||||||
#define PRUN_NON_MUSR 8
|
#define PRUN_NON_MUSR 8
|
||||||
|
|
||||||
// muon life time in (us)
|
// muon life time in (us), see PRL99, 032001 (2007)
|
||||||
#define PMUON_LIFETIME 2.19705
|
#define PMUON_LIFETIME 2.197019
|
||||||
|
|
||||||
// accelerator cycles in (us), needed to determine proper background
|
// accelerator cycles in (us), needed to determine proper background
|
||||||
#define ACCEL_PERIOD_PSI 0.01975
|
#define ACCEL_PERIOD_PSI 0.01975
|
||||||
|
@ -118,8 +118,6 @@ class PMusrCanvas : public TObject, public TQObject
|
|||||||
TPaveText *fParameterTheoryPad;
|
TPaveText *fParameterTheoryPad;
|
||||||
TLegend *fInfoPad;
|
TLegend *fInfoPad;
|
||||||
|
|
||||||
TPaveText *fKeyboardHandlerText;
|
|
||||||
|
|
||||||
#ifndef __MAKECINT__
|
#ifndef __MAKECINT__
|
||||||
PMsrHandler *fMsrHandler;
|
PMsrHandler *fMsrHandler;
|
||||||
PRunListCollection *fRunList;
|
PRunListCollection *fRunList;
|
||||||
@ -133,10 +131,7 @@ class PMusrCanvas : public TObject, public TQObject
|
|||||||
virtual void InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
|
virtual void InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh);
|
||||||
virtual void InitDataSet(PMusrCanvasDataSet &dataSet);
|
virtual void InitDataSet(PMusrCanvasDataSet &dataSet);
|
||||||
virtual void CleanupDataSet(PMusrCanvasDataSet &dataSet);
|
virtual void CleanupDataSet(PMusrCanvasDataSet &dataSet);
|
||||||
virtual void HandleSingleHistoDataSet(unsigned int runNo, PRunData *data);
|
virtual void HandleDataSet(unsigned int runNo, PRunData *data);
|
||||||
virtual void HandleAsymmetryDataSet(unsigned int runNo, PRunData *data);
|
|
||||||
virtual void HandleRRFDataSet(unsigned int runNo, PRunData *data);
|
|
||||||
virtual void HandleNoneMusrDataSet(unsigned int runNo, PRunData *data);
|
|
||||||
|
|
||||||
ClassDef(PMusrCanvas, 1)
|
ClassDef(PMusrCanvas, 1)
|
||||||
};
|
};
|
||||||
|
@ -225,6 +225,7 @@ int main(int argc, char *argv[])
|
|||||||
// clean up
|
// clean up
|
||||||
cout << endl << "clean up canvas vector ...";
|
cout << endl << "clean up canvas vector ...";
|
||||||
for (unsigned int i=0; i<canvasVector.size(); i++) {
|
for (unsigned int i=0; i<canvasVector.size(); i++) {
|
||||||
|
// check if canvas is still there before calling the destructor **TO BE DONE**
|
||||||
canvasVector[i]->~PMusrCanvas();
|
canvasVector[i]->~PMusrCanvas();
|
||||||
}
|
}
|
||||||
canvasVector.empty();
|
canvasVector.empty();
|
||||||
|
Reference in New Issue
Block a user