MarlinTrkProcessors  2.4.1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DDSpacePointBuilder Class Reference

================= FTD Space Point Builder ================= More...

#include <DDSpacePointBuilder.h>

Inheritance diagram for DDSpacePointBuilder:

Public Member Functions

virtual Processor * newProcessor ()
 
virtual void init ()
 Called at the begin of the job before anything is read. More...
 
virtual void processRunHeader (LCRunHeader *run)
 Called for every run.
 
virtual void processEvent (LCEvent *evt)
 Called for every event - the working horse.
 
virtual void check (LCEvent *evt)
 
virtual void end ()
 Called after data processing for clean up.
 

Protected Member Functions

TrackerHitImpl * createSpacePoint (TrackerHitPlane *a, TrackerHitPlane *b, double stripLength)
 
std::vector< int > getCellID0sAtBack (int cellID0)
 
std::vector< int > getCellID0sAtBackOfFTD (int cellID0)
 
std::vector< int > getCellID0sAtBackOfSET (int cellID0)
 
std::vector< int > getCellID0sAtBackOfSIT (int cellID0)
 
std::string getCellID0Info (int cellID0)
 

Static Protected Member Functions

static int calculateXingPoint (double x1, double y1, float ex1, float ey1, double x2, double y2, float ex2, float ey2, double &x, double &y)
 Calculates the 2 dimensional crossing point of two lines. More...
 
static int calculatePointBetweenTwoLines (const CLHEP::Hep3Vector &P1, const CLHEP::Hep3Vector &V1, const CLHEP::Hep3Vector &P2, const CLHEP::Hep3Vector &V2, CLHEP::Hep3Vector &point)
 Calculates a point between two lines in a way that it is equidistant from both lines and as close to them as possible. More...
 
static int calculatePointBetweenTwoLines_UsingVertex (const CLHEP::Hep3Vector &PA, const CLHEP::Hep3Vector &PB, const CLHEP::Hep3Vector &PC, const CLHEP::Hep3Vector &PD, const CLHEP::Hep3Vector &Vertex, CLHEP::Hep3Vector &point)
 Calculates the intersection of a line L and line PAPB ( strip on the first sensor ). More...
 

Protected Attributes

std::string _TrackerHitCollection
 Input collection name.
 
std::string _TrackerHitSimHitRelCollection
 Input relation collection name.
 
std::string _SpacePointsCollection
 Output collection name.
 
std::string _relColName
 Output relations collection name.
 
int _nRun
 
int _nEvt
 
unsigned _nOutOfBoundary
 
unsigned _nStripsTooParallel
 
unsigned _nPlanesNotParallel
 
float _nominal_vertex_x
 
float _nominal_vertex_y
 
float _nominal_vertex_z
 
CLHEP::Hep3Vector _nominal_vertex
 
float _striplength_tolerance
 
double _striplength
 
std::string _subDetName
 
const DD4hep::DDRec::SurfaceMap * surfMap
 

Detailed Description

================= FTD Space Point Builder =================

Builds space points for pairs of silicon strip detectors. The digitisers create TrackerHitPlanars for the front and the back strips. In order to get a spacepoint (as is needed by track reconstruction) those strip measurements need to be combined into one space point.

This is done by this processor.

Input - Prerequisites

The TrackerHitPlanars as created by the Digitisers of FTD, SET or SIT. This could of course be used for other detectors as well, but as information about the detector is acquired from gear, and as different detectors (at the moment) are stored differently in gear, used detectors have to be taken care of in the code.

Output

A collection of TrackerHits containing the constructed space points. The created hits will store the original strip hits in their rawHits.

Parameters
TrackerHitCollectionThe name of the input collection of TrackerHits coming from strip detectors on the FTD, SIT or SET
(default name FTDTrackerHits)
SpacePointsCollectionThe name of the output collection of the created spacepoints
(default name FTDSpacePoints)
TrackerHitSimHitRelCollectionThe name of the input collection of the relations of the TrackerHits to SimHits
(default name FTDTrackerHitRelations)
SimHitSpacePointRelCollectionThe name of the SpacePoint SimTrackerHit relation output collection
(default name VTXTrackerHitRelations)
Author
Robin Glattauer HEPHY, Vienna

Member Function Documentation

int DDSpacePointBuilder::calculatePointBetweenTwoLines ( const CLHEP::Hep3Vector &  P1,
const CLHEP::Hep3Vector &  V1,
const CLHEP::Hep3Vector &  P2,
const CLHEP::Hep3Vector &  V2,
CLHEP::Hep3Vector &  point 
)
staticprotected

Calculates a point between two lines in a way that it is equidistant from both lines and as close to them as possible.

So when you calculate the distance between two lines, and you actually draw this distance as a short connecting line, the point in the middle of this line, is what this method finds.

             /
            /
           /|___here!!!
          / |
---------/-------------- (line a)
        /
       /(line b)

(If this sketch looks terrible, you probably read this in doxygen and it still needs to be formatted in a way, that it still looks sensible in doxygen.)

Parameters
P1a point on the first line
V1the direction vector of the first line
pointthe reference to a point where the result will be stored

References calculateXingPoint().

int DDSpacePointBuilder::calculatePointBetweenTwoLines_UsingVertex ( const CLHEP::Hep3Vector &  PA,
const CLHEP::Hep3Vector &  PB,
const CLHEP::Hep3Vector &  PC,
const CLHEP::Hep3Vector &  PD,
const CLHEP::Hep3Vector &  Vertex,
CLHEP::Hep3Vector &  point 
)
staticprotected

Calculates the intersection of a line L and line PAPB ( strip on the first sensor ).

L is constrained to pass through the point "Vertex" and bisect both lines PAPB ( strip on the first sensor ) and PCPD ( strip on the second sensor )

Parameters
PAstart of the first line
PBend of the first line
PCstart of the second line
PDend of the second line
Vertexthe position
pointthe reference to a point where the result will be stored

Referenced by createSpacePoint().

int DDSpacePointBuilder::calculateXingPoint ( double  x1,
double  y1,
float  ex1,
float  ey1,
double  x2,
double  y2,
float  ex2,
float  ey2,
double &  x,
double &  y 
)
staticprotected

Calculates the 2 dimensional crossing point of two lines.

Each line is specified by a point (x,y) and a direction vector (ex,ey).

Returns
0, if the calculation has been successful, another number if there was a problem.

Referenced by calculatePointBetweenTwoLines().

TrackerHitImpl * DDSpacePointBuilder::createSpacePoint ( TrackerHitPlane *  a,
TrackerHitPlane *  b,
double  stripLength 
)
protected
Returns
a spacepoint (in the form of a TrackerHitImpl* ) created from two TrackerHitPlane* which stand for si-strips

References calculatePointBetweenTwoLines_UsingVertex().

Referenced by processEvent().

std::string DDSpacePointBuilder::getCellID0Info ( int  cellID0)
protected
Returns
information about the contents of the passed CellID0

Referenced by processEvent().

std::vector< int > DDSpacePointBuilder::getCellID0sAtBack ( int  cellID0)
protected
Returns
the CellID0s of the sensors that are back to back to a given front sensor. If the given sensor is in the back itself or has no corresponding sensor(s) on the back the vector will be empty.
Parameters
cellID0a CellID0 corresponding to a sensor

Referenced by processEvent().

void DDSpacePointBuilder::init ( )
virtual

Called at the begin of the job before anything is read.

Use to initialize the processor, e.g. book histograms.


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