From 85c126c97dff9c1f31596b25edc2628e8ba0f63e Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Tue, 6 Dec 2022 17:03:26 +0100
Subject: [PATCH] Improve DDDigi doc

---
 DDDigi/README.md                       | 16 ++++++++--------
 DDDigi/include/DDDigi/DigiAttenuator.h |  4 ----
 DDDigi/src/DigiAttenuator.cpp          |  3 ---
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/DDDigi/README.md b/DDDigi/README.md
index a0678f196..cb0f0f6b8 100644
--- a/DDDigi/README.md
+++ b/DDDigi/README.md
@@ -72,14 +72,14 @@ energy deposits of the simulation.
 
   Deposit attenuator for energy deposits according to decay time constant. <br/>
   Properties: <br/>
-    |**Property**  |**Data type**    |**Description**                                                  |
-    |:---          |:---             |:---                                                             |
-    |`.input`      | vector<string>  | List of input files to be processed                             |
-    |`.attenuate_history`| boolean   | Propagate the weight also to the history entries. default: true |
-    |`.processor_type`| string       | Processor type used for single container attenuation default: `DigiAttenuator` |
-    |`.containers` | vector<string>  | List of containers to be attenuated.                            |
-    |`.signal_decay`| string         | Decay function. default: `exponential`                          |
-    |`.t0`         | double          | Time constant for exponential signal decay.                     |
+    |**Property**     |**Data type**    |**Description**                                                  |
+    |:---             |:---             |:---                                                             |
+    |`.input`         | vector<string>  | List of input files to be processed                             |
+    |`.processor_type`| string          | Processor type used for single container attenuation.           |
+    |                 |                 | default: `DigiAttenuator`                                       |
+    |`.containers`    | vector<string>  | List of containers to be attenuated.                            |
+    |`.signal_decay`  | string          | Decay function. default: `exponential`                          |
+    |`.t0`            | double          | Time constant for exponential signal decay.                     |
 
 
 
diff --git a/DDDigi/include/DDDigi/DigiAttenuator.h b/DDDigi/include/DDDigi/DigiAttenuator.h
index f492d48b4..a5d85b886 100644
--- a/DDDigi/include/DDDigi/DigiAttenuator.h
+++ b/DDDigi/include/DDDigi/DigiAttenuator.h
@@ -87,10 +87,6 @@ namespace dd4hep {
       std::map<std::string, double>  m_container_attenuation  { };
       /// Property: T0 with respect to central crossing
       double                         m_t0     { 0e0 };
-      /// Property: Flag to act on hit input data
-      bool                           m_attenuate_data  { true };
-      /// Property: Flag to act on history objects as well
-      bool                           m_attenuate_history  { true };
 
     protected:
       /// Define standard assignments and constructors
diff --git a/DDDigi/src/DigiAttenuator.cpp b/DDDigi/src/DigiAttenuator.cpp
index ecd09d0a3..1d63f324e 100644
--- a/DDDigi/src/DigiAttenuator.cpp
+++ b/DDDigi/src/DigiAttenuator.cpp
@@ -48,8 +48,6 @@ DigiAttenuator::attenuate(T& cont, const predicate_t& predicate) const {
   for( auto& dep : cont )   {
     if ( predicate(dep) )   {
       dep.second.deposit *= m_factor;
-      if ( !m_attenuate_history ) 
-	continue;
       auto& e = dep.second.history;
       for( auto& h : e.hits ) h.weight *= m_factor;
       for( auto& h : e.particles ) h.weight *= m_factor;
@@ -88,7 +86,6 @@ void DigiAttenuator::execute(DigiContext& context, work_t& work, const predicate
 DigiAttenuatorSequence::DigiAttenuatorSequence(const DigiKernel& krnl, const std::string& nam)
   : DigiContainerSequenceAction(krnl, nam)
 {
-  declareProperty("attenuate_history", m_attenuate_history);
   declareProperty("processor_type",    m_processor_type = "DigiAttenuator");
   declareProperty("containers",        m_container_attenuation);
   declareProperty("signal_decay",      m_signal_decay = "exponential");
-- 
GitLab