Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventDisplay.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventDisplay.h
1 /* Copyright 2011, Technische Universitaet Muenchen,
2  Author: Karl Bicker
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
23 #ifndef genfit_EventDisplay_h
24 #define genfit_EventDisplay_h
25 
26 #include "Track.h"
27 #include "AbsKalmanFitter.h"
28 
29 #include <TEveBox.h>
30 #include <TVector3.h>
31 #include <string>
32 #include <vector>
33 
34 #include <TGButton.h>
35 #include <TGNumberEntry.h>
36 #include <TGButtonGroup.h>
37 
38 
39 namespace genfit {
40 
46 };
47 
59 class EventDisplay : public TNamed {
60  private:
61  EventDisplay();
62 
63  public:
64  ~EventDisplay();
65  static EventDisplay* getInstance();
66 
68  void reset();
69 
77  void addEvent(std::vector<genfit::Track*>& tracks);
78  void addEvent(std::vector<const genfit::Track*>& tracks);
79 
85  void addEvent(const Track* tr);
86 
88  void next(unsigned int stp = 1);
89 
91  void prev(unsigned int stp = 1);
92 
94  void gotoEvent(unsigned int id);
95 
97  int getNEvents();
98 
136 
138  void setErrScale(double errScale = 1.);
139 
141  double getErrScale();
142 
144  void open();
145 
146  void guiGoto();
147  void guiGoto2();
148  void guiSetDrawParams();
149  void guiSelectFitterId(int val);
150  void guiSelectMmHandling(int val);
151 
152  private:
154  void makeGui();
155 
157  void drawEvent(unsigned int id, bool resetCam = true);
158 
162  TEveBox* boxCreator(TVector3 o, TVector3 u, TVector3 v, float ud, float vd, float depth);
163 
164  void makeLines(const StateOnPlane* prevState, const StateOnPlane* state, const AbsTrackRep* rep,
165  const Color_t& color, const Style_t& style, bool drawMarkers, bool drawErrors, double lineWidth = 2, int markerPos = 1);
166 
167 
169  unsigned int eventId_;
170  double errorScale_;
171  std::vector< std::vector<genfit::Track*>* > events_;
172 
173 
174  TGNumberEntry* guiEvent;
175  TGNumberEntry* guiEvent2;
176 
177  TGCheckButton* guiDrawGeometry_;
179  TGCheckButton* guiDrawDetectors_;
181  TGCheckButton* guiDrawHits_;
182  bool drawHits_;
183  TGCheckButton* guiDrawErrors_;
185 
186  TGCheckButton* guiDrawPlanes_;
188  TGCheckButton* guiDrawTrackMarkers_;
190 
191  TGCheckButton* guiDrawTrack_;
193  TGCheckButton* guiDrawRefTrack_;
195  TGCheckButton* guiDrawForward_;
197  TGCheckButton* guiDrawBackward_;
199 
200  TGCheckButton* guiDrawAutoScale_;
202  TGCheckButton* guiDrawScaleMan_;
204  TGNumberEntry* guiErrorScale_;
205 
207 
208  TGCheckButton* guiDrawCardinalRep_;
210  TGNumberEntry* guiRepId_;
211  unsigned int repId_;
212 
213  TGCheckButton* guiDrawAllTracks_;
215  TGNumberEntry* guiTrackId_;
216  unsigned int trackId_;
217 
218  TGCheckButton* guiRefit_;
219  bool refit_;
220  TGNumberEntry* guiDebugLvl_;
221  unsigned int debugLvl_;
222  TGButtonGroup* guiFitterId_;
224  TGButtonGroup* guiMmHandling_;
226 
227  TGCheckButton* guiSquareRootFormalism_;
229  TGNumberEntry* guiDPVal_;
230  double dPVal_;
231  TGNumberEntry* guiRelChi2_;
232  double dRelChi2_;
233  TGNumberEntry* guiDChi2Ref_;
234  double dChi2Ref_;
235  TGNumberEntry* guiNMinIter_;
236  unsigned int nMinIter_;
237  TGNumberEntry* guiNMaxIter_;
238  unsigned int nMaxIter_;
239  TGNumberEntry* guiNMaxFailed_;
241  TGCheckButton* guiResort_;
242  bool resort_;
243 
244 
245  public:
246  ClassDef(EventDisplay,1)
247 
248 };
249 
250 } /* End of namespace genfit */
253 #endif // genfit_EventDisplay_h
254