Back to home page

EIC code displayed by LXR

 
 

    


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

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 DDDIGI_DIGISIGNALPROCESSOR_H
0014 #define DDDIGI_DIGISIGNALPROCESSOR_H
0015 
0016 /// Framework include files
0017 #include <DDDigi/DigiAction.h>
0018 #include <DDDigi/DigiData.h>
0019 
0020 /// Namespace for the AIDA detector description toolkit
0021 namespace dd4hep {
0022 
0023   /// Namespace for the Digitization part of the AIDA detector description toolkit
0024   namespace digi {
0025 
0026     // Forward declarations
0027     class DigiAction;
0028     class DigiContext;
0029     class DigiCellData;
0030     class DigiSignalProcessor;
0031 
0032     /// 
0033     /**
0034      *
0035      *  \author  M.Frank
0036      *  \version 1.0
0037      *  \ingroup DD4HEP_DIGITIZATION
0038      */
0039     class DigiCellContext  final  {
0040     public:
0041       DigiContext&  context;
0042       DigiCellData& data;
0043       DigiCellContext(DigiContext& c, DigiCellData& d) : context(c), data(d) {}
0044       ~DigiCellContext() = default;
0045     };
0046 
0047     /// Base class for signal processing actions to the digitization
0048     /**
0049      *
0050      *  \author  M.Frank
0051      *  \version 1.0
0052      *  \ingroup DD4HEP_DIGITIZATION
0053      */
0054     class DigiSignalProcessor : public DigiAction {
0055     protected:
0056       /// Flag to check if initialized was called
0057       bool  m_initialized = false;
0058 
0059       /// Define standard assignments and constructors
0060       DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiSignalProcessor);
0061 
0062     public:
0063       /// Standard constructor
0064       DigiSignalProcessor(const DigiKernel& kernel, const std::string& nam);
0065       /// Default destructor
0066       virtual ~DigiSignalProcessor();
0067       /// Initialize the noise source
0068       virtual void initialize();
0069       /// Callback to read event signalprocessor
0070       virtual double operator()(DigiCellContext& context)  const = 0;
0071     };
0072   }    // End namespace digi
0073 }      // End namespace dd4hep
0074 #endif // DDDIGI_DIGISIGNALPROCESSOR_H