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/DigiLandauNoise.h>
0017 #include <DDDigi/DigiSegmentation.h>
0018 #include <DDDigi/DigiRandomGenerator.h>
0019 
0020 using namespace dd4hep::digi;
0021 
0022 /// Standard constructor
0023 DigiLandauNoise::DigiLandauNoise(const DigiKernel& krnl, const std::string& nam)
0024   : DigiSignalProcessor(krnl, nam)
0025 {
0026   declareProperty("meam",    m_mean);
0027   declareProperty("sigma",   m_sigma);
0028   declareProperty("cutoff",  m_cutoff);
0029   InstanceCount::increment(this);
0030 }
0031 
0032 /// Default destructor
0033 DigiLandauNoise::~DigiLandauNoise() {
0034   InstanceCount::decrement(this);
0035 }
0036 
0037 /// Callback to read event landaunoise
0038 double DigiLandauNoise::operator()(DigiCellContext& context)  const  {
0039   if ( context.data.signal < m_cutoff )
0040     return 0;
0041   return context.context.randomGenerator().landau(m_mean,m_sigma);
0042 }