GEMC  1.8
Geant4 Monte-Carlo Framework
gsignal.h
Go to the documentation of this file.
1 #ifndef gsignal_H
2 #define gsignal_H 1
3 
4 // %%%%%%%%%%
5 // Qt headers
6 // %%%%%%%%%%
7 #include <QWidget>
8 #include <QSlider>
9 #include <QComboBox>
10 #include <QTextEdit>
11 
12 
13 // %%%%%%%%%%%%%
14 // gemc headers
15 // %%%%%%%%%%%%%
16 #include "usage.h"
17 #include "MSensitiveDetector.h"
18 
19 // %%%%%%%%%%
20 // G4 headers
21 // %%%%%%%%%%
22 #include "G4UImanager.hh"
23 
24 // %%%%%%%%%%%
25 // C++ headers
26 // %%%%%%%%%%%
27 #include <string>
28 #include <map>
29 using namespace std;
30 
31 
32 // %%%%%%%%%%%%%%%%
33 // Class definition
34 // %%%%%%%%%%%%%%%%
35 class gsignal : public QWidget
36 {
37  // metaobject required for non-qt slots
38  Q_OBJECT
39 
40  public:
41  gsignal(QWidget *parent, gemc_opts*, map<string, MSensitiveDetector*>);
42  ~gsignal();
43 
44  int xorig, yorig; // origin of the axis
45  int xaxil, yaxil; // axis length
46  double xmin, ymin; // graph minima
47  double xmax, ymax; // graph maxima
48  double inside; // how much inside the graph will be
49  double dx, dy, DX, DY; // lowercase: graph limits; uppercase: scene inside limits
50  int nticksx, nticksy;
51 
52  void plots_bg(string xtit, string ytit, vector<double> x, vector<double> y, string title); // draw axis, ticks and labels
53  void osci_bg( string xtit, string ytit, vector<double> x, vector<double> y, string title); // draw axis, ticks, labels and oscilloscope background
54  void plot_graph(vector<double> x, vector<double> y, vector<int> pid);
55 
57  G4UImanager *UImanager;
58  map<string, MSensitiveDetector*> SeDe_Map;
59 
60  map<int, QPen> pcolors;
61 
62  private:
63  QTreeWidget *gsignals;
64  QTreeWidget *s_detectors;
65 
66  QLinearGradient HitGrad;
67  QBrush HitBrush;
68 
69  QGraphicsView *plots;
70  QGraphicsScene *scene;
71 
72 
73  public slots:
74 
75  QTreeWidget* CreateSDetsTree(); // creates Sensitive Detector / Hits Tree
76  QTreeWidget* CreateSignalsTree(); // creates signals tree
77 
78 
79 };
80 
81 #endif
82 
83 
84 
85 
86 
87 
88 
89 
double ymax
Definition: gsignal.h:47
double ymin
Definition: gsignal.h:46
map< int, QPen > pcolors
Definition: gsignal.h:60
double DY
Definition: gsignal.h:49
STL namespace.
int yaxil
Definition: gsignal.h:45
int yorig
Definition: gsignal.h:44
map< string, MSensitiveDetector * > SeDe_Map
Definition: gsignal.h:58
G4UImanager * UImanager
Definition: gsignal.h:57
double inside
Definition: gsignal.h:48
int nticksy
Definition: gsignal.h:50
gemc_opts * gemcOpt
Definition: gsignal.h:56