diff --git a/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.cxx b/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.cxx index c1e9df33f961a6a0549fb3279204d6ec9aca4dd2..be3780053e171e5e76581a2f8fcbe972f6608550 100644 --- a/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.cxx +++ b/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.cxx @@ -106,7 +106,35 @@ std::string CbmMvdSensorDataSheet::ToString() const ss << "Data card properly initialized: " << fValidData << endl; return ss.str(); } -// ------------------------------------------------------------------------- + +// ----------- Methode ComputeCCE ---------------------------------- +// ----------- Computes the relative number of electrons being deposited at chargePointXYZ and collected by a diode at diodeXYZ +// ----------- Standard implementation for backward compatibility based on Lorentz-Model. +// ----------- See PhD Christina Dritsa for scientific details on this model. + +Double_t CbmMvdSensorDataSheet::ComputeCCE(Float_t chargePointX, Float_t chargePointY,Float_t chargePointZ,Float_t diodeX,Float_t diodeY,Float_t diodeZ) { + + return + + (0.5 * fLorentzPar0 * fLorentzPar1 / TMath::Pi() + /TMath::Max(1.e-10, + + + ((chargePointX - diodeX) * (chargePointX - diodeX)/ fPixelPitchX / fPixelPitchX) + + ((chargePointY - diodeY) * (chargePointY - diodeY)/ fPixelPitchY / fPixelPitchY) + + 0.25 * fLorentzPar1 * fLorentzPar1 + ) + + fLorentzPar2); + + // Original Equation + // Float_t totCharge = (sPoint->charge * fLorentzNorm * (0.5 * fPar0 * fPar1 / TMath::Pi()) + // / TMath::Max(1.e-10, (((Current[0] - xCentre) * (Current[0] - xCentre)) + // + ((Current[1] - yCentre) * (Current[1] - yCentre))) + // / fPixelSize / fPixelSize + // + 0.25 * fPar1 * fPar1) + // + fPar2); + +} ClassImp(CbmMvdSensorDataSheet) diff --git a/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.h b/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.h index 261b85ab7cb27a7aa4f36d4583a2f7a51348ae4c..78a975779940faf42fc66571fba097df83f1a400 100644 --- a/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.h +++ b/core/detectors/mvd/SensorDataSheets/CbmMvdSensorDataSheet.h @@ -156,6 +156,7 @@ public: virtual Double_t ComputeHitDeadTime(Float_t charge){return charge * 0.;}; // Multiplication only to suppress "variable not used" warning. virtual Double_t ComputeHitDelay(Float_t charge){return charge * 0.;}; virtual Double_t ComputeHitJitter (Float_t charge){return charge * 0.;}; + virtual Double_t ComputeCCE(Float_t chargePointX, Float_t chargePointY,Float_t chargePointZ,Float_t diodeX,Float_t diodeY,Float_t diodeZ); //>>>>>>> ddd5fbbb (Time response added) /** ADC description **/ diff --git a/sim/detectors/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx b/sim/detectors/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx index 4b5cd47be2762daf76be86d2277b42ec9f3dfdf1..e3fa340f6dc27e9be809d65a1ce1819a3121d1d9 100644 --- a/sim/detectors/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx +++ b/sim/detectors/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx @@ -1053,7 +1053,9 @@ void CbmMvdSensorDigitizerTask::ProducePixelCharge(CbmMvdPoint* point) / fPixelSize / fPixelSize + 0.25 * fPar1 * fPar1) + fPar2); - //Todo: Equation wrong, hardcoded pixel size is set to wrong number. + + totCharge= sPoint->charge * fLorentzNorm * + fSensorDataSheet-> ComputeCCE(xCentre, yCentre, 0, Current[0], Current[1],0); if (totCharge < 1) {