Calculate avalanches in a uniform electric field using avalanche statistics.  
 More...
#include <AvalancheGrid.hh>
|  | 
|  | AvalancheGrid () | 
|  | Default constructor. 
 | 
|  | AvalancheGrid (Sensor *sensor) | 
|  | Constructor. 
 | 
|  | ~AvalancheGrid ()=default | 
|  | Destructor. 
 | 
| void | SetSensor (Sensor *sensor) | 
|  | Set the sensor. 
 | 
| void | StartGridAvalanche () | 
|  | Start grid based avalanche simulation. 
 | 
| void | SetElectronVelocity (const double vx, const double vy, const double vz) | 
|  | Set the electron drift velocity (in cm / ns). 
 | 
| void | SetElectronTownsend (const double town) | 
|  | Set the electron Townsend coefficient (in 1 / cm). 
 | 
| void | SetElectronAttachment (const double att) | 
|  | Set the electron attachment coefficient (in 1 / cm). 
 | 
| void | SetMaxAvalancheSize (const double size) | 
|  | Set the maximum avalanche size (1e7 by default). 
 | 
| void | AddElectron (const double x, const double y, const double z, const double t=0, const int n=1) | 
|  | Add an electron to the initial configuration. 
 | 
| void | AddElectrons (AvalancheMicroscopic *avmc) | 
|  | Import electrons from AvalancheMicroscopic object. 
 | 
| void | SetGrid (const double xmin, const double xmax, const int xsteps, const double ymin, const double ymax, const int ysteps, const double zmin, const double zmax, const int zsteps) | 
|  | Set the grid. 
 | 
| int | GetAmountOfStartingElectrons () | 
|  | Returns the initial number of electrons in the avalanche. 
 | 
| int | GetAvalancheSize () | 
|  | Returns the final number of electrons in the avalanche. 
 | 
| void | EnableDebugging () | 
| void | Reset () | 
Calculate avalanches in a uniform electric field using avalanche statistics. 
Definition at line 16 of file AvalancheGrid.hh.
◆ AvalancheGrid() [1/2]
  
  | 
        
          | Garfield::AvalancheGrid::AvalancheGrid | ( |  | ) |  |  | inline | 
 
Default constructor. 
Definition at line 19 of file AvalancheGrid.hh.
AvalancheGrid()
Default constructor.
 
 
 
◆ AvalancheGrid() [2/2]
      
        
          | Garfield::AvalancheGrid::AvalancheGrid | ( | Sensor * | sensor | ) |  | 
      
 
 
◆ ~AvalancheGrid()
  
  | 
        
          | Garfield::AvalancheGrid::~AvalancheGrid | ( |  | ) |  |  | default | 
 
 
◆ AddElectron()
      
        
          | void Garfield::AvalancheGrid::AddElectron | ( | const double | x, | 
        
          |  |  | const double | y, | 
        
          |  |  | const double | z, | 
        
          |  |  | const double | t = 0, | 
        
          |  |  | const int | n = 1 ) | 
      
 
Add an electron to the initial configuration. 
- Parameters
- 
  
    | x | x-coordinate of initial electron. |  | y | y-coordinate of initial electron. |  | z | t-coordinate of initial electron. |  | t | starting time of avalanche. |  | n | number of electrons at this point. |  
 
 
 
◆ AddElectrons()
◆ DeactivateNode()
  
  | 
        
          | void Garfield::AvalancheGrid::DeactivateNode | ( | AvalancheNode & | node | ) |  |  | private | 
 
 
◆ EnableDebugging()
  
  | 
        
          | void Garfield::AvalancheGrid::EnableDebugging | ( |  | ) |  |  | inline | 
 
 
◆ GetAmountOfStartingElectrons()
  
  | 
        
          | int Garfield::AvalancheGrid::GetAmountOfStartingElectrons | ( |  | ) |  |  | inline | 
 
Returns the initial number of electrons in the avalanche. 
Definition at line 75 of file AvalancheGrid.hh.
 
 
◆ GetAvalancheSize()
  
  | 
        
          | int Garfield::AvalancheGrid::GetAvalancheSize | ( |  | ) |  |  | inline | 
 
Returns the final number of electrons in the avalanche. 
Definition at line 77 of file AvalancheGrid.hh.
int m_nTotal
Total amount of charge.
 
 
 
◆ GetParameters()
  
  | 
        
          | bool Garfield::AvalancheGrid::GetParameters | ( | AvalancheNode & | node | ) |  |  | private | 
 
 
◆ NextAvalancheGridPoint()
  
  | 
        
          | void Garfield::AvalancheGrid::NextAvalancheGridPoint | ( |  | ) |  |  | private | 
 
 
◆ Reset()
      
        
          | void Garfield::AvalancheGrid::Reset | ( |  | ) |  | 
      
 
 
◆ SetElectronAttachment()
  
  | 
        
          | void Garfield::AvalancheGrid::SetElectronAttachment | ( | const double | att | ) |  |  | inline | 
 
Set the electron attachment coefficient (in 1 / cm). 
Definition at line 44 of file AvalancheGrid.hh.
 
 
◆ SetElectronTownsend()
  
  | 
        
          | void Garfield::AvalancheGrid::SetElectronTownsend | ( | const double | town | ) |  |  | inline | 
 
Set the electron Townsend coefficient (in 1 / cm). 
Definition at line 42 of file AvalancheGrid.hh.
 
 
◆ SetElectronVelocity()
  
  | 
        
          | void Garfield::AvalancheGrid::SetElectronVelocity | ( | const double | vx, |  
          |  |  | const double | vy, |  
          |  |  | const double | vz ) |  | inline | 
 
Set the electron drift velocity (in cm / ns). 
Definition at line 31 of file AvalancheGrid.hh.
   31                                                                              {
   32    double vel = std::sqrt(vx * vx + vy * vy + vz * vz);
   33    if (vel != std::abs(vx) && vel != std::abs(vy) && vel != std::abs(vz))
   34      return;
   35    int nx = (int)vx / vel;
   36    int ny = (int)vy / vel;
   37    int nz = (int)vz / vel;
   40  }
std::vector< int > m_velNormal
 
 
◆ SetGrid()
      
        
          | void Garfield::AvalancheGrid::SetGrid | ( | const double | xmin, | 
        
          |  |  | const double | xmax, | 
        
          |  |  | const int | xsteps, | 
        
          |  |  | const double | ymin, | 
        
          |  |  | const double | ymax, | 
        
          |  |  | const int | ysteps, | 
        
          |  |  | const double | zmin, | 
        
          |  |  | const double | zmax, | 
        
          |  |  | const int | zsteps ) | 
      
 
Set the grid. 
- Parameters
- 
  
    | xmin,xmax | x-coordinate range of the grid [cm]. |  | xsteps | number of x-coordinate points in the grid. |  | ymin,ymax | y-coordinate range of the grid [cm]. |  | ysteps | number of y-coordinate points in the grid. |  | zmin,zmax | z-coordinate range of the grid [cm]. |  | zsteps | number of z-coordinate points in the grid. |  
 
 
 
◆ SetMaxAvalancheSize()
  
  | 
        
          | void Garfield::AvalancheGrid::SetMaxAvalancheSize | ( | const double | size | ) |  |  | inline | 
 
Set the maximum avalanche size (1e7 by default). 
Definition at line 46 of file AvalancheGrid.hh.
 
 
◆ SetSensor()
  
  | 
        
          | void Garfield::AvalancheGrid::SetSensor | ( | Sensor * | sensor | ) |  |  | inline | 
 
 
◆ SnapToGrid()
  
  | 
        
          | bool Garfield::AvalancheGrid::SnapToGrid | ( | const double | x, |  
          |  |  | const double | y, |  
          |  |  | const double | z, |  
          |  |  | const double | v, |  
          |  |  | const int | n = 1 ) |  | private | 
 
 
◆ StartGridAvalanche()
      
        
          | void Garfield::AvalancheGrid::StartGridAvalanche | ( |  | ) |  | 
      
 
Start grid based avalanche simulation. 
 
 
◆ m_activeNodes
  
  | 
        
          | std::vector<AvalancheNode> Garfield::AvalancheGrid::m_activeNodes = {} |  | private | 
 
 
◆ m_Attachment
  
  | 
        
          | double Garfield::AvalancheGrid::m_Attachment = -1 |  | private | 
 
 
◆ m_className
  
  | 
        
          | std::string Garfield::AvalancheGrid::m_className = "AvalancheGrid" |  | private | 
 
 
◆ m_debug
  
  | 
        
          | bool Garfield::AvalancheGrid::m_debug = false |  | private | 
 
 
◆ m_gridset
  
  | 
        
          | bool Garfield::AvalancheGrid::m_gridset = false |  | private | 
 
 
◆ m_MaxSize
  
  | 
        
          | double Garfield::AvalancheGrid::m_MaxSize = 1.6e7 |  | private | 
 
 
◆ m_nestart
  
  | 
        
          | int Garfield::AvalancheGrid::m_nestart = 0. |  | private | 
 
 
◆ m_nLayer
  
  | 
        
          | std::vector<double> Garfield::AvalancheGrid::m_nLayer |  | private | 
 
 
◆ m_nTotal
  
  | 
        
          | int Garfield::AvalancheGrid::m_nTotal = 0 |  | private | 
 
 
◆ m_printPar
  
  | 
        
          | bool Garfield::AvalancheGrid::m_printPar = false |  | private | 
 
 
◆ m_run
  
  | 
        
          | bool Garfield::AvalancheGrid::m_run = true |  | private | 
 
Tracking if the charges are still in the drift gap. 
Definition at line 122 of file AvalancheGrid.hh.
 
 
◆ m_Saturated
  
  | 
        
          | bool Garfield::AvalancheGrid::m_Saturated = false |  | private | 
 
 
◆ m_SaturationTime
  
  | 
        
          | double Garfield::AvalancheGrid::m_SaturationTime = -1. |  | private | 
 
 
◆ m_sensor
  
  | 
        
          | Sensor* Garfield::AvalancheGrid::m_sensor = nullptr |  | private | 
 
 
◆ m_time
  
  | 
        
          | double Garfield::AvalancheGrid::m_time = 0 |  | private | 
 
 
◆ m_Townsend
  
  | 
        
          | double Garfield::AvalancheGrid::m_Townsend = -1 |  | private | 
 
 
◆ m_velNormal
  
  | 
        
          | std::vector<int> Garfield::AvalancheGrid::m_velNormal = {0, 0, 0} |  | private | 
 
 
◆ m_Velocity
  
  | 
        
          | double Garfield::AvalancheGrid::m_Velocity = 0. |  | private | 
 
 
◆ m_xgrid
  
  | 
        
          | std::vector<double> Garfield::AvalancheGrid::m_xgrid |  | private | 
 
 
◆ m_xStepSize
  
  | 
        
          | double Garfield::AvalancheGrid::m_xStepSize = 0. |  | private | 
 
 
◆ m_ygrid
  
  | 
        
          | std::vector<double> Garfield::AvalancheGrid::m_ygrid |  | private | 
 
 
◆ m_yStepSize
  
  | 
        
          | double Garfield::AvalancheGrid::m_yStepSize = 0. |  | private | 
 
 
◆ m_zgrid
  
  | 
        
          | std::vector<double> Garfield::AvalancheGrid::m_zgrid |  | private | 
 
 
◆ m_zStepSize
  
  | 
        
          | double Garfield::AvalancheGrid::m_zStepSize = 0. |  | private | 
 
 
The documentation for this class was generated from the following file: