#include <ConstantInfoDefinitions.h>
Definition at line 461 of file ConstantInfoDefinitions.h.
◆ get_double_gaussian_noise()
| CUDA_HOS_DEV float CaloRecGPU::CellNoiseArr::get_double_gaussian_noise |
( |
const int | cell, |
|
|
const int | gain, |
|
|
const float | energy ) const |
|
inline |
Calculates the double gaussian noise for a Tile cell.
Does not check explicitly for a cell being from Tile.
Definition at line 541 of file ConstantInfoDefinitions.h.
542 {
543 using namespace std;
544
546 if (!props.is_valid())
547 {
549 }
550
552
553 const float first_factor = (
sigma != 0.f ? fabsf(energy / sigma) : 0.f);
554
555 if (props.is_electronic_noise())
556 {
557 return first_factor;
558 }
559 else
560 {
561 const float second_factor = this->double_gaussian_constants[3][cell - TileCellStart][gain];
562
563 switch (props.version())
564 {
565 case 1:
566 return sqrtf(first_factor * first_factor + second_factor * second_factor * this->luminosity);
567 case 2:
568 return first_factor + second_factor * this->luminosity;
569 default:
570 return 0.f / 0.f;
571 }
572 }
573 }
constexpr float get_noise(const int cell, const int gain) const
CUDA_HOS_DEV float get_double_gaussian_significance(const int cell, const int gain, const float energy) const
CellNoiseProperties::carrier noise_properties
◆ get_double_gaussian_significance()
| CUDA_HOS_DEV float CaloRecGPU::CellNoiseArr::get_double_gaussian_significance |
( |
const int | cell, |
|
|
const int | gain, |
|
|
const float | energy ) const |
|
inlineprotected |
Definition at line 481 of file ConstantInfoDefinitions.h.
482 {
483
484 using namespace std;
485
487
491
492 if ((sigma_1 == 0.f && sigma_2 == 0.f) || energy == 0.f)
493 {
494 return 0.f;
495 }
496 else if (sigma_1 == 0.f)
497 {
499 }
500 else if (ratio == 0.f || sigma_2 == 0.f)
501 {
503 }
504
505 const float x_1 =
energy / sigma_1;
506 const float x_2 =
energy / sigma_2;
507 const float x_1_abs = fabsf(x_1);
508 const float x_2_abs = fabsf(x_2);
509
510 const float min_abs =
min(x_1_abs, x_2_abs);
511
512 const float max_abs =
max(x_1_abs, x_2_abs);
513
514 if (min_abs > 7.4f)
515 {
516 return min_abs;
517 }
518 if (max_abs < 0.9f)
519 {
520 return max_abs;
521 }
522
525
526
527 const float z = (y_1 * sigma_1 +
ratio * y_2 * sigma_2) / (sigma_1 + ratio * sigma_2);
528
530
531
532
533 return ret;
534
535 }
static CUDA_HOS_DEV float erf_inv_wrapper(const float x)
constexpr int TileCellStart
float double_gaussian_constants[s_numDoubleGaussianConstants][NTileCells][NumGainStates]
◆ get_noise()
| float CaloRecGPU::CellNoiseArr::get_noise |
( |
const int | cell, |
|
|
const int | gain ) const |
|
inlineconstexpr |
◆ double_gaussian_constants
◆ luminosity
| float CaloRecGPU::CellNoiseArr::luminosity |
◆ noise
◆ noise_properties
◆ s_numDoubleGaussianConstants
| int CaloRecGPU::CellNoiseArr::s_numDoubleGaussianConstants = 4 |
|
staticconstexpr |
The documentation for this struct was generated from the following file: