20#include <TGeoPhysicalNode.h>
24using std::stringstream;
52 Double_t& fracC, Double_t& fracR)
56 assert(side == 0 || side == 1);
64 Int_t iStrip = TMath::FloorNint(xRo /
fPitch);
67 Double_t xLeftRo = Double_t(iStrip) *
fPitch;
68 Double_t xRightRo = xLeftRo +
fPitch;
71 Double_t dLeft = (xRo - xLeftRo) *
fCosStereo[side];
72 Double_t dRight = (xRightRo - xRo) *
fCosStereo[side];
77 if (dLeft < 3. * sigma) fracL = 0.5 * (1. - TMath::Erf(0.707107 * dLeft / sigma));
79 if (dRight < 3. * sigma) fracR = 0.5 * (1. - TMath::Erf(0.707107 * dRight / sigma));
80 fracC = 1. - fracL - fracR;
90 assert(side == 0 || side == 1);
93 Int_t channel = strip - sensorId *
fStripShift[side];
119 assert(side == 0 || side == 1);
122 assert(TMath::Abs(
x) <=
fDx / 2.);
123 assert(TMath::Abs(
y) <=
fDy / 2.);
127 Double_t xdist =
x + 0.5 *
fDx;
128 Double_t ydist =
y + 0.5 *
fDy;
134 Int_t iStrip = TMath::FloorNint(xro /
fPitch);
161 TGeoBBox*
shape =
dynamic_cast<TGeoBBox*
>(node->GetShape());
227 assert(side == 0 || side == 1);
229 Double_t xCharge =
x;
230 Double_t yCharge =
y;
237 if (!
IsInside(xCharge, yCharge)) {
return; }
251 assert(diffusionWidth >= 0.);
256 Diffusion(xCharge, yCharge, diffusionWidth, side, fracL, fracC, fracR);
266 iStripL = iStripC - 1;
267 iStripR = iStripC + 1;
270 iStripL = (iStripC == 0 ?
fNofStrips - 1 : iStripC - 1);
271 iStripR = (iStripC ==
fNofStrips - 1 ? 0 : iStripC + 1);
277 if (fracL > 0. && iStripL >= 0) {
293 ss <<
fElement->GetName() <<
" (DssdStereo): ";
295 if (!node) ss <<
"no node assigned; ";
297 TGeoBBox*
shape =
dynamic_cast<TGeoBBox*
>(node->GetShape());
299 ss <<
"Dimension (" << 2. *
shape->GetDX() <<
", " << 2. *
shape->GetDY() <<
", " << 2. *
shape->GetDZ()
302 ss <<
"dy " <<
fDy <<
" cm, ";
ClassImp(CbmConverterManager)
Class representing an element of the STS setup.
TGeoPhysicalNode * GetPnode() const
std::string ToString() const
String output.
Bool_t LorentzShift() const
Check whether Lorentz shift is applied.
Bool_t Diffusion() const
Check whether diffusion is applied.
static Double_t DiffusionWidth(Double_t z, Double_t d, Double_t vBias, Double_t vFd, Double_t temperature, Int_t chargeType)
Detector response for DSSD sensors with stereo angles and cross-connection by double metal layers.
Double_t fPitch
Strip pitch /same for front and back)
Int_t fStripShift[2]
cosine of stereo angle front/back side
virtual Int_t GetModuleChannel(Int_t strip, Int_t side, Int_t sensorId) const
Get the readout channel in the module for a given strip.
Double_t fCosStereo[2]
tangent of stereo angle front/back side
std::string ToString() const
String output.
Double_t fErrorFac
Shift in number of strips from bottom to top.
virtual void PropagateCharge(Double_t x, Double_t y, Double_t z, Double_t charge, Double_t bY, Int_t side)
virtual Int_t GetStripNumber(Double_t x, Double_t y, Int_t side) const
Get strip number from point coordinates.
Double_t fStereoF
Stereo angle front side [degrees].
virtual void ModifyStripPitch(Double_t pitch)
Modify the strip pitch.
CbmStsSimSensorDssdStereo(CbmStsElement *element=nullptr)
virtual void Diffusion(Double_t x, Double_t y, Double_t sigma, Int_t side, Double_t &fracL, Double_t &fracC, Double_t &fracR)
Used for calculation of hit errors.
virtual Bool_t Init()
Initialisation @value kTRUE if parameters and node are consistent.
Int_t fNofStrips
Number of strips (same for front and back)
Double_t fStereoB
Stereo angle front back side [degrees].
Abstract class for the simulation of double-sided silicon strip sensors.
Bool_t IsInside(Double_t x, Double_t y)
Double_t fDz
Thickness in z [cm].
Bool_t fIsSet
Flag whether sensor is properly initialised.
Double_t fDx
Dimension of active area in x [cm].
Double_t fDy
Dimension of active area in y [cm].
Double_t LorentzShift(Double_t z, Int_t chargeType, Double_t bY) const
Lorentz shift in the x coordinate.
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
const CbmStsParSensorCond * fConditions
Simulation settings.
const CbmStsParSim * fSettings
Simulation module.