ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::DigitizationModule Class Reference

#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. More...
 
virtual ~DigitizationModule ()
 Virtual Destructor. More...
 
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. More...
 
const DigitizationCell cell (const Amg::Vector2D &position) const
 Get the digitization cell fropm a position. More...
 
double halfThickness () const
 module thickness More...
 
int readoutDirection () const
 return the readout direction More...
 
double lorentzAngle () const
 return the lorentz Angle More...
 
const Segmentationsegmentation () const
 return the segmenation More...
 
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 More...
 
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. More...
 
const std::vector< std::shared_ptr< const Surface > > & boundarySurfaces () const
 return the bounding surfaces at top and bottom More...
 
const std::vector< std::shared_ptr< const Surface > > & segmentationSurfacesX () const
 return all surfaces in X - excluding the boundaries More...
 
const std::vector< std::shared_ptr< const Surface > > & segmentationSurfacesY () const
 return all surfaces in Y - excluding the boundaries More...
 

Private Attributes

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

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:

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.

◆ ~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.

◆ 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 }

◆ 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 }

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:
Trk::DigitizationModule::lorentzAngle
double lorentzAngle() const
return the lorentz Angle
Definition: DigitizationModule.h:115
Trk::DigitizationModule::m_lorentzAngle
double m_lorentzAngle
the lorentz angle
Definition: DigitizationModule.h:98
Trk::DigitizationModule::readoutDirection
int readoutDirection() const
return the readout direction
Definition: DigitizationModule.h:112
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
Trk::DigitizationModule::m_boundarySurfaces
std::vector< std::shared_ptr< const Surface > > m_boundarySurfaces
boundary surfaces, they are ordered: readout, opposite, x boundaries, y boundaries
Definition: DigitizationModule.h:102
Trk::DigitizationModule::stepSurfaces
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
Definition: DigitizationModule.cxx:58
Trk::DigitizationCell
std::pair< size_t, size_t > DigitizationCell
Definition: DigitizationCell.h:18
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Trk::DigitizationModule::m_readoutDirection
int m_readoutDirection
defines if the readout is along (+1) / (-1) wrt the z axis
Definition: DigitizationModule.h:97
Trk::DigitizationModule::m_segmentationSurfacesX
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesX
segmentation surfaces in X - without boundaries
Definition: DigitizationModule.h:103
Trk::DigitizationModule::m_segmentationSurfacesY
std::vector< std::shared_ptr< const Surface > > m_segmentationSurfacesY
segmentation surfaces in Y - without boundaries
Definition: DigitizationModule.h:104
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
Trk::DigitizationModule::m_segmentation
std::shared_ptr< const Segmentation > m_segmentation
segmentation descriptor
Definition: DigitizationModule.h:101
Trk::DigitizationModule::m_halfThickness
double m_halfThickness
Definition: DigitizationModule.h:96
Trk::DigitizationModule::m_tanLorentzAngle
double m_tanLorentzAngle
and the tangent of it
Definition: DigitizationModule.h:99
Trk::DigitizationModule::halfThickness
double halfThickness() const
module thickness
Definition: DigitizationModule.h:109