48 std::vector< std::shared_ptr< const Trk::Surface> >& segmentationSurfacesX,
49 std::vector< std::shared_ptr< const Trk::Surface> >& segmentationSurfacesY,
59 std::shared_ptr<Trk::TrapezoidBounds> readoutPlaneBounds =
60 std::make_shared<Trk::TrapezoidBounds>(
m_activeBounds->minHalflengthX(),
68 readoutPlaneTransform.translation() =
Amg::Vector3D(0.,0.,readoutDirection*halfThickness);
70 std::shared_ptr<Trk::TrapezoidBounds> counterPlaneBounds = readoutPlaneBounds;
71 counterPlaneTransform.translation() =
Amg::Vector3D(0.,0.,-readoutDirection*halfThickness);
74 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(readoutPlaneTransform,readoutPlaneBounds));
75 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(counterPlaneTransform,counterPlaneBounds));
83 xBinRotationMatrix.col(0) = Amg::Vector3D::UnitY();
84 xBinRotationMatrix.col(1) = Amg::Vector3D::UnitZ();
85 xBinRotationMatrix.col(2) = Amg::Vector3D::UnitX();
88 segmentationSurfacesX.reserve(
m_binsX);
89 for (
size_t ibinx = 0; ibinx <=
m_binsX; ++ibinx){
100 auto xBinBounds = std::make_shared<Trk::RectangleBounds>(
m_activeBounds->halflengthY()/cos(stereoLocal),halfThickness);
102 if (ibinx==0 || ibinx ==
m_binsX)
103 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform, xBinBounds));
105 segmentationSurfacesX.push_back(std::make_shared<Trk::PlaneSurface>(binTransform, xBinBounds));
111 yBinRotationMatrix.col(0) = Amg::Vector3D::UnitX();
112 yBinRotationMatrix.col(1) = Amg::Vector3D::UnitZ();
117 segmentationSurfacesY.reserve(
m_binsY);
118 for (
size_t ibiny = 0; ibiny <=
m_binsY; ++ibiny){
123 auto yBinBounds = std::make_shared<Trk::RectangleBounds>(localPitchX*
m_binsX*0.5,halfThickness);
126 if (ibiny == 0 || ibiny ==
m_binsY)
127 boundarySurfaces.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform,yBinBounds));
129 segmentationSurfacesY.push_back(std::make_shared<const Trk::PlaneSurface>(binTransform,yBinBounds));
146 double halfThickness,
147 int readoutDirection,
148 double lorentzAngle)
const
153 double lorentzDeltaX = -readoutDirection*stepCenter.z()*std::tan(lorentzAngle);
155 double driftInZ = (halfThickness-readoutDirection*stepCenter.z());
156 double driftLength = std::abs(driftInZ/std::cos(lorentzAngle));
158 Amg::Vector2D stepCenterProjected(stepCenter.x()+lorentzDeltaX,stepCenter.y());
163 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...