KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches

Detailed Description

GUI for simple intuitive analysis of data in TTree ,.

Configure initial state of interface

In .kvrootrc file, user can configure the following options, corresponding to check boxes in the interface:

KVTreeAnalyzer.LogScale:         off
KVTreeAnalyzer.UserBinning:           off
KVTreeAnalyzer.UserWeight:       off
KVTreeAnalyzer.NewCanvas:      off
KVTreeAnalyzer.Normalize:      off
KVTreeAnalyzer.Stats:      off

Change value to 'on' if required.

Definition at line 147 of file KVTreeAnalyzer.h.

#include <KVTreeAnalyzer.h>

Inheritance diagram for KVTreeAnalyzer:

Public Member Functions

 KVTreeAnalyzer (Bool_t nogui=kTRUE)
 
 KVTreeAnalyzer (TTree *, Bool_t nogui=kFALSE)
 
virtual ~KVTreeAnalyzer ()
 Destructor.
 
void AddSelectedHistos ()
 
void AutoSaveHisto (TH1 *h)
 
 ClassDef (KVTreeAnalyzer, 5) void OpenSingleFile(TFile *file)
 
void CombineSelectionsAnd ()
 
void CombineSelectionsOr ()
 
void Copy (TObject &obj) const
 
void CurrentSelection ()
 Print the currently active selection (TEntryList set on TTree).
 
void DeleteHisto (const Char_t *expr, const Char_t *selection, const Char_t *weight)
 
void DeleteSelectedHisto ()
 Delete all currently selected histograms.
 
void DeleteSelections ()
 Delete the currently selected selection(s)
 
void DeleteThis ()
 
void DrawAsDalitz ()
 
void DrawCut (TCutG *)
 
void DrawHisto (TObject *o, Bool_t gen=kTRUE)
 
void DrawHistogram (TH1 *histo, Bool_t same=false, Bool_t logscale=false)
 
void DrawLeaf (TObject *)
 Method called when user double-clicks a leaf/alias in list.
 
void DrawLeafExpr ()
 
void EnablePROOF (Bool_t yes=kTRUE)
 
void GenerateAlias ()
 
void GenerateAllAliases (TCollection *list)
 Generate all user aliases in list which are not already defined.
 
void GenerateAllHistograms (TCollection *)
 
void GenerateAllSelections (TCollection *)
 For applying existing analysis to new data.
 
void GenerateConstantXSecSelections (const char *name, Double_t sigmaTot, Double_t sigmaBin)
 
void GenerateSelection ()
 
TNamedGetAlias (const Char_t *expr)
 
TChainGetChain () const
 
Long64_t GetEntriesInCurrentSelection () const
 
TH1GetHisto (const Char_t *expr, const Char_t *selection, const Char_t *weight="")
 
KVHistogramGetHistoByTitle (const Char_t *title)
 
TH1GetHistogram (const Char_t *name) const
 Return histogram with given name.
 
const KVListGetHistoList () const
 
TListGetHistosByData (const Char_t *expr)
 
TListGetHistosBySelection (const Char_t *expr)
 
void GetHistosFromFile (TFile *file, const KVUnownedList &keys)
 
Int_t GetNx ()
 
Int_t GetNxD ()
 
Int_t GetNxF ()
 
Int_t GetNy ()
 
Int_t GetNyD ()
 
Bool_t GetOrderedDalitz ()
 
TEntryListGetSelection (const Char_t *)
 Look for selection in list of selections.
 
const charGetWeight ()
 
Double_t GetXmax ()
 
Double_t GetXmaxF ()
 
Double_t GetXmin ()
 
Double_t GetXminF ()
 
Double_t GetYmax ()
 
Double_t GetYmin ()
 
void GUIClosed ()
 Called when graphical window is closed.
 
void HandleHistoFileMenu (Int_t)
 
void HandleOptionsMenu (Int_t opt)
 
void HandleSelectionsMenu (Int_t)
 
void HistoAddition (Double_t c1=1, Double_t c2=1)
 
void HistoFileMenu_Apply ()
 
void HistoFileMenu_OpenFriend ()
 
void HistoSelectionChanged ()
 Method called when user histo selection changes in GUI histogram list.
 
Bool_t IsCurrentSelection (const Char_t *sel)
 
Bool_t IsPROOFEnabled () const
 
Bool_t IsPROOFEnabledForSelections () const
 
void LeafChanged ()
 
void MakeAbsoluteIPScale (const char *name, Double_t sigmaTot)
 
TH1MakeHisto (const Char_t *expr, const Char_t *selection, Int_t nX, Int_t nY=0, const Char_t *weight="", Double_t xmin=-1, Double_t xmax=-1, Double_t ymin=-1, Double_t ymax=-1)
 
TH1MakeIntHisto (const Char_t *expr, const Char_t *selection, Int_t Xmin, Int_t Xmax, const Char_t *weight="")
 
Bool_t MakeSelection (const Char_t *selection)
 
void OpenAnyFile (const Char_t *filepath)
 
void OpenAnyFriendFile (const Char_t *filepath)
 
void OpenChain (const TString &treename, const TString &treetitle, const TSeqCollection *files)
 
void OpenGUI ()
 Launch the GUI (unless fNoGui=kTRUE in which case this does nothing)
 
void ReadFromFile (const Char_t *filename)
 open a previously saved analysis session.
 
void ReadFromFile (TFile *f)
 open a previously saved analysis session.
 
void ReapplyAnyFile (const Char_t *filepath)
 
TH1RemakeHisto (TH1 *h, const Char_t *expr, const Char_t *weight="")
 
void Save ()
 
void SaveAs (const char *filename="", Option_t *option="") const
 
void SelectionChanged ()
 Method called whenever the selected selection in the GUI list changes.
 
void SetAlias (const Char_t *name, const Char_t *expr)
 
void SetApplySelection (Bool_t yes=kTRUE)
 
void SetAutoSaveHisto (Bool_t yes=kTRUE)
 
void SetDrawLog (Bool_t yes=kTRUE)
 
void SetDrawOption (Option_t *option="")
 
void SetDrawSame (Bool_t yes=kTRUE)
 
void SetNewCanvas (Bool_t yes=kTRUE)
 
void SetNormHisto (Bool_t yes=kTRUE)
 
void SetNormHistoEvents (Bool_t yes=kTRUE)
 
void SetProfileHisto (Bool_t yes=kTRUE)
 
void SetSelection (const Char_t *)
 
void SetSelection (TObject *)
 
void SetStatsHisto (Bool_t yes=kTRUE)
 
void SetTree (TTree *t)
 Connects a TChain for analysis.
 
void SetTreeFileName (TTree *t)
 
void SetUpHistoAutoSave ()
 
void SetUserBinning (Bool_t ub)
 
void SetUserWeight (Bool_t uw)
 
void ShowAliases ()
 
void ShowHistos ()
 
void ShowSelections ()
 
void ShowVariables ()
 
void UpdateEntryLists ()
 regenerate entry lists for all selections
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
void Clear (Option_t *option="") override
 
TObjectClone (const char *newname="") const override
 
Int_t Compare (const TObject *obj) const override
 
void Copy (TObject &named) const override
 
virtual void FillBuffer (char *&buffer)
 
const char * GetName () const override
 
const char * GetTitle () const override
 
ULong_t Hash () const override
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 
TNamedoperator= (const TNamed &rhs)
 
void Print (Option_t *option="") const override
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *vp)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, void *vp)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetUniqueID (UInt_t uid)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 

Static Public Member Functions

static KVTreeAnalyzerGetAnalyzer (const Char_t *title)
 
static KVListGetListOfAnalyzers ()
 
static KVTreeAnalyzerOpenFile (const Char_t *filename, Bool_t nogui=kFALSE)
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 

Private Types

enum  {
  MH_OPEN_FILE , MH_OPEN_CHAIN , MH_ADD_FRIEND , MH_SAVE_FILE ,
  MH_SAVE , MH_CLOSE , MH_QUIT , OPT_PROOF ,
  MH_APPLY_ANALYSIS , SEL_COMB_AND , SEL_COMB_OR , SEL_UPDATE ,
  SEL_DELETE , SEL_GEN_CONST_XSEC
}
 

Private Member Functions

void AddCut (TCutG *)
 
void AddHisto (TH1 *)
 
void AddSelection (TEntryList *)
 
void AnalysisSaveCheck ()
 
bool DefineUserBinning ()
 
bool DefineUserBinning1F ()
 
bool DefineUserBinningD ()
 
bool DefineWeight ()
 
void FillLeafList ()
 
void GenerateHistoTitle (TString &title, const Char_t *exp, const Char_t *sel, const Char_t *weight="")
 
const Char_tget_leaf_type_name (const TNamed *l)
 
const TGMainFrameGetMainWindow () const
 
double GetTreeMaximum (const TString &leafname)
 
double GetTreeMinimum (const TString &leafname)
 
void HistoFileMenu_Open ()
 Open a previous analysis session.
 
void HistoFileMenu_Save ()
 
void init ()
 Default initialization.
 
Bool_t MethodNotCalled ()
 
void OpenChain ()
 Open a file or files containing TTrees to analyse.
 
void ReconnectTree ()
 Backwards compatibility: to read old analysis files.
 
void ResetMethodCalled ()
 
void SetAnalysisModifiedSinceLastSave (Bool_t)
 
void SetEntryList (TEntryList *)
 
void SetRelativePathToAnalysisFile (const Char_t *p)
 

Private Attributes

KVList fAliasList
 list of TTree aliases
 
Int_t fAliasNumber
 used for automatic naming of TTree aliases
 
Bool_t fAnalysisModifiedSinceLastSave
 
TString fAnalysisSaveDir
 
Bool_t fApplySelection
 =kTRUE: apply current selection to existing histogram
 
TString fAutoSaveDir
 directory for autosaving histos
 
Bool_t fAutoSaveHisto
 =kTRUE: on draw, generate image file of current displayed histo
 
TString fAutoSaveType
 filetype for autosaving histos
 
TChainfChain
 the analyzed TTree or TChain
 
Bool_t fDeletedByGUIClose
 
Bool_t fDrawLog
 =kTRUE: draw histograms with log-Y (1-D) or log-Z (2-D) scale
 
TString fDrawOption
 
Bool_t fDrawSame
 =kTRUE: draw histograms in same plot
 
KVList fHistolist
 list of generated histograms
 
Int_t fHistoNumber
 used for automatic naming of histograms
 
TString fLeafExpr
 
KVList fLeafList
 clones of leaves in TChain
 
TGMainFramefMain_histolist
 GUI for handling histograms.
 
TGGroupFramefMain_leaflist
 GUI for access to TTree leaves and aliases.
 
TGGroupFramefMain_selectionlist
 GUI for handling selections.
 
TGMenuBarfMenuBar
 
TGLayoutHintsfMenuBarItemLayout
 
TGPopupMenufMenuFile
 
TGPopupMenufMenuSelections
 
Bool_t fMethodCalled
 allows to know if context menu methods are called
 
Bool_t fNewCanvas
 =kTRUE: draw each histogram in a new canvas
 
Bool_t fNoGui
 =kTRUE if no graphical interface is required
 
Bool_t fNormHisto
 =kTRUE: generate normalised histograms (normalise to integral of histo)
 
Bool_t fNormHistoEvents
 =kTRUE: generate normalised histograms (normalise to number of events)
 
Int_t fNx
 
Int_t fNxD
 
Int_t fNxF
 
Int_t fNy
 
Int_t fNyD
 
TGPopupMenufOptionMenu
 
bool fOrderedDalitz
 
Bool_t fProfileHisto
 
Bool_t fPROOFEnabled
 
TString fRelativePathToAnalysisFile
 
Int_t fSameColorIndex
 
TString fSaveAnalysisFileName
 
TGPopupMenufSelCombMenu
 
TListfSelectedHistos
 
KVListfSelectedLeaves
 
TListfSelectedSelections
 
Int_t fSelectionNumber
 used for automatic naming of selections
 
KVUniqueNameList fSelections
 list of TEntryList user selections
 
TGPopupMenufSelGenerate
 
Bool_t fStatsHisto
 =kTRUE: display histo stats box
 
TTreefTree
 for backwards compatibility
 
TString fTreeFileName
 name of file containing analyzed TTree
 
TString fTreeName
 name of analyzed TTree
 
Bool_t fUserBinning
 
Bool_t fUserWeight
 
TString fWeight
 
TNamedfXLeaf
 
Double_t fXmax
 
Double_t fXmaxF
 
Double_t fXmin
 
Double_t fXminF
 
TNamedfYLeaf
 
Double_t fYmax
 
Double_t fYmin
 
TNamedfZLeaf
 
TGTextEntryG_alias_text
 
TGTextButtonG_fit1
 
TGTextButtonG_fit2
 
TGTextButtonG_fit3
 
TGTextButtonG_fitGG1
 
TGTextButtonG_fitGG2
 
TGTextButtonG_fitGG3
 
TGPictureButtonG_histo_add
 
TGCheckButtonG_histo_app_sel
 
TGCheckButtonG_histo_autosave
 
TGCheckButtonG_histo_bin
 
TGPictureButtonG_histo_del
 
TGComboBoxG_histo_draw_option
 
TGCheckButtonG_histo_log
 
TGCheckButtonG_histo_new_can
 
TGCheckButtonG_histo_norm
 
TGCheckButtonG_histo_norm_events
 
TGCheckButtonG_histo_prof
 
TGCheckButtonG_histo_same
 
TGCheckButtonG_histo_stats
 
TGCheckButtonG_histo_weight
 
KVListViewG_histolist
 GUI list of histograms.
 
TGLabelG_ip_histo
 
TGPictureButtonG_leaf_draw
 
TGLabelG_leaf_expr
 
KVListViewG_leaflist
 GUI list of TTree leaves and aliases.
 
TGTextButtonG_make_ip_scale
 
TGTextEntryG_make_ip_selection
 
TGStatusBarG_selection_status
 status bar in selections GUI
 
TGTextEntryG_selection_text
 
KVListViewG_selectionlist
 GUI list of TEntryList selections.
 
TH1HistoAddResult
 
TH1HistoToAdd1
 
TH1HistoToAdd2
 

Static Private Attributes

static KVListfgAnalyzerList = new KVList(0)
 static list of all analyzers in memory
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MH_OPEN_FILE 
MH_OPEN_CHAIN 
MH_ADD_FRIEND 
MH_SAVE_FILE 
MH_SAVE 
MH_CLOSE 
MH_QUIT 
OPT_PROOF 
MH_APPLY_ANALYSIS 
SEL_COMB_AND 
SEL_COMB_OR 
SEL_UPDATE 
SEL_DELETE 
SEL_GEN_CONST_XSEC 

Definition at line 201 of file KVTreeAnalyzer.h.

Constructor & Destructor Documentation

◆ KVTreeAnalyzer() [1/2]

KVTreeAnalyzer::KVTreeAnalyzer ( Bool_t  nogui = kTRUE)

Default constructor - used when loading from a file. The 'nogui' option (default=kTRUE) controls whether or not to launch the graphical interface

Definition at line 108 of file KVTreeAnalyzer.cpp.

◆ KVTreeAnalyzer() [2/2]

KVTreeAnalyzer::KVTreeAnalyzer ( TTree t,
Bool_t  nogui = kFALSE 
)

Initialize analyzer for a given TTree. (in fact we re-open the tree using a TChain) If 'nogui' option (default=kFALSE) is kTRUE we do not launch the graphical interface.

Definition at line 127 of file KVTreeAnalyzer.cpp.

◆ ~KVTreeAnalyzer()

KVTreeAnalyzer::~KVTreeAnalyzer ( )
virtual

Destructor.

Definition at line 146 of file KVTreeAnalyzer.cpp.

Member Function Documentation

◆ AddCut()

void KVTreeAnalyzer::AddCut ( TCutG c)
private

Adds histogram to internal list of user histograms and updates GUI display

Definition at line 1157 of file KVTreeAnalyzer.cpp.

◆ AddHisto()

void KVTreeAnalyzer::AddHisto ( TH1 h)
private

Adds histogram to internal list of user histograms and updates GUI display

Definition at line 1125 of file KVTreeAnalyzer.cpp.

◆ AddSelectedHistos()

void KVTreeAnalyzer::AddSelectedHistos ( )

Called when G_histo_add button is pressed There should be 2 histograms in fSelectedHistos We assume that both are of same type and have same binning etc.

Definition at line 2722 of file KVTreeAnalyzer.cpp.

◆ AddSelection()

void KVTreeAnalyzer::AddSelection ( TEntryList e)
private

Adds selection to internal list of user histograms and updates GUI display

Definition at line 1141 of file KVTreeAnalyzer.cpp.

◆ AnalysisSaveCheck()

void KVTreeAnalyzer::AnalysisSaveCheck ( )
private

if analysis has been modified since last save, open an invite to ask if user wants to save with current default filename

Definition at line 608 of file KVTreeAnalyzer.cpp.

◆ AutoSaveHisto()

void KVTreeAnalyzer::AutoSaveHisto ( TH1 h)

Save currently displayed histo as an image file If 'same' checkbox is ticked, we use the same filename as used for the first histogram

Definition at line 3286 of file KVTreeAnalyzer.cpp.

◆ ClassDef()

KVTreeAnalyzer::ClassDef ( KVTreeAnalyzer  ,
 
)

◆ CombineSelectionsAnd()

void KVTreeAnalyzer::CombineSelectionsAnd ( )

void MakeIPScale(); void GenerateIPSelection();

Method called when user hits 'combine selections' button in selections GUI. Generates new selection which is the intersection (logical AND) of the currently selected selections.

Definition at line 1669 of file KVTreeAnalyzer.cpp.

◆ CombineSelectionsOr()

void KVTreeAnalyzer::CombineSelectionsOr ( )

Method called when user hits 'combine selections' button in selections GUI. Generates new selection which is the intersection (logical AND) of the currently selected selections.

Definition at line 1699 of file KVTreeAnalyzer.cpp.

◆ Copy()

void KVTreeAnalyzer::Copy ( TObject obj) const
virtual

This method copies the current state of 'this' object into 'obj' You should add here any member variables, for example: (supposing a member variable KVTreeAnalyzer::fToto) CastedObj.fToto = fToto; or CastedObj.SetToto( GetToto() );

Reimplemented from TObject.

Definition at line 167 of file KVTreeAnalyzer.cpp.

◆ CurrentSelection()

void KVTreeAnalyzer::CurrentSelection ( )

Print the currently active selection (TEntryList set on TTree).

Definition at line 526 of file KVTreeAnalyzer.cpp.

◆ DefineUserBinning()

bool KVTreeAnalyzer::DefineUserBinning ( )
private

Definition at line 1877 of file KVTreeAnalyzer.cpp.

◆ DefineUserBinning1F()

bool KVTreeAnalyzer::DefineUserBinning1F ( )
private

Definition at line 1898 of file KVTreeAnalyzer.cpp.

◆ DefineUserBinningD()

bool KVTreeAnalyzer::DefineUserBinningD ( )
private

Definition at line 1915 of file KVTreeAnalyzer.cpp.

◆ DefineWeight()

bool KVTreeAnalyzer::DefineWeight ( )
private

Open dialogue box for user to fill required weight for histo

returns false if Cancel button is pressed

Definition at line 2263 of file KVTreeAnalyzer.cpp.

◆ DeleteHisto()

void KVTreeAnalyzer::DeleteHisto ( const Char_t expr,
const Char_t selection,
const Char_t weight 
)

Definition at line 2677 of file KVTreeAnalyzer.cpp.

◆ DeleteSelectedHisto()

void KVTreeAnalyzer::DeleteSelectedHisto ( )

Delete all currently selected histograms.

Definition at line 2698 of file KVTreeAnalyzer.cpp.

◆ DeleteSelections()

void KVTreeAnalyzer::DeleteSelections ( )

Delete the currently selected selection(s)

Definition at line 1727 of file KVTreeAnalyzer.cpp.

◆ DeleteThis()

void KVTreeAnalyzer::DeleteThis ( )
inline

Definition at line 329 of file KVTreeAnalyzer.h.

◆ DrawAsDalitz()

void KVTreeAnalyzer::DrawAsDalitz ( )

Definition at line 2143 of file KVTreeAnalyzer.cpp.

◆ DrawCut()

void KVTreeAnalyzer::DrawCut ( TCutG cut)

Definition at line 1318 of file KVTreeAnalyzer.cpp.

◆ DrawHisto()

void KVTreeAnalyzer::DrawHisto ( TObject obj,
Bool_t  gen = kTRUE 
)

Method called when a user double-clicks a histogram in the GUI list.

  • if histogram is already displayed in active pad and if the pad also contains a graphical contour (TCutG) object, we use the contour to define a new data selection (TEntryList) which is added to the internal list.
  • if 'reapply selection' is activated and if the current active selection is not the same as that used to generate the histogram, we generate a new histogram displaying the same variables but with the current selection.
  • if 'draw same' is active we superimpose the (1-D) spectrum on the existing plot with a different colour and add it to the automatically generated legend which is also displayed in the plot
  • if 'new canvas' is active the histogram is displayed in a new KVCanvas
  • in all cases when a histogram is displayed the log/linear scale of Y (1-D) or Z (2-D) axis is automatically adjusted according to the 'log scale' check box

Definition at line 1476 of file KVTreeAnalyzer.cpp.

◆ DrawHistogram()

void KVTreeAnalyzer::DrawHistogram ( TH1 histo,
Bool_t  same = false,
Bool_t  logscale = false 
)

Definition at line 1377 of file KVTreeAnalyzer.cpp.

◆ DrawLeaf()

void KVTreeAnalyzer::DrawLeaf ( TObject obj)

Method called when user double-clicks a leaf/alias in list.

Definition at line 2284 of file KVTreeAnalyzer.cpp.

◆ DrawLeafExpr()

void KVTreeAnalyzer::DrawLeafExpr ( )

Method called when user hits 'draw' button in TTree GUI. If only one leaf/alias is selected, this actually calls DrawLeaf.

Definition at line 2016 of file KVTreeAnalyzer.cpp.

◆ EnablePROOF()

void KVTreeAnalyzer::EnablePROOF ( Bool_t  yes = kTRUE)

Definition at line 2385 of file KVTreeAnalyzer.cpp.

◆ FillLeafList()

void KVTreeAnalyzer::FillLeafList ( )
private

Fills the GUI list with the names of all leaves in the TTree and any friend TTrees and all aliases defined by the user

Definition at line 557 of file KVTreeAnalyzer.cpp.

◆ GenerateAlias()

void KVTreeAnalyzer::GenerateAlias ( )

Method called when user hits 'return' in TTree leaf/alias GUI text-box Generates a new alias using the expression in the text-box.

Definition at line 1649 of file KVTreeAnalyzer.cpp.

◆ GenerateAllAliases()

void KVTreeAnalyzer::GenerateAllAliases ( TCollection list)

Generate all user aliases in list which are not already defined.

Definition at line 3151 of file KVTreeAnalyzer.cpp.

◆ GenerateAllHistograms()

void KVTreeAnalyzer::GenerateAllHistograms ( TCollection list)

For every histogram in the list, we generate histograms with the same binning for the same expression, selection and weight if they don't already exist

Definition at line 3339 of file KVTreeAnalyzer.cpp.

◆ GenerateAllSelections()

void KVTreeAnalyzer::GenerateAllSelections ( TCollection list)

For applying existing analysis to new data.

We take the title of every object in 'list' and generate the corresponding selection if it does not already exist

Definition at line 3318 of file KVTreeAnalyzer.cpp.

◆ GenerateConstantXSecSelections()

void KVTreeAnalyzer::GenerateConstantXSecSelections ( const char name,
Double_t  sigmaTot,
Double_t  sigmaBin 
)

◆ GenerateHistoTitle()

void KVTreeAnalyzer::GenerateHistoTitle ( TString title,
const Char_t expr,
const Char_t selection,
const Char_t weight = "" 
)
private

PRIVATE utility method Encodes the histogram title for the desired expression and an optional selection. The expression and selection should be valid TTreeFormula strings (i.e. they use TTree leaves and/or alias names) If there is already an active selection (TEntryList set on TTree) then the corresponding selection expression will also be included in the title. The format of the resulting title string is one of the following:

"expr1[:expr2]" "expr1[:expr2] {selection}" "expr1[:expr2] {active selection}" "expr1[:expr2] {(active selection) && (selection)}"

If histogram is weighted, the weight is added such as:

"expr1:expr2 [weight] {active selection}"

Definition at line 211 of file KVTreeAnalyzer.cpp.

◆ GenerateSelection()

void KVTreeAnalyzer::GenerateSelection ( )

Method called when user hits 'return' in selection GUI text-box Takes expression from text-box and generates the corresponding selection which is added to the GUI list of selections.

Definition at line 1632 of file KVTreeAnalyzer.cpp.

◆ get_leaf_type_name()

const Char_t * KVTreeAnalyzer::get_leaf_type_name ( const TNamed l)
private

Definition at line 2004 of file KVTreeAnalyzer.cpp.

◆ GetAlias()

TNamed * KVTreeAnalyzer::GetAlias ( const Char_t expr)
inline

Definition at line 367 of file KVTreeAnalyzer.h.

◆ GetAnalyzer()

static KVTreeAnalyzer * KVTreeAnalyzer::GetAnalyzer ( const Char_t title)
inlinestatic

Definition at line 570 of file KVTreeAnalyzer.h.

◆ GetChain()

TChain * KVTreeAnalyzer::GetChain ( ) const
inline

Definition at line 585 of file KVTreeAnalyzer.h.

◆ GetEntriesInCurrentSelection()

Long64_t KVTreeAnalyzer::GetEntriesInCurrentSelection ( ) const

Return number of entries (events) in the currently active selection, or the number of entries in the analysed TTree/TChain if no selection active

Definition at line 542 of file KVTreeAnalyzer.cpp.

◆ GetHisto()

TH1 * KVTreeAnalyzer::GetHisto ( const Char_t expr,
const Char_t selection,
const Char_t weight = "" 
)

Definition at line 2647 of file KVTreeAnalyzer.cpp.

◆ GetHistoByTitle()

KVHistogram * KVTreeAnalyzer::GetHistoByTitle ( const Char_t title)

Definition at line 2668 of file KVTreeAnalyzer.cpp.

◆ GetHistogram()

TH1 * KVTreeAnalyzer::GetHistogram ( const Char_t name) const

Return histogram with given name.

Definition at line 411 of file KVTreeAnalyzer.cpp.

◆ GetHistoList()

const KVList * KVTreeAnalyzer::GetHistoList ( ) const
inline

Definition at line 342 of file KVTreeAnalyzer.h.

◆ GetHistosByData()

TList * KVTreeAnalyzer::GetHistosByData ( const Char_t expr)

fill and return TList with histos containing the given data which may be 1D ("mult", "zmax", etc.) or 2D ("zmax:mult") DELETE LIST AFTER USE

Definition at line 2606 of file KVTreeAnalyzer.cpp.

◆ GetHistosBySelection()

TList * KVTreeAnalyzer::GetHistosBySelection ( const Char_t expr)

fill and return TList with histos using the given selection criteria DELETE LIST AFTER USE

Definition at line 2628 of file KVTreeAnalyzer.cpp.

◆ GetHistosFromFile()

void KVTreeAnalyzer::GetHistosFromFile ( TFile file,
const KVUnownedList keys 
)

Definition at line 3044 of file KVTreeAnalyzer.cpp.

◆ GetListOfAnalyzers()

static KVList * KVTreeAnalyzer::GetListOfAnalyzers ( )
inlinestatic

Definition at line 566 of file KVTreeAnalyzer.h.

◆ GetMainWindow()

const TGMainFrame * KVTreeAnalyzer::GetMainWindow ( ) const
inlineprivate

Definition at line 192 of file KVTreeAnalyzer.h.

◆ GetNx()

Int_t KVTreeAnalyzer::GetNx ( )
inline

void FitGum1(); void FitGum2(); void FitGum3(); void FitGausGum1(); void FitGausGum2(); void FitGausGum3();

Definition at line 496 of file KVTreeAnalyzer.h.

◆ GetNxD()

Int_t KVTreeAnalyzer::GetNxD ( )
inline

Definition at line 521 of file KVTreeAnalyzer.h.

◆ GetNxF()

Int_t KVTreeAnalyzer::GetNxF ( )
inline

Definition at line 534 of file KVTreeAnalyzer.h.

◆ GetNy()

Int_t KVTreeAnalyzer::GetNy ( )
inline

Definition at line 500 of file KVTreeAnalyzer.h.

◆ GetNyD()

Int_t KVTreeAnalyzer::GetNyD ( )
inline

Definition at line 525 of file KVTreeAnalyzer.h.

◆ GetOrderedDalitz()

Bool_t KVTreeAnalyzer::GetOrderedDalitz ( )
inline

Definition at line 529 of file KVTreeAnalyzer.h.

◆ GetSelection()

TEntryList * KVTreeAnalyzer::GetSelection ( const Char_t selection)

Look for selection in list of selections.

Definition at line 2376 of file KVTreeAnalyzer.cpp.

◆ GetTreeMaximum()

double KVTreeAnalyzer::GetTreeMaximum ( const TString leafname)
private
Returns
maximum value of given TTree variable, taking into account any current selection (TEntryList).
Parameters
leafnamename of TTree variable
Note
TTree::GetMaximum() is supposed to do exactly the same, but strangely ignores the selection.

Definition at line 1936 of file KVTreeAnalyzer.cpp.

◆ GetTreeMinimum()

double KVTreeAnalyzer::GetTreeMinimum ( const TString leafname)
private
Returns
minimum value of given TTree variable, taking into account any current selection (TEntryList).
Parameters
leafnamename of TTree variable
Note
TTree::GetMinimum() is supposed to do exactly the same, but strangely ignores the selection.

Definition at line 1972 of file KVTreeAnalyzer.cpp.

◆ GetWeight()

const char * KVTreeAnalyzer::GetWeight ( )
inline

Definition at line 547 of file KVTreeAnalyzer.h.

◆ GetXmax()

Double_t KVTreeAnalyzer::GetXmax ( )
inline

Definition at line 508 of file KVTreeAnalyzer.h.

◆ GetXmaxF()

Double_t KVTreeAnalyzer::GetXmaxF ( )
inline

Definition at line 542 of file KVTreeAnalyzer.h.

◆ GetXmin()

Double_t KVTreeAnalyzer::GetXmin ( )
inline

Definition at line 504 of file KVTreeAnalyzer.h.

◆ GetXminF()

Double_t KVTreeAnalyzer::GetXminF ( )
inline

Definition at line 538 of file KVTreeAnalyzer.h.

◆ GetYmax()

Double_t KVTreeAnalyzer::GetYmax ( )
inline

Definition at line 516 of file KVTreeAnalyzer.h.

◆ GetYmin()

Double_t KVTreeAnalyzer::GetYmin ( )
inline

Definition at line 512 of file KVTreeAnalyzer.h.

◆ GUIClosed()

void KVTreeAnalyzer::GUIClosed ( )

Called when graphical window is closed.

Definition at line 1110 of file KVTreeAnalyzer.cpp.

◆ HandleHistoFileMenu()

void KVTreeAnalyzer::HandleHistoFileMenu ( Int_t  id)

Definition at line 2804 of file KVTreeAnalyzer.cpp.

◆ HandleOptionsMenu()

void KVTreeAnalyzer::HandleOptionsMenu ( Int_t  opt)

Definition at line 2885 of file KVTreeAnalyzer.cpp.

◆ HandleSelectionsMenu()

void KVTreeAnalyzer::HandleSelectionsMenu ( Int_t  id)

Definition at line 2853 of file KVTreeAnalyzer.cpp.

◆ HistoAddition()

void KVTreeAnalyzer::HistoAddition ( Double_t  c1 = 1,
Double_t  c2 = 1 
)

Definition at line 2761 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_Apply()

void KVTreeAnalyzer::HistoFileMenu_Apply ( )

Definition at line 2996 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_Open()

void KVTreeAnalyzer::HistoFileMenu_Open ( )
private

Open a previous analysis session.

Definition at line 2905 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_OpenFriend()

void KVTreeAnalyzer::HistoFileMenu_OpenFriend ( )

Definition at line 2930 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_Save()

void KVTreeAnalyzer::HistoFileMenu_Save ( )
private

Definition at line 3017 of file KVTreeAnalyzer.cpp.

◆ HistoSelectionChanged()

void KVTreeAnalyzer::HistoSelectionChanged ( )

Method called when user histo selection changes in GUI histogram list.

Definition at line 2344 of file KVTreeAnalyzer.cpp.

◆ init()

void KVTreeAnalyzer::init ( )
private

Default initialization.

Definition at line 59 of file KVTreeAnalyzer.cpp.

◆ IsCurrentSelection()

Bool_t KVTreeAnalyzer::IsCurrentSelection ( const Char_t sel)

Returns kTRUE if "sel" corresponds to current active selection (i.e. entry list of TTree)

Definition at line 1562 of file KVTreeAnalyzer.cpp.

◆ IsPROOFEnabled()

Bool_t KVTreeAnalyzer::IsPROOFEnabled ( ) const
inline

Definition at line 394 of file KVTreeAnalyzer.h.

◆ IsPROOFEnabledForSelections()

Bool_t KVTreeAnalyzer::IsPROOFEnabledForSelections ( ) const
inline

Generation of TEntryList with PROOF only works from 20/11/2015 onwards Variable in .kvrootrc file KVTreeAnalyzer.PROOFSelections: on controls whether to use it or not (default: no/off/false)

Definition at line 398 of file KVTreeAnalyzer.h.

◆ LeafChanged()

void KVTreeAnalyzer::LeafChanged ( )

Method called whenever the leaf/alias selection in the TTree GUI list changes. Updates the names of the leaves/aliases displayed next to the 'draw' button.

Definition at line 1795 of file KVTreeAnalyzer.cpp.

◆ MakeAbsoluteIPScale()

void KVTreeAnalyzer::MakeAbsoluteIPScale ( const char name,
Double_t  sigmaTot 
)

◆ MakeHisto()

TH1 * KVTreeAnalyzer::MakeHisto ( const Char_t expr,
const Char_t selection,
Int_t  nX,
Int_t  nY = 0,
const Char_t weight = "",
Double_t  xmin = -1,
Double_t  xmax = -1,
Double_t  ymin = -1,
Double_t  ymax = -1 
)

Create and fill a new histogram with the desired expression (expr="expr1[:expr2]" etc.) with the given selection (selection="" if no selection required). Any currently active selection (TEntryList set on TTree) will also be applied. The new histogram is not drawn but added to the internal list of histograms (see method AddHisto).

Histograms are automatically named 'h1', 'h2', etc. in order of creation. Histogram title is generated with method GenerateHistoTitle. Number of bins on X (and Y for a 2-D spectrum) are given. Axis limits are automatically adjusted to data unless given.

For 2-D spectra the initial drawing option is set to "COL"

If normalisation of spectra is required (fNormHisto = kTRUE) the histogram bin contents are divided by the integral (sum of weights).

Definition at line 275 of file KVTreeAnalyzer.cpp.

◆ MakeIntHisto()

TH1 * KVTreeAnalyzer::MakeIntHisto ( const Char_t expr,
const Char_t selection,
Int_t  Xmin,
Int_t  Xmax,
const Char_t weight = "" 
)

Like MakeHisto but only used for 1-D spectra of integer variables. The number of bins is Xmax-Xmin+1 and bins are defined over [x-0.5,x+0.5] for all values of x.

Histograms are automatically named 'Ih1', 'Ih2', etc. in order of creation.

Definition at line 352 of file KVTreeAnalyzer.cpp.

◆ MakeSelection()

Bool_t KVTreeAnalyzer::MakeSelection ( const Char_t selection)

Generate a new user-selection (TEntryList) of events in the TTree according to the given selection expression (valid TTreeFormula expression using TTree leaf and/or alias names). The new selection is not applied immediately but added to the internal list of selections (see method AddSelection).

If there is already an active selection (TEntryList set on TTree) this will generate the composite selection, {(active selection) && (selection)}. The selection's title will then be in the following format:

"[(active selection) && ](selection)"

TEntryList objects are automatically named 'el1', 'el2', etc. in order of creation.

Definition at line 437 of file KVTreeAnalyzer.cpp.

◆ MethodNotCalled()

Bool_t KVTreeAnalyzer::MethodNotCalled ( )
inlineprivate

Definition at line 299 of file KVTreeAnalyzer.h.

◆ OpenAnyFile()

void KVTreeAnalyzer::OpenAnyFile ( const Char_t filepath)

assuming filepath is the URL of a ROOT file containing a previously-saved analysis, open it and open the KVTreeAnalyzer object stored in it

Definition at line 3092 of file KVTreeAnalyzer.cpp.

◆ OpenAnyFriendFile()

void KVTreeAnalyzer::OpenAnyFriendFile ( const Char_t filepath)

assuming filepath is the URL of a ROOT file, open it and add the first TTree found in file as a friend of the current TTree Any histograms in the file are added to the list of histograms

Definition at line 3485 of file KVTreeAnalyzer.cpp.

◆ OpenChain() [1/2]

void KVTreeAnalyzer::OpenChain ( )
private

Open a file or files containing TTrees to analyse.

Definition at line 2951 of file KVTreeAnalyzer.cpp.

◆ OpenChain() [2/2]

void KVTreeAnalyzer::OpenChain ( const TString treename,
const TString treetitle,
const TSeqCollection files 
)

Open a TChain for analysis treename/title is the name/title of the TTree :) files is a list of objects with the names of the files in the chain

Definition at line 3117 of file KVTreeAnalyzer.cpp.

◆ OpenFile()

KVTreeAnalyzer * KVTreeAnalyzer::OpenFile ( const Char_t filename,
Bool_t  nogui = kFALSE 
)
static

STATIC method to open a previously saved analysis session.

Use: root[0] KVTreeAnalyzer* TA = KVTreeAnalyzer::OpenFile("my_analysis.root")

If option nogui=kTRUE the GUI will not be launched

Definition at line 1264 of file KVTreeAnalyzer.cpp.

◆ OpenGUI()

void KVTreeAnalyzer::OpenGUI ( )

Launch the GUI (unless fNoGui=kTRUE in which case this does nothing)

Definition at line 692 of file KVTreeAnalyzer.cpp.

◆ ReadFromFile() [1/2]

void KVTreeAnalyzer::ReadFromFile ( const Char_t filename)

open a previously saved analysis session.

Definition at line 1287 of file KVTreeAnalyzer.cpp.

◆ ReadFromFile() [2/2]

void KVTreeAnalyzer::ReadFromFile ( TFile f)

open a previously saved analysis session.

Definition at line 1300 of file KVTreeAnalyzer.cpp.

◆ ReapplyAnyFile()

void KVTreeAnalyzer::ReapplyAnyFile ( const Char_t filepath)

assuming filepath is the URL of a ROOT file, open it and, if no KVTreeAnalyzer object is found, open first TTree in file and apply all selections and generate all histograms which were made for this analysis. Any histograms in the file are added to the list of histograms. If filepath contains an existing analysis, we add to it any histograms/selections/aliases which are not defined

Definition at line 3179 of file KVTreeAnalyzer.cpp.

◆ ReconnectTree()

void KVTreeAnalyzer::ReconnectTree ( )
private

Backwards compatibility: to read old analysis files.

Definition at line 1217 of file KVTreeAnalyzer.cpp.

◆ RemakeHisto()

TH1 * KVTreeAnalyzer::RemakeHisto ( TH1 h,
const Char_t expr,
const Char_t weight = "" 
)

Remake an existing histogram of data 'expr' using the current active selection If such a histogram already exists, we just return its address. We must have the same binning in the new as in the original histogram.

Definition at line 1582 of file KVTreeAnalyzer.cpp.

◆ ResetMethodCalled()

void KVTreeAnalyzer::ResetMethodCalled ( )
inlineprivate

Definition at line 295 of file KVTreeAnalyzer.h.

◆ Save()

void KVTreeAnalyzer::Save ( )

Definition at line 2402 of file KVTreeAnalyzer.cpp.

◆ SaveAs()

void KVTreeAnalyzer::SaveAs ( const char filename = "",
Option_t option = "" 
) const
virtual

Override TObject::SaveAs We need to:

  • (re)create the file
  • do fChain->SetDirectory before writing to disk save current directory

Reimplemented from TObject.

Definition at line 2418 of file KVTreeAnalyzer.cpp.

◆ SelectionChanged()

void KVTreeAnalyzer::SelectionChanged ( )

Method called whenever the selected selection in the GUI list changes.

Definition at line 1754 of file KVTreeAnalyzer.cpp.

◆ SetAlias()

void KVTreeAnalyzer::SetAlias ( const Char_t name,
const Char_t expr 
)

Definition at line 3217 of file KVTreeAnalyzer.cpp.

◆ SetAnalysisModifiedSinceLastSave()

void KVTreeAnalyzer::SetAnalysisModifiedSinceLastSave ( Bool_t  x)
private

Definition at line 643 of file KVTreeAnalyzer.cpp.

◆ SetApplySelection()

void KVTreeAnalyzer::SetApplySelection ( Bool_t  yes = kTRUE)
inline

Definition at line 477 of file KVTreeAnalyzer.h.

◆ SetAutoSaveHisto()

void KVTreeAnalyzer::SetAutoSaveHisto ( Bool_t  yes = kTRUE)
inline

Definition at line 428 of file KVTreeAnalyzer.h.

◆ SetDrawLog()

void KVTreeAnalyzer::SetDrawLog ( Bool_t  yes = kTRUE)
inline

Definition at line 473 of file KVTreeAnalyzer.h.

◆ SetDrawOption()

void KVTreeAnalyzer::SetDrawOption ( Option_t option = "")
inlinevirtual

Reimplemented from TObject.

Definition at line 449 of file KVTreeAnalyzer.h.

◆ SetDrawSame()

void KVTreeAnalyzer::SetDrawSame ( Bool_t  yes = kTRUE)
inline

deselect 'new canvas' if it was selected

Definition at line 463 of file KVTreeAnalyzer.h.

◆ SetEntryList()

void KVTreeAnalyzer::SetEntryList ( TEntryList l)
private

Modify currently active selection (TEntryList) Instead of calling fChain->SetEntryList(l); call this method which works with or without PROOF. When using PROOF, fChain->SetEntryList(nullptr) does not work (bug in TProofChain), the last selection remains active. This problem is corrected here.

Definition at line 669 of file KVTreeAnalyzer.cpp.

◆ SetNewCanvas()

void KVTreeAnalyzer::SetNewCanvas ( Bool_t  yes = kTRUE)
inline

deselect 'same' if it was selected

Definition at line 454 of file KVTreeAnalyzer.h.

◆ SetNormHisto()

void KVTreeAnalyzer::SetNormHisto ( Bool_t  yes = kTRUE)
inline

Definition at line 437 of file KVTreeAnalyzer.h.

◆ SetNormHistoEvents()

void KVTreeAnalyzer::SetNormHistoEvents ( Bool_t  yes = kTRUE)
inline

Definition at line 443 of file KVTreeAnalyzer.h.

◆ SetProfileHisto()

void KVTreeAnalyzer::SetProfileHisto ( Bool_t  yes = kTRUE)
inline

Definition at line 481 of file KVTreeAnalyzer.h.

◆ SetRelativePathToAnalysisFile()

void KVTreeAnalyzer::SetRelativePathToAnalysisFile ( const Char_t p)
inlineprivate

Definition at line 286 of file KVTreeAnalyzer.h.

◆ SetSelection() [1/2]

void KVTreeAnalyzer::SetSelection ( const Char_t sel)

Definition at line 2366 of file KVTreeAnalyzer.cpp.

◆ SetSelection() [2/2]

void KVTreeAnalyzer::SetSelection ( TObject obj)

Method called when a selection is double-clicked in the GUI list. The required selection is passed as argument (address of TEntryList object) and becomes the currently active selection (TEntryList set on TTree). If the requested selection was already active, it is deactivated (remove TEntryList from TTree). The 'CURRENT SELECTION' message in the GUI status bar is updated.

Definition at line 501 of file KVTreeAnalyzer.cpp.

◆ SetStatsHisto()

void KVTreeAnalyzer::SetStatsHisto ( Bool_t  yes = kTRUE)
inline

Definition at line 433 of file KVTreeAnalyzer.h.

◆ SetTree()

void KVTreeAnalyzer::SetTree ( TTree t)

Connects a TChain for analysis.

Definition at line 1201 of file KVTreeAnalyzer.cpp.

◆ SetTreeFileName()

void KVTreeAnalyzer::SetTreeFileName ( TTree t)

the Tree file name is used as the basis for the default analysis backup filename. for a TChain there may be many files with a common root. we look for this common root and replace any "wildcard" characters with "X" i.e. for files "run_001.root", "run_002.root", ..., "run_999.root" we will use "Analysis_run_XXX.root" as default name

Definition at line 1176 of file KVTreeAnalyzer.cpp.

◆ SetUpHistoAutoSave()

void KVTreeAnalyzer::SetUpHistoAutoSave ( )

Open file dialog box for user to choose directory and image file-type for generating picture files of all histos as they are drawn

Definition at line 3253 of file KVTreeAnalyzer.cpp.

◆ SetUserBinning()

void KVTreeAnalyzer::SetUserBinning ( Bool_t  ub)
inline

Definition at line 419 of file KVTreeAnalyzer.h.

◆ SetUserWeight()

void KVTreeAnalyzer::SetUserWeight ( Bool_t  uw)
inline

Definition at line 423 of file KVTreeAnalyzer.h.

◆ ShowAliases()

void KVTreeAnalyzer::ShowAliases ( )
inline

Definition at line 379 of file KVTreeAnalyzer.h.

◆ ShowHistos()

void KVTreeAnalyzer::ShowHistos ( )
inline

Definition at line 383 of file KVTreeAnalyzer.h.

◆ ShowSelections()

void KVTreeAnalyzer::ShowSelections ( )
inline

Definition at line 371 of file KVTreeAnalyzer.h.

◆ ShowVariables()

void KVTreeAnalyzer::ShowVariables ( )
inline

Definition at line 375 of file KVTreeAnalyzer.h.

◆ UpdateEntryLists()

void KVTreeAnalyzer::UpdateEntryLists ( )

regenerate entry lists for all selections

Definition at line 2780 of file KVTreeAnalyzer.cpp.

Member Data Documentation

◆ fAliasList

KVList KVTreeAnalyzer::fAliasList
private

list of TTree aliases

Definition at line 276 of file KVTreeAnalyzer.h.

◆ fAliasNumber

Int_t KVTreeAnalyzer::fAliasNumber
private

used for automatic naming of TTree aliases

Definition at line 275 of file KVTreeAnalyzer.h.

◆ fAnalysisModifiedSinceLastSave

Bool_t KVTreeAnalyzer::fAnalysisModifiedSinceLastSave
private

Definition at line 160 of file KVTreeAnalyzer.h.

◆ fAnalysisSaveDir

TString KVTreeAnalyzer::fAnalysisSaveDir
private

Definition at line 291 of file KVTreeAnalyzer.h.

◆ fApplySelection

Bool_t KVTreeAnalyzer::fApplySelection
private

=kTRUE: apply current selection to existing histogram

Definition at line 238 of file KVTreeAnalyzer.h.

◆ fAutoSaveDir

TString KVTreeAnalyzer::fAutoSaveDir
private

directory for autosaving histos

Definition at line 244 of file KVTreeAnalyzer.h.

◆ fAutoSaveHisto

Bool_t KVTreeAnalyzer::fAutoSaveHisto
private

=kTRUE: on draw, generate image file of current displayed histo

Definition at line 243 of file KVTreeAnalyzer.h.

◆ fAutoSaveType

TString KVTreeAnalyzer::fAutoSaveType
private

filetype for autosaving histos

Definition at line 245 of file KVTreeAnalyzer.h.

◆ fChain

TChain* KVTreeAnalyzer::fChain
private

the analyzed TTree or TChain

Definition at line 156 of file KVTreeAnalyzer.h.

◆ fDeletedByGUIClose

Bool_t KVTreeAnalyzer::fDeletedByGUIClose
private

Definition at line 153 of file KVTreeAnalyzer.h.

◆ fDrawLog

Bool_t KVTreeAnalyzer::fDrawLog
private

=kTRUE: draw histograms with log-Y (1-D) or log-Z (2-D) scale

Definition at line 237 of file KVTreeAnalyzer.h.

◆ fDrawOption

TString KVTreeAnalyzer::fDrawOption
private

Definition at line 234 of file KVTreeAnalyzer.h.

◆ fDrawSame

Bool_t KVTreeAnalyzer::fDrawSame
private

=kTRUE: draw histograms in same plot

Definition at line 235 of file KVTreeAnalyzer.h.

◆ fgAnalyzerList

KVList * KVTreeAnalyzer::fgAnalyzerList = new KVList(0)
staticprivate

static list of all analyzers in memory

Definition at line 150 of file KVTreeAnalyzer.h.

◆ fHistolist

KVList KVTreeAnalyzer::fHistolist
private

list of generated histograms

Definition at line 270 of file KVTreeAnalyzer.h.

◆ fHistoNumber

Int_t KVTreeAnalyzer::fHistoNumber
private

used for automatic naming of histograms

Definition at line 273 of file KVTreeAnalyzer.h.

◆ fLeafExpr

TString KVTreeAnalyzer::fLeafExpr
private

Definition at line 168 of file KVTreeAnalyzer.h.

◆ fLeafList

KVList KVTreeAnalyzer::fLeafList
private

clones of leaves in TChain

Definition at line 165 of file KVTreeAnalyzer.h.

◆ fMain_histolist

TGMainFrame* KVTreeAnalyzer::fMain_histolist
private

GUI for handling histograms.

Definition at line 191 of file KVTreeAnalyzer.h.

◆ fMain_leaflist

TGGroupFrame* KVTreeAnalyzer::fMain_leaflist
private

GUI for access to TTree leaves and aliases.

Definition at line 163 of file KVTreeAnalyzer.h.

◆ fMain_selectionlist

TGGroupFrame* KVTreeAnalyzer::fMain_selectionlist
private

GUI for handling selections.

KVGumbelDistribution *GDfirst;//! KVGumbelDistribution *GDsecond;//! KVGumbelDistribution *GDthird;//! KVGausGumDistribution *GausGum1;//! KVGausGumDistribution *GausGum2;//! KVGausGumDistribution *GausGum3;//!

Definition at line 264 of file KVTreeAnalyzer.h.

◆ fMenuBar

TGMenuBar* KVTreeAnalyzer::fMenuBar
private

Definition at line 221 of file KVTreeAnalyzer.h.

◆ fMenuBarItemLayout

TGLayoutHints* KVTreeAnalyzer::fMenuBarItemLayout
private

Definition at line 220 of file KVTreeAnalyzer.h.

◆ fMenuFile

TGPopupMenu* KVTreeAnalyzer::fMenuFile
private

Definition at line 196 of file KVTreeAnalyzer.h.

◆ fMenuSelections

TGPopupMenu* KVTreeAnalyzer::fMenuSelections
private

Definition at line 197 of file KVTreeAnalyzer.h.

◆ fMethodCalled

Bool_t KVTreeAnalyzer::fMethodCalled
private

allows to know if context menu methods are called

Definition at line 279 of file KVTreeAnalyzer.h.

◆ fNewCanvas

Bool_t KVTreeAnalyzer::fNewCanvas
private

=kTRUE: draw each histogram in a new canvas

Definition at line 239 of file KVTreeAnalyzer.h.

◆ fNoGui

Bool_t KVTreeAnalyzer::fNoGui
private

=kTRUE if no graphical interface is required

Definition at line 277 of file KVTreeAnalyzer.h.

◆ fNormHisto

Bool_t KVTreeAnalyzer::fNormHisto
private

=kTRUE: generate normalised histograms (normalise to integral of histo)

Definition at line 240 of file KVTreeAnalyzer.h.

◆ fNormHistoEvents

Bool_t KVTreeAnalyzer::fNormHistoEvents
private

=kTRUE: generate normalised histograms (normalise to number of events)

Definition at line 241 of file KVTreeAnalyzer.h.

◆ fNx

Int_t KVTreeAnalyzer::fNx
private

Definition at line 182 of file KVTreeAnalyzer.h.

◆ fNxD

Int_t KVTreeAnalyzer::fNxD
private

Definition at line 187 of file KVTreeAnalyzer.h.

◆ fNxF

Int_t KVTreeAnalyzer::fNxF
private

Definition at line 184 of file KVTreeAnalyzer.h.

◆ fNy

Int_t KVTreeAnalyzer::fNy
private

Definition at line 182 of file KVTreeAnalyzer.h.

◆ fNyD

Int_t KVTreeAnalyzer::fNyD
private

Definition at line 187 of file KVTreeAnalyzer.h.

◆ fOptionMenu

TGPopupMenu* KVTreeAnalyzer::fOptionMenu
private

Definition at line 199 of file KVTreeAnalyzer.h.

◆ fOrderedDalitz

bool KVTreeAnalyzer::fOrderedDalitz
private

Definition at line 188 of file KVTreeAnalyzer.h.

◆ fProfileHisto

Bool_t KVTreeAnalyzer::fProfileHisto
private

Definition at line 175 of file KVTreeAnalyzer.h.

◆ fPROOFEnabled

Bool_t KVTreeAnalyzer::fPROOFEnabled
private

Definition at line 293 of file KVTreeAnalyzer.h.

◆ fRelativePathToAnalysisFile

TString KVTreeAnalyzer::fRelativePathToAnalysisFile
private

Definition at line 285 of file KVTreeAnalyzer.h.

◆ fSameColorIndex

Int_t KVTreeAnalyzer::fSameColorIndex
private

Definition at line 236 of file KVTreeAnalyzer.h.

◆ fSaveAnalysisFileName

TString KVTreeAnalyzer::fSaveAnalysisFileName
private

Definition at line 159 of file KVTreeAnalyzer.h.

◆ fSelCombMenu

TGPopupMenu* KVTreeAnalyzer::fSelCombMenu
private

Definition at line 198 of file KVTreeAnalyzer.h.

◆ fSelectedHistos

TList* KVTreeAnalyzer::fSelectedHistos
private

Definition at line 246 of file KVTreeAnalyzer.h.

◆ fSelectedLeaves

KVList* KVTreeAnalyzer::fSelectedLeaves
private

Definition at line 169 of file KVTreeAnalyzer.h.

◆ fSelectedSelections

TList* KVTreeAnalyzer::fSelectedSelections
private

Definition at line 268 of file KVTreeAnalyzer.h.

◆ fSelectionNumber

Int_t KVTreeAnalyzer::fSelectionNumber
private

used for automatic naming of selections

Definition at line 274 of file KVTreeAnalyzer.h.

◆ fSelections

KVUniqueNameList KVTreeAnalyzer::fSelections
private

list of TEntryList user selections

Definition at line 157 of file KVTreeAnalyzer.h.

◆ fSelGenerate

TGPopupMenu* KVTreeAnalyzer::fSelGenerate
private

Definition at line 200 of file KVTreeAnalyzer.h.

◆ fStatsHisto

Bool_t KVTreeAnalyzer::fStatsHisto
private

=kTRUE: display histo stats box

Definition at line 242 of file KVTreeAnalyzer.h.

◆ fTree

TTree* KVTreeAnalyzer::fTree
private

for backwards compatibility

Definition at line 155 of file KVTreeAnalyzer.h.

◆ fTreeFileName

TString KVTreeAnalyzer::fTreeFileName
private

name of file containing analyzed TTree

Definition at line 272 of file KVTreeAnalyzer.h.

◆ fTreeName

TString KVTreeAnalyzer::fTreeName
private

name of analyzed TTree

Definition at line 271 of file KVTreeAnalyzer.h.

◆ fUserBinning

Bool_t KVTreeAnalyzer::fUserBinning
private

Definition at line 177 of file KVTreeAnalyzer.h.

◆ fUserWeight

Bool_t KVTreeAnalyzer::fUserWeight
private

Definition at line 179 of file KVTreeAnalyzer.h.

◆ fWeight

TString KVTreeAnalyzer::fWeight
private

Definition at line 180 of file KVTreeAnalyzer.h.

◆ fXLeaf

TNamed* KVTreeAnalyzer::fXLeaf
private

Definition at line 170 of file KVTreeAnalyzer.h.

◆ fXmax

Double_t KVTreeAnalyzer::fXmax
private

Definition at line 183 of file KVTreeAnalyzer.h.

◆ fXmaxF

Double_t KVTreeAnalyzer::fXmaxF
private

Definition at line 185 of file KVTreeAnalyzer.h.

◆ fXmin

Double_t KVTreeAnalyzer::fXmin
private

Definition at line 183 of file KVTreeAnalyzer.h.

◆ fXminF

Double_t KVTreeAnalyzer::fXminF
private

Definition at line 185 of file KVTreeAnalyzer.h.

◆ fYLeaf

TNamed* KVTreeAnalyzer::fYLeaf
private

Definition at line 171 of file KVTreeAnalyzer.h.

◆ fYmax

Double_t KVTreeAnalyzer::fYmax
private

Definition at line 183 of file KVTreeAnalyzer.h.

◆ fYmin

Double_t KVTreeAnalyzer::fYmin
private

Definition at line 183 of file KVTreeAnalyzer.h.

◆ fZLeaf

TNamed* KVTreeAnalyzer::fZLeaf
private

Definition at line 172 of file KVTreeAnalyzer.h.

◆ G_alias_text

TGTextEntry* KVTreeAnalyzer::G_alias_text
private

Definition at line 173 of file KVTreeAnalyzer.h.

◆ G_fit1

TGTextButton* KVTreeAnalyzer::G_fit1
private

Definition at line 248 of file KVTreeAnalyzer.h.

◆ G_fit2

TGTextButton* KVTreeAnalyzer::G_fit2
private

Definition at line 249 of file KVTreeAnalyzer.h.

◆ G_fit3

TGTextButton* KVTreeAnalyzer::G_fit3
private

Definition at line 250 of file KVTreeAnalyzer.h.

◆ G_fitGG1

TGTextButton* KVTreeAnalyzer::G_fitGG1
private

Definition at line 251 of file KVTreeAnalyzer.h.

◆ G_fitGG2

TGTextButton* KVTreeAnalyzer::G_fitGG2
private

Definition at line 252 of file KVTreeAnalyzer.h.

◆ G_fitGG3

TGTextButton* KVTreeAnalyzer::G_fitGG3
private

Definition at line 253 of file KVTreeAnalyzer.h.

◆ G_histo_add

TGPictureButton* KVTreeAnalyzer::G_histo_add
private

Definition at line 224 of file KVTreeAnalyzer.h.

◆ G_histo_app_sel

TGCheckButton* KVTreeAnalyzer::G_histo_app_sel
private

Definition at line 226 of file KVTreeAnalyzer.h.

◆ G_histo_autosave

TGCheckButton* KVTreeAnalyzer::G_histo_autosave
private

Definition at line 232 of file KVTreeAnalyzer.h.

◆ G_histo_bin

TGCheckButton* KVTreeAnalyzer::G_histo_bin
private

Definition at line 176 of file KVTreeAnalyzer.h.

◆ G_histo_del

TGPictureButton* KVTreeAnalyzer::G_histo_del
private

Definition at line 223 of file KVTreeAnalyzer.h.

◆ G_histo_draw_option

TGComboBox* KVTreeAnalyzer::G_histo_draw_option
private

Definition at line 233 of file KVTreeAnalyzer.h.

◆ G_histo_log

TGCheckButton* KVTreeAnalyzer::G_histo_log
private

Definition at line 227 of file KVTreeAnalyzer.h.

◆ G_histo_new_can

TGCheckButton* KVTreeAnalyzer::G_histo_new_can
private

Definition at line 228 of file KVTreeAnalyzer.h.

◆ G_histo_norm

TGCheckButton* KVTreeAnalyzer::G_histo_norm
private

Definition at line 229 of file KVTreeAnalyzer.h.

◆ G_histo_norm_events

TGCheckButton* KVTreeAnalyzer::G_histo_norm_events
private

Definition at line 230 of file KVTreeAnalyzer.h.

◆ G_histo_prof

TGCheckButton* KVTreeAnalyzer::G_histo_prof
private

Definition at line 174 of file KVTreeAnalyzer.h.

◆ G_histo_same

TGCheckButton* KVTreeAnalyzer::G_histo_same
private

Definition at line 225 of file KVTreeAnalyzer.h.

◆ G_histo_stats

TGCheckButton* KVTreeAnalyzer::G_histo_stats
private

Definition at line 231 of file KVTreeAnalyzer.h.

◆ G_histo_weight

TGCheckButton* KVTreeAnalyzer::G_histo_weight
private

Definition at line 178 of file KVTreeAnalyzer.h.

◆ G_histolist

KVListView* KVTreeAnalyzer::G_histolist
private

GUI list of histograms.

Definition at line 222 of file KVTreeAnalyzer.h.

◆ G_ip_histo

TGLabel* KVTreeAnalyzer::G_ip_histo
private

Definition at line 255 of file KVTreeAnalyzer.h.

◆ G_leaf_draw

TGPictureButton* KVTreeAnalyzer::G_leaf_draw
private

Definition at line 167 of file KVTreeAnalyzer.h.

◆ G_leaf_expr

TGLabel* KVTreeAnalyzer::G_leaf_expr
private

Definition at line 166 of file KVTreeAnalyzer.h.

◆ G_leaflist

KVListView* KVTreeAnalyzer::G_leaflist
private

GUI list of TTree leaves and aliases.

Definition at line 164 of file KVTreeAnalyzer.h.

◆ G_make_ip_scale

TGTextButton* KVTreeAnalyzer::G_make_ip_scale
private

Definition at line 247 of file KVTreeAnalyzer.h.

◆ G_make_ip_selection

TGTextEntry* KVTreeAnalyzer::G_make_ip_selection
private

Definition at line 254 of file KVTreeAnalyzer.h.

◆ G_selection_status

TGStatusBar* KVTreeAnalyzer::G_selection_status
private

status bar in selections GUI

Definition at line 266 of file KVTreeAnalyzer.h.

◆ G_selection_text

TGTextEntry* KVTreeAnalyzer::G_selection_text
private

Definition at line 267 of file KVTreeAnalyzer.h.

◆ G_selectionlist

KVListView* KVTreeAnalyzer::G_selectionlist
private

GUI list of TEntryList selections.

Definition at line 265 of file KVTreeAnalyzer.h.

◆ HistoAddResult

TH1* KVTreeAnalyzer::HistoAddResult
private

Definition at line 283 of file KVTreeAnalyzer.h.

◆ HistoToAdd1

TH1* KVTreeAnalyzer::HistoToAdd1
private

Definition at line 281 of file KVTreeAnalyzer.h.

◆ HistoToAdd2

TH1* KVTreeAnalyzer::HistoToAdd2
private

Definition at line 282 of file KVTreeAnalyzer.h.