ChannelSiPM.h
Go to the documentation of this file.
1 #ifndef _mdet_ChannelSiPM_h
2 #define _mdet_ChannelSiPM_h
3 
4 #include <mdet/MDetectorComponent.h>
5 //
6 #include <utl/Validated.h>
7 //
8 #include <complex>
9 #include <memory>
10 #include <string>
11 
12 namespace det {
13  struct ParentCreator;
14  struct ComponentUpdater;
15 }
16 
17 namespace mdet {
18 
19  class FrontEndSiPM;
20 
33  class ChannelSiPM : public MDetectorComponent<ChannelSiPM>::Type {
34  public:
35 
36  static const char* const kComponentName;
37 
38  static const char* const kComponentId;
42  const FrontEndSiPM& GetFrontEnd() const {
43  return fFrontEnd;
44  }
64  double GetThreshold() const;
74  std::complex<double> ComputeTransfer(double freq) const;
75 
76  double ComputeDiscriminator(double signal, double deltaTime) const;
77 
78  private:
79  /*
80  * Properties that characterise the amplification
81  * stage (with its frequency response). The
82  * idea is that client code doesn't access
83  * to this properties.
84  * Instead the client code would provide a signal
85  * and in this class (through this, or any other
86  * mean) would give the output-response to that
87  * given signal by the ChannelSiPM.
88  */
93  double GetPreAmplifierTime() const;
97  double GetPreAmplifierGain() const;
101  const char* GetPreAmplifierFunctionReal() const;
102 
103  const char* GetPreAmplifierFunctionIm() const;
108  double GetFastShaperTime() const;
112  double GetFastShaperGain() const;
116  const char* GetFastShaperFunctionReal() const;
117 
118  const char* GetFastShaperFunctionIm() const;
119  /*
120  * Propeties that characterize the discrimination stage.
121  * The output signal of the discriminator is ideally a
122  * two valued continuous wave. This two values are set
123  * according to the comparisson with the threshold,
124  * the hi value level meaning that the signal was
125  * greater than the threshold and viceversa.
126  * In reality, the signal has a finite transition time
127  * between states, and finite stabilization times.
128  */
133  double GetDiscriminatorLowLevel() const;
138  double GetDiscriminatorHiLevel() const;
143  double GetDiscriminatorTransitionTime() const;
151  double GetDiscriminatorGain() const;
152  double GetDiscriminatorThreshold() const;
153  double ApplySaturation(double v) const;
154 
155 
171  ChannelSiPM(int cId, const det::VManager::IndexMap& parentMap, const FrontEndSiPM& parent);
179  friend struct det::ParentCreator;
185  template<class T>
186  friend void boost::checked_delete(T*) BOOST_NOEXCEPT;
188  friend struct det::ComponentUpdater;
189 
190  mutable utl::Validated<double> fPreAmplifierTime;
191 
192  mutable utl::Validated<double> fPreAmplifierGain;
193 
194  mutable utl::Validated<double> fFastShaperTime;
195 
196  mutable utl::Validated<double> fFastShaperGain;
197 
198  mutable utl::Validated<double> fDiscriminatorGain;
199 
200  // mutable utl::Validated<double> fDiscriminatorDACThresholdStep;
201 
202 
203  mutable utl::Validated<double> fThreshold;
204 
205  mutable utl::Validated<double> fDiscriminatorLowLevel;
206 
207  mutable utl::Validated<double> fDiscriminatorHiLevel;
208 
209  mutable utl::Validated<double> fDiscriminatorTransitionTime;
210 
211  mutable double fTimeOverThreshold;
212 
214 
215  };
216 
217 }
218 
219 #endif // _mdet_ChannelSiPM_h
220 
static const char *const kComponentId
Definition: ChannelSiPM.h:38
utl::Validated< double > fFastShaperGain
Definition: ChannelSiPM.h:196
double ApplySaturation(double v) const
Definition: ChannelSiPM.cc:147
double fTimeOverThreshold
Definition: ChannelSiPM.h:211
utl::Validated< double > fDiscriminatorHiLevel
Definition: ChannelSiPM.h:207
double ComputeDiscriminator(double signal, double deltaTime) const
Definition: ChannelSiPM.cc:159
int freq
Definition: dump1090.h:244
const char * GetFastShaperFunctionReal() const
Transfer function. Separated in Re and Im.
double GetDiscriminatorGain() const
Voltage change per time unit.
Definition: ChannelSiPM.cc:78
double GetFastShaperTime() const
Definition: ChannelSiPM.cc:54
double GetFastShaperGain() const
Pre amplifier gain.
Definition: ChannelSiPM.cc:62
Defines within it the common (templated) type for muon detector hierarchy components.
const FrontEndSiPM & GetFrontEnd() const
The shared common-to-all-ChannelSiPMs electronic frontend of this ChannelSiPM.
Definition: ChannelSiPM.h:42
const char * GetFastShaperFunctionIm() const
Electronic front-end for the modules.
Definition: FrontEndSiPM.h:35
Eletronic ChannelSiPM.
Definition: ChannelSiPM.h:33
const FrontEndSiPM & fFrontEnd
Definition: ChannelSiPM.h:213
friend void boost::checked_delete(T *) BOOST_NOEXCEPT
Friendship for destruction.
utl::Validated< double > fDiscriminatorTransitionTime
Definition: ChannelSiPM.h:209
double GetDiscriminatorHiLevel() const
Target voltage when the signal is higher than the threshold.
Definition: ChannelSiPM.cc:94
double GetDiscriminatorLowLevel() const
Target voltage when the signal is lower than the threshold.
Definition: ChannelSiPM.cc:86
std::complex< double > ComputeTransfer(double freq) const
Computes the circuit transfer function at the given frequency.
Definition: ChannelSiPM.cc:116
utl::Validated< double > fFastShaperTime
Definition: ChannelSiPM.h:194
double GetPreAmplifierTime() const
Pre amplifier time.
Definition: ChannelSiPM.cc:38
utl::Validated< double > fThreshold
Definition: ChannelSiPM.h:203
const char * GetPreAmplifierFunctionIm() const
static const char *const kComponentName
Definition: ChannelSiPM.h:36
std::string const
Returns the message that identifies this component.
utl::Validated< double > fPreAmplifierTime
Definition: ChannelSiPM.h:190
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
~ChannelSiPM()
Destructor (!).
Definition: ChannelSiPM.h:175
utl::Validated< double > fPreAmplifierGain
Definition: ChannelSiPM.h:192
double GetThreshold() const
Discrimination threshold.
double GetPreAmplifierGain() const
Pre amplifier gain.
Definition: ChannelSiPM.cc:46
double GetDiscriminatorThreshold() const
Definition: ChannelSiPM.cc:70
Type
The type of file that we are acutally opening.
Definition: IoCodes.h:33
ChannelSiPM(int cId, const det::VManager::IndexMap &parentMap, const FrontEndSiPM &parent)
Constructs the electronic ChannelSiPM.
Definition: ChannelSiPM.cc:22
utl::Validated< double > fDiscriminatorLowLevel
Definition: ChannelSiPM.h:205
utl::Validated< double > fDiscriminatorGain
Definition: ChannelSiPM.h:198
The child the information from the parent upon construction.
double GetDiscriminatorTransitionTime() const
Time for the discriminator to go up, once the signal reaches the threshold.
Definition: ChannelSiPM.cc:102
const char * GetPreAmplifierFunctionReal() const
Transfer Function.

, generated on Tue Sep 26 2023.