KaliVeda
Toolkit for HIC analysis

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. More...
 
void AddSelectedHistos ()
 
void AutoSaveHisto (TH1 *h)
 
 ClassDefOverride (KVTreeAnalyzer, 5) void OpenSingleFile(TFile *file)
 
void CombineSelectionsAnd ()
 
void CombineSelectionsOr ()
 
void Copy (TObject &obj) const override
 
void CurrentSelection ()
 Print the currently active selection (TEntryList set on TTree). More...
 
void DeleteHisto (const Char_t *expr, const Char_t *selection, const Char_t *weight)
 
void DeleteSelectedHisto ()
 Delete all currently selected histograms. More...
 
void DeleteSelections ()
 Delete the currently selected selection(s) More...
 
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. More...
 
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. More...
 
void GenerateAllHistograms (TCollection *)
 
void GenerateAllSelections (TCollection *)
 For applying existing analysis to new data. More...
 
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. More...
 
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. More...
 
const char * GetWeight ()
 
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. More...
 
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. More...
 
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) More...
 
void ReadFromFile (const Char_t *filename)
 open a previously saved analysis session. More...
 
void ReadFromFile (TFile *f)
 open a previously saved analysis session. More...
 
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 override
 
void SelectionChanged ()
 Method called whenever the selected selection in the GUI list changes. More...
 
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="") override
 
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. More...
 
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 More...
 
- 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
 
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 KVSeqCollectionGetListOfAnalyzers ()
 
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)
 

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
 

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 107 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 126 of file KVTreeAnalyzer.cpp.

◆ ~KVTreeAnalyzer()

KVTreeAnalyzer::~KVTreeAnalyzer ( )
virtual

Destructor.

Definition at line 145 of file KVTreeAnalyzer.cpp.

Member Function Documentation

◆ 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 2731 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 3306 of file KVTreeAnalyzer.cpp.

◆ ClassDefOverride()

KVTreeAnalyzer::ClassDefOverride ( 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 1678 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 1708 of file KVTreeAnalyzer.cpp.

◆ Copy()

void KVTreeAnalyzer::Copy ( TObject obj) const
overridevirtual

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 TNamed.

Definition at line 164 of file KVTreeAnalyzer.cpp.

◆ CurrentSelection()

void KVTreeAnalyzer::CurrentSelection ( )

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

Definition at line 533 of file KVTreeAnalyzer.cpp.

◆ DeleteHisto()

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

Definition at line 2686 of file KVTreeAnalyzer.cpp.

◆ DeleteSelectedHisto()

void KVTreeAnalyzer::DeleteSelectedHisto ( )

Delete all currently selected histograms.

Definition at line 2707 of file KVTreeAnalyzer.cpp.

◆ DeleteSelections()

void KVTreeAnalyzer::DeleteSelections ( )

Delete the currently selected selection(s)

Definition at line 1736 of file KVTreeAnalyzer.cpp.

◆ DeleteThis()

void KVTreeAnalyzer::DeleteThis ( )
inline

Definition at line 336 of file KVTreeAnalyzer.h.

◆ DrawAsDalitz()

void KVTreeAnalyzer::DrawAsDalitz ( )

Definition at line 2153 of file KVTreeAnalyzer.cpp.

◆ DrawCut()

void KVTreeAnalyzer::DrawCut ( TCutG cut)

Definition at line 1327 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 1485 of file KVTreeAnalyzer.cpp.

◆ DrawHistogram()

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

Definition at line 1386 of file KVTreeAnalyzer.cpp.

◆ DrawLeaf()

void KVTreeAnalyzer::DrawLeaf ( TObject obj)

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

Definition at line 2294 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 2024 of file KVTreeAnalyzer.cpp.

◆ EnablePROOF()

void KVTreeAnalyzer::EnablePROOF ( Bool_t  yes = kTRUE)

Definition at line 2392 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 1658 of file KVTreeAnalyzer.cpp.

◆ GenerateAllAliases()

void KVTreeAnalyzer::GenerateAllAliases ( TCollection list)

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

Definition at line 3171 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 3359 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 3338 of file KVTreeAnalyzer.cpp.

◆ GenerateConstantXSecSelections()

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

◆ 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 1641 of file KVTreeAnalyzer.cpp.

◆ GetAlias()

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

Definition at line 374 of file KVTreeAnalyzer.h.

◆ GetAnalyzer()

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

Definition at line 577 of file KVTreeAnalyzer.h.

◆ GetChain()

TChain* KVTreeAnalyzer::GetChain ( ) const
inline

Definition at line 592 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 549 of file KVTreeAnalyzer.cpp.

◆ GetHisto()

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

Definition at line 2656 of file KVTreeAnalyzer.cpp.

◆ GetHistoByTitle()

KVHistogram * KVTreeAnalyzer::GetHistoByTitle ( const Char_t title)

Definition at line 2677 of file KVTreeAnalyzer.cpp.

◆ GetHistogram()

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

Return histogram with given name.

Definition at line 416 of file KVTreeAnalyzer.cpp.

◆ GetHistoList()

const KVList* KVTreeAnalyzer::GetHistoList ( ) const
inline

Definition at line 349 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 2615 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 2637 of file KVTreeAnalyzer.cpp.

◆ GetHistosFromFile()

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

Definition at line 3063 of file KVTreeAnalyzer.cpp.

◆ GetListOfAnalyzers()

static KVSeqCollection* KVTreeAnalyzer::GetListOfAnalyzers ( )
inlinestatic

Definition at line 573 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 503 of file KVTreeAnalyzer.h.

◆ GetNxD()

Int_t KVTreeAnalyzer::GetNxD ( )
inline

Definition at line 528 of file KVTreeAnalyzer.h.

◆ GetNxF()

Int_t KVTreeAnalyzer::GetNxF ( )
inline

Definition at line 541 of file KVTreeAnalyzer.h.

◆ GetNy()

Int_t KVTreeAnalyzer::GetNy ( )
inline

Definition at line 507 of file KVTreeAnalyzer.h.

◆ GetNyD()

Int_t KVTreeAnalyzer::GetNyD ( )
inline

Definition at line 532 of file KVTreeAnalyzer.h.

◆ GetOrderedDalitz()

Bool_t KVTreeAnalyzer::GetOrderedDalitz ( )
inline

Definition at line 536 of file KVTreeAnalyzer.h.

◆ GetSelection()

TEntryList * KVTreeAnalyzer::GetSelection ( const Char_t selection)

Look for selection in list of selections.

Definition at line 2383 of file KVTreeAnalyzer.cpp.

◆ GetWeight()

const char* KVTreeAnalyzer::GetWeight ( )
inline

Definition at line 554 of file KVTreeAnalyzer.h.

◆ GetXmax()

Double_t KVTreeAnalyzer::GetXmax ( )
inline

Definition at line 515 of file KVTreeAnalyzer.h.

◆ GetXmaxF()

Double_t KVTreeAnalyzer::GetXmaxF ( )
inline

Definition at line 549 of file KVTreeAnalyzer.h.

◆ GetXmin()

Double_t KVTreeAnalyzer::GetXmin ( )
inline

Definition at line 511 of file KVTreeAnalyzer.h.

◆ GetXminF()

Double_t KVTreeAnalyzer::GetXminF ( )
inline

Definition at line 545 of file KVTreeAnalyzer.h.

◆ GetYmax()

Double_t KVTreeAnalyzer::GetYmax ( )
inline

Definition at line 523 of file KVTreeAnalyzer.h.

◆ GetYmin()

Double_t KVTreeAnalyzer::GetYmin ( )
inline

Definition at line 519 of file KVTreeAnalyzer.h.

◆ GUIClosed()

void KVTreeAnalyzer::GUIClosed ( )

Called when graphical window is closed.

Definition at line 1117 of file KVTreeAnalyzer.cpp.

◆ HandleHistoFileMenu()

void KVTreeAnalyzer::HandleHistoFileMenu ( Int_t  id)

Definition at line 2813 of file KVTreeAnalyzer.cpp.

◆ HandleOptionsMenu()

void KVTreeAnalyzer::HandleOptionsMenu ( Int_t  opt)

Definition at line 2894 of file KVTreeAnalyzer.cpp.

◆ HandleSelectionsMenu()

void KVTreeAnalyzer::HandleSelectionsMenu ( Int_t  id)

Definition at line 2862 of file KVTreeAnalyzer.cpp.

◆ HistoAddition()

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

Definition at line 2770 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_Apply()

void KVTreeAnalyzer::HistoFileMenu_Apply ( )

Definition at line 3015 of file KVTreeAnalyzer.cpp.

◆ HistoFileMenu_OpenFriend()

void KVTreeAnalyzer::HistoFileMenu_OpenFriend ( )

Definition at line 2939 of file KVTreeAnalyzer.cpp.

◆ HistoSelectionChanged()

void KVTreeAnalyzer::HistoSelectionChanged ( )

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

Definition at line 2354 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 1571 of file KVTreeAnalyzer.cpp.

◆ IsPROOFEnabled()

Bool_t KVTreeAnalyzer::IsPROOFEnabled ( ) const
inline

Definition at line 401 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 405 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 1803 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 272 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 353 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 442 of file KVTreeAnalyzer.cpp.

◆ 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 3114 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 3507 of file KVTreeAnalyzer.cpp.

◆ OpenChain()

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 3139 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 1273 of file KVTreeAnalyzer.cpp.

◆ OpenGUI()

void KVTreeAnalyzer::OpenGUI ( )

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

Definition at line 699 of file KVTreeAnalyzer.cpp.

◆ ReadFromFile() [1/2]

void KVTreeAnalyzer::ReadFromFile ( const Char_t filename)

open a previously saved analysis session.

Definition at line 1296 of file KVTreeAnalyzer.cpp.

◆ ReadFromFile() [2/2]

void KVTreeAnalyzer::ReadFromFile ( TFile f)

open a previously saved analysis session.

Definition at line 1309 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 3199 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 1591 of file KVTreeAnalyzer.cpp.

◆ Save()

void KVTreeAnalyzer::Save ( )

Definition at line 2411 of file KVTreeAnalyzer.cpp.

◆ SaveAs()

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

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 2427 of file KVTreeAnalyzer.cpp.

◆ SelectionChanged()

void KVTreeAnalyzer::SelectionChanged ( )

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

Definition at line 1763 of file KVTreeAnalyzer.cpp.

◆ SetAlias()

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

Definition at line 3237 of file KVTreeAnalyzer.cpp.

◆ SetApplySelection()

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

Definition at line 484 of file KVTreeAnalyzer.h.

◆ SetAutoSaveHisto()

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

Definition at line 435 of file KVTreeAnalyzer.h.

◆ SetDrawLog()

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

Definition at line 480 of file KVTreeAnalyzer.h.

◆ SetDrawOption()

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

Reimplemented from TObject.

Definition at line 456 of file KVTreeAnalyzer.h.

◆ SetDrawSame()

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

deselect 'new canvas' if it was selected

Definition at line 470 of file KVTreeAnalyzer.h.

◆ SetNewCanvas()

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

deselect 'same' if it was selected

Definition at line 461 of file KVTreeAnalyzer.h.

◆ SetNormHisto()

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

Definition at line 444 of file KVTreeAnalyzer.h.

◆ SetNormHistoEvents()

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

Definition at line 450 of file KVTreeAnalyzer.h.

◆ SetProfileHisto()

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

Definition at line 488 of file KVTreeAnalyzer.h.

◆ SetSelection() [1/2]

void KVTreeAnalyzer::SetSelection ( const Char_t sel)

Definition at line 2373 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 508 of file KVTreeAnalyzer.cpp.

◆ SetStatsHisto()

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

Definition at line 440 of file KVTreeAnalyzer.h.

◆ SetTree()

void KVTreeAnalyzer::SetTree ( TTree t)

Connects a TChain for analysis.

Definition at line 1208 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 1183 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 3273 of file KVTreeAnalyzer.cpp.

◆ SetUserBinning()

void KVTreeAnalyzer::SetUserBinning ( Bool_t  ub)
inline

Definition at line 426 of file KVTreeAnalyzer.h.

◆ SetUserWeight()

void KVTreeAnalyzer::SetUserWeight ( Bool_t  uw)
inline

Definition at line 430 of file KVTreeAnalyzer.h.

◆ ShowAliases()

void KVTreeAnalyzer::ShowAliases ( )
inline

Definition at line 386 of file KVTreeAnalyzer.h.

◆ ShowHistos()

void KVTreeAnalyzer::ShowHistos ( )
inline

Definition at line 390 of file KVTreeAnalyzer.h.

◆ ShowSelections()

void KVTreeAnalyzer::ShowSelections ( )
inline

Definition at line 378 of file KVTreeAnalyzer.h.

◆ ShowVariables()

void KVTreeAnalyzer::ShowVariables ( )
inline

Definition at line 382 of file KVTreeAnalyzer.h.

◆ UpdateEntryLists()

void KVTreeAnalyzer::UpdateEntryLists ( )

regenerate entry lists for all selections

Definition at line 2789 of file KVTreeAnalyzer.cpp.