MarlinUtil  1.12.1
Static Public Member Functions | Public Attributes | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DDMarlinCED Class Reference

Singleton class to manage access to CED from several processors. More...

#include <DDMarlinCED.h>

Static Public Member Functions

static DDMarlinCEDinstance ()
 
static void init (Processor *proc)
 To be called by every processor that uses CED in intit().
 
static void newEvent (Processor *proc, LCEvent *evt=0)
 
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 *)
 
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 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)
 
static void drawDD4hepDetector (DD4hep::Geometry::LCDD &lcdd, bool _surfaces, StringVec _detailled)
 

Public Attributes

LCEvent * _currEvent
 

Static Protected Member Functions

static void drawHitCollectionsByType (LCEvent *event, const char *type, int marker, int size, unsigned int color, unsigned int layer=0)
 
static void drawHitCollectionsByMCContribution (LCEvent *event, MCParticle *MCP, int marker, int size, unsigned int color, unsigned int layer=0)
 

Protected Attributes

Processor * _first
 
Processor * _last
 

Static Protected Attributes

static DDMarlinCED_me = 0
 

Detailed Description

Singleton class to manage access to CED from several processors.

All processors using CED have to use the methods init(), newEvent() and draw().

Member Function Documentation

void DDMarlinCED::draw ( Processor *  proc,
int  waitForKeyboard = 1 
)
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 DDCEDPickingHandler::getInstance(), DDCEDPickingHandler::kbhit(), and DDCEDPickingHandler::printID().

void DDMarlinCED::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 
)
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.

template<class In >
static void DDMarlinCED::drawObjectsWithPosition ( In  first,
In  last,
int  marker,
int  size,
unsigned int  color,
unsigned int  layer = 0,
const char *  PickingMessage = "" 
)
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.


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