1#ifndef G_COMPONENT_ANALYTIC_FIELD_H
2#define G_COMPONENT_ANALYTIC_FIELD_H
22 Medium*
GetMedium(
const double x,
const double y,
const double z)
override;
23 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
24 double& ey,
double& ez,
Medium*& m,
int& status)
override {
28 status = Field(x, y, z, ex, ey, ez, v,
false);
40 void ElectricField(
const double x,
const double y,
const double z,
double& ex,
41 double& ey,
double& ez,
double& v,
Medium*& m,
42 int& status)
override {
45 status = Field(x, y, z, ex, ey, ez, v,
true);
60 double& wx,
double& wy,
double& wz,
61 const std::string& label)
override {
64 if (!m_sigset) PrepareSignals();
65 Wfield(x, y, z, wx, wy, wz, volt, label,
false);
68 const std::string& label)
override {
69 double wx = 0., wy = 0., wz = 0.;
71 if (!m_sigset) PrepareSignals();
72 Wfield(x, y, z, wx, wy, wz, volt, label,
true);
76 bool GetBoundingBox(
double& x0,
double& y0,
double& z0,
double& x1,
77 double& y1,
double& z1)
override;
79 bool IsWireCrossed(
const double x0,
const double y0,
const double z0,
80 const double x1,
const double y1,
const double z1,
81 double& xc,
double& yc,
double& zc,
const bool centre,
84 bool IsInTrapRadius(
const double q0,
const double x0,
const double y0,
85 const double z0,
double& xw,
double& yx,
92 void AddWire(
const double x,
const double y,
const double diameter,
93 const double voltage,
const std::string& label,
94 const double length = 100.,
const double tension = 50.,
95 const double rho = 19.3,
const int ntrap = 5);
97 void AddTube(
const double radius,
const double voltage,
const int nEdges,
98 const std::string& label);
100 void AddPlaneX(
const double x,
const double voltage,
101 const std::string& label);
103 void AddPlaneY(
const double y,
const double voltage,
104 const std::string& label);
106 void AddPlaneR(
const double r,
const double voltage,
107 const std::string& label);
109 void AddPlanePhi(
const double phi,
const double voltage,
110 const std::string& label);
112 void AddStripOnPlaneX(
const char direction,
const double x,
const double smin,
113 const double smax,
const std::string& label,
114 const double gap = -1.);
116 void AddStripOnPlaneY(
const char direction,
const double y,
const double smin,
117 const double smax,
const std::string& label,
118 const double gap = -1.);
120 void AddStripOnPlaneR(
const char direction,
const double r,
const double smin,
121 const double smax,
const std::string& label,
122 const double gap = -1.);
125 const double smax,
const std::string& label,
126 const double gap = -1.);
129 const double zmin,
const double zmax,
130 const std::string& label,
const double gap = -1.);
133 const double zmin,
const double zmax,
134 const std::string& label,
const double gap = -1.);
137 const double phimin,
const double phimax,
138 const double zmin,
const double zmax,
139 const std::string& label,
const double gap = -1.);
142 const double rmin,
const double rmax,
143 const double zmin,
const double zmax,
144 const std::string& label,
const double gap = -1.);
170 void AddCharge(
const double x,
const double y,
const double z,
198 if (CellCheck()) CellType();
217 const bool print =
false,
const bool plot =
false,
218 const double rmult = 1.,
const double eps = 1.e-4,
219 const unsigned int nMaxIter = 20);
228 bool GetWire(
const unsigned int i,
double& x,
double& y,
double& diameter,
229 double& voltage, std::string& label,
double& length,
230 double& charge,
int& ntrap)
const;
241 bool GetPlaneX(
const unsigned int i,
double& x,
double& voltage,
242 std::string& label)
const;
244 bool GetPlaneY(
const unsigned int i,
double& y,
double& voltage,
245 std::string& label)
const;
247 bool GetPlaneR(
const unsigned int i,
double& r,
double& voltage,
248 std::string& label)
const;
250 bool GetPlanePhi(
const unsigned int i,
double& phi,
double& voltage,
251 std::string& label)
const;
253 bool GetTube(
double& r,
double& voltage,
int& nEdges,
254 std::string& label)
const;
265 void SetScanningArea(
const double xmin,
const double xmax,
const double ymin,
278 void SetGravity(
const double dx,
const double dy,
const double dz);
280 void GetGravity(
double& dx,
double& dy,
double& dz)
const;
289 bool ForcesOnWire(
const unsigned int iw, std::vector<double>& xMap,
290 std::vector<double>& yMap,
291 std::vector<std::vector<double> >& fxMap,
292 std::vector<std::vector<double> >& fyMap);
304 std::vector<double>& csag, std::vector<double>& xsag,
305 std::vector<double>& ysag,
double& stretch,
306 const bool print =
true);
331 Medium* m_medium =
nullptr;
333 bool m_chargeCheck =
false;
335 bool m_cellset =
false;
336 bool m_sigset =
false;
338 bool m_polar =
false;
344 double m_xmin, m_xmax;
345 double m_ymin, m_ymax;
346 double m_zmin, m_zmax;
349 double m_vmin, m_vmax;
359 bool m_fperx =
false;
360 bool m_fpery =
false;
367 std::vector<std::string> m_readout;
370 unsigned int m_nWires;
384 std::vector<Wire> m_w;
389 std::vector<double> m_cosph2;
390 std::vector<double> m_sinph2;
391 std::vector<double> m_amp2;
394 std::vector<double> m_b2sin;
397 std::complex<double> m_zmult;
398 double m_p1, m_p2, m_c1;
401 std::vector<std::complex<double> > wmap;
406 double m_corvta, m_corvtb, m_corvtc;
411 bool m_ynplax, m_ynplay;
414 double m_coplax, m_coplay;
436 double ewxcor, ewycor;
437 std::vector<Strip> strips1;
438 std::vector<Strip> strips2;
439 std::vector<Pixel> pixels;
441 std::array<Plane, 5> m_planes;
447 double m_cotube = 1.;
448 double m_cotube2 = 1.;
449 double m_vttube = 0.;
452 std::vector<std::vector<double> > m_a;
454 std::vector<std::vector<std::complex<double> > > m_sigmat;
456 std::vector<std::vector<double> > m_qplane;
463 std::vector<Charge3d> m_ch3d;
464 unsigned int m_nTermBessel = 10;
465 unsigned int m_nTermPoly = 100;
467 bool m_useElectrostaticForce =
true;
468 bool m_useGravitationalForce =
true;
470 std::array<double, 3> m_down{{0, 0, 1}};
472 unsigned int m_nShots = 2;
474 unsigned int m_nSteps = 20;
477 enum class ScanningRange { Largest = 0, FirstOrder, User };
478 ScanningRange m_scanRange = ScanningRange::FirstOrder;
480 double m_xScanMin = 0.;
481 double m_xScanMax = 0.;
482 double m_yScanMin = 0.;
483 double m_yScanMax = 0.;
485 double m_scaleRange = 2.;
487 unsigned int m_nScanX = 11;
488 unsigned int m_nScanY = 11;
490 bool m_extrapolateForces =
false;
492 void UpdatePeriodicity()
override;
493 void Reset()
override {
501 bool WireCheck()
const;
504 bool PrepareStrips();
505 bool PrepareSignals();
506 bool SetupWireSignals();
507 bool SetupPlaneSignals();
524 bool IprA00(
const int mx,
const int my);
525 bool IprB2X(
const int my);
526 bool IprB2Y(
const int mx);
533 bool SetupDipoleTerms();
539 int Field(
const double xin,
const double yin,
const double zin,
double& ex,
540 double& ey,
double& ez,
double& volt,
const bool opt);
541 void FieldA00(
const double xpos,
const double ypos,
double& ex,
double& ey,
542 double& volt,
const bool opt)
const;
543 void FieldB1X(
const double xpos,
const double ypos,
double& ex,
double& ey,
544 double& volt,
const bool opt)
const;
545 void FieldB1Y(
const double xpos,
const double ypos,
double& ex,
double& ey,
546 double& volt,
const bool opt)
const;
547 void FieldB2X(
const double xpos,
const double ypos,
double& ex,
double& ey,
548 double& volt,
const bool opt)
const;
549 void FieldB2Y(
const double xpos,
const double ypos,
double& ex,
double& ey,
550 double& volt,
const bool opt)
const;
551 void FieldC10(
const double xpos,
const double ypos,
double& ex,
double& ey,
552 double& volt,
const bool opt)
const;
553 void FieldC2X(
const double xpos,
const double ypos,
double& ex,
double& ey,
554 double& volt,
const bool opt)
const;
555 void FieldC2Y(
const double xpos,
const double ypos,
double& ex,
double& ey,
556 double& volt,
const bool opt)
const;
557 void FieldC30(
const double xpos,
const double ypos,
double& ex,
double& ey,
558 double& volt,
const bool opt)
const;
559 void FieldD10(
const double xpos,
const double ypos,
double& ex,
double& ey,
560 double& volt,
const bool opt)
const;
561 void FieldD20(
const double xpos,
const double ypos,
double& ex,
double& ey,
562 double& volt,
const bool opt)
const;
563 void FieldD30(
const double xpos,
const double ypos,
double& ex,
double& ey,
564 double& volt,
const bool opt)
const;
567 void Field3dA00(
const double x,
const double y,
const double z,
double& ex,
568 double& ey,
double& ez,
double& volt);
569 void Field3dB2X(
const double x,
const double y,
const double z,
double& ex,
570 double& ey,
double& ez,
double& volt);
571 void Field3dB2Y(
const double x,
const double y,
const double z,
double& ex,
572 double& ey,
double& ez,
double& volt);
573 void Field3dD10(
const double x,
const double y,
const double z,
double& ex,
574 double& ey,
double& ez,
double& volt);
576 bool Wfield(
const double xpos,
const double ypos,
const double zpos,
577 double& ex,
double& ey,
double& ez,
double& volt,
578 const std::string& label,
const bool opt)
const;
579 void WfieldWireA00(
const double xpos,
const double ypos,
double& ex,
580 double& ey,
double& volt,
const int mx,
const int my,
581 const int sw,
const bool opt)
const;
582 void WfieldWireB2X(
const double xpos,
const double ypos,
double& ex,
583 double& ey,
double& volt,
const int my,
const int sw,
584 const bool opt)
const;
585 void WfieldWireB2Y(
const double xpos,
const double ypos,
double& ex,
586 double& ey,
double& volt,
const int mx,
const int sw,
587 const bool opt)
const;
588 void WfieldWireC2X(
const double xpos,
const double ypos,
double& ex,
589 double& ey,
double& volt,
const int sw,
590 const bool opt)
const;
591 void WfieldWireC2Y(
const double xpos,
const double ypos,
double& ex,
592 double& ey,
double& volt,
const int sw,
593 const bool opt)
const;
594 void WfieldWireC30(
const double xpos,
const double ypos,
double& ex,
595 double& ey,
double& volt,
const int sw,
596 const bool opt)
const;
597 void WfieldWireD10(
const double xpos,
const double ypos,
double& ex,
598 double& ey,
double& volt,
const int sw,
599 const bool opt)
const;
600 void WfieldWireD30(
const double xpos,
const double ypos,
double& ex,
601 double& ey,
double& volt,
const int sw,
602 const bool opt)
const;
603 void WfieldPlaneA00(
const double xpos,
const double ypos,
double& ex,
604 double& ey,
double& volt,
const int mx,
const int my,
605 const int iplane,
const bool opt)
const;
606 void WfieldPlaneB2X(
const double xpos,
const double ypos,
double& ex,
607 double& ey,
double& volt,
const int my,
const int iplane,
608 const bool opt)
const;
609 void WfieldPlaneB2Y(
const double xpos,
const double ypos,
double& ex,
610 double& ey,
double& volt,
const int mx,
const int iplane,
611 const bool opt)
const;
612 void WfieldPlaneC2X(
const double xpos,
const double ypos,
double& ex,
613 double& ey,
double& volt,
const int iplane,
614 const bool opt)
const;
615 void WfieldPlaneC2Y(
const double xpos,
const double ypos,
double& ex,
616 double& ey,
double& volt,
const int iplane,
617 const bool opt)
const;
618 void WfieldPlaneC30(
const double xpos,
const double ypos,
double& ex,
619 double& ey,
double& volt,
const int iplane,
620 const bool opt)
const;
621 void WfieldPlaneD10(
const double xpos,
const double ypos,
double& ex,
622 double& ey,
double& volt,
const int iplane,
623 const bool opt)
const;
624 void WfieldPlaneD30(
const double xpos,
const double ypos,
double& ex,
625 double& ey,
double& volt,
const int iplane,
626 const bool opt)
const;
627 void WfieldStripZ(
const double xpos,
const double ypos,
double& ex,
628 double& ey,
double& volt,
const int ip,
const Strip& strip,
629 const bool opt)
const;
630 void WfieldStripXy(
const double xpos,
const double ypos,
const double zpos,
631 double& ex,
double& ey,
double& ez,
double& volt,
632 const int ip,
const Strip& strip,
const bool opt)
const;
633 void WfieldPixel(
const double xpos,
const double ypos,
const double zpos,
634 double& ex,
double& ey,
double& ez,
double& volt,
635 const int ip,
const Pixel& pixel,
const bool opt)
const;
640 void FieldAtWireA00(
const double xpos,
const double ypos,
double& ex,
641 double& ey,
const std::vector<bool>& cnalso)
const;
642 void FieldAtWireB1X(
const double xpos,
const double ypos,
double& ex,
643 double& ey,
const std::vector<bool>& cnalso)
const;
644 void FieldAtWireB1Y(
const double xpos,
const double ypos,
double& ex,
645 double& ey,
const std::vector<bool>& cnalso)
const;
646 void FieldAtWireB2X(
const double xpos,
const double ypos,
double& ex,
647 double& ey,
const std::vector<bool>& cnalso)
const;
648 void FieldAtWireB2Y(
const double xpos,
const double ypos,
double& ex,
649 double& ey,
const std::vector<bool>& cnalso)
const;
650 void FieldAtWireC10(
const double xpos,
const double ypos,
double& ex,
651 double& ey,
const std::vector<bool>& cnalso)
const;
652 void FieldAtWireC2X(
const double xpos,
const double ypos,
double& ex,
653 double& ey,
const std::vector<bool>& cnalso)
const;
654 void FieldAtWireC2Y(
const double xpos,
const double ypos,
double& ex,
655 double& ey,
const std::vector<bool>& cnalso)
const;
656 void FieldAtWireC30(
const double xpos,
const double ypos,
double& ex,
657 double& ey,
const std::vector<bool>& cnalso)
const;
658 void FieldAtWireD10(
const double xpos,
const double ypos,
double& ex,
659 double& ey,
const std::vector<bool>& cnalso)
const;
660 void FieldAtWireD20(
const double xpos,
const double ypos,
double& ex,
661 double& ey,
const std::vector<bool>& cnalso)
const;
662 void FieldAtWireD30(
const double xpos,
const double ypos,
double& ex,
663 double& ey,
const std::vector<bool>& cnalso)
const;
665 void DipoleFieldA00(
const double xpos,
const double ypos,
double& ex,
666 double& ey,
double& volt,
const bool opt)
const;
667 void DipoleFieldB1X(
const double xpos,
const double ypos,
double& ex,
668 double& ey,
double& volt,
const bool opt)
const;
669 void DipoleFieldB1Y(
const double xpos,
const double ypos,
double& ex,
670 double& ey,
double& volt,
const bool opt)
const;
671 void DipoleFieldB2X(
const double xpos,
const double ypos,
double& ex,
672 double& ey,
double& volt,
const bool opt)
const;
673 void DipoleFieldB2Y(
const double xpos,
const double ypos,
double& ex,
674 double& ey,
double& volt,
const bool opt)
const;
677 double Ph2(
const double xpos,
const double ypos)
const;
678 double Ph2Lim(
const double radius)
const {
679 return -log(abs(m_zmult) * radius * (1. - 3. * m_p1 + 5. * m_p2));
681 void E2Sum(
const double xpos,
const double ypos,
double& ex,
685 void ConformalMap(
const std::complex<double>& z, std::complex<double>& ww,
686 std::complex<double>& wd)
const;
688 bool InTube(
const double x0,
const double y0,
const double a,
691 bool SagDetailed(
const Wire& wire,
const std::vector<double>& xMap,
692 const std::vector<double>& yMap,
693 const std::vector<std::vector<double> >& fxMap,
694 const std::vector<std::vector<double> >& fyMap,
695 std::vector<double>& csag, std::vector<double>& xsag,
696 std::vector<double>& ysag)
const;
697 bool GetForceRatio(
const Wire& wire,
const double coor,
698 const std::array<double, 2>& bend,
699 const std::array<double, 2>& dbend,
700 std::array<double, 2>& f,
const std::vector<double>& xMap,
701 const std::vector<double>& yMap,
702 const std::vector<std::vector<double> >& fxMap,
703 const std::vector<std::vector<double> >& fyMap)
const;
704 bool FindZeroes(
const Wire& wire,
const double h, std::vector<double>& x,
705 const std::vector<double>& xMap,
706 const std::vector<double>& yMap,
707 const std::vector<std::vector<double> >& fxMap,
708 const std::vector<std::vector<double> >& fyMap)
const;
709 bool StepRKN(
const Wire& wire,
const double h,
double& x,
710 std::array<double, 2>& y, std::array<double, 2>& yp,
711 const std::vector<double>& xMap,
const std::vector<double>& yMap,
712 const std::vector<std::vector<double> >& fxMap,
713 const std::vector<std::vector<double> >& fyMap)
const;
714 bool Trace(
const Wire& wire,
const double h,
const std::vector<double>& xx,
715 std::vector<double>& f,
const std::vector<double>& xMap,
716 const std::vector<double>& yMap,
717 const std::vector<std::vector<double> >& fxMap,
718 const std::vector<std::vector<double> >& fyMap)
const;
void PrintCell()
Print all available information on the cell.
void SetGravity(const double dx, const double dy, const double dz)
Set the gravity orientation.
bool GetVoltageRange(double &pmin, double &pmax) override
Calculate the voltage range [V].
void SetPolarCoordinates()
Use polar coordinates.
void SetPeriodicityX(const double s)
Set the periodic length [cm] in the x-direction.
void EnableDipoleTerms(const bool on=true)
Request dipole terms be included for each of the wires (default: off).
bool GetPeriodicityY(double &s)
Get the periodic length in the y-direction.
void SetCartesianCoordinates()
Use Cartesian coordinates (default).
void AddPixelOnPlanePhi(const double phi, const double rmin, const double rmax, const double zmin, const double zmax, const std::string &label, const double gap=-1.)
Add a pixel on an existing plane at constant phi.
void AddTube(const double radius, const double voltage, const int nEdges, const std::string &label)
Add a tube.
void AddPlaneX(const double x, const double voltage, const std::string &label)
Add a plane at constant x.
void EnableChargeCheck(const bool on=true)
Check the quality of the capacitance matrix inversion (default: off).
bool IsPolar() const
Are polar coordinates being used?
void SetMedium(Medium *medium)
Set the medium inside the cell.
void AddPixelOnPlaneY(const double y, const double xmin, const double xmax, const double zmin, const double zmax, const std::string &label, const double gap=-1.)
Add a pixel on an existing plane at constant y.
void AddCharge(const double x, const double y, const double z, const double q)
Add a point charge.
unsigned int GetNumberOfWires() const
Get the number of wires.
void SetScanningGrid(const unsigned int nX, const unsigned int nY)
void SetNumberOfSteps(const unsigned int n)
Set the number of integration steps within each shot (must be >= 1).
std::string GetCellType()
void SetNumberOfShots(const unsigned int n)
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
void AddPixelOnPlaneR(const double r, const double phimin, const double phimax, const double zmin, const double zmax, const std::string &label, const double gap=-1.)
Add a pixel on an existing plane at constant radius.
bool GetWire(const unsigned int i, double &x, double &y, double &diameter, double &voltage, std::string &label, double &length, double &charge, int &ntrap) const
Retrieve the parameters of a wire.
bool GetPlaneR(const unsigned int i, double &r, double &voltage, std::string &label) const
Retrieve the parameters of a plane at constant radius.
bool WireDisplacement(const unsigned int iw, const bool detailed, std::vector< double > &csag, std::vector< double > &xsag, std::vector< double > &ysag, double &stretch, const bool print=true)
void GetGravity(double &dx, double &dy, double &dz) const
Get the gravity orientation.
ComponentAnalyticField()
Constructor.
void AddStripOnPlaneX(const char direction, const double x, const double smin, const double smax, const std::string &label, const double gap=-1.)
Add a strip in the y or z direction on an existing plane at constant x.
void ClearCharges()
Remove all point charges.
unsigned int GetNumberOfPlanesY() const
Get the number of equipotential planes at constant y.
void AddPlanePhi(const double phi, const double voltage, const std::string &label)
Add a plane at constant phi.
void AddPlaneR(const double r, const double voltage, const std::string &label)
Add a plane at constant radius.
bool ElectricFieldAtWire(const unsigned int iw, double &ex, double &ey)
bool MultipoleMoments(const unsigned int iw, const unsigned int order=4, const bool print=false, const bool plot=false, const double rmult=1., const double eps=1.e-4, const unsigned int nMaxIter=20)
void AddWire(const double x, const double y, const double diameter, const double voltage, const std::string &label, const double length=100., const double tension=50., const double rho=19.3, const int ntrap=5)
Add a wire at (x, y) .
void EnableExtrapolation(const bool on=true)
unsigned int GetNumberOfPlanesX() const
Get the number of equipotential planes at constant x.
void SetScanningAreaLargest()
bool GetPeriodicityX(double &s)
Get the periodic length in the x-direction.
bool GetTube(double &r, double &voltage, int &nEdges, std::string &label) const
Retrieve the tube parameters.
bool GetPlaneX(const unsigned int i, double &x, double &voltage, std::string &label) const
Retrieve the parameters of a plane at constant x.
void AddPlaneY(const double y, const double voltage, const std::string &label)
Add a plane at constant y.
void AddPixelOnPlaneX(const double x, const double ymin, const double ymax, const double zmin, const double zmax, const std::string &label, const double gap=-1.)
Add a pixel on an existing plane at constant x.
bool IsInTrapRadius(const double q0, const double x0, const double y0, const double z0, double &xw, double &yx, double &rw) override
void SetPeriodicityPhi(const double phi)
Set the periodicity [degree] in phi.
bool GetPeriodicityPhi(double &s)
Get the periodicity [degree] in phi.
bool GetPlanePhi(const unsigned int i, double &phi, double &voltage, std::string &label) const
Retrieve the parameters of a plane at constant phi.
void AddStripOnPlaneY(const char direction, const double y, const double smin, const double smax, const std::string &label, const double gap=-1.)
Add a strip in the x or z direction on an existing plane at constant y.
bool GetBoundingBox(double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) override
Get the bounding box coordinates.
bool ForcesOnWire(const unsigned int iw, std::vector< double > &xMap, std::vector< double > &yMap, std::vector< std::vector< double > > &fxMap, std::vector< std::vector< double > > &fyMap)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
~ComponentAnalyticField()
Destructor.
void SetScanningAreaFirstOrder(const double scale=2.)
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, const bool centre, double &rc) override
void AddReadout(const std::string &label)
Setup the weighting field for a given group of wires or planes.
double WeightingPotential(const double x, const double y, const double z, const std::string &label) override
void SetPeriodicityY(const double s)
Set the periodic length [cm] in the y-direction.
Medium * GetMedium(const double x, const double y, const double z) override
Get the medium at a given location (x, y, z).
unsigned int GetNumberOfPlanesPhi() const
Get the number of equipotential planes at constant phi.
void AddStripOnPlaneR(const char direction, const double r, const double smin, const double smax, const std::string &label, const double gap=-1.)
Add a strip in the phi or z direction on an existing plane at constant radius.
void PrintCharges() const
Print a list of the point charges.
void SetScanningArea(const double xmin, const double xmax, const double ymin, const double ymax)
bool GetPlaneY(const unsigned int i, double &y, double &voltage, std::string &label) const
Retrieve the parameters of a plane at constant y.
unsigned int GetNumberOfPlanesR() const
Get the number of equipotential planes at constant radius.
void AddStripOnPlanePhi(const char direction, const double phi, const double smin, const double smax, const std::string &label, const double gap=-1.)
Add a strip in the r or z direction on an existing plane at constant phi.
Abstract base class for components.
GeometryBase * m_geometry
Pointer to the geometry.
virtual Medium * GetMedium(const double x, const double y, const double z) const =0
Retrieve the medium at a given point.
Abstract base class for media.
bool IsDriftable() const
Is charge carrier transport enabled in this medium?