(1) added cleaninstall to Makefile.PMusr, (2) some minor changes in PMusrCanvas (towards showing difference between data and theory), (3) a very experimental inital guess of N0's for single histogram fits which should help minuit

This commit is contained in:
nemu 2008-08-20 12:20:18 +00:00
parent d4ee3197af
commit b48ec8515e
4 changed files with 33 additions and 0 deletions

View File

@ -148,3 +148,5 @@ ifeq ($(OS),LINUX)
cp -pv $(SHLIB) $(ROOTSYS)/lib cp -pv $(SHLIB) $(ROOTSYS)/lib
cp -pv $(PMUSRPATH)/*.h $(ROOTSYS)/include cp -pv $(PMUSRPATH)/*.h $(ROOTSYS)/include
endif endif
cleaninstall: clean install

View File

@ -49,6 +49,7 @@ ClassImpQ(PMusrCanvas)
PMusrCanvas::PMusrCanvas() PMusrCanvas::PMusrCanvas()
{ {
fValid = false; fValid = false;
fDifferencePlot = false;
fPlotNumber = -1; fPlotNumber = -1;
fStyle = 0; fStyle = 0;
@ -166,6 +167,7 @@ void PMusrCanvas::CreateStyle()
void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh) void PMusrCanvas::InitMusrCanvas(const char* title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
{ {
fValid = false; fValid = false;
fDifferencePlot = false;
fMainCanvas = 0; fMainCanvas = 0;
fTitlePad = 0; fTitlePad = 0;
@ -1066,4 +1068,19 @@ void PMusrCanvas::HandleDifference()
{ {
cout << endl << ">> will show the difference between the theory and the signal, to be implemented yet. fMainCanvas name = " << fMainCanvas->GetName(); cout << endl << ">> will show the difference between the theory and the signal, to be implemented yet. fMainCanvas name = " << fMainCanvas->GetName();
cout << endl; cout << endl;
if (fDifferencePlot)
fDifferencePlot = kFALSE;
else
fDifferencePlot = kTRUE;
// difference plot wished hence feed difference data and plot them
if (fDifferencePlot) {
// check if it is necessary to calculate diff data
// get current x-range
}
// switch back to the "normal" view
if (!fDifferencePlot) {
}
} }

View File

@ -455,6 +455,19 @@ bool PRunSingleHisto::PrepareFitData()
} }
} }
// crude estimate of the initial N0 (experimental), the idea is that the integral
// over N(t) would be N0 tau if there would be no asymmetry and bkg
value = 0.0;
for (unsigned i=start; i<runData->fDataBin[histoNo].size(); i++) {
value += runData->fDataBin[histoNo][i];
}
// the factor 0.8 takes into account bkg and asymmetry uncertainties
value = value*fTimeResolution/PMUON_LIFETIME*0.8;
cout << endl << ">> histoNo = " << histoNo << ", NormParamNo = " << fRunInfo->fNormParamNo << ", N0 estimate = " << value;
// only update parameter list if fRunInfo->fNormParamNo is a parameter and not a function
if (fRunInfo->fNormParamNo < (int)fMsrInfo->GetNoOfParams())
fMsrInfo->SetMsrParamValue(fRunInfo->fNormParamNo, value);
// count the number of bins to be fitted // count the number of bins to be fitted
fNoOfFitBins=0; fNoOfFitBins=0;
double time; double time;

View File

@ -141,6 +141,7 @@ class PMusrCanvas : public TObject, public TQObject
private: private:
Bool_t fValid; Bool_t fValid;
Bool_t fDifferencePlot; /// flag showing is a difference plot is shown
Int_t fPlotNumber; Int_t fPlotNumber;
TStyle *fStyle; TStyle *fStyle;