ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::DigitizationModule Class Reference

Class that holds the surfaces for a planar digitization detector module. More...

#include <DigitizationModule.h>

Collaboration diagram for Trk::DigitizationModule:

Public Member Functions

 DigitizationModule (std::shared_ptr< const Segmentation > moduleSegmentation, double halfThickness, int readoutDirection, double lorentzAngle)
 Constructor from a Segmentation descriptor.
virtual ~DigitizationModule ()
 Virtual Destructor.
const std::vector< std::shared_ptr< const Surface > > segmentationSurfaces (const DigitizationCell &entryCids, const DigitizationCell &exitCids) const
 Return the internal test segmentation surfaces to test between entry and exit given by their cell id's - the boundaries are not given.
const DigitizationCell cell (const Amg::Vector2D &position) const
 Get the digitization cell fropm a position.
double halfThickness () const
 module thickness
int readoutDirection () const
 return the readout direction
double lorentzAngle () const
 return the lorentz Angle
const Segmentationsegmentation () const
 return the segmenation
const std::vector< std::shared_ptr< const Surface > > stepSurfaces (const Amg::Vector3D &start, const Amg::Vector3D &end) const
 return the test surfaces between these points
const DigitizationStep digitizationStep (const Amg::Vector3D &start, const Amg::Vector3D &end) const
 Fill the associated digitsation cell from this start and end position, correct for lorentz effect if needed.
const std::vector< std::shared_ptr< const Surface > > & boundarySurfaces () const
 return the bounding surfaces at top and bottom
const std::vector< std::shared_ptr< const Surface > > & segmentationSurfacesX () const
 return all surfaces in X - excluding the boundaries
const std::vector< std::shared_ptr< const Surface > > & segmentationSurfacesY () const
 return all surfaces in Y - excluding the boundaries

Private Attributes

double m_halfThickness
int m_readoutDirection
 defines if the readout is along (+1) / (-1) wrt the z axis
double m_lorentzAngle
 the lorentz angle
double m_tanLorentzAngle
 and the tangent of it
std::shared_ptr< const Segmentationm_segmentation
 segmentation descriptor
std::vector< std::shared_ptr< const Surface > > m_boundarySurfaces
 boundary surfaces, they are ordered: readout, opposite, x boundaries, y boundaries
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesX
 segmentation surfaces in X - without boundaries
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesY
 segmentation surfaces in Y - without boundaries

Detailed Description

Class that holds the surfaces for a planar digitization detector module.

It needs a descriptor to design different pixel/strixels/strip setups (with a segmentation class)

The digitizaiton is done in the local frame of the surface and binning can be done in local x and local y direction.

The lorentz angle is assumed to be only in x-direction and constant for the module, it is measured from the local z-direction.

The readout direction defines the charge drift either: a) towards the surface at -halfThickness if readout is defined at -1 b) towards the surface at +halfThickness if readout is defined at +1

Conventions:

  • 3D positions are within the 3D frame of the module
  • 2D positions are corrected to parameter surface at the center of the module (and not the readout surface)

The lorenzShift is the correction from the readout surface to the parameter surface

Author
Andreas.Salzburger -at- cern.ch

Definition at line 50 of file DigitizationModule.h.

Constructor & Destructor Documentation

◆ DigitizationModule()

Trk::DigitizationModule::DigitizationModule ( std::shared_ptr< const Segmentation > moduleSegmentation,
double halfThickness,
int readoutDirection,
double lorentzAngle )

Constructor from a Segmentation descriptor.

Definition at line 11 of file DigitizationModule.cxx.

14 :
15
20 m_segmentation(std::move(moduleSegmentation)),
24{
25 m_segmentation->createSegmenationSurfaces(m_boundarySurfaces,
31}
double lorentzAngle() const
return the lorentz Angle
int readoutDirection() const
return the readout direction
double m_lorentzAngle
the lorentz angle
std::vector< std::shared_ptr< const Surface > > m_boundarySurfaces
boundary surfaces, they are ordered: readout, opposite, x boundaries, y boundaries
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesX
segmentation surfaces in X - without boundaries
std::shared_ptr< const Segmentation > m_segmentation
segmentation descriptor
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesY
segmentation surfaces in Y - without boundaries
double m_tanLorentzAngle
and the tangent of it
int m_readoutDirection
defines if the readout is along (+1) / (-1) wrt the z axis
double halfThickness() const
module thickness

◆ ~DigitizationModule()

virtual Trk::DigitizationModule::~DigitizationModule ( )
inlinevirtual

Virtual Destructor.

Definition at line 59 of file DigitizationModule.h.

59{}

Member Function Documentation

◆ boundarySurfaces()

const std::vector< std::shared_ptr< const Surface > > & Trk::DigitizationModule::boundarySurfaces ( ) const
inline

return the bounding surfaces at top and bottom

Definition at line 121 of file DigitizationModule.h.

122 { return m_boundarySurfaces; }

◆ cell()

const DigitizationCell Trk::DigitizationModule::cell ( const Amg::Vector2D & position) const

Get the digitization cell fropm a position.

◆ digitizationStep()

const DigitizationStep Trk::DigitizationModule::digitizationStep ( const Amg::Vector3D & start,
const Amg::Vector3D & end ) const
inline

Fill the associated digitsation cell from this start and end position, correct for lorentz effect if needed.

Definition at line 130 of file DigitizationModule.h.

131 { return m_segmentation->digitizationStep(start,end,m_halfThickness,m_readoutDirection,m_lorentzAngle); }

◆ halfThickness()

double Trk::DigitizationModule::halfThickness ( ) const
inline

module thickness

Definition at line 109 of file DigitizationModule.h.

110 { return m_halfThickness; }

◆ lorentzAngle()

double Trk::DigitizationModule::lorentzAngle ( ) const
inline

return the lorentz Angle

Definition at line 115 of file DigitizationModule.h.

116 { return m_lorentzAngle; }

◆ readoutDirection()

int Trk::DigitizationModule::readoutDirection ( ) const
inline

return the readout direction

Definition at line 112 of file DigitizationModule.h.

113 { return m_readoutDirection; }

◆ segmentation()

const Segmentation & Trk::DigitizationModule::segmentation ( ) const
inline

return the segmenation

Definition at line 118 of file DigitizationModule.h.

119 { return (*(m_segmentation.get())); }

◆ segmentationSurfaces()

const std::vector< std::shared_ptr< const Trk::Surface > > Trk::DigitizationModule::segmentationSurfaces ( const DigitizationCell & entryCids,
const DigitizationCell & exitCids ) const

Return the internal test segmentation surfaces to test between entry and exit given by their cell id's - the boundaries are not given.

Definition at line 33 of file DigitizationModule.cxx.

34{
35 std::vector< std::shared_ptr<const Trk::Surface> > sSurfaces;
36
37 int startbinX = entryCids.first;
38 int endbinX = exitCids.first;
39 // swap if needed
40 if (startbinX > endbinX) std::swap(startbinX,endbinX);
41 // now cash in the rest
42 for ( ; startbinX <= endbinX; ++startbinX)
43 sSurfaces.push_back(m_segmentationSurfacesX[startbinX]);
44
45 // start bin, end bin
46 int startbinY = entryCids.second;
47 int endbinY = exitCids.second;
48 // swap if needed
49 if (startbinY > endbinY) std::swap(startbinY,endbinY);
50 // now cash in the rest
51 for ( ; startbinY <= endbinY; ++startbinY)
52 sSurfaces.push_back(m_segmentationSurfacesY[startbinY]);
53
54 // return what you have
55 return sSurfaces;
56}
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)

◆ segmentationSurfacesX()

const std::vector< std::shared_ptr< const Surface > > & Trk::DigitizationModule::segmentationSurfacesX ( ) const
inline

return all surfaces in X - excluding the boundaries

Definition at line 124 of file DigitizationModule.h.

125 { return m_segmentationSurfacesX; }

◆ segmentationSurfacesY()

const std::vector< std::shared_ptr< const Surface > > & Trk::DigitizationModule::segmentationSurfacesY ( ) const
inline

return all surfaces in Y - excluding the boundaries

Definition at line 127 of file DigitizationModule.h.

128 { return m_segmentationSurfacesY; }

◆ stepSurfaces()

const std::vector< std::shared_ptr< const Trk::Surface > > Trk::DigitizationModule::stepSurfaces ( const Amg::Vector3D & start,
const Amg::Vector3D & end ) const

return the test surfaces between these points

Definition at line 58 of file DigitizationModule.cxx.

59{
60 // prepare the return vector
61 std::vector< std::shared_ptr<const Trk::Surface> > stepSurfaces;
62
63 const Trk::DigitizationCell startCell = m_segmentation->cell(start);
64 const Trk::DigitizationCell endCell = m_segmentation->cell(end);
65
66 // go along x - first with the naive binning (i.e. w.o lorentz angle)
67 size_t sCellX = startCell.first;
68 size_t eCellX = endCell.first;
69 if (sCellX > eCellX) std::swap(sCellX,eCellX);
70 // now take the boundaries as well
71 if (sCellX > 0) --sCellX;
72 ++eCellX;
73 // the surfaces along Y are easy, just the bin surfaces
74 size_t sCellY = startCell.second;
75 size_t eCellY = endCell.second;
76 if (sCellY > eCellY) std::swap(sCellY,eCellY);
77 // reserve - be safe
78 stepSurfaces.reserve((eCellY-sCellY)+(eCellX-sCellX)+2);
79 // now fill the x surfaces
80 for ( ; sCellX <= eCellX && sCellX < m_segmentationSurfacesX.size(); ++sCellX)
81 stepSurfaces.push_back(m_segmentationSurfacesX[sCellX]);
82 // end fill the y surfaces
83 for ( ; sCellY <= eCellY && sCellY < m_segmentationSurfacesY.size(); ++sCellY)
84 stepSurfaces.push_back(m_segmentationSurfacesY[sCellY]);
85 // return the lot
86 return stepSurfaces;
87}
const std::vector< std::shared_ptr< const Surface > > stepSurfaces(const Amg::Vector3D &start, const Amg::Vector3D &end) const
return the test surfaces between these points
std::pair< size_t, size_t > DigitizationCell

Member Data Documentation

◆ m_boundarySurfaces

std::vector< std::shared_ptr<const Surface> > Trk::DigitizationModule::m_boundarySurfaces
private

boundary surfaces, they are ordered: readout, opposite, x boundaries, y boundaries

Definition at line 102 of file DigitizationModule.h.

◆ m_halfThickness

double Trk::DigitizationModule::m_halfThickness
private

Definition at line 96 of file DigitizationModule.h.

◆ m_lorentzAngle

double Trk::DigitizationModule::m_lorentzAngle
private

the lorentz angle

Definition at line 98 of file DigitizationModule.h.

◆ m_readoutDirection

int Trk::DigitizationModule::m_readoutDirection
private

defines if the readout is along (+1) / (-1) wrt the z axis

Definition at line 97 of file DigitizationModule.h.

◆ m_segmentation

std::shared_ptr<const Segmentation> Trk::DigitizationModule::m_segmentation
private

segmentation descriptor

Definition at line 101 of file DigitizationModule.h.

◆ m_segmentationSurfacesX

std::vector< std::shared_ptr<const Surface> > Trk::DigitizationModule::m_segmentationSurfacesX
private

segmentation surfaces in X - without boundaries

Definition at line 103 of file DigitizationModule.h.

◆ m_segmentationSurfacesY

std::vector< std::shared_ptr<const Surface> > Trk::DigitizationModule::m_segmentationSurfacesY
private

segmentation surfaces in Y - without boundaries

Definition at line 104 of file DigitizationModule.h.

◆ m_tanLorentzAngle

double Trk::DigitizationModule::m_tanLorentzAngle
private

and the tangent of it

Definition at line 99 of file DigitizationModule.h.


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