10#include <mdst/dataobjects/MCParticle.h>
11#include <mdst/dataobjects/ECLCluster.h>
12#include <mdst/dataobjects/KLMCluster.h>
13#include <mdst/dataobjects/Track.h>
14#include <cdc/dataobjects/CDCSimHit.h>
15#include <cdc/dataobjects/CDCHit.h>
16#include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
17#include <trg/cdc/dataobjects/CDCTriggerTrack.h>
18#include <pxd/dataobjects/PXDSimHit.h>
19#include <svd/dataobjects/SVDSimHit.h>
20#include <svd/dataobjects/SVDCluster.h>
21#include <klm/dataobjects/KLMHit2d.h>
22#include <klm/dataobjects/KLMSimHit.h>
23#include <arich/dataobjects/ARICHHit.h>
24#include <top/dataobjects/TOPDigit.h>
25#include <vxd/geometry/GeoCache.h>
26#include <tracking/dataobjects/ROIid.h>
28#include <framework/datastore/StoreArray.h>
30#include <tracking/dataobjects/RecoTrack.h>
31#include <genfit/GFRaveVertex.h>
33#include <Math/Vector3D.h>
34#include <TEveStraightLineSet.h>
47class TEveTrackPropagator;
138 const int numHits = hits.getEntries();
139 for (
int i = 0; i < numHits; i++) {
170 void addVertex(
const genfit::GFRaveVertex* vertex);
193 if (hits.getEntries() == 0)
203 for (
const T& hit : hits) {
224 void addObject(
const TObject* dataStoreObject, TEveElement* visualRepresentation);
281 TEveBox*
boxCreator(
const ROOT::Math::XYZVector& o, ROOT::Math::XYZVector u, ROOT::Math::XYZVector v,
float ud,
float vd,
285 void makeLines(TEveTrack* eveTrack,
const genfit::StateOnPlane* prevState,
const genfit::StateOnPlane* state,
286 const genfit::AbsTrackRep* rep,
287 TEvePathMark::EType_e markType,
bool drawErrors,
int markerPos = 1);
290 template <
class SomeVXDHit>
void addRecoHit(
const SomeVXDHit* hit, TEveStraightLineSet* lines)
294 const ROOT::Math::XYZVector local_pos(hit->getU(), hit->getV(), 0.0);
296 const ROOT::Math::XYZVector global_pos = sensor.pointToGlobal(local_pos);
297 lines->AddMarker(global_pos.X(), global_pos.Y(), global_pos.Z());
314 void addToGroup(
const std::string& name, TEveElement* elem);
Datastore class that holds photon hits. Input to the reconstruction.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Combination of several CDCHits to a track segment hit for the trigger.
Track created by the CDC trigger.
Add custom information to the display.
Produces visualisation for MCParticles, simhits, genfit::Tracks, geometry and other things.
void clearEvent()
clear event data.
void setOptions(const std::string &opts)
Set the display options.
void addSimHits(const StoreArray< T > &hits)
Add all entries in the given 'hits' array (and the corresponding MCParticles) to the event scene.
static constexpr double c_minPCut
don't show MCParticles with momentum below this cutoff.
EVEVisualization(const EVEVisualization &)=delete
disabled.
void setHideSecondaries(bool on)
If true, secondary MCParticles (and hits created by them) will not be shown.
void setAssignToPrimaries(bool on)
If true, hits created by secondary particles (e.g.
void addTrackCandidateImproved(const std::string &collectionName, const RecoTrack &recoTrack)
Add a RecoTrack, but use stored genfit track representation to make visualisation objects.
EveVisBField * m_bfield
The global magnetic field.
eFitterType
Fitter type to be used for addTrack().
TEveBox * boxCreator(const ROOT::Math::XYZVector &o, ROOT::Math::XYZVector u, ROOT::Math::XYZVector 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...
TEveStraightLineSet * m_unassignedRecoHits
Unassigned recohits.
static const int c_recoHitColor
Color for reco hits.
void addCDCHit(const CDCHit *hit, bool showTriggerHits=false)
show CDCHits directly.
std::map< const MCParticle *, MCTrack > m_mcparticleTracks
map MCParticles to MCTrack (so hits can be added to the correct track).
void addBKLMHit2d(const KLMHit2d *bklm2dhit)
Add a reconstructed 2d hit in the BKLM.
EVEVisualization()
Constructor.
void setErrScale(double errScale=1.)
Set the scaling factor for the visualization of track hit errors.
bool m_drawRefTrack
Draw reference track in addTrack.
void addVertex(const genfit::GFRaveVertex *vertex)
Add a vertex point and its covariance matrix.
bool m_drawForward
draw forward in addTrack
TEveCalo3D * m_calo3d
Object for the energy bar visualisation.
bool m_drawCardinalRep
Draw cardinal representation in addTrack.
void addCDCTriggerTrack(const std::string &collectionName, const CDCTriggerTrack &track)
Add a CDCTriggerTrack.
void addCDCTriggerSegmentHit(const std::string &collectionName, const CDCTriggerSegmentHit *hit)
show outline of track segments.
TEveTrackPropagator * m_trackpropagator
Track propagator for MCParticles.
std::map< std::string, ElementGroup > m_groups
name -> grouping element.
void addSimHit(const CDCSimHit *hit, const MCParticle *particle)
Add a CDCSimHit.
void addECLCluster(const ECLCluster *cluster)
Add a reconstructed cluster in the ECL.
TEveTrackList * m_tracklist
parent object for MC tracks.
EVEVisualization & operator=(const EVEVisualization &)=delete
disabled assignment
void addToGroup(const std::string &name, TEveElement *elem)
Add 'elem' to the element group 'name' (created if necessary).
void makeTracks()
Create visual representation of all tracks.
void addRecoHit(const SomeVXDHit *hit, TEveStraightLineSet *lines)
adds given VXD hit to lines.
void addUnassignedRecoHits(const StoreArray< T > &hits)
After adding recohits for tracks/candidates, this function adds the remaining hits in a global collec...
void addTrack(const Belle2::Track *belle2Track)
Add this genfit::Track to event data.
bool m_unassignedRecoHitsVisibility
is m_unassignedRecoHits visible?
static const int c_trackMarkerColor
Color for track markers.
TEveTrackPropagator * m_gftrackpropagator
Track propagator for genfit::Tracks (different mainly because of drawing options)
std::string m_options
Option string for genfit::Track visualisation.
static const int c_trackColor
Color for tracks.
static const int c_unassignedHitColor
Color for unassigned (reco)hits.
bool m_hideSecondaries
If true, secondary MCParticles (and hits created by them) will not be shown.
void addEKLMHit2d(const KLMHit2d *eklm2dhit)
Add a reconstructed 2d hit in the EKLM.
void addARICHHit(const ARICHHit *hit)
Add recontructed hit in ARICH.
void showUserData(const DisplayData &displayData)
Add user-defined data (labels, points, etc.)
std::set< const TObject * > m_shownRecohits
List of shown recohits (PXDCluster, SVDCluster, CDCHit).
bool m_drawBackward
draw backward in addTrack
TEveTrackPropagator * m_consttrackpropagator
Track propagator for CDCTriggerTracks (uses constant B field)
bool m_assignToPrimaries
If true, hits created by secondary particles (e.g.
~EVEVisualization()
Destructor.
bool m_drawErrors
Draw errors in addTrack.
double m_errorScale
Rescale PXD/SVD errors with this factor to ensure visibility.
void addTOPDigits(const StoreArray< TOPDigit > &digits)
Add TOPDigits (shown aggregated per module).
void addROI(const ROIid *roi)
Add a Region Of Interest, computed by the PXDDataReduction module.
void addKLMCluster(const KLMCluster *cluster)
Add a reconstructed cluster in the KLM.
static const int c_klmClusterColor
Color for KLMCluster objects.
MCTrack * addMCParticle(const MCParticle *particle)
Return MCTrack for given particle, add it if it doesn't exist yet.
TEveCaloDataVec * m_eclData
ECL cluster data.
static const int c_recoTrackColor
Color for TrackCandidates.
void addTrackCandidate(const std::string &collectionName, const RecoTrack &recoTrack)
Add a RecoTrack, to evaluate track finding.
void addObject(const TObject *dataStoreObject, TEveElement *visualRepresentation)
Generic function to keep track of which objects have which visual representation.
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'.
Provide magnetic field values for TEveTrackPropagator.
A Class to store the Monte Carlo particle information.
Class PXDSimHit - Geant4 simulated hit for the PXD.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
This is the Reconstruction Event-Data Model Track.
Defines interface for accessing relations of objects in StoreArray.
FROM * getRelatedFrom(const std::string &name="", const std::string &namedRelation="") const
Get the object from which this object has a relation.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Class SVDSimHit - Geant4 simulated hit for the SVD.
Accessor to arrays stored in the data store.
Class that bundles various TrackFitResults.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
Abstract base class for different kinds of events.
Group of TEveElements, remembers wether user wants it visible or not.
TEveElementList * group
Contains elements of this group.
bool visible
Stores wether this group was visible in last event.
Hold MC tracks and associated visualisation objects.
TEvePointSet * simhits
simhit positions.
const MCParticle * parentParticle
parent particle, or nullptr.
TEveTrack * track
the actual MC track.