PandaRoot
DalitzGUI.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // DalitzGui - ROOT based tool to plot 3body decay's with resonant behaviour
3 // --------------------------------------------------------------------------
4 //
5 // Check accompanying README file for infos how to use
6 //
7 // Original author: Klaus Goetzen - GSI Darmstadt
8 // Last modified : 2014/08/15
9 // --------------------------------------------------------------------------
10 #pragma once
11 
12 #include "TRandom3.h"
13 #include <TQObject.h>
14 #include <RQ_OBJECT.h>
15 //#include "stdafx.h"
16 
17 class TH2F;
18 class TH1D;
19 class TRootEmbeddedCanvas;
20 class TGLayoutHints;
21 class TGHorizontalFrame;
22 // class TGVerticalFrame;
23 class TGLabel;
24 class TGHSlider;
25 class TGTextButton;
26 class TGCheckButton;
27 class TGTextEntry;
28 class TGTextBuffer;
29 class TGComboBox;
30 class TGraph;
31 class CRes;
32 class TGMainFrame;
33 class TGWindow;
34 class TGMenuBar;
35 class TGPopupMenu;
36 class TGDockableFrame;
37 // class TGTransientFrame;
38 // class TGDoubleHSlider;
39 // class TGButton;
40 
41 class TDalitzGui {
42  RQ_OBJECT("TDalitzGui")
43 
44  private:
45  TGMainFrame *fMain;
46  TRootEmbeddedCanvas *fCanvas;
47  TGLayoutHints *fLcan;
48 
49  TH2F *fHDalitz; // coherent (correct) Dalitz Plot
50  TH2F *fHDalitzSct; // coherent (correct) Dalitz Plot (scatter plot)
51  TH2F *fHDalitzI; // incoherent Dalitz Plot
52  TH2F *fHDalitzD; // difference coherent-incoherent
53  TH2F *fHDalitzPh; // total absoluted phase of resulting amplitude
54 
55  TH1D *fHs1Proj, *fHs2Proj, *fHs3Proj; // 1D projections of squared masses
56  TH1D *fHs1M, *fHs2M, *fHs3M; // 1D projections of inv. masses (generated randomly from projections)
57  TH1D *fHs1Ph, *fHs2Ph; // 1D phases for s1 and s2
58 
59  TGMenuBar *fMenuBar;
60  TGPopupMenu *fMenuFile;
61  TGDockableFrame *fMenuDock;
62 
63  TGHorizontalFrame *fVframe[4];
64  TGLayoutHints *fBly, *fBfly1, *fBfly2, *fBfly3, *fMenuBarItemLayout, *fMenuBarLayout;
65  TGLabel *fLab[7];
66  TGHSlider *fHslider1, *fHslider2, *fHslider3;
67  TGTextButton *fButResize;
68  TGCheckButton *fCheckResize, *fCheckColor, *fCheckLog;
69 
70  TGTextEntry *fTeh1;
71  TGTextBuffer *fTbh1;
72  TGTextEntry *fTeh2;
73  TGTextBuffer *fTbh2;
74 
75  TGLabel *fLabRN[3], *fLabRA[6], *fLabRph[6];
76 
77  TGComboBox *fComRes[6];
78  TGCheckButton *fChRes[6];
79 
80  TGHSlider *fSlResA[6], *fSlResph[6];
81 
82  TGHSlider *fSlOcc;
83 
84  TGComboBox *fComFin[3];
85 
86  TGComboBox *fComPlot;
87 
88  TGraph *fGraphKin;
89 
90  CRes *fRes[6];
91 
92  Int_t fnR[3];
93 
94  //
95  Double_t fM;
96  Double_t fm1;
97  Double_t fm2;
98  Double_t fm3;
99 
100  TString fn1, fn2, fn3; // Print names of particles
101 
102  Int_t ndbins;
103 
104  TRandom3 fRand;
105  Int_t fOcc;
106 
107  TString fActiveRes;
108 
109  public:
110  TDalitzGui(const TGWindow *p, UInt_t w, UInt_t h);
111  virtual ~TDalitzGui();
112 
113  // signal handler
114  void CloseWindow();
115  void DoSlider(Int_t pos);
116  void DoParmSlider(Int_t pos);
117  void DoResize();
118  void DoText();
119  void DoCombo(Int_t id);
120  void DoCheckRes() { DoParmSlider(0); }
121  void HandleMenu(Int_t id);
122  void Rebin();
123  Int_t IdToSelection(Int_t id, int mode = 1);
124 
125  // other functions
126  void CreateGraph(TGraph *g, const Int_t n, const Double_t m, const Double_t m1, const Double_t m2, const Double_t m3);
127  void CreateDalitz();
128  void InitParams();
129  void DrawMainPlot();
130  void DrawPlot();
131  void ReadOutGui();
132  void ComputeCache(Int_t ri = 1);
133  void MakeAnimatedGif();
134 
135  void ConfigPlot();
136  void ResetPlots();
137  void ConfigComboFin(TGComboBox *b);
138  void ConfigComboRes(TGComboBox *b);
139  void ConfigSliderRes(TGHSlider *a, TGHSlider *p); //, TGHSlider *J);
140 
141  void LoadConfiguration(TString filename);
142  void SaveConfiguration(TString filename);
143 
144  void SwitchColor();
145  // void HandleButtons();
146 
147  ClassDef(TDalitzGui, 1)
148 };
virtual ~TDalitzGui()
void InitParams()
void ConfigSliderRes(TGHSlider *a, TGHSlider *p)
void DoCheckRes()
Definition: DalitzGUI.h:120
void DoParmSlider(Int_t pos)
Definition: CRes.h:21
void ConfigPlot()
__m128 m
Definition: P4_F32vec4.h:26
void Rebin()
void DoText()
void SaveConfiguration(TString filename)
void LoadConfiguration(TString filename)
void DoCombo(Int_t id)
Int_t IdToSelection(Int_t id, int mode=1)
void CloseWindow()
void CreateGraph(TGraph *g, const Int_t n, const Double_t m, const Double_t m1, const Double_t m2, const Double_t m3)
void ResetPlots()
void DoSlider(Int_t pos)
void DoResize()
void DrawMainPlot()
TDalitzGui(const TGWindow *p, UInt_t w, UInt_t h)
void DrawPlot()
void HandleMenu(Int_t id)
void ReadOutGui()
void SwitchColor()
void MakeAnimatedGif()
void CreateDalitz()
void ComputeCache(Int_t ri=1)
void ConfigComboFin(TGComboBox *b)
void ConfigComboRes(TGComboBox *b)