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/DigiRandomGenerator.h>
0017 #include <DDDigi/noise/DigiUniformNoise.h>
0018 
0019 using namespace dd4hep::digi;
0020 
0021 /// Standard constructor
0022 DigiUniformNoise::DigiUniformNoise(const DigiKernel& krnl, const std::string& nam)
0023   : DigiSignalProcessor(krnl, nam)
0024 {
0025   declareProperty("minimum", m_min);
0026   declareProperty("maximum", m_max);
0027   InstanceCount::increment(this);
0028 }
0029 
0030 /// Default destructor
0031 DigiUniformNoise::~DigiUniformNoise() {
0032   InstanceCount::decrement(this);
0033 }
0034 
0035 /// Callback to read event uniformnoise
0036 double DigiUniformNoise::operator()(DigiCellContext& context)  const  {
0037   return context.context.randomGenerator().uniform(m_min,m_max);
0038 }