#ifndef PNDSDSCALCPIXELDIF_H #define PNDSDSCALCPIXELDIF_H #include "PndSdsPixel.h" #include "FairGeoVector.h" #include #include //#include //#include "CLHEP/Vector/TwoVector.h" //! Calculates the pixels (digis) fired from a particle hitting the sensor /** * @author Tobias Stockmanns * @author Ralf Kliemt, Uni Bonn * This class gets as an input the point where the particle enters the sensor, * where it leaves the sensor and the deposited energy. It calculates the track * of the particle between these two points and determines the pixels lying on the * track. The total energy of the particle is then distributed acording to a gaussian widened path * to the pixels. The output is a vector of the fired sensor pixels * with the energy deposited in the pixels. * If a noise value is given a gausian distributed energy with a sigma of (noise) is added (or substracted) to * the energy deposited in one pixel. * If a threshold value is given all pixels with energies below threshold are ignored */ class PndSdsCalcPixelDif { public: ///Default constructor PndSdsCalcPixelDif(); ///Main constructor ///@param w width of sensor pixel [cm] ///@param l length of sensor pixel [cm] ///@param threshold discriminator threshold of pixel [e] ///@param noise total noise of pixel [e] PndSdsCalcPixelDif(Double_t w, Double_t l, Double_t qspread = 0); ///Main function to calculate the vector of fired pixel std::vector GetPixels (Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy); Int_t GetPixelsAlternative(Double_t inx, Double_t iny, Double_t outx, Double_t outy, Double_t energy, std::vector& cols, std::vector& rows, std::vector& charges); void SetVerboseLevel(Int_t level){ fVerboseLevel = level;}; std::ostream& operator<<(std::ostream& out); private: Double_t CalcFk(Double_t k, Double_t x, Double_t sig); const Double_t ChargeFromEloss(Double_t eloss) const {return eloss/(3.61e-9);} void InjectPixelCharge(Int_t i, Int_t j, Double_t charge); std::vector fPixels; PndSdsPixel fActivePixel; Double_t fPixelSizeX; Double_t fPixelSizeY; Double_t fThreshold; Double_t fNoise; Double_t fQspread; Double_t fEnergy; Int_t fVerboseLevel; }; #endif