MarlinUtil
1.12.1
|
Singleton class to manage access to CED from several processors. More...
#include <MarlinCED.h>
Static Public Member Functions | |
static MarlinCED * | instance () |
static void | init (Processor *proc) |
To be called by every processor that uses CED in intit(). | |
static void | newEvent (Processor *proc, int modelID=0, LCEvent *evt=0) |
To be called by every processor that uses CED in processEvent() before actually drawing something. More... | |
static void | draw (Processor *proc, int waitForKeyboard=1) |
To be called by every processor that uses CED in processEvent() after drawing everything. More... | |
static void | getParticleFromID (int, LCEvent *) |
static void | printMCParticle (MCParticle *mcp, int daughterIndent=0, int motherIndent=0) |
template<class In > | |
static void | drawObjectsWithPosition (In first, In last, int marker, int size, unsigned int color, unsigned int layer=0, const char *PickingMessage="") |
Draw all objects in iterator range [first,last) which have a method getPosition() with the given color marker and size in the given layer (default 0). More... | |
template<class In > | |
static void | drawObjectsWithPositionID (LCCollection *col, In first, In last, int marker, int size, unsigned int color, unsigned int layer=0) |
static void | drawHelix (float b, float charge, float x, float y, float z, float px, float py, float pz, int marker, int size, unsigned int col, float rmin=10.0, float rmax=3000.0, float zmax=4500.0, unsigned int id=0) |
Draws a helix from the given point(x,y,z) for momentum(px,py,pz) in a B-field b (in Tesla) More... | |
static void | drawTrajectory (const Trajectory *t, const int marker, const int size, const unsigned int col, const float rmin=10.0, const float rmax=3000.0, const float zmax=4500.0, unsigned int id=0) |
Draws a trajectory in the volume described by rmin, rmax, zmax. | |
static void | drawSpike (float x0, float y0, float z0, float x1, float y1, float z1, unsigned int color, unsigned int layer, unsigned int id=0) |
Draws a 'spike', i.e. More... | |
static void | drawGEARDetector () |
Draws the detector using the geometry parameters from GEAR. | |
static void | drawDetectorFromGear (gear::GearMgr *gearMgr) |
static void | drawGEARTelescope () |
Draws the telescope using the geometry parameters from GEAR. | |
static void | drawDetector (int modelID) |
Draws the detector only. More... | |
static void | drawMCParticle (MCParticle *MCP, bool drawSimHits, LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0, double bField=4.0, double rmin=0.0, double zmin=0.0, double rmax=3000.0, double zmax=4500.0, bool drawOnDifferentLayers=true) |
Draws a thin line between vertex-point and end-point of a MC particle, another thin line at the vertex-point symbolising the initial momentum vector and all the hits in the SimTrackerHit- and SimCalorimeterHitCollections which are produced by this MC particle, if toggle drawSimHits is true. More... | |
static void | drawMCParticleTree (LCEvent *event, std::string colNameMC, double energyCut, double bField=4.0, double rIn=0.0, double zIn=0.0, double rOut=3000.0, double zOut=4500.0) |
Draws the full MC Particle Tree on the layers 1, 2 and 3. More... | |
static void | drawSimTrackerHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all SimTrackerHit Collections of event with a marker of size and color on layer. | |
static void | drawSimCalorimeterHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all SimCalorimeterHit Collections of event with a marker of size and color on layer. | |
static void | drawSimHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all SimHit Collections of event with a marker of size and color on layer. | |
static void | drawTrackerHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all TrackerHit Collections of event with a marker of size and color on layer. | |
static void | drawCalorimeterHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all CalorimeterHit Collections of event with a marker of size and color on layer. | |
static void | drawHits (LCEvent *event, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of all Hit Collections of event with a marker of size and color on layer. | |
static void | drawTrack (Track *track, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of a track with a marker of size and color on layer. | |
static void | drawCluster (Cluster *cluster, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of a cluster with a marker of size and color on layer. | |
static void | drawClusterImpl (const ClusterImpl *cluster, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of a cluster implementation with a marker of size and color on layer. | |
static void | drawRecoParticle (ReconstructedParticle *reco, int marker, int size, unsigned int color, unsigned int layer=0) |
Draws the hits of a recontructed particle reco with a marker of size and color on layer. | |
static int | getIDfromIndex (LCCollection *col, int index) |
static void | set_layer_description (const std::string &desc, int layerID) |
static void | add_layer_description (const std::string &desc, int layerID) |
static void | write_layer_description (void) |
Public Attributes | |
LCEvent * | _currEvent |
Protected Attributes | |
Processor * | _first |
Processor * | _last |
Static Protected Attributes | |
static MarlinCED * | _me = 0 |
Singleton class to manage access to CED from several processors.
All processors using CED have to use the methods init(), newEvent() and draw().
|
static |
To be called by every processor that uses CED in processEvent() after drawing everything.
Actually draws the event. The flag waitForKeyboard indicates if after an event is drawn an input from the keyboard is expected (waitForKeyboard=1) or not (waitForKeyboard=0).
References CEDPickingHandler::getInstance(), CEDPickingHandler::kbhit(), and CEDPickingHandler::printID().
Referenced by DrawMCParticles::processEvent().
|
inlinestatic |
Draws the detector only.
modelID: LDC(0) - default , SID(1), GLD(2), CaliceTestBeam(3). Needed if you would like to draw the detector wire frame several times in one event
|
static |
Draws a helix from the given point(x,y,z) for momentum(px,py,pz) in a B-field b (in Tesla)
Improved drawHelix() method.
Draws straight lines as well.
|
static |
Draws a thin line between vertex-point and end-point of a MC particle, another thin line at the vertex-point symbolising the initial momentum vector and all the hits in the SimTrackerHit- and SimCalorimeterHitCollections which are produced by this MC particle, if toggle drawSimHits is true.
These SimHits are drawn with a marker of size and color. All objects are drawn on the same layer.
Referenced by drawMCParticleTree().
|
static |
Draws the full MC Particle Tree on the layers 1, 2 and 3.
On layer 1 the charged particles are displayed and on layer shift-1 their corresponding SimHits. On layer 2 all the neutral particles are shown, again with their SimHits on layer shift-2. The layers 3 and shift-3 are used for the backscattered MC Particles. The variables energyCut, rIn, zIn, rOut and zOut are cut values meant to reduce the number particles displayed; i.e. only particles with energy larger than 'energyCut' and within the cylinder described by rIn, zIn, rOut, zOut are shown.
References drawMCParticle().
Referenced by DrawMCParticles::processEvent().
|
inlinestatic |
Draw all objects in iterator range [first,last) which have a method getPosition() with the given color marker and size in the given layer (default 0).
The template takes classes providing a class method 'getPosition()' as template argument.
|
static |
Draws a 'spike', i.e.
a bold arrow, from (x0,y0,z0) to (x1,y1,z1) with color on layer e.g. to display jet thrust axes
|
static |
To be called by every processor that uses CED in processEvent() before actually drawing something.
Draws the detector depending on modelID:
Referenced by DrawMCParticles::processEvent().