Belle II Software
release-08-01-10
|
Produces visualisation for MCParticles, simhits, genfit::Tracks, geometry and other things. More...
#include <EVEVisualization.h>
Classes | |
struct | ElementGroup |
Group of TEveElements, remembers wether user wants it visible or not. More... | |
struct | MCTrack |
Hold MC tracks and associated visualisation objects. More... | |
Public Member Functions | |
EVEVisualization () | |
Constructor. | |
EVEVisualization (const EVEVisualization &)=delete | |
disabled. | |
EVEVisualization & | operator= (const EVEVisualization &)=delete |
disabled assignment | |
~EVEVisualization () | |
Destructor. | |
void | addTrack (const Belle2::Track *belle2Track) |
Add this genfit::Track to event data. More... | |
void | addTrackCandidate (const std::string &collectionName, const RecoTrack &recoTrack) |
Add a RecoTrack, to evaluate track finding. | |
void | addTrackCandidateImproved (const std::string &collectionName, const RecoTrack &recoTrack) |
Add a RecoTrack, but use stored genfit track representation to make visualisation objects. More... | |
void | addCDCTriggerTrack (const std::string &collectionName, const CDCTriggerTrack &track) |
Add a CDCTriggerTrack. | |
template<class T > | |
void | addSimHits (const StoreArray< T > &hits) |
Add all entries in the given 'hits' array (and the corresponding MCParticles) to the event scene. | |
void | addSimHit (const CDCSimHit *hit, const MCParticle *particle) |
Add a CDCSimHit. | |
void | addSimHit (const PXDSimHit *hit, const MCParticle *particle) |
Add a PXDSimHit. | |
void | addSimHit (const SVDSimHit *hit, const MCParticle *particle) |
Add a SVDSimHit. | |
void | addSimHit (const KLMSimHit *hit, const MCParticle *particle) |
Add a KLMSimHit. | |
void | addSimHit (const TVector3 &v, const MCParticle *particle) |
Add simhit as a simple point. | |
void | addSimHit (const ROOT::Math::XYZVector &v, const MCParticle *particle) |
Add simhit as a simple point. | |
MCTrack * | addMCParticle (const MCParticle *particle) |
Return MCTrack for given particle, add it if it doesn't exist yet. More... | |
void | addVertex (const genfit::GFRaveVertex *vertex) |
Add a vertex point and its covariance matrix. | |
void | addECLCluster (const ECLCluster *cluster) |
Add a reconstructed cluster in the ECL. | |
void | addKLMCluster (const KLMCluster *cluster) |
Add a reconstructed cluster in the KLM. | |
void | addBKLMHit2d (const KLMHit2d *bklm2dhit) |
Add a reconstructed 2d hit in the BKLM. | |
void | addEKLMHit2d (const KLMHit2d *eklm2dhit) |
Add a reconstructed 2d hit in the EKLM. | |
void | addARICHHit (const ARICHHit *hit) |
Add recontructed hit in ARICH. | |
void | addROI (const ROIid *roi) |
Add a Region Of Interest, computed by the PXDDataReduction module. | |
template<class T > | |
void | addUnassignedRecoHits (const StoreArray< T > &hits) |
After adding recohits for tracks/candidates, this function adds the remaining hits in a global collection. | |
void | addCDCHit (const CDCHit *hit, bool showTriggerHits=false) |
show CDCHits directly. | |
void | addCDCTriggerSegmentHit (const std::string &collectionName, const CDCTriggerSegmentHit *hit) |
show outline of track segments. | |
void | addTOPDigits (const StoreArray< TOPDigit > &digits) |
Add TOPDigits (shown aggregated per module). | |
void | addObject (const TObject *dataStoreObject, TEveElement *visualRepresentation) |
Generic function to keep track of which objects have which visual representation. More... | |
void | showUserData (const DisplayData &displayData) |
Add user-defined data (labels, points, etc.) | |
void | makeTracks () |
Create visual representation of all tracks. More... | |
void | clearEvent () |
clear event data. | |
void | setOptions (const std::string &opts) |
Set the display options. More... | |
void | setErrScale (double errScale=1.) |
Set the scaling factor for the visualization of track hit errors. More... | |
void | setAssignToPrimaries (bool on) |
If true, hits created by secondary particles (e.g. More... | |
void | setHideSecondaries (bool on) |
If true, secondary MCParticles (and hits created by them) will not be shown. | |
Private Types | |
enum | eFitterType { SimpleKalman , RefKalman , DafSimple , DafRef , Gbl } |
Fitter type to be used for addTrack(). | |
Private Member Functions | |
TEveBox * | boxCreator (const 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 (TEveTrack *eveTrack, const genfit::StateOnPlane *prevState, const genfit::StateOnPlane *state, const genfit::AbsTrackRep *rep, TEvePathMark::EType_e markType, bool drawErrors, int markerPos=1) |
Create hit visualisation for the given options, and add them to 'eveTrack'. | |
template<class SomeVXDHit > | |
void | addRecoHit (const SomeVXDHit *hit, TEveStraightLineSet *lines) |
adds given VXD hit to lines. | |
void | addRecoHit (const SVDCluster *hit, TEveStraightLineSet *lines) |
specialisation for SVDCluster | |
void | addRecoHit (const CDCHit *hit, TEveStraightLineSet *lines) |
specialisation for CDCHit. | |
void | addToGroup (const std::string &name, TEveElement *elem) |
Add 'elem' to the element group 'name' (created if necessary). More... | |
Private Attributes | |
TEveCalo3D * | m_calo3d |
Object for the energy bar visualisation. | |
double | m_errorScale |
Rescale PXD/SVD errors with this factor to ensure visibility. | |
std::string | m_options |
Option string for genfit::Track visualisation. More... | |
bool | m_assignToPrimaries |
If true, hits created by secondary particles (e.g. More... | |
bool | m_hideSecondaries {false} |
If true, secondary MCParticles (and hits created by them) will not be shown. | |
std::map< const MCParticle *, MCTrack > | m_mcparticleTracks |
map MCParticles to MCTrack (so hits can be added to the correct track). | |
std::map< std::string, ElementGroup > | m_groups |
name -> grouping element. | |
TEveTrackList * | m_tracklist |
parent object for MC tracks. | |
TEveTrackPropagator * | m_trackpropagator |
Track propagator for MCParticles. | |
TEveTrackPropagator * | m_gftrackpropagator |
Track propagator for genfit::Tracks (different mainly because of drawing options) | |
TEveTrackPropagator * | m_consttrackpropagator |
Track propagator for CDCTriggerTracks (uses constant B field) | |
TEveCaloDataVec * | m_eclData |
ECL cluster data. | |
EveVisBField * | m_bfield |
The global magnetic field. | |
std::set< const TObject * > | m_shownRecohits |
List of shown recohits (PXDCluster, SVDCluster, CDCHit). | |
TEveStraightLineSet * | m_unassignedRecoHits = nullptr |
Unassigned recohits. | |
bool | m_unassignedRecoHitsVisibility = true |
is m_unassignedRecoHits visible? | |
bool | m_drawCardinalRep = true |
Draw cardinal representation in addTrack. | |
bool | m_drawErrors = false |
Draw errors in addTrack. | |
bool | m_drawRefTrack = false |
Draw reference track in addTrack. | |
bool | m_drawForward = false |
draw forward in addTrack | |
bool | m_drawBackward = false |
draw backward in addTrack | |
Static Private Attributes | |
static const int | c_recoHitColor = getTColorID("Orange", 1) |
Color for reco hits. | |
static const int | c_recoTrackColor = getTColorID("Sky Blue", 1) |
Color for TrackCandidates. | |
static const int | c_trackColor = getTColorID("Sky Blue", 2) |
Color for tracks. | |
static const int | c_trackMarkerColor = getTColorID("Chameleon", 3) |
Color for track markers. | |
static const int | c_unassignedHitColor = getTColorID("Plum", 1) |
Color for unassigned (reco)hits. | |
static const int | c_klmClusterColor = getTColorID("Chameleon", 1) |
Color for KLMCluster objects. | |
static constexpr double | c_minPCut = 0.00 |
don't show MCParticles with momentum below this cutoff. | |
Produces visualisation for MCParticles, simhits, genfit::Tracks, geometry and other things.
Creates TEve objects from the given data, and adds them to the global or event scene.
Definition at line 63 of file EVEVisualization.h.
EVEVisualization::MCTrack * addMCParticle | ( | const MCParticle * | particle | ) |
Return MCTrack for given particle, add it if it doesn't exist yet.
If particle is NULL, a dummy MCTrack (with track=0) is created which can accept otherwise unassigned hits. Returns NULL if this particle and its hits shouldn't be shown.
Definition at line 1089 of file EVEVisualization.cc.
void addObject | ( | const TObject * | dataStoreObject, |
TEveElement * | visualRepresentation | ||
) |
Generic function to keep track of which objects have which visual representation.
Should be called by functions adding TEveElements to the event scene (Hits are currently excluded).
Definition at line 1890 of file EVEVisualization.cc.
|
private |
Add 'elem' to the element group 'name' (created if necessary).
name can also be a path, e.g. MyOwnStuff/SpecialObject A, which will automatically create sub-groups.
slashes at beginning and end of name are ignored.
Definition at line 1895 of file EVEVisualization.cc.
void addTrack | ( | const Belle2::Track * | belle2Track | ) |
Add this genfit::Track to event data.
Adapted from GenfitDisplay, originally written by Karl Bicker.
Definition at line 376 of file EVEVisualization.cc.
void addTrackCandidateImproved | ( | const std::string & | collectionName, |
const RecoTrack & | recoTrack | ||
) |
Add a RecoTrack, but use stored genfit track representation to make visualisation objects.
FIXME this is mostly just a workaround for monopoles.
Definition at line 254 of file EVEVisualization.cc.
void makeTracks | ( | ) |
Create visual representation of all tracks.
Needs to be called after all hits / tracks are added.
Definition at line 1236 of file EVEVisualization.cc.
|
inline |
If true, hits created by secondary particles (e.g.
delta electrons) will be assigned to the original primary particle.
Definition at line 272 of file EVEVisualization.h.
void setErrScale | ( | double | errScale = 1. | ) |
Set the scaling factor for the visualization of track hit errors.
(only affects PXD and SpacePoint hits, which are somewhat small
Definition at line 177 of file EVEVisualization.cc.
void setOptions | ( | const std::string & | opts | ) |
Set the display options.
The option string lets you steer the way the events are displayed. The following options are available:
'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.
'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. Normally used in connection with 'D'.
'M': Draw track markers. Draw the intersection points between the track and the virtual (and/or real) detector planes. 'P': Draw detector planes. Draws the virtual (and/or real) detector planes.
Definition at line 175 of file EVEVisualization.cc.
|
private |
If true, hits created by secondary particles (e.g.
delta electrons) will be assigned to the original primary particle.
Definition at line 329 of file EVEVisualization.h.
|
private |
Option string for genfit::Track visualisation.
Definition at line 326 of file EVEVisualization.h.