|
||||
File indexing completed on 2025-01-18 09:55:20
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_DIGIATTENUATOR_H 0014 #define DDDIGI_DIGIATTENUATOR_H 0015 0016 // Framework include files 0017 #include <DDDigi/DigiContainerProcessor.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 /// Tool to compute decay time of the signal for spillover 0026 /** 0027 * The following signal decays are supported: 0028 * -- Exponential decay depending on time offset(t0) and mean signal decay time 0029 * -- more to be added 0030 * 0031 * \author M.Frank 0032 * \version 1.0 0033 * \ingroup DD4HEP_DIGITIZATION 0034 */ 0035 class DigiAttenuationTool { 0036 public: 0037 /// Exponential decay depending on time offset(t0) and mean signal decay time 0038 double exponential(double t0, double decay_time) const; 0039 }; 0040 0041 /// Default base class for all Digitizer actions and derivates thereof. 0042 /** 0043 * This is a utility class supporting properties, output and access to 0044 * event and run objects through the context. 0045 * 0046 * \author M.Frank 0047 * \version 1.0 0048 * \ingroup DD4HEP_DIGITIZATION 0049 */ 0050 class DigiAttenuator : public DigiContainerProcessor { 0051 protected: 0052 /// Signal reduction factor 0053 double m_factor { 1.0 }; 0054 0055 protected: 0056 /// Define standard assignments and constructors 0057 DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiAttenuator); 0058 /// Default destructor 0059 virtual ~DigiAttenuator(); 0060 /// Attenuator callback for single container 0061 template <typename DEPOSITS> std::size_t 0062 attenuate(DEPOSITS& cont, const predicate_t& predicate) const; 0063 0064 public: 0065 /// Standard constructor 0066 DigiAttenuator(const kernel_t& kernel, const std::string& nam); 0067 /// Main functional callback adapter 0068 virtual void execute(context_t& context, work_t& work, const predicate_t& predicate) const override; 0069 }; 0070 0071 /// Default base class for all Digitizer actions and derivates thereof. 0072 /** 0073 * This is a utility class supporting properties, output and access to 0074 * event and run objects through the context. 0075 * 0076 * \author M.Frank 0077 * \version 1.0 0078 * \ingroup DD4HEP_DIGITIZATION 0079 */ 0080 class DigiAttenuatorSequence : public DigiContainerSequenceAction { 0081 protected: 0082 /// Property: Data processor type 0083 std::string m_processor_type { }; 0084 /// Property: Signal decay algorithm 0085 std::string m_signal_decay { }; 0086 /// Property: Container names to be loaded 0087 std::map<std::string, double> m_container_attenuation { }; 0088 /// Property: T0 with respect to central crossing 0089 double m_t0 { 0e0 }; 0090 0091 protected: 0092 /// Define standard assignments and constructors 0093 DDDIGI_DEFINE_ACTION_CONSTRUCTORS(DigiAttenuatorSequence); 0094 /// Default destructor 0095 virtual ~DigiAttenuatorSequence(); 0096 0097 public: 0098 /// Standard constructor 0099 DigiAttenuatorSequence(const kernel_t& kernel, const std::string& nam); 0100 /// Initialization callback 0101 virtual void initialize(); 0102 /// Main functional callback 0103 virtual void execute(context_t& context) const; 0104 }; 0105 } // End namespace digi 0106 } // End namespace dd4hep 0107 #endif // DDDIGI_DIGIATTENUATOR_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |