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