SND@LHC Software
Loading...
Searching...
No Matches
EventDisplay.h
Go to the documentation of this file.
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
39namespace genfit {
40
47
59class EventDisplay : public TNamed {
60 private:
62
63 public:
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
98
135 void setOptions(std::string opts);
136
138 void setErrScale(double errScale = 1.);
139
141 double getErrScale();
142
144 void open();
145
146 void guiGoto();
147 void guiGoto2();
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_;
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
229 TGNumberEntry* guiDPVal_;
230 double dPVal_;
231 TGNumberEntry* guiRelChi2_;
232 double dRelChi2_;
233 TGNumberEntry* guiNMinIter_;
234 unsigned int nMinIter_;
235 TGNumberEntry* guiNMaxIter_;
236 unsigned int nMaxIter_;
237 TGNumberEntry* guiNMaxFailed_;
239 TGCheckButton* guiResort_;
241
242
243 public:
244 ClassDef(EventDisplay,1)
245
246};
247
248} /* End of namespace genfit */
251#endif // genfit_EventDisplay_h
252
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
Event display designed to run with Genfit.
void guiSelectMmHandling(int val)
TGNumberEntry * guiDebugLvl_
void next(unsigned int stp=1)
Go to the next event or step a certain number of events ahead.
unsigned int trackId_
TEveBox * boxCreator(TVector3 o, TVector3 u, TVector3 v, float ud, float vd, float depth)
Create a box around o, oriented along u and v with widths ud, vd and depth and return a pointer to th...
TGCheckButton * guiDrawPlanes_
TGCheckButton * guiDrawGeometry_
void addEvent(std::vector< const genfit::Track * > &tracks)
TGCheckButton * guiDrawTrack_
int getNEvents()
Get the total number of events stored.
eMultipleMeasurementHandling mmHandling_
TGCheckButton * guiDrawBackward_
TGNumberEntry * guiEvent
void addEvent(std::vector< genfit::Track * > &tracks)
Add new event.
void drawEvent(unsigned int id, bool resetCam=true)
Draw an event.
TGCheckButton * guiDrawErrors_
TGCheckButton * guiSquareRootFormalism_
unsigned int debugLvl_
TGCheckButton * guiRefit_
void gotoEvent(unsigned int id)
Go to event with index id.
TGCheckButton * guiDrawAllTracks_
void prev(unsigned int stp=1)
Go to the previous event or step a certain number of events back.
TGNumberEntry * guiRelChi2_
TGNumberEntry * guiNMinIter_
TGNumberEntry * guiNMaxFailed_
TGCheckButton * guiDrawScaleMan_
void setErrScale(double errScale=1.)
Set the scaling factor for the visualization of the errors.
TGCheckButton * guiDrawRefTrack_
TGNumberEntry * guiTrackId_
TGNumberEntry * guiRepId_
std::vector< std::vector< genfit::Track * > * > events_
TGCheckButton * guiDrawAutoScale_
unsigned int eventId_
void reset()
Drop all events.
static EventDisplay * getInstance()
TGNumberEntry * guiDPVal_
TGCheckButton * guiDrawCardinalRep_
unsigned int nMaxIter_
void makeGui()
Build the buttons for event navigation.
TGNumberEntry * guiErrorScale_
TGCheckButton * guiDrawHits_
TGCheckButton * guiResort_
void setOptions(std::string opts)
Set the display options.
TGButtonGroup * guiMmHandling_
void makeLines(const StateOnPlane *prevState, const StateOnPlane *state, const AbsTrackRep *rep, const Color_t &color, const Style_t &style, bool drawMarkers, bool drawErrors, double lineWidth=2, int markerPos=1)
TGCheckButton * guiDrawForward_
static EventDisplay * eventDisplay_
void guiSelectFitterId(int val)
void addEvent(const Track *tr)
Add new event.
TGCheckButton * guiDrawDetectors_
TGButtonGroup * guiFitterId_
void open()
Open the event display.
TGCheckButton * guiDrawTrackMarkers_
unsigned int nMinIter_
TGNumberEntry * guiNMaxIter_
double getErrScale()
Get the error scaling factor.
TGNumberEntry * guiEvent2
A state with arbitrary dimension defined in a DetPlane.
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition Track.h:71
Matrix inversion tools.
Definition AbsBField.h:29
eMultipleMeasurementHandling
@ SimpleKalman