IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
DecayPileup.h
Go to the documentation of this file.
1 /**
2  * \file IMP/bff/DecayPileup.h
3  * \brief Simple Accessible Volume decorator.
4  *
5  * This file contains the declaration of the DecayPileup class, which is a subclass of DecayModifier.
6  * DecayPileup is a decorator that adds pile-up effects to a DecayCurve object.
7  *
8  * \authors Thomas-Otavio Peulen
9  * Copyright 2007-2022 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPBFF_DECAYPILEUP_H
13 #define IMPBFF_DECAYPILEUP_H
14 
15 #include <IMP/bff/bff_config.h>
16 #include <memory> /* shared_ptr */
17 #include <string>
18 #include <iostream> /* std::cerr */
19 #include <IMP/bff/DecayCurve.h>
20 #include <IMP/bff/DecayModifier.h>
21 #include <IMP/bff/DecayRoutines.h> /* add_pile_up_to_model */
22 #include <IMP/check_macros.h>
23 
24 IMPBFF_BEGIN_NAMESPACE
25 
26 /**
27  * \class DecayPileup
28  * \brief A decorator that adds pile-up effects to a DecayCurve object.
29  *
30  * DecayPileup is a subclass of DecayModifier and provides methods to set and get the pile-up model,
31  * repetition rate, and instrument dead time. It also overrides the add() method to add pile-up effects
32  * to the DecayCurve object.
33  */
34 class IMPBFFEXPORT DecayPileup : public DecayModifier {
35 
36 private:
37  /// Dead time of the instrument in units of the lifetime (usually nanoseconds)
38  double instrument_dead_time = std::numeric_limits<double>::epsilon();
39 
40  /// Repetition rate of the light source in MHz
41  double repetition_rate = 100.0;
42 
43  /// Identifier of pile up model
44  std::string pile_up_model = "coates";
45 
46 public:
47  /**
48  * \brief Set the pile-up model.
49  * \param v The pile-up model identifier.
50  */
51  void set_pile_up_model(std::string v);
52 
53  /**
54  * \brief Get the pile-up model.
55  * \return The pile-up model identifier.
56  */
57  std::string get_pile_up_model();
58 
59  /**
60  * \brief Set the repetition rate.
61  * \param v The repetition rate in MHz.
62  */
63  void set_repetition_rate(double v);
64 
65  /**
66  * \brief Get the repetition rate.
67  * \return The repetition rate in MHz.
68  */
69  double get_repetition_rate();
70 
71  /**
72  * \brief Set the instrument dead time.
73  * \param v The instrument dead time in units of the lifetime.
74  */
75  void set_instrument_dead_time(double v);
76 
77  /**
78  * \brief Get the instrument dead time.
79  * \return The instrument dead time in units of the lifetime.
80  */
81  double get_instrument_dead_time();
82 
83  /**
84  * \brief Add pile-up effects to the DecayCurve object.
85  * \param out The DecayCurve object to add pile-up effects to.
86  */
87  void add(DecayCurve* out) override;
88 
89  /**
90  * \brief Constructor for DecayPileup.
91  * \param data The DecayCurve object to decorate.
92  * \param pile_up_model The pile-up model identifier.
93  * \param repetition_rate The repetition rate in MHz.
94  * \param instrument_dead_time The instrument dead time in units of the lifetime.
95  * \param start The start index of the DecayCurve.
96  * \param stop The stop index of the DecayCurve.
97  * \param active The activity status of the DecayPileup object.
98  */
100  DecayCurve* data,
101  const char* pile_up_model = "coates",
102  double repetition_rate = 100,
103  double instrument_dead_time = 120,
104  int start = 0, int stop = -1,
105  bool active = true
106  );
107 };
108 
110 
111 IMPBFF_END_NAMESPACE
112 
113 #endif //IMPBFF_DECAYPILEUP_H
Simple Accessible Volume decorator.
A decorator that adds pile-up effects to a DecayCurve object.
Definition: DecayPileup.h:34
Decay routines (e.g. convolution, scaling, and lamp shift routines)
A decorator that modifies a DecayCurve within a specified range.
Definition: DecayModifier.h:29
A more IMP-like version of the std::vector.
Definition: Vector.h:50
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition: value_macros.h:23
Class for fluorescence decay curves.
Class for fluorescence decay curves.
Definition: DecayCurve.h:38
Helper macros for throwing and handling exceptions.
virtual void add(DecayCurve *out)=0