LDMX Software
Public Member Functions | Protected Attributes | List of all members
trigscint::QIEInputPulse Class Referenceabstract

The base class to store the most important functions. More...

#include <QIEInputPulse.h>

Public Member Functions

virtual ~QIEInputPulse ()=default
 Destructor.
 
float Eval (float T)
 Evaluate the pulse train at time T.
 
virtual float EvalSingle (float T, int id)=0
 Evaluate the pulse train at time T.
 
virtual float Integrate (float T1, float T2)=0
 Integrate the pulse from T1 to T2.
 
virtual float Derivative (float T, int id)=0
 Differentiate pulse at time T.
 
virtual float Max (int id)=0
 maximum of the pulse
 
void AddPulse (float toff, float ampl)
 To add a pulse to the collection.
 
int GetNPulses ()
 Get the number of pulses in the collection.
 

Protected Attributes

std::vector< float > toff_
 collection of pulse time offsets
 
std::vector< float > ampl_
 collection of pulse amplitudes
 

Detailed Description

The base class to store the most important functions.

Note
Always use the classes inherited from this class for QIE input pulse.

Definition at line 17 of file QIEInputPulse.h.

Member Function Documentation

◆ AddPulse()

void trigscint::QIEInputPulse::AddPulse ( float  toff,
float  ampl 
)

To add a pulse to the collection.

Parameters
tofftime at which the pulse starts
amplpulse amplitude (total area under the curve)

Definition at line 13 of file QIEInputPulse.cxx.

13 {
14 toff_.push_back(toff);
15 ampl_.push_back(ampl);
16}
std::vector< float > ampl_
collection of pulse amplitudes
std::vector< float > toff_
collection of pulse time offsets

References ampl_, and toff_.

◆ Derivative()

virtual float trigscint::QIEInputPulse::Derivative ( float  T,
int  id 
)
pure virtual

Differentiate pulse at time T.

Implemented in trigscint::Bimoid, and trigscint::Expo.

◆ Eval()

float trigscint::QIEInputPulse::Eval ( float  T)

Evaluate the pulse train at time T.

Definition at line 18 of file QIEInputPulse.cxx.

18 {
19 if (ampl_.size() == 0) return 0;
20 float val = 0;
21 for (int i = 0; i < ampl_.size(); i++) {
22 val += EvalSingle(T, i);
23 }
24 return val;
25}
virtual float EvalSingle(float T, int id)=0
Evaluate the pulse train at time T.

References ampl_, and EvalSingle().

Referenced by trigscint::SimQIE::TDC().

◆ EvalSingle()

virtual float trigscint::QIEInputPulse::EvalSingle ( float  T,
int  id 
)
pure virtual

Evaluate the pulse train at time T.

Implemented in trigscint::Bimoid, and trigscint::Expo.

Referenced by Eval().

◆ GetNPulses()

int trigscint::QIEInputPulse::GetNPulses ( )
inline

Get the number of pulses in the collection.

Definition at line 58 of file QIEInputPulse.h.

58{ return ampl_.size(); }

References ampl_.

Referenced by trigscint::SimQIE::PulseCut().

◆ Integrate()

virtual float trigscint::QIEInputPulse::Integrate ( float  T1,
float  T2 
)
pure virtual

Integrate the pulse from T1 to T2.

Implemented in trigscint::Bimoid, and trigscint::Expo.

Referenced by trigscint::SimQIE::Out_ADC(), and trigscint::SimQIE::PulseCut().

◆ Max()

virtual float trigscint::QIEInputPulse::Max ( int  id)
pure virtual

maximum of the pulse

Implemented in trigscint::Bimoid, and trigscint::Expo.

Member Data Documentation

◆ ampl_

std::vector<float> trigscint::QIEInputPulse::ampl_
protected

◆ toff_

std::vector<float> trigscint::QIEInputPulse::toff_
protected

The documentation for this class was generated from the following files: