A single asymmetry plot allows to toggle the color of the theory function line by the key 't'.
This commit is contained in:
@@ -125,6 +125,7 @@ PMusrCanvas::PMusrCanvas()
|
||||
fValid = false;
|
||||
fAveragedView = false;
|
||||
fDifferenceView = false;
|
||||
fToggleColor = false;
|
||||
fCurrentPlotView = PV_DATA;
|
||||
fPreviousPlotView = PV_DATA;
|
||||
fPlotType = -1;
|
||||
@@ -1182,6 +1183,19 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
|
||||
fDataTheoryPad->SetCrosshair(0);
|
||||
}
|
||||
fMainCanvas->Update();
|
||||
} else if (x == 't') { // toggle theory color
|
||||
if (fData.size() == 1) { // only do something if there is a single data set
|
||||
if (fToggleColor) {
|
||||
fData[0].theory->SetLineColor(kRed);
|
||||
fData[0].theory->SetLineWidth(2);
|
||||
} else {
|
||||
fData[0].theory->SetLineColor(fColorList[0]);
|
||||
fData[0].theory->SetLineWidth(1);
|
||||
}
|
||||
fToggleColor = !fToggleColor;
|
||||
fDataTheoryPad->Modified();
|
||||
fMainCanvas->Update();
|
||||
}
|
||||
} else {
|
||||
fMainCanvas->Update();
|
||||
}
|
||||
@@ -2384,6 +2398,7 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
||||
fValid = false;
|
||||
fAveragedView = false;
|
||||
fDifferenceView = false;
|
||||
fToggleColor = false;
|
||||
fCurrentPlotView = PV_DATA;
|
||||
fPreviousPlotView = PV_DATA;
|
||||
fPlotType = -1;
|
||||
|
||||
@@ -244,6 +244,7 @@ class PMusrCanvas : public TObject, public TQObject
|
||||
Bool_t fValid; ///< if true, everything looks OK
|
||||
Bool_t fAveragedView; ///< tag showing that the averaged view or normal view should be presented.
|
||||
Bool_t fDifferenceView; ///< tag showing that the shown data, fourier, are the difference between data and theory
|
||||
Bool_t fToggleColor; ///< tag showing if a single histo theory is color toggled
|
||||
Int_t fCurrentPlotView; ///< tag showing what the current plot view is: data, fourier, ...
|
||||
Int_t fPreviousPlotView; ///< tag showing the previous plot view
|
||||
Int_t fPlotType; ///< plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_BNMR == beta-NMR asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR
|
||||
|
||||
Reference in New Issue
Block a user