32 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
33 double& ey,
double& ez,
double& v,
Medium*& medium,
36 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
37 double& ey,
double& ez,
Medium*& medium,
int& status);
40 void MagneticField(
const double x,
const double y,
const double z,
double& bx,
41 double& by,
double& bz,
int& status);
44 void WeightingField(
const double x,
const double y,
const double z,
45 double& wx,
double& wy,
double& wz,
46 const std::string& label);
49 const std::string& label);
52 bool GetMedium(
const double x,
const double y,
const double z,
58 bool SetArea(
const double xmin,
const double ymin,
const double zmin,
59 const double xmax,
const double ymax,
const double zmax);
61 bool GetArea(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
62 double& ymax,
double& zmax);
64 bool IsInArea(
const double x,
const double y,
const double z);
66 bool IsWireCrossed(
const double x0,
const double y0,
const double z0,
67 const double x1,
const double y1,
const double z1,
68 double& xc,
double& yc,
double& zc);
70 bool IsInTrapRadius(
const double q0,
const double x0,
const double y0,
71 const double z0,
double& xw,
double& yw,
double& rw);
80 void AddSignal(
const double q,
const double t,
const double dt,
81 const double x,
const double y,
const double z,
82 const double vx,
const double vy,
const double vz);
84 const double z0,
const double x1,
const double y1,
88 const unsigned int nsteps);
89 void GetTimeWindow(
double& tstart,
double& tstep,
unsigned int& nsteps) {
94 double GetSignal(
const std::string& label,
const unsigned int bin);
96 double GetIonSignal(
const std::string& label,
const unsigned int bin);
100 const std::vector<double>& values);
105 void AddNoise(
const bool total =
true,
const bool electron =
false,
106 const bool ion =
false);
110 return m_thresholdCrossings.size();
120 std::string m_className;
126 std::vector<component> m_components;
133 std::vector<double> signal;
134 std::vector<double> electronsignal;
135 std::vector<double> ionsignal;
138 std::vector<electrode> m_electrodes;
141 unsigned int m_nTimeBins;
142 double m_tStart, m_tStep;
143 unsigned int m_nEvents;
144 static double m_signalConversion;
147 bool m_hasTransferFunction;
148 double (*m_fTransfer)(
double t);
149 std::vector<double> m_transferFunctionTimes;
150 std::vector<double> m_transferFunctionValues;
153 bool m_hasNoiseFunction;
154 double (*m_fNoise)(
double t);
156 struct thresholdCrossing {
160 std::vector<thresholdCrossing> m_thresholdCrossings;
161 double m_thresholdLevel;
165 double m_xMinUser, m_yMinUser, m_zMinUser;
166 double m_xMaxUser, m_yMaxUser, m_zMaxUser;
172 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
173 double& ymax,
double& zmax);
175 double InterpolateTransferFunctionTable(
double t);
Abstract base class for components.
Abstract base class for media.
void MagneticField(const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
Get the magnetic field at (x, y, z).
double GetElectronSignal(const std::string &label, const unsigned int bin)
bool GetVoltageRange(double &vmin, double &vmax)
Return the voltage range.
void SetTimeWindow(const double tstart, const double tstep, const unsigned int nsteps)
bool IsInTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
Get the weighting field at (x, y, z).
double GetTransferFunction(const double t)
unsigned int GetNumberOfElectrodes() const
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&medium, int &status)
Get the drift field and potential at (x, y, z).
bool SetArea()
Set the user area to the default.
double GetSignal(const std::string &label, const unsigned int bin)
void SetNoiseFunction(double(*f)(double t))
bool IsInArea(const double x, const double y, const double z)
Check if a point is inside the user area.
void AddElectrode(ComponentBase *comp, const std::string &label)
Add an electrode.
double GetInducedCharge(const std::string &label)
void AddNoise(const bool total=true, const bool electron=false, const bool ion=false)
void AddSignal(const double q, const double t, const double dt, const double x, const double y, const double z, const double vx, const double vy, const double vz)
double WeightingPotential(const double x, const double y, const double z, const std::string &label)
Get the weighting potential at (x, y, z).
bool ComputeThresholdCrossings(const double thr, const std::string &label, int &n)
bool GetMedium(const double x, const double y, const double z, Medium *&medium)
Get the medium at (x, y, z).
ComponentBase * GetComponent(const unsigned int componentNumber)
void Clear()
Remove all components, electrodes and reset the sensor.
void SetTransferFunction(double(*f)(double t))
bool GetThresholdCrossing(const unsigned int i, double &time, double &level, bool &rise) const
bool IsWireCrossed(const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc)
void AddComponent(ComponentBase *comp)
Add a component.
unsigned int GetNumberOfThresholdCrossings() const
void EnableDebugging()
Switch on debugging messages.
void ClearSignal()
Reset signals and induced charges of all electrodes.
void GetTimeWindow(double &tstart, double &tstep, unsigned int &nsteps)
void AddInducedCharge(const double q, const double x0, const double y0, const double z0, const double x1, const double y1, const double z1)
unsigned int GetNumberOfComponents() const
double GetIonSignal(const std::string &label, const unsigned int bin)
void NewSignal()
Start a new event, when computing the average signal over multiple events.
bool GetArea(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
Return the current user area.