Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Sensor More...
#include <Sensor.hh>
Public Member Functions | |
Sensor () | |
Constructor. | |
~Sensor () | |
Destructor. | |
void | AddComponent (ComponentBase *comp) |
Add a component. | |
unsigned int | GetNumberOfComponents () const |
ComponentBase * | GetComponent (const unsigned int componentNumber) |
void | AddElectrode (ComponentBase *comp, const std::string &label) |
Add an electrode. | |
unsigned int | GetNumberOfElectrodes () const |
void | Clear () |
Remove all components, electrodes and reset the sensor. | |
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). | |
void | ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&medium, int &status) |
Get the drift field at (x, y, z). | |
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). | |
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 | WeightingPotential (const double x, const double y, const double z, const std::string &label) |
Get the weighting potential at (x, y, z). | |
bool | GetMedium (const double x, const double y, const double z, Medium *&medium) |
Get the medium at (x, y, z). | |
bool | SetArea () |
Set the user area to the default. | |
bool | SetArea (const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax) |
Set the user area explicitly. | |
bool | GetArea (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) |
Return the current user area. | |
bool | IsInArea (const double x, const double y, const double z) |
Check if a point is inside the user area. | |
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) |
bool | IsInTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw) |
bool | GetVoltageRange (double &vmin, double &vmax) |
Return the voltage range. | |
void | NewSignal () |
Start a new event, when computing the average signal over multiple events. | |
void | ClearSignal () |
Reset signals and induced charges of all electrodes. | |
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) |
void | AddInducedCharge (const double q, const double x0, const double y0, const double z0, const double x1, const double y1, const double z1) |
void | SetTimeWindow (const double tstart, const double tstep, const unsigned int nsteps) |
void | GetTimeWindow (double &tstart, double &tstep, unsigned int &nsteps) |
double | GetSignal (const std::string &label, const unsigned int bin) |
double | GetElectronSignal (const std::string &label, const unsigned int bin) |
double | GetIonSignal (const std::string &label, const unsigned int bin) |
double | GetInducedCharge (const std::string &label) |
void | SetTransferFunction (double(*f)(double t)) |
void | SetTransferFunction (const std::vector< double > ×, const std::vector< double > &values) |
double | GetTransferFunction (const double t) |
bool | ConvoluteSignal () |
bool | IntegrateSignal () |
void | SetNoiseFunction (double(*f)(double t)) |
void | AddNoise (const bool total=true, const bool electron=false, const bool ion=false) |
bool | ComputeThresholdCrossings (const double thr, const std::string &label, int &n) |
unsigned int | GetNumberOfThresholdCrossings () const |
bool | GetThresholdCrossing (const unsigned int i, double &time, double &level, bool &rise) const |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Garfield::Sensor::Sensor | ( | ) |
Constructor.
Definition at line 15 of file Sensor.cc.
void Garfield::Sensor::AddComponent | ( | ComponentBase * | comp | ) |
Add a component.
Definition at line 314 of file Sensor.cc.
Referenced by GarfieldPhysics::CreateGeometry().
void Garfield::Sensor::AddElectrode | ( | ComponentBase * | comp, |
const std::string & | label | ||
) |
Add an electrode.
Definition at line 327 of file Sensor.cc.
void Garfield::Sensor::AddInducedCharge | ( | const double | q, |
const double | x0, | ||
const double | y0, | ||
const double | z0, | ||
const double | x1, | ||
const double | y1, | ||
const double | z1 | ||
) |
Definition at line 501 of file Sensor.cc.
void Garfield::Sensor::AddNoise | ( | const bool | total = true , |
const bool | electron = false , |
||
const bool | ion = false |
||
) |
Definition at line 796 of file Sensor.cc.
void Garfield::Sensor::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 | ||
) |
Definition at line 417 of file Sensor.cc.
void Garfield::Sensor::Clear | ( | ) |
void Garfield::Sensor::ClearSignal | ( | ) |
Reset signals and induced charges of all electrodes.
Definition at line 403 of file Sensor.cc.
Referenced by AddElectrode().
bool Garfield::Sensor::ComputeThresholdCrossings | ( | const double | thr, |
const std::string & | label, | ||
int & | n | ||
) |
Definition at line 817 of file Sensor.cc.
bool Garfield::Sensor::ConvoluteSignal | ( | ) |
Definition at line 702 of file Sensor.cc.
|
inline |
void Garfield::Sensor::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).
Definition at line 48 of file Sensor.cc.
Referenced by Garfield::ViewField::Evaluate2D(), Garfield::ViewField::EvaluateProfile(), Heed::HeedFieldMap::field_map(), and Garfield::DriftLineRKF::GetGain().
void Garfield::Sensor::ElectricField | ( | const double | x, |
const double | y, | ||
const double | z, | ||
double & | ex, | ||
double & | ey, | ||
double & | ez, | ||
Medium *& | medium, | ||
int & | status | ||
) |
Get the drift field at (x, y, z).
Definition at line 75 of file Sensor.cc.
|
inline |
bool Garfield::Sensor::GetArea | ( | double & | xmin, |
double & | ymin, | ||
double & | zmin, | ||
double & | xmax, | ||
double & | ymax, | ||
double & | zmax | ||
) |
Return the current user area.
Definition at line 237 of file Sensor.cc.
Referenced by Garfield::TrackHeed::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackHeed::TransportDeltaElectron(), and Garfield::TrackHeed::TransportPhoton().
ComponentBase * Garfield::Sensor::GetComponent | ( | const unsigned int | componentNumber | ) |
double Garfield::Sensor::GetElectronSignal | ( | const std::string & | label, |
const unsigned int | bin | ||
) |
Definition at line 563 of file Sensor.cc.
Referenced by Garfield::ViewSignal::PlotSignal().
double Garfield::Sensor::GetInducedCharge | ( | const std::string & | label | ) |
Definition at line 619 of file Sensor.cc.
double Garfield::Sensor::GetIonSignal | ( | const std::string & | label, |
const unsigned int | bin | ||
) |
Definition at line 583 of file Sensor.cc.
Referenced by Garfield::ViewSignal::PlotSignal().
bool Garfield::Sensor::GetMedium | ( | const double | x, |
const double | y, | ||
const double | z, | ||
Medium *& | medium | ||
) |
Get the medium at (x, y, z).
Definition at line 150 of file Sensor.cc.
Referenced by Garfield::TrackBichsel::GetCluster(), Garfield::TrackSimple::GetCluster(), Garfield::TrackElectron::GetCluster(), Garfield::TrackPAI::GetCluster(), Heed::HeedFieldMap::inside(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackElectron::NewTrack(), Garfield::TrackHeed::NewTrack(), Garfield::TrackPAI::NewTrack(), Garfield::TrackSimple::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackHeed::TransportDeltaElectron(), and Garfield::TrackHeed::TransportPhoton().
|
inline |
|
inline |
|
inline |
Definition at line 109 of file Sensor.hh.
Referenced by Garfield::ViewSignal::PlotSignal().
double Garfield::Sensor::GetSignal | ( | const std::string & | label, |
const unsigned int | bin | ||
) |
Definition at line 601 of file Sensor.cc.
Referenced by Garfield::ViewSignal::PlotSignal().
bool Garfield::Sensor::GetThresholdCrossing | ( | const unsigned int | i, |
double & | time, | ||
double & | level, | ||
bool & | rise | ||
) | const |
Definition at line 960 of file Sensor.cc.
Referenced by Garfield::ViewSignal::PlotSignal().
|
inline |
Definition at line 89 of file Sensor.hh.
Referenced by Garfield::ViewSignal::PlotSignal().
double Garfield::Sensor::GetTransferFunction | ( | const double | t | ) |
bool Garfield::Sensor::GetVoltageRange | ( | double & | vmin, |
double & | vmax | ||
) |
Return the voltage range.
Definition at line 369 of file Sensor.cc.
bool Garfield::Sensor::IntegrateSignal | ( | ) |
Definition at line 760 of file Sensor.cc.
bool Garfield::Sensor::IsInArea | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
Check if a point is inside the user area.
Definition at line 264 of file Sensor.cc.
Referenced by Garfield::TrackElectron::GetCluster(), Garfield::TrackPAI::GetCluster(), Heed::HeedFieldMap::inside(), and Garfield::TrackSrim::NewTrack().
bool Garfield::Sensor::IsInTrapRadius | ( | const double | q0, |
const double | x0, | ||
const double | y0, | ||
const double | z0, | ||
double & | xw, | ||
double & | yw, | ||
double & | rw | ||
) |
bool Garfield::Sensor::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 Garfield::Sensor::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).
Definition at line 101 of file Sensor.cc.
Referenced by Heed::HeedFieldMap::field_map(), and Garfield::DriftLineRKF::GetGain().
|
inline |
bool Garfield::Sensor::SetArea | ( | ) |
Set the user area to the default.
Definition at line 175 of file Sensor.cc.
Referenced by GetArea(), and IsInArea().
bool Garfield::Sensor::SetArea | ( | const double | xmin, |
const double | ymin, | ||
const double | zmin, | ||
const double | xmax, | ||
const double | ymax, | ||
const double | zmax | ||
) |
Set the user area explicitly.
Definition at line 204 of file Sensor.cc.
void Garfield::Sensor::SetNoiseFunction | ( | double(*)(double t) | f | ) |
void Garfield::Sensor::SetTimeWindow | ( | const double | tstart, |
const double | tstep, | ||
const unsigned int | nsteps | ||
) |
Definition at line 527 of file Sensor.cc.
void Garfield::Sensor::SetTransferFunction | ( | const std::vector< double > & | times, |
const std::vector< double > & | values | ||
) |
Definition at line 648 of file Sensor.cc.
void Garfield::Sensor::SetTransferFunction | ( | double(*)(double t) | f | ) |
void Garfield::Sensor::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).
Definition at line 117 of file Sensor.cc.
Referenced by Garfield::ViewField::Evaluate2D(), and Garfield::ViewField::EvaluateProfile().
double Garfield::Sensor::WeightingPotential | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const std::string & | label | ||
) |
Get the weighting potential at (x, y, z).
Definition at line 136 of file Sensor.cc.
Referenced by Garfield::ViewField::Evaluate2D(), and Garfield::ViewField::EvaluateProfile().