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