Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
InteractiveSimultaneousFitEditor Class Reference

Interactive editor for a multi-channel simultaneous RooFit fit. More...

#include <InteractiveSimultaneousFitEditor.hpp>

Inheritance diagram for InteractiveSimultaneousFitEditor:
Collaboration diagram for InteractiveSimultaneousFitEditor:

Public Member Functions

 InteractiveSimultaneousFitEditor (const TGWindow *parent, RooSimultaneous *sim_pdf, RooAbsData *combined_data, RooRealVar *x, const std::vector< SimEditorChannelView > &channel_views, Double_t range_low, Double_t range_high, const TString &info_label="", Bool_t fit_debug=kFALSE)
 Build the editor around a converged simultaneous model.
virtual ~InteractiveSimultaneousFitEditor ()
 Destroys the widgets and drawing objects the editor created.
virtual Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2)
 ROOT GUI message dispatch for every widget in the editor.
virtual Bool_t HandleTimer (TTimer *timer)
 Redraw tick.
virtual void CloseWindow ()
 Window-manager close. Treated as a cancel, not an accept.
Bool_t WasAccepted () const
 Whether the user accepted rather than cancelled.
Bool_t IsDone () const
 Whether the editor has finished and the loop may exit.
TTimer * GetRedrawTimer ()
 The coalescing redraw timer, for the driving event loop.
std::vector< SimEditorChannelView > * GetChannels ()
 The per-channel views, carrying the edited parameters.

Detailed Description

Interactive editor for a multi-channel simultaneous RooFit fit.

The fit and residual pads update live as parameters move. Parameters can be fixed or freed individually, bounds edited, and Refit re-runs the minimiser from the current values as starting points. The residual panel is marked with dashed guide lines at plus and minus three sigma.

Note
Normally reached through the Launch function below rather than constructed directly; the launcher owns the event loop, the batch-mode toggle and the X error-handler guard.
Warning
None of the objects passed in are owned by the editor, and all of them must outlive it. Accepting writes the edited values back into them in place.

Definition at line 109 of file InteractiveSimultaneousFitEditor.hpp.

Constructor & Destructor Documentation

◆ InteractiveSimultaneousFitEditor()

InteractiveSimultaneousFitEditor::InteractiveSimultaneousFitEditor ( const TGWindow * parent,
RooSimultaneous * sim_pdf,
RooAbsData * combined_data,
RooRealVar * x,
const std::vector< SimEditorChannelView > & channel_views,
Double_t range_low,
Double_t range_high,
const TString & info_label = "",
Bool_t fit_debug = kFALSE )

Build the editor around a converged simultaneous model.

Parameters
parentParent window, normally gClient->GetRoot().
sim_pdfThe RooSimultaneous model. Borrowed.
combined_dataCombined dataset across every channel. Borrowed.
xShared observable. Borrowed.
channel_viewsOne view per channel; each gets its own tab, and its parameters are edited in place.
range_lowInitial lower fit bound.
range_highInitial upper fit bound.
info_labelOptional annotation shown in the editor.
fit_debugkTRUE to un-suppress RooFit evaluation errors and print the seed NLL on refit, so an invalid-NLL failure names the offending PDF.

Definition at line 15 of file InteractiveSimultaneousFitEditor.cpp.

◆ ~InteractiveSimultaneousFitEditor()

InteractiveSimultaneousFitEditor::~InteractiveSimultaneousFitEditor ( )
virtual

Destroys the widgets and drawing objects the editor created.

Definition at line 132 of file InteractiveSimultaneousFitEditor.cpp.

Member Function Documentation

◆ CloseWindow()

void InteractiveSimultaneousFitEditor::CloseWindow ( )
virtual

Window-manager close. Treated as a cancel, not an accept.

Definition at line 1107 of file InteractiveSimultaneousFitEditor.cpp.

◆ GetChannels()

std::vector< SimEditorChannelView > * InteractiveSimultaneousFitEditor::GetChannels ( )
inline

The per-channel views, carrying the edited parameters.

Returns
Borrowed pointer to the editor's own vector.

Definition at line 260 of file InteractiveSimultaneousFitEditor.hpp.

Referenced by LaunchInteractiveSimultaneousFitEditor().

◆ GetRedrawTimer()

TTimer * InteractiveSimultaneousFitEditor::GetRedrawTimer ( )
inline

The coalescing redraw timer, for the driving event loop.

Returns
Borrowed pointer; the editor owns it.

Definition at line 257 of file InteractiveSimultaneousFitEditor.hpp.

Referenced by LaunchInteractiveSimultaneousFitEditor().

◆ HandleTimer()

Bool_t InteractiveSimultaneousFitEditor::HandleTimer ( TTimer * timer)
virtual

Redraw tick.

Parameter edits set a dirty flag rather than redrawing inline; this coalesces them so dragging a slider does not queue one full redraw per pixel of travel.

Parameters
timerTimer that fired.
Returns
kTRUE once handled.

Definition at line 1100 of file InteractiveSimultaneousFitEditor.cpp.

◆ IsDone()

Bool_t InteractiveSimultaneousFitEditor::IsDone ( ) const
inline

Whether the editor has finished and the loop may exit.

Definition at line 254 of file InteractiveSimultaneousFitEditor.hpp.

Referenced by LaunchInteractiveSimultaneousFitEditor().

◆ ProcessMessage()

Bool_t InteractiveSimultaneousFitEditor::ProcessMessage ( Long_t msg,
Long_t parm1,
Long_t parm2 )
virtual

ROOT GUI message dispatch for every widget in the editor.

Parameters
msgEncoded message type and subtype.
parm1Widget id that raised it.
parm2Message-specific payload.
Returns
kTRUE once handled.

Definition at line 1028 of file InteractiveSimultaneousFitEditor.cpp.

◆ WasAccepted()

Bool_t InteractiveSimultaneousFitEditor::WasAccepted ( ) const
inline

Whether the user accepted rather than cancelled.

Returns
kTRUE if Accept was pressed. Only meaningful once IsDone().

Definition at line 252 of file InteractiveSimultaneousFitEditor.hpp.

Referenced by LaunchInteractiveSimultaneousFitEditor().


The documentation for this class was generated from the following files: