KaliVeda
Toolkit for HIC analysis
KVItvFinderDialog.h
1 
4 #ifndef __KVITVFINDERDIALOG_H
5 #define __KVITVFINDERDIALOG_H
6 
7 #include "RQ_OBJECT.h"
8 #include "TGFrame.h"
9 #include "TGButton.h"
10 #include <TGComboBox.h>
11 #include <TGLabel.h>
12 #include <TGNumberEntry.h>
13 #include <TGTextEntry.h>
14 #include <TGProgressBar.h>
15 #include "TCanvas.h"
16 #include "KVList.h"
17 #include "KVListView.h"
18 #include "KVIDZAFromZGrid.h"
19 #include "TGToolBar.h"
20 #include "TGButton.h"
21 #include <TSpectrum.h>
22 #include <TROOT.h>
23 #include <TF1.h>
24 #include "KVPIDIntervalPainter.h"
25 
35  RQ_OBJECT("KVZAFinderDialog");
36 
37  TGTransientFrame* fMain;
38  TCanvas* fCanvas;
39  TVirtualPad* fPad;
40 
41  TGToolBar* fToolBar;
42  TGToolBar* fToolBar2;
43  TGButton* fTBbuttons[50];
44  Int_t fNbButtons;
45 
46 
47  KVList* fCustoms;
48  KVListView* fIntervalSetListView;
49  KVListView* fIntervalListView;
50 
51  KVIDZAFromZGrid* fGrid;
52  TH2* fHisto;
53  TH1* fLinearHisto;
54 
55  KVList fItvPaint;
56 
57  TSpectrum fSpectrum;
58  TGraph* fPoints;
59  Int_t fNPoints;
60  TList fFunc;
61  Int_t fNpeaks[30];
62 
63  Int_t fNextIntervalZ;
64 
65  Double_t fSig, fRat;
66 
67  KVPIDIntervalPainter* last_drawn_interval;
68  void delete_painter_from_painter_list(KVPIDIntervalPainter*);
69 
70  interval_set* current_interval_set = nullptr;// interval selected by ZoomOnCanvas()
71 
72  void remove_interval_from_interval_set(interval_set* itvs, interval* itv, bool remove_fit = true);
73 
74  bool negative_bkg_slope_changed = false;
75 public:
76  enum {
82  M_UNZOOM
83  };
84 
87  {
88  fMain->CloseWindow();
89  }
90 
92  {
93  return fNextIntervalZ;
94  }
95  void SetNextIntevalZ(int zz)
96  {
97  fNextIntervalZ = zz;
98  }
99 
100  void DisplayPIDint();
101  void SelectionITVChanged();
102  void UpdatePIDList();
103 
104  void ZoomOnCanvas();
105  void DrawIntervals();
106  void DrawInterval(interval_set* itvs, bool label = 0);
107 
108  void ClearInterval(interval_set* itvs);
109 
111  void LinearizeHisto(int nbins);
112 
113  void DoClose()
114  {
115  gROOT->ProcessLine("KVItvFinderDialog* _dummy_itv=nullptr");
116  delete this;
117  }
118 
119  void Identify();//{ProcessIdentification(1,25);}//{Info("SaveGrid","Not yet implemented");}
120  void Identify(double sigma, double ratio);//{ProcessIdentification(1,25);}//{Info("SaveGrid","Not yet implemented");}
121  void SaveGrid();//{fGrid->GetIntervalSets()->ls(); fGrid->GetParameters()->ls();}
122  void ExportToGrid();
123  void NewInterval();//{Info("NewInterval","Not yet implemented");}
124  void AddInterval(double pid);
125  void NewIntervalSet();//{Info("NewIntervalSet","Not yet implemented");}
126  void RemoveInterval();//{Info("RemoveInterval","Not yet implemented");}
127  void MassesUp();//{Info("ChangeMasses","Not yet implemented");}
128  void MassesDown();//{Info("ChangeMasses","Not yet implemented");}
129  void UpdateLists();//{cout << "toto" << endl;}
130  void TestIdent();//;{cout << "TestIdent()" << endl;}
131  void SetLogy();
132  void UnzoomHisto();
133  void FitIsotopes();
134  void SetFitParameters();
135  void RemoveFit();
136 
137  void HandleKey();
138  void PrintHelp();
139 
140  void ProcessIdentification(Int_t zmin = -1, Int_t zmax = -1);
141  void FindPIDIntervals(Int_t zz);
142  Double_t fpeaks(Double_t* x, Double_t* par);
143  ClassDef(KVItvFinderDialog, 1) //gui to KVPIDIntevalFinder
144 };
145 
146 
149 
154 
157 
162 
164 
167 
168 #endif
int Int_t
double Double_t
#define ClassDef(name, id)
#define gROOT
Hybrid charge & mass identification grid.
GUI for finding/fixing mass identification intervals.
void DrawInterval(interval_set *itvs, bool label=0)
void ClearInterval(interval_set *itvs)
void ProcessIdentification(Int_t zmin=-1, Int_t zmax=-1)
void AddInterval(double pid)
virtual ~KVItvFinderDialog()
void Identify()
KVBase::OpenContextMenu("Identify(double,double)",this);.
void SetFitParameters()
Open dialog to modify parameters for multigauss mass fit.
void FindPIDIntervals(Int_t zz)
KVItvFinderDialog(KVIDZAFromZGrid *gg, TH2 *hh)
void RemoveFit()
Remove fit of currently selected interval set from pad.
void ExportToGrid()
Write all PID intervals in grid parameters "PIDRANGE", "PIDRANGE%d", etc.
void TestIdent()
fGrid->SetOnlyZId(0);
void SetNextIntevalZ(int zz)
void LinearizeHisto(int nbins)
Double_t fpeaks(Double_t *x, Double_t *par)
void ZoomOnCanvas()
Display the interval set for a given Z when the user double clicks on it.
Enhanced version of ROOT TGListView widget.
Definition: KVListView.h:147
Extended TList class which owns its objects by default.
Definition: KVList.h:22
Graphical representation of a PID interval in the KVIDZAFromZGrid mass assignation GUI.
virtual void CloseWindow()