Back to home page

EIC code displayed by LXR

 
 

    


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

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_DIGITESTSIGNALPROCESSOR_H
0014 #define DD4HEP_DDDIGI_DIGITESTSIGNALPROCESSOR_H
0015 
0016 // Framework include files
0017 #include "DDDigi/DigiSignalProcessor.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 DigiSignalProcessor;
0027     class DigiTestSignalProcessor;
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 DigiTestSignalProcessor : public DigiSignalProcessor {
0039     protected:
0040       double m_attenuation = 1.0;
0041     protected:
0042       /// Define standard assignments and constructors
0043       DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiTestSignalProcessor);
0044       
0045     public:
0046       /// Standard constructor
0047       DigiTestSignalProcessor(const DigiKernel& kernel, const std::string& nam);
0048       /// Default destructor
0049       virtual ~DigiTestSignalProcessor();
0050       /// Process signal data
0051       virtual double operator()(DigiCellContext& context)   const  override;
0052     };
0053 
0054   }    // End namespace digi
0055 }      // End namespace dd4hep
0056 #endif // DD4HEP_DDDIGI_DIGITESTSIGNALPROCESSOR_H
0057 
0058 //==========================================================================
0059 //  AIDA Detector description implementation 
0060 //--------------------------------------------------------------------------
0061 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0062 // All rights reserved.
0063 //
0064 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0065 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0066 //
0067 // Author     : M.Frank
0068 //
0069 //==========================================================================
0070 
0071 // Framework include files
0072 #include "DD4hep/Printout.h"
0073 #include "DD4hep/InstanceCount.h"
0074 #include "DDDigi/DigiFactories.h"
0075 #include "DDDigi/DigiSegmentation.h"
0076 //#include "DDDigi/DigiTestSignalProcessor.h"
0077 
0078 // C/C++ include files
0079 
0080 using namespace std;
0081 using namespace dd4hep::digi;
0082 
0083 DECLARE_DIGISIGNALPROCESSOR_NS(dd4hep::digi,DigiTestSignalProcessor)
0084 
0085 /// Standard constructor
0086 DigiTestSignalProcessor::DigiTestSignalProcessor(const DigiKernel& kernel, const string& nam)
0087   : DigiSignalProcessor(kernel, nam)
0088 {
0089   declareProperty("attenuation", m_attenuation = 1.0);
0090   InstanceCount::increment(this);
0091 }
0092 
0093 /// Default destructor
0094 DigiTestSignalProcessor::~DigiTestSignalProcessor() {
0095   InstanceCount::decrement(this);
0096 }
0097 
0098 /// Process signal data
0099 double DigiTestSignalProcessor::operator()(DigiCellContext& context)   const   {
0100   return m_attenuation * context.data.signal;
0101 }