Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:17:12

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 DD4HEP_DDDIGI_DIGIRANDOMNOISE_H
0014 #define DD4HEP_DDDIGI_DIGIRANDOMNOISE_H
0015 
0016 // Framework include files
0017 #include <DDDigi/DigiEventAction.h>
0018 
0019 /// Namespace for the AIDA detector description toolkit
0020 namespace dd4hep {
0021 
0022   /// Namespace for the Digitization part of the AIDA detector description toolkit
0023   namespace digi {
0024 
0025     // Forward declarations
0026     class DigiAction;
0027     class DigiRandomNoise;
0028 
0029     /// Class which applies random noise hits of a given amplitude
0030     /**
0031      *  Class which applies random noise hits of a given amplitude
0032      *  to a segmented sensitive element.
0033      *
0034      *  \author  M.Frank
0035      *  \version 1.0
0036      *  \ingroup DD4HEP_DIGITIZATION
0037      */
0038     class DigiRandomNoise : public DigiEventAction {
0039     protected:
0040       double m_probability = 1.0;
0041       double m_amplitude   = 1.0;
0042       
0043     protected:
0044       /// Inhibit copy constructor
0045       DigiRandomNoise() = delete;
0046       /// Inhibit copy constructor
0047       DigiRandomNoise(const DigiRandomNoise& copy) = delete;
0048       /// Inhibit assignment operator
0049       DigiRandomNoise& operator=(const DigiRandomNoise& copy) = delete;
0050 
0051     public:
0052       /// Standard constructor
0053       DigiRandomNoise(const DigiKernel& kernel, const std::string& nam);
0054       /// Default destructor
0055       virtual ~DigiRandomNoise();
0056       /// Callback to read event input
0057       virtual void execute(DigiContext& context)  const override;
0058     };
0059 
0060   }    // End namespace digi
0061 }      // End namespace dd4hep
0062 #endif // DD4HEP_DDDIGI_DIGIRANDOMNOISE_H
0063 
0064 //==========================================================================
0065 //  AIDA Detector description implementation 
0066 //--------------------------------------------------------------------------
0067 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0068 // All rights reserved.
0069 //
0070 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0071 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0072 //
0073 // Author     : M.Frank
0074 //
0075 //==========================================================================
0076 
0077 // Framework include files
0078 #include <DD4hep/Printout.h>
0079 #include <DD4hep/InstanceCount.h>
0080 #include <DDDigi/DigiFactories.h>
0081 //#include <DDDigi/DigiRandomNoise.h>
0082 
0083 // C/C++ include files
0084 
0085 using namespace dd4hep::digi;
0086 
0087 DECLARE_DIGIACTION_NS(dd4hep::digi,DigiRandomNoise)
0088 
0089 /// Standard constructor
0090 DigiRandomNoise::DigiRandomNoise(const DigiKernel& kernel, const std::string& nam)
0091   : DigiEventAction(kernel, nam)
0092 {
0093   declareProperty("Probability", m_probability);
0094   declareProperty("Amplitude",   m_amplitude);
0095   InstanceCount::increment(this);
0096 }
0097 
0098 /// Default destructor
0099 DigiRandomNoise::~DigiRandomNoise() {
0100   InstanceCount::decrement(this);
0101 }
0102 
0103 /// Pre-track action callback
0104 void DigiRandomNoise::execute(DigiContext& /* context */)  const   {
0105   info("+++ Virtual method execute() MUST be overloaded!");
0106 }