|
||||
File indexing completed on 2025-01-30 10:04:22
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DDDIGI_NOISE_DIGIRANDOMNOISE_H 0014 #define DDDIGI_NOISE_DIGIRANDOMNOISE_H 0015 0016 /// Framework include files 0017 #include <DDDigi/DigiSignalProcessor.h> 0018 #include <DDDigi/noise/FalphaNoise.h> 0019 0020 /// Namespace for the AIDA detector description toolkit 0021 namespace dd4hep { 0022 0023 /// Namespace for the Digitization part of the AIDA detector description toolkit 0024 namespace digi { 0025 0026 // Forward declarations 0027 class DigiRandomNoise; 0028 0029 /// Generic noise source for colored noise: white, pink and brown 0030 /** 0031 * Generic noise source for colored noise: white, pink and brown 0032 * Uses internall a 1 / f**alpha noise generator with 0033 * alpha = 0 -> white noise 0034 * alpha = 1 -> pink noise (decay 10 db per decade) 0035 * alpha = 2 -> red (brownian) noise (decay 20 db per decade) 0036 * See https://en.wikipedia.org/wiki/White_noise for details on colored noise. 0037 * See the header FalphaNoise.h and references therein for details 0038 * about the generation. 0039 * 0040 * \author M.Frank 0041 * \version 1.0 0042 * \ingroup DD4HEP_DIGITIZATION 0043 */ 0044 class DigiRandomNoise : public DigiSignalProcessor { 0045 protected: 0046 /// Property: Alpha parameter of the distribution 0047 double m_alpha = 1.0; 0048 /// Property: Variance of the energy distribution in electron Volt. MANDATORY! 0049 double m_variance = -1; 0050 /// Property: Number of IRR poles for the noise generator (5 should fit nearly everything) 0051 double m_poles = 5; 0052 0053 /// Noise generator 0054 detail::FalphaNoise m_noise; 0055 protected: 0056 /// Define standard assignments and constructors 0057 DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiRandomNoise); 0058 0059 public: 0060 /// Standard constructor 0061 DigiRandomNoise(const DigiKernel& kernel, const std::string& nam); 0062 /// Default destructor 0063 virtual ~DigiRandomNoise(); 0064 /// Initialize the noise source 0065 virtual void initialize() override; 0066 /// Callback to read event randomnoise 0067 virtual double operator()(DigiCellContext& context) const override; 0068 }; 0069 } // End namespace digi 0070 } // End namespace dd4hep 0071 #endif // DDDIGI_NOISE_DIGIRANDOMNOISE_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |