SND@LHC Software
Loading...
Searching...
No Matches
genfit::EventDisplay Class Reference

Event display designed to run with Genfit. More...

#include <EventDisplay.h>

Inheritance diagram for genfit::EventDisplay:
Collaboration diagram for genfit::EventDisplay:

Public Member Functions

 ~EventDisplay ()
 
void reset ()
 Drop all events.
 
void addEvent (std::vector< genfit::Track * > &tracks)
 Add new event.
 
void addEvent (std::vector< const genfit::Track * > &tracks)
 
void addEvent (const Track *tr)
 Add new event.
 
void next (unsigned int stp=1)
 Go to the next event or step a certain number of events ahead.
 
void prev (unsigned int stp=1)
 Go to the previous event or step a certain number of events back.
 
void gotoEvent (unsigned int id)
 Go to event with index id.
 
int getNEvents ()
 Get the total number of events stored.
 
void setOptions (std::string opts)
 Set the display options.
 
void setErrScale (double errScale=1.)
 Set the scaling factor for the visualization of the errors.
 
double getErrScale ()
 Get the error scaling factor.
 
void open ()
 Open the event display.
 
void guiGoto ()
 
void guiGoto2 ()
 
void guiSetDrawParams ()
 
void guiSelectFitterId (int val)
 
void guiSelectMmHandling (int val)
 

Static Public Member Functions

static EventDisplaygetInstance ()
 

Private Member Functions

 EventDisplay ()
 
void makeGui ()
 Build the buttons for event navigation.
 
void drawEvent (unsigned int id, bool resetCam=true)
 Draw an event.
 
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 the box object.
 
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)
 

Private Attributes

unsigned int eventId_
 
double errorScale_
 
std::vector< std::vector< genfit::Track * > * > events_
 
TGNumberEntry * guiEvent
 
TGNumberEntry * guiEvent2
 
TGCheckButton * guiDrawGeometry_
 
bool drawGeometry_
 
TGCheckButton * guiDrawDetectors_
 
bool drawDetectors_
 
TGCheckButton * guiDrawHits_
 
bool drawHits_
 
TGCheckButton * guiDrawErrors_
 
bool drawErrors_
 
TGCheckButton * guiDrawPlanes_
 
bool drawPlanes_
 
TGCheckButton * guiDrawTrackMarkers_
 
bool drawTrackMarkers_
 
TGCheckButton * guiDrawTrack_
 
bool drawTrack_
 
TGCheckButton * guiDrawRefTrack_
 
bool drawRefTrack_
 
TGCheckButton * guiDrawForward_
 
bool drawForward_
 
TGCheckButton * guiDrawBackward_
 
bool drawBackward_
 
TGCheckButton * guiDrawAutoScale_
 
bool drawAutoScale_
 
TGCheckButton * guiDrawScaleMan_
 
bool drawScaleMan_
 
TGNumberEntry * guiErrorScale_
 
bool drawSilent_
 
TGCheckButton * guiDrawCardinalRep_
 
bool drawCardinalRep_
 
TGNumberEntry * guiRepId_
 
unsigned int repId_
 
TGCheckButton * guiDrawAllTracks_
 
bool drawAllTracks_
 
TGNumberEntry * guiTrackId_
 
unsigned int trackId_
 
TGCheckButton * guiRefit_
 
bool refit_
 
TGNumberEntry * guiDebugLvl_
 
unsigned int debugLvl_
 
TGButtonGroup * guiFitterId_
 
eFitterType fitterId_
 
TGButtonGroup * guiMmHandling_
 
eMultipleMeasurementHandling mmHandling_
 
TGCheckButton * guiSquareRootFormalism_
 
bool squareRootFormalism_
 
TGNumberEntry * guiDPVal_
 
double dPVal_
 
TGNumberEntry * guiRelChi2_
 
double dRelChi2_
 
TGNumberEntry * guiNMinIter_
 
unsigned int nMinIter_
 
TGNumberEntry * guiNMaxIter_
 
unsigned int nMaxIter_
 
TGNumberEntry * guiNMaxFailed_
 
int nMaxFailed_
 
TGCheckButton * guiResort_
 
bool resort_
 

Static Private Attributes

static EventDisplayeventDisplay_
 

Detailed Description

Event display designed to run with Genfit.

Author
Karl Bicker (Technische Universität München, original author)

The EventDisplay class is a singelton used to visualize the events processed with Genfit. The event display uses the EVE event visualization package to visualize Tracks which are bundled in a vector and which form one event. The information about the tracks is supplied in Track objects. To use the event display, the geometry (TGeoManager)and magnetic field (FieldManager) have to be initialized and gApplication and gEve have to exist.

Definition at line 59 of file EventDisplay.h.

Constructor & Destructor Documentation

◆ EventDisplay()

genfit::EventDisplay::EventDisplay ( )
private

◆ ~EventDisplay()

genfit::EventDisplay::~EventDisplay ( )

Member Function Documentation

◆ addEvent() [1/3]

void genfit::EventDisplay::addEvent ( const Track tr)

Add new event.

Add a new event consisting of one track.

◆ addEvent() [2/3]

void genfit::EventDisplay::addEvent ( std::vector< const genfit::Track * > &  tracks)

◆ addEvent() [3/3]

void genfit::EventDisplay::addEvent ( std::vector< genfit::Track * > &  tracks)

Add new event.

Add a new event. An event is a collection of Tracks which are displayed at the the same time. The tracks are copied.

◆ boxCreator()

TEveBox * genfit::EventDisplay::boxCreator ( TVector3  o,
TVector3  u,
TVector3  v,
float  ud,
float  vd,
float  depth 
)
private

Create a box around o, oriented along u and v with widths ud, vd and depth and return a pointer to the box object.

◆ drawEvent()

void genfit::EventDisplay::drawEvent ( unsigned int  id,
bool  resetCam = true 
)
private

Draw an event.

◆ getErrScale()

double genfit::EventDisplay::getErrScale ( )

Get the error scaling factor.

◆ getInstance()

static EventDisplay * genfit::EventDisplay::getInstance ( )
static

◆ getNEvents()

int genfit::EventDisplay::getNEvents ( )

Get the total number of events stored.

◆ gotoEvent()

void genfit::EventDisplay::gotoEvent ( unsigned int  id)

Go to event with index id.

◆ guiGoto()

void genfit::EventDisplay::guiGoto ( )

◆ guiGoto2()

void genfit::EventDisplay::guiGoto2 ( )

◆ guiSelectFitterId()

void genfit::EventDisplay::guiSelectFitterId ( int  val)

◆ guiSelectMmHandling()

void genfit::EventDisplay::guiSelectMmHandling ( int  val)

◆ guiSetDrawParams()

void genfit::EventDisplay::guiSetDrawParams ( )

◆ makeGui()

void genfit::EventDisplay::makeGui ( )
private

Build the buttons for event navigation.

◆ makeLines()

void genfit::EventDisplay::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 
)
private

◆ next()

void genfit::EventDisplay::next ( unsigned int  stp = 1)

Go to the next event or step a certain number of events ahead.

◆ open()

void genfit::EventDisplay::open ( )

Open the event display.

◆ prev()

void genfit::EventDisplay::prev ( unsigned int  stp = 1)

Go to the previous event or step a certain number of events back.

◆ reset()

void genfit::EventDisplay::reset ( )

Drop all events.

◆ setErrScale()

void genfit::EventDisplay::setErrScale ( double  errScale = 1.)

Set the scaling factor for the visualization of the errors.

◆ setOptions()

void genfit::EventDisplay::setOptions ( std::string  opts)

Set the display options.

The option string lets you steer the way the events are displayed. The following options are available:

'A': Autoscale errors. The representation of hits are scaled with the error found their covariance matrix. This can lead to hits not being displayed beause the errors are too small. Autoscaling ensures that the errors are scaled up sufficiently to ensure all hits are displayed. However, this can lead to unwanted results if there are only a few hits with very small errors, as all hits are scaled by the same factor to ensure consistency.

'B': Draw Backward Fit (track segments start at updates and end at predictions)

'D': Draw detectors. This causes a simple representation for all detectors to be drawn. For planar detectors, this is a plane with the same position and orientation of the real detector plane, but with different size. For wires, this is a tube whose diameter is equal to the value measured by the wire. Spacepoint hits are not affected by this option.

'E': Draw Error cones (position and direction uncertainties) around the track.

'F': Draw Forward Fit (track segments start at updates and end at predictions) 'H': Draw hits. This causes the hits to be visualized. Normally, the size of the hit representation is connected to the covariance matrix of the hit, scaled by the value set in setErrScale which is normally 1. See also option 'A' and 'S'. Normally used in connection with 'D'.

'G': Draw geometry. Draw also the geometry in the gGeoManager. This feature is experimental and may lead to strang things being drawn.

'M': Draw track markers. Draw the intersection points between the track and the virtual (and/or real) detector planes. Can only be used in connection with 'T'.

'P': Draw detector planes. Draws the virtual (and/or real) detector planes.

'S': Scale manually. This leads to the spacepoint hits (and only them up to now!) being drawn as spheres with radius 0.5 scaled with the error scale factor. Can be used if the scaling with errors leads to problems.

'T': Draw Track. Draw the track as lines between the virtual (and/or real) detector planes.

'X': Draw silent. Does not run the TApplication.

Member Data Documentation

◆ debugLvl_

unsigned int genfit::EventDisplay::debugLvl_
private

Definition at line 221 of file EventDisplay.h.

◆ dPVal_

double genfit::EventDisplay::dPVal_
private

Definition at line 230 of file EventDisplay.h.

◆ drawAllTracks_

bool genfit::EventDisplay::drawAllTracks_
private

Definition at line 214 of file EventDisplay.h.

◆ drawAutoScale_

bool genfit::EventDisplay::drawAutoScale_
private

Definition at line 201 of file EventDisplay.h.

◆ drawBackward_

bool genfit::EventDisplay::drawBackward_
private

Definition at line 198 of file EventDisplay.h.

◆ drawCardinalRep_

bool genfit::EventDisplay::drawCardinalRep_
private

Definition at line 209 of file EventDisplay.h.

◆ drawDetectors_

bool genfit::EventDisplay::drawDetectors_
private

Definition at line 180 of file EventDisplay.h.

◆ drawErrors_

bool genfit::EventDisplay::drawErrors_
private

Definition at line 184 of file EventDisplay.h.

◆ drawForward_

bool genfit::EventDisplay::drawForward_
private

Definition at line 196 of file EventDisplay.h.

◆ drawGeometry_

bool genfit::EventDisplay::drawGeometry_
private

Definition at line 178 of file EventDisplay.h.

◆ drawHits_

bool genfit::EventDisplay::drawHits_
private

Definition at line 182 of file EventDisplay.h.

◆ drawPlanes_

bool genfit::EventDisplay::drawPlanes_
private

Definition at line 187 of file EventDisplay.h.

◆ drawRefTrack_

bool genfit::EventDisplay::drawRefTrack_
private

Definition at line 194 of file EventDisplay.h.

◆ drawScaleMan_

bool genfit::EventDisplay::drawScaleMan_
private

Definition at line 203 of file EventDisplay.h.

◆ drawSilent_

bool genfit::EventDisplay::drawSilent_
private

Definition at line 206 of file EventDisplay.h.

◆ drawTrack_

bool genfit::EventDisplay::drawTrack_
private

Definition at line 192 of file EventDisplay.h.

◆ drawTrackMarkers_

bool genfit::EventDisplay::drawTrackMarkers_
private

Definition at line 189 of file EventDisplay.h.

◆ dRelChi2_

double genfit::EventDisplay::dRelChi2_
private

Definition at line 232 of file EventDisplay.h.

◆ errorScale_

double genfit::EventDisplay::errorScale_
private

Definition at line 170 of file EventDisplay.h.

◆ eventDisplay_

EventDisplay* genfit::EventDisplay::eventDisplay_
staticprivate

Definition at line 168 of file EventDisplay.h.

◆ eventId_

unsigned int genfit::EventDisplay::eventId_
private

Definition at line 169 of file EventDisplay.h.

◆ events_

std::vector< std::vector<genfit::Track*>* > genfit::EventDisplay::events_
private

Definition at line 171 of file EventDisplay.h.

◆ fitterId_

eFitterType genfit::EventDisplay::fitterId_
private

Definition at line 223 of file EventDisplay.h.

◆ guiDebugLvl_

TGNumberEntry* genfit::EventDisplay::guiDebugLvl_
private

Definition at line 220 of file EventDisplay.h.

◆ guiDPVal_

TGNumberEntry* genfit::EventDisplay::guiDPVal_
private

Definition at line 229 of file EventDisplay.h.

◆ guiDrawAllTracks_

TGCheckButton* genfit::EventDisplay::guiDrawAllTracks_
private

Definition at line 213 of file EventDisplay.h.

◆ guiDrawAutoScale_

TGCheckButton* genfit::EventDisplay::guiDrawAutoScale_
private

Definition at line 200 of file EventDisplay.h.

◆ guiDrawBackward_

TGCheckButton* genfit::EventDisplay::guiDrawBackward_
private

Definition at line 197 of file EventDisplay.h.

◆ guiDrawCardinalRep_

TGCheckButton* genfit::EventDisplay::guiDrawCardinalRep_
private

Definition at line 208 of file EventDisplay.h.

◆ guiDrawDetectors_

TGCheckButton* genfit::EventDisplay::guiDrawDetectors_
private

Definition at line 179 of file EventDisplay.h.

◆ guiDrawErrors_

TGCheckButton* genfit::EventDisplay::guiDrawErrors_
private

Definition at line 183 of file EventDisplay.h.

◆ guiDrawForward_

TGCheckButton* genfit::EventDisplay::guiDrawForward_
private

Definition at line 195 of file EventDisplay.h.

◆ guiDrawGeometry_

TGCheckButton* genfit::EventDisplay::guiDrawGeometry_
private

Definition at line 177 of file EventDisplay.h.

◆ guiDrawHits_

TGCheckButton* genfit::EventDisplay::guiDrawHits_
private

Definition at line 181 of file EventDisplay.h.

◆ guiDrawPlanes_

TGCheckButton* genfit::EventDisplay::guiDrawPlanes_
private

Definition at line 186 of file EventDisplay.h.

◆ guiDrawRefTrack_

TGCheckButton* genfit::EventDisplay::guiDrawRefTrack_
private

Definition at line 193 of file EventDisplay.h.

◆ guiDrawScaleMan_

TGCheckButton* genfit::EventDisplay::guiDrawScaleMan_
private

Definition at line 202 of file EventDisplay.h.

◆ guiDrawTrack_

TGCheckButton* genfit::EventDisplay::guiDrawTrack_
private

Definition at line 191 of file EventDisplay.h.

◆ guiDrawTrackMarkers_

TGCheckButton* genfit::EventDisplay::guiDrawTrackMarkers_
private

Definition at line 188 of file EventDisplay.h.

◆ guiErrorScale_

TGNumberEntry* genfit::EventDisplay::guiErrorScale_
private

Definition at line 204 of file EventDisplay.h.

◆ guiEvent

TGNumberEntry* genfit::EventDisplay::guiEvent
private

Definition at line 174 of file EventDisplay.h.

◆ guiEvent2

TGNumberEntry* genfit::EventDisplay::guiEvent2
private

Definition at line 175 of file EventDisplay.h.

◆ guiFitterId_

TGButtonGroup* genfit::EventDisplay::guiFitterId_
private

Definition at line 222 of file EventDisplay.h.

◆ guiMmHandling_

TGButtonGroup* genfit::EventDisplay::guiMmHandling_
private

Definition at line 224 of file EventDisplay.h.

◆ guiNMaxFailed_

TGNumberEntry* genfit::EventDisplay::guiNMaxFailed_
private

Definition at line 237 of file EventDisplay.h.

◆ guiNMaxIter_

TGNumberEntry* genfit::EventDisplay::guiNMaxIter_
private

Definition at line 235 of file EventDisplay.h.

◆ guiNMinIter_

TGNumberEntry* genfit::EventDisplay::guiNMinIter_
private

Definition at line 233 of file EventDisplay.h.

◆ guiRefit_

TGCheckButton* genfit::EventDisplay::guiRefit_
private

Definition at line 218 of file EventDisplay.h.

◆ guiRelChi2_

TGNumberEntry* genfit::EventDisplay::guiRelChi2_
private

Definition at line 231 of file EventDisplay.h.

◆ guiRepId_

TGNumberEntry* genfit::EventDisplay::guiRepId_
private

Definition at line 210 of file EventDisplay.h.

◆ guiResort_

TGCheckButton* genfit::EventDisplay::guiResort_
private

Definition at line 239 of file EventDisplay.h.

◆ guiSquareRootFormalism_

TGCheckButton* genfit::EventDisplay::guiSquareRootFormalism_
private

Definition at line 227 of file EventDisplay.h.

◆ guiTrackId_

TGNumberEntry* genfit::EventDisplay::guiTrackId_
private

Definition at line 215 of file EventDisplay.h.

◆ mmHandling_

eMultipleMeasurementHandling genfit::EventDisplay::mmHandling_
private

Definition at line 225 of file EventDisplay.h.

◆ nMaxFailed_

int genfit::EventDisplay::nMaxFailed_
private

Definition at line 238 of file EventDisplay.h.

◆ nMaxIter_

unsigned int genfit::EventDisplay::nMaxIter_
private

Definition at line 236 of file EventDisplay.h.

◆ nMinIter_

unsigned int genfit::EventDisplay::nMinIter_
private

Definition at line 234 of file EventDisplay.h.

◆ refit_

bool genfit::EventDisplay::refit_
private

Definition at line 219 of file EventDisplay.h.

◆ repId_

unsigned int genfit::EventDisplay::repId_
private

Definition at line 211 of file EventDisplay.h.

◆ resort_

bool genfit::EventDisplay::resort_
private

Definition at line 240 of file EventDisplay.h.

◆ squareRootFormalism_

bool genfit::EventDisplay::squareRootFormalism_
private

Definition at line 228 of file EventDisplay.h.

◆ trackId_

unsigned int genfit::EventDisplay::trackId_
private

Definition at line 216 of file EventDisplay.h.


The documentation for this class was generated from the following file: