15 #include "TGeoManager.h"
24 : current_index(0), n_detectors(0), n_readout_modules(0), n_sensors(0),
25 n_sensor_tiles_x(1), n_sensor_tiles_y(1),
26 half_sensor_width(1.0), half_sensor_height(1.0),
27 n_pixel_x(1), n_pixel_y(1), pitch_x(1.0), pitch_y(1.0),
48 int n_pixel_x_,
int n_pixel_y_)
88 int n_pixel, n_hits,
hit, n_total_hits = 0;
89 int sensor_nx, sensor_ny, detector_id, readout_id, sensor_id, sensor_vid;
90 double hit_time, pos_x, pos_y;
92 for(detector_id=0; detector_id<
n_detectors; detector_id++) {
94 for(sensor_vid=0; sensor_vid<
n_sensors; sensor_vid++) {
105 n_hits = gRandom->Poisson(n_hits_avg);
106 for(hit=0; hit < n_hits; hit++) {
107 hit_time = gRandom->Uniform(t_start_ns, t_end_ns);
109 new ((*noise_digits)[n_total_hits++])
PndDiscDigitizedHit(FairLink(), detector_id, readout_id, sensor_id, sensor_id, n_pixel/
n_pixel_x, pos_y, hit_time, hit_time, 1);
120 if(current_index < noise_digits->
GetEntries())
void SetSensorTiling(int sensor_tiles_x, int sensor_tiles_y)
Set a logical tiling (used for dead time handling)
~PndDiscNoiseGeneration()
int n_sensor_tiles_x
number of sensor tiles = number of dies
int n_readout_modules
number of readout modules on a detector
void SetSensorGrid(double sensor_width_, double sensor_height_, int n_pixel_x_, int n_pixel_y_)
Set the pixel grid on the sensors.
void SetNumberOfSensors(int n_detectors_, int n_readout_modules_, int n_sensors_)
Set the number of sensors for the whole apparatus.
TClonesArray * noise_digits
Memory pool to store the digits.
bool GetPixelPosition(int n_pixel, double &pos_x, double &pos_y)
int n_sensor_tiles_y
number of sensor tiles = number of dies
int n_sensors
number of sensors (untiled) at a readout module
cout<<"will loop over "<< t-> GetEntries()
PndDiscDigitizedHit * GetNextNoiseDigit()
Iterate over all generated hits.
int n_detectors
number of detectors
void Clear()
Clears the digit buffer.
double half_sensor_height
int GenerateNoise(double t_start_ns, double t_end_ns)
Generate noise pattern in time window given by t_start, t_end.
int current_index
current index in pool (used in iteration)