24using std::stringstream;
60 Int_t nCharges[2] = {0, 0};
61 for (Int_t side = 0; side < 2; side++) {
63 for (Int_t strip = 0; strip <
GetNofStrips(side); strip++) {
73 nSignals = 1000 * nCharges[0] + nCharges[1];
84 ss << GetName() <<
": Charge status: \n";
85 for (Int_t side = 0; side < 2; side++) {
86 for (Int_t strip = 0; strip <
GetNofStrips(side); strip++) {
88 ss <<
" " << (side ?
"Back " :
"Front ") <<
"strip " << strip <<
" charge "
102 for (Int_t side = 0; side < 2; side++) {
113 for (Int_t strip = 1; strip < nStrips - 1; strip++) {
122 fStripCharge[side][nStrips - 1] = ctcoeff * qLeft + (1. - ctcoeff) * qCurrent;
132 if (
x < -
fDx / 2.)
return kFALSE;
133 if (
x >
fDx / 2.)
return kFALSE;
134 if (
y < -
fDy / 2.)
return kFALSE;
135 if (
y >
fDy / 2.)
return kFALSE;
145 assert(chargeType == 0 || chargeType == 1);
149 assert(chargeType == 0 || chargeType == 1);
150 Double_t driftZ = 0.;
151 if (chargeType == 0) driftZ =
fDz / 2. - z;
152 else if (chargeType == 1)
153 driftZ =
fDz / 2. + z;
176 Double_t shift = muHall * bY * driftZ * 1.e-4;
198 Double_t xP = 0.5 * (point->
GetX1() + point->
GetX2());
199 Double_t yP = 0.5 * (point->
GetY1() + point->
GetY2());
200 Double_t zP = 0.5 * (point->
GetZ1() + point->
GetZ2());
208 Double_t eKin = TMath::Sqrt(point->
GetP() * point->
GetP() + mass * mass) - mass;
211 Double_t trajLx = point->
GetX2() - point->
GetX1();
212 Double_t trajLy = point->
GetY2() - point->
GetY1();
213 Double_t trajLz = point->
GetZ2() - point->
GetZ1();
214 Double_t trajLength = TMath::Sqrt(trajLx * trajLx + trajLy * trajLy + trajLz * trajLz);
218 Double_t stepSizeTarget = 3.e-4;
219 Int_t nSteps = TMath::Nint(trajLength / stepSizeTarget);
220 if (nSteps == 0) nSteps = 1;
221 Double_t stepSize = trajLength / nSteps;
222 Double_t stepSizeX = trajLx / nSteps;
223 Double_t stepSizeY = trajLy / nSteps;
224 Double_t stepSizeZ = trajLz / nSteps;
227 Double_t chargePerStep = chargeTotal / nSteps;
235 Double_t chargeSum = 0.;
236 Double_t xStep = point->
GetX1() - 0.5 * stepSizeX;
237 Double_t yStep = point->
GetY1() - 0.5 * stepSizeY;
238 Double_t zStep = point->
GetZ1() - 0.5 * stepSizeZ;
239 for (Int_t iStep = 0; iStep < nSteps; iStep++) {
245 Double_t chargeInStep = chargePerStep;
249 chargeSum += chargeInStep;
263 for (Int_t side = 0; side < 2; side++) {
264 for (Int_t strip = 0; strip <
GetNofStrips(side); strip++)
ClassImp(CbmConverterManager)
CbmStsELoss
Energy loss model used in simulation.
Class representing an element of the STS setup.
Double_t GetVbias() const
Bias voltage.
Double_t GetHallMobility(Double_t eField, Int_t chargeType) const
Hall mobility.
Double_t GetCrossTalkCoeff() const
Cross-talk coefficient.
CbmStsELoss ELossModel() const
Energy loss model.
Bool_t CrossTalk() const
Check whether cross-talk is applied.
static Double_t PairCreationEnergy()
Energy for electron-hole pair creation in silicon.
static Double_t ElectricField(Double_t vBias, Double_t vFd, Double_t dZ, Double_t z)
Electric field magnitude in a silicon sensor as function of z.
static Double_t ParticleMass(Int_t pid)
Particle mass from PDG particle ID.
static CbmStsPhysics * Instance()
Accessor to singleton instance.
Double_t StoppingPower(Double_t eKin, Int_t pid)
Stopping power (average specific energy loss) in Silicon.
Double_t EnergyLoss(Double_t dz, Double_t mass, Double_t eKin, Double_t dedx) const
Energy loss in a Silicon layer.
Container class for a local point in a STS sensor.
Int_t GetPid() const
Particle ID [PDG].
Double_t GetY2() const
Exit y coordinate [cm].
Double_t GetY1() const
Entry y coordinate [cm].
Double_t GetP() const
Momentum magnitude.
Double_t GetX1() const
Entry x coordinate [cm].
Double_t GetZ1() const
Entry z coordinate [cm].
Double_t GetBy() const
By-Field at midpoint [T].
Double_t GetX2() const
Exit x coordinate [cm].
Double_t GetTime() const
Time [ns].
Double_t GetZ2() const
Exit z coordinate [cm].
Double_t GetELoss() const
Energy loss [GeV].
void AddSignal(UShort_t channel, Double_t time, Double_t charge, Int_t index=0, Int_t entry=0, Int_t file=0)
Abstract class for the simulation of double-sided silicon strip sensors.
std::string ChargeStatus() const
Print charge status.
Bool_t IsInside(Double_t x, Double_t y)
Double_t fDz
Thickness in z [cm].
virtual Int_t GetNofStrips(Int_t side) const =0
Number of strips on front and back side.
virtual void PropagateCharge(Double_t x, Double_t y, Double_t z, Double_t charge, Double_t bY, Int_t side)=0
void ProduceCharge(CbmStsSensorPoint *point)
Generate charge as response to a sensor point.
Bool_t fIsSet
Flag whether sensor is properly initialised.
Double_t fDx
Dimension of active area in x [cm].
CbmStsSimSensorDssd(CbmStsElement *element=nullptr)
Standard constructor.
Double_t fDy
Dimension of active area in y [cm].
virtual Int_t CalculateResponse(CbmStsSensorPoint *point)
Analogue response to a track in the sensor.
Double_t LorentzShift(Double_t z, Int_t chargeType, Double_t bY) const
Lorentz shift in the x coordinate.
void CrossTalk(Double_t ctCoeff)
void RegisterCharge(Int_t side, Int_t strip, Double_t charge, Double_t time) const
Register the produced charge in one strip to the module.
virtual Int_t GetModuleChannel(Int_t strip, Int_t side, Int_t sensorId) const =0
Get the readout channel in the module for a given strip.
Class for the simulation of a sensor in the CBM-STS.
CbmStsSimModule * GetModule() const
Simulation module.
Int_t GetSensorId() const
Sensor ID.
const CbmLink & GetCurrentLink() const
Current link object.
const CbmStsParSensorCond * GetConditions() const
Sensor conditions.
const CbmStsParSim * fSettings
Simulation module.