Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:07

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 
0014 // Framework include files
0015 #include <DD4hep/InstanceCount.h>
0016 #include <DDDigi/noise/DigiRandomNoise.h>
0017 
0018 using namespace dd4hep::digi;
0019 
0020 /// Standard constructor
0021 DigiRandomNoise::DigiRandomNoise(const DigiKernel& krnl, const std::string& nam)
0022   : DigiSignalProcessor(krnl, nam)
0023 {
0024   InstanceCount::increment(this);
0025 }
0026 
0027 /// Default destructor
0028 DigiRandomNoise::~DigiRandomNoise() {
0029   InstanceCount::decrement(this);
0030 }
0031 
0032 /// Initialize the noise source
0033 void DigiRandomNoise::initialize()   {
0034   std::default_random_engine generator;
0035   m_noise.init(m_poles, m_alpha, m_variance);
0036   m_noise.normalize(generator, 5000);
0037   DigiSignalProcessor::initialize();
0038 }
0039 
0040 /// Callback to read event randomnoise
0041 double DigiRandomNoise::operator()(DigiCellContext& /* context */)  const {
0042   return 0.0;
0043 }