3#ifndef G_AVALANCHE_MICROSCOPIC_H
4#define G_AVALANCHE_MICROSCOPIC_H
111 double& t0,
double& e0,
double& x1,
double& y1,
112 double& z1,
double& t1,
double& e1,
115 double& t0,
double& e0,
double& x1,
double& y1,
116 double& z1,
double& t1,
double& e1,
double& dx1,
117 double& dy1,
double& dz1,
int& status)
const;
121 const int ip,
const unsigned int iel = 0)
const;
123 const int ip,
const unsigned int iel = 0)
const;
126 void GetHoleEndpoint(
const unsigned int i,
double& x0,
double& y0,
double& z0,
127 double& t0,
double& e0,
double& x1,
double& y1,
128 double& z1,
double& t1,
double& e1,
int& status)
const;
133 void GetPhoton(
const unsigned int i,
double& e,
double& x0,
double& y0,
double& z0,
134 double& t0,
double& x1,
double& y1,
double& z1,
double& t1,
140 bool DriftElectron(
const double x0,
const double y0,
const double z0,
141 const double t0,
const double e0,
const double dx0 = 0.,
142 const double dy0 = 0.,
const double dz0 = 0.);
147 const double t0,
const double e0,
148 const double dx0 = 0.,
const double dy0 = 0.,
149 const double dz0 = 0.);
153 double e,
double dx,
double dy,
double dz,
157 int type,
int level,
Medium* m));
160 int type,
int level,
Medium* m));
163 int type,
int level,
Medium* m));
171 std::string m_className;
185 double x0, y0, z0, t0;
197 std::vector<point> driftLine;
198 double xLast, yLast, zLast;
200 std::vector<electron> m_stack;
201 std::vector<electron> m_endpointsElectrons;
202 std::vector<electron> m_endpointsHoles;
204 unsigned int m_nPhotons;
211 double x0, y0, z0, t0;
213 double x1, y1, z1, t1;
215 std::vector<photon> m_photons;
223 unsigned int m_nElectronEndpoints;
224 unsigned int m_nHoleEndpoints;
228 bool m_plotExcitations;
229 bool m_plotIonisations;
230 bool m_plotAttachments;
232 TH1* m_histElectronEnergy;
233 TH1* m_histHoleEnergy;
234 bool m_hasElectronEnergyHistogram;
235 bool m_hasHoleEnergyHistogram;
237 bool m_hasDistanceHistogram;
238 char m_distanceOption;
239 std::vector<int> m_distanceHistogramType;
241 TH1* m_histSecondary;
242 bool m_hasSecondaryHistogram;
245 bool m_useInducedCharge;
246 bool m_useDriftLines;
248 bool m_useBandStructureDefault;
249 bool m_useNullCollisionSteps;
253 double m_rb11, m_rb12, m_rb13;
254 double m_rb21, m_rb22, m_rb23;
255 double m_rb31, m_rb32, m_rb33;
256 double m_rx22, m_rx23, m_rx32, m_rx33;
267 bool m_hasTimeWindow;
268 double m_tMin, m_tMax;
271 bool m_hasUserHandleStep;
272 bool m_hasUserHandleAttachment;
273 bool m_hasUserHandleInelastic;
274 bool m_hasUserHandleIonisation;
275 void (*m_userHandleStep)(
double x,
double y,
double z,
double t,
double e,
276 double dx,
double dy,
double dz,
bool hole);
277 void (*m_userHandleAttachment)(
double x,
double y,
double z,
double t,
int type,
278 int level, Medium* m);
279 void (*m_userHandleInelastic)(
double x,
double y,
double z,
double t,
int type,
280 int level, Medium* m);
281 void (*m_userHandleIonisation)(
double x,
double y,
double z,
double t,
int type,
282 int level, Medium* m);
288 bool TransportElectron(
const double x0,
const double y0,
const double z0,
289 const double t0,
const double e0,
const double dx0,
290 const double dy0,
const double dz0,
const bool aval,
293 void TransportPhoton(
const double x,
const double y,
const double z,
294 const double t,
const double e);
296 void ComputeRotationMatrix(
const double bx,
const double by,
const double bz,
297 const double bmag,
const double ex,
298 const double ey,
const double ez);
300 void RotateGlobal2Local(
double& dx,
double& dy,
double& dz);
301 void RotateLocal2Global(
double& dx,
double& dy,
double& dz);
void SetCollisionSteps(const int n)
void EnableDistanceHistogramming(const int type)
void SetDistanceHistogram(TH1 *histo, const char opt='r')
void EnablePhotonTransport()
void EnableSignalCalculation()
void EnableNullCollisionSteps()
void SetUserHandleStep(void(*f)(double x, double y, double z, double t, double e, double dx, double dy, double dz, bool hole))
void EnableHoleEnergyHistogramming(TH1 *histo)
void EnableAvalancheSizeLimit(const int size)
void EnableInducedChargeCalculation()
void EnablePlotting(ViewDrift *view)
void SetUserHandleIonisation(void(*f)(double x, double y, double z, double t, int type, int level, Medium *m))
void UnsetUserHandleAttachment()
void DisableHoleEnergyHistogramming()
void DisableIonisationMarkers()
bool DriftElectron(const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0=0., const double dy0=0., const double dz0=0.)
void SetPhotonTransportCut(const double cut)
void DisableAttachmentMarkers()
void EnableExcitationMarkers()
void DisableSecondaryEnergyHistogramming()
unsigned int GetNumberOfElectronDriftLinePoints(const unsigned int i=0) const
void DisableAvalancheSizeLimit()
void DisableMagneticField()
void EnableIonisationMarkers()
int GetNumberOfPhotons() const
void EnableMagneticField()
double GetPhotonTransportCut() const
void GetAvalancheSize(int &ne, int &ni) const
void SetUserHandleAttachment(void(*f)(double x, double y, double z, double t, int type, int level, Medium *m))
void SetSensor(Sensor *sensor)
void GetHoleDriftLinePoint(double &x, double &y, double &z, double &t, const int ip, const unsigned int iel=0) const
void DisableBandStructure()
void DisableInducedChargeCalculation()
void DisableNullCollisionSteps()
void GetElectronEndpoint(const unsigned int i, double &x0, double &y0, double &z0, double &t0, double &e0, double &x1, double &y1, double &z1, double &t1, double &e1, int &status) const
int GetNumberOfHoleEndpoints() const
void GetHoleEndpoint(const unsigned int i, double &x0, double &y0, double &z0, double &t0, double &e0, double &x1, double &y1, double &z1, double &t1, double &e1, int &status) const
void GetElectronDriftLinePoint(double &x, double &y, double &z, double &t, const int ip, const unsigned int iel=0) const
void UnsetUserHandleStep()
double GetElectronTransportCut() const
void EnableElectronEnergyHistogramming(TH1 *histo)
void DisablePhotonTransport()
void DisableExcitationMarkers()
void UnsetUserHandleIonisation()
void DisableDistanceHistogramming()
void GetPhoton(const unsigned int i, double &e, double &x0, double &y0, double &z0, double &t0, double &x1, double &y1, double &z1, double &t1, int &status) const
void GetAvalancheSize(int &ne, int &nh, int &ni) const
void EnableSecondaryEnergyHistogramming(TH1 *histo)
void EnableAttachmentMarkers()
bool AvalancheElectron(const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0=0., const double dy0=0., const double dz0=0.)
void EnableBandStructure()
void SetElectronTransportCut(const double cut)
int GetAvalancheSizeLimit() const
void DisableElectronEnergyHistogramming()
int GetNumberOfElectronEndpoints() const
unsigned int GetNumberOfHoleDriftLinePoints(const unsigned int i=0) const
void SetUserHandleInelastic(void(*f)(double x, double y, double z, double t, int type, int level, Medium *m))
void DisableSignalCalculation()
void UnsetUserHandleInelastic()
void SetTimeWindow(const double t0, const double t1)