43 std::vector< std::shared_ptr< const Trk::Surface> >& segmentationSurfacesX,
44 std::vector< std::shared_ptr< const Trk::Surface> >& segmentationSurfacesY,
54 std::shared_ptr<Trk::TrapezoidBounds> readoutPlaneBounds =
55 std::make_shared<Trk::TrapezoidBounds>(
m_activeBounds->minHalflengthX(),
63 readoutPlaneTransform.translation() =
Amg::Vector3D(0.,0.,readoutDirection*halfThickness);
65 std::shared_ptr<Trk::TrapezoidBounds> counterPlaneBounds = readoutPlaneBounds;
66 counterPlaneTransform.translation() =
Amg::Vector3D(0.,0.,-readoutDirection*halfThickness);
69 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(readoutPlaneTransform,readoutPlaneBounds));
70 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(counterPlaneTransform,counterPlaneBounds));
78 xBinRotationMatrix.col(0) = Amg::Vector3D::UnitY();
79 xBinRotationMatrix.col(1) = Amg::Vector3D::UnitZ();
80 xBinRotationMatrix.col(2) = Amg::Vector3D::UnitX();
83 segmentationSurfacesX.reserve(
m_binsX);
84 for (
size_t ibinx = 0; ibinx <=
m_binsX; ++ibinx){
95 auto xBinBounds = std::make_shared<Trk::RectangleBounds>(
m_activeBounds->halflengthY()/cos(stereoLocal),halfThickness);
97 if (ibinx==0 || ibinx ==
m_binsX)
98 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform, xBinBounds));
100 segmentationSurfacesX.push_back(std::make_shared<Trk::PlaneSurface>(binTransform, xBinBounds));
106 yBinRotationMatrix.col(0) = Amg::Vector3D::UnitX();
107 yBinRotationMatrix.col(1) = Amg::Vector3D::UnitZ();
112 segmentationSurfacesY.reserve(
m_binsY);
113 for (
size_t ibiny = 0; ibiny <=
m_binsY; ++ibiny){
118 auto yBinBounds = std::make_shared<Trk::RectangleBounds>(localPitchX*
m_binsX*0.5,halfThickness);
121 if (ibiny == 0 || ibiny ==
m_binsY)
122 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform,yBinBounds));
124 segmentationSurfacesY.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform,yBinBounds));
141 double halfThickness,
142 int readoutDirection,
143 double lorentzAngle)
const
148 double lorentzDeltaX = -readoutDirection*stepCenter.z()*std::tan(lorentzAngle);
150 double driftInZ = (halfThickness-readoutDirection*stepCenter.z());
151 double driftLength = std::abs(driftInZ/std::cos(lorentzAngle));
153 Amg::Vector2D stepCenterProjected(stepCenter.x()+lorentzDeltaX,stepCenter.y());
158 return Trk::DigitizationStep((endStep-startStep).
mag(),driftLength,dCell,startStep,endStep,stepCenterProjected,cellCenter);
void createSegmenationSurfaces(std::vector< std::shared_ptr< const Surface > > &boundarySurfaces, std::vector< std::shared_ptr< const Surface > > &segmentationSurfacesX, std::vector< std::shared_ptr< const Surface > > &segmentationSurfacesY, double halfThickness, int readoutDirection=1., double lorentzAngle=0.) const override
Create the segmentation surfaces in X.
const DigitizationStep digitizationStep(const Amg::Vector3D &start, const Amg::Vector3D &end, double halfThickness, int readoutDirection=1, double lorentzAngle=0.) const override
Fill the associated digitisation cell from this start and end position, correct for lorentz effect if...