Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Protected Member Functions | List of all members
mctools::signal::triangle_gate_signal_shape Class Reference

Triangular gate signal shape. More...

#include <bayeux/mctools/signal/triangle_gate_signal_shape.h>

Inheritance diagram for mctools::signal::triangle_gate_signal_shape:
mygsl::i_unary_function datatools::i_cloneable datatools::i_tree_dumpable

Public Member Functions

bool is_valid () const
 Check the validity. More...
 
 triangle_gate_signal_shape ()
 Default constructor. More...
 
virtual ~triangle_gate_signal_shape ()
 Destructor. More...
 
virtual void initialize (const datatools::properties &config_, const mygsl::unary_function_dict_type &functors_)
 Initialization. More...
 
virtual void reset ()
 Reset. More...
 
virtual bool is_initialized () const
 Check initialization status. More...
 
void set_polarity (polarity_type)
 Set the polarity of the signal. More...
 
polarity_type get_polarity () const
 Return the polarity of the signal. More...
 
void reset_polarity ()
 Reset the polarity of the signal. More...
 
double get_rise_time () const
 Return the rise time of the signal. More...
 
double get_fall_time () const
 Return the fall time of the signal. More...
 
void set_amplitude (double)
 Set the amplitude of the signal. More...
 
double get_amplitude () const
 Return the amplitude of the signal. More...
 
double get_q () const
 Return the charge of the signal. More...
 
void set_t0 (double)
 Set the starting time of the signal. More...
 
double get_t0 () const
 Return the starting time of the signal. More...
 
void set_t1 (double)
 Set the starting time of the plateau. More...
 
double get_t1 () const
 Return the starting time of the plateau. More...
 
void set_t2 (double)
 Set the stopping time of the plateau. More...
 
double get_t2 () const
 Return the stopping time of the plateau. More...
 
double get_t3 () const
 Return the stopping time of the signal. More...
 
void set_t3 (double)
 Set the stopping time of the signal. More...
 
double get_tpeak () const
 Return the first peak time of the signal. More...
 
virtual double get_non_zero_domain_min () const
 The minimum bound of the non-zero domain (default is minus infinity) More...
 
virtual double get_non_zero_domain_max () const
 The maximum bound of the non-zero domain (default is plus infinity) More...
 
double get_duration () const
 Return the width of the signal. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart printing. More...
 
- Public Member Functions inherited from mygsl::i_unary_function
 i_unary_function (double epsilon_=0.0)
 Constructor. More...
 
virtual ~i_unary_function ()
 Destructor. More...
 
virtual bool has_explicit_domain_of_definition () const
 Check if the function has an explicit domain of definition (default: false) More...
 
virtual bool is_in_domain_of_definition (double x_) const
 Check if a value is in the domain of definition of the function (default: true) More...
 
virtual double eval (double x_) const
 The function evaluation method. More...
 
double evaluate (double x_) const
 The function evaluation method. More...
 
virtual double eval_no_check (double x_) const
 The function evaluation method with any value check. More...
 
bool has_non_zero_domain_min () const
 Check the minimum bound of the non-zero domain. More...
 
bool has_non_zero_domain_max () const
 Check the maximum bound of the non-zero domain. More...
 
bool is_in_non_zero_domain (double x_) const
 Check if a value is in the non-zero domain. More...
 
bool is_in_zero_domain (double x_) const
 Check if a value is in the zero domain. More...
 
bool has_zero_domain () const
 Check if the functor has an explicit zero domain. More...
 
double operator() (double x_) const
 Standard C++ functor interface. More...
 
void write_ascii (std::ostream &fout_, double min_, double max_, unsigned int nsamples_, int x_precision_=16, int fx_precision_=16, uint32_t options_=wo_default) const
 Write the (x,y=f(x)) value pairs in an ASCII stream : More...
 
void write_ascii_with_units (std::ostream &fout_, double min_, double max_, unsigned int nsamples_, double x_unit_, double fx_unit_, int x_precision_=16, int fx_precision_=16, uint32_t options_=wo_default) const
 Write the (x,y=f(x)) value pairs in an ASCII stream : More...
 
void write_ascii_file (const std::string &filename_, double min_, double max_, unsigned int nsamples_, int x_precision_=16, int fx_precision_=16, uint32_t options_=wo_default) const
 Write the (x,y=f(x)) value pairs in an ASCII file (typical Gnuplot input) : More...
 
void write_ascii_file_with_units (const std::string &filename_, double min_, double max_, unsigned int nsamples_, const std::string &x_unit_label_, const std::string &fx_unit_label_, int x_precision_=16, int fx_precision_=16, uint32_t options_=wo_default) const
 Write the (x,y=f(x)) value pairs in an ASCII file (typical Gnuplot input) : More...
 
void set_epsilon (double)
 Set the precision. More...
 
double get_epsilon () const
 Return the precision. More...
 
void initialize_simple ()
 Simple initialization. More...
 
void initialize_standalone (const datatools::properties &config_)
 Initialization from a container of parameters. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 
- Public Member Functions inherited from datatools::i_cloneable
virtual i_cloneableclone (void) const =0
 
virtual ~i_cloneable ()
 
template<class CandidateType >
bool is_cloneable (const CandidateType &candidate_)
 

Protected Member Functions

void _set_defaults ()
 Set default attributes. More...
 
void _compute_parameters ()
 Automatically compute working data parameters. More...
 
double _eval (double t_) const
 Evaluation from parameters. More...
 
- Protected Member Functions inherited from mygsl::i_unary_function
void _base_initialize (const datatools::properties &config_, const unary_function_dict_type &functors_)
 
void _base_reset ()
 
void _compute_auto_epsilon ()
 
void _set_defaults ()
 Set defaults attributes. More...
 

Additional Inherited Members

- Public Types inherited from mygsl::i_unary_function
enum  write_options_type {
  wo_none = 0, wo_data_index = 0x1, wo_skip_nan = 0x2, wo_skip_inf = 0x4,
  wo_skip_onzd = 0x8, wo_skip_odod = 0x10, wo_append = 0x20, wo_default = wo_none
}
 Options for writing sampled function in an ASCII stream. More...
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 
- Static Public Member Functions inherited from mygsl::i_unary_function
static double g_function (double x_, void *functor_)
 A generic static function to feed the GSL gsl_function interface: More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 
- Static Public Member Functions inherited from datatools::i_cloneable
template<class Copyable >
static Copyable * clone_it (const Copyable &a_copyable)
 
- Static Public Attributes inherited from mygsl::i_unary_function
static const double DEFAULT_EPSILON
 Default error. More...
 
static const double AUTO_EPSILON
 Value for automatic computation of the error. More...
 

Detailed Description

Triangular gate signal shape.

The signal shape :

duration
:<---------------------->:
t0 t1 t2 t3
---------+------+----------+------+------------------> time
: \ : : /
: \ Q : : /
: \ : : /
amplitude \ : : / polarity == negative
: \ : : /
: \: :/
v.........\__________/

Constructor & Destructor Documentation

◆ triangle_gate_signal_shape()

mctools::signal::triangle_gate_signal_shape::triangle_gate_signal_shape ( )

Default constructor.

◆ ~triangle_gate_signal_shape()

virtual mctools::signal::triangle_gate_signal_shape::~triangle_gate_signal_shape ( )
virtual

Destructor.

Member Function Documentation

◆ _compute_parameters()

void mctools::signal::triangle_gate_signal_shape::_compute_parameters ( )
protected

Automatically compute working data parameters.

◆ _eval()

double mctools::signal::triangle_gate_signal_shape::_eval ( double  t_) const
protectedvirtual

Evaluation from parameters.

Implements mygsl::i_unary_function.

◆ _set_defaults()

void mctools::signal::triangle_gate_signal_shape::_set_defaults ( )
protected

Set default attributes.

◆ get_amplitude()

double mctools::signal::triangle_gate_signal_shape::get_amplitude ( ) const

Return the amplitude of the signal.

◆ get_duration()

double mctools::signal::triangle_gate_signal_shape::get_duration ( ) const

Return the width of the signal.

◆ get_fall_time()

double mctools::signal::triangle_gate_signal_shape::get_fall_time ( ) const

Return the fall time of the signal.

◆ get_non_zero_domain_max()

virtual double mctools::signal::triangle_gate_signal_shape::get_non_zero_domain_max ( ) const
virtual

The maximum bound of the non-zero domain (default is plus infinity)

Reimplemented from mygsl::i_unary_function.

◆ get_non_zero_domain_min()

virtual double mctools::signal::triangle_gate_signal_shape::get_non_zero_domain_min ( ) const
virtual

The minimum bound of the non-zero domain (default is minus infinity)

Reimplemented from mygsl::i_unary_function.

◆ get_polarity()

polarity_type mctools::signal::triangle_gate_signal_shape::get_polarity ( ) const

Return the polarity of the signal.

◆ get_q()

double mctools::signal::triangle_gate_signal_shape::get_q ( ) const

Return the charge of the signal.

◆ get_rise_time()

double mctools::signal::triangle_gate_signal_shape::get_rise_time ( ) const

Return the rise time of the signal.

◆ get_t0()

double mctools::signal::triangle_gate_signal_shape::get_t0 ( ) const

Return the starting time of the signal.

◆ get_t1()

double mctools::signal::triangle_gate_signal_shape::get_t1 ( ) const

Return the starting time of the plateau.

◆ get_t2()

double mctools::signal::triangle_gate_signal_shape::get_t2 ( ) const

Return the stopping time of the plateau.

◆ get_t3()

double mctools::signal::triangle_gate_signal_shape::get_t3 ( ) const

Return the stopping time of the signal.

◆ get_tpeak()

double mctools::signal::triangle_gate_signal_shape::get_tpeak ( ) const

Return the first peak time of the signal.

◆ initialize()

virtual void mctools::signal::triangle_gate_signal_shape::initialize ( const datatools::properties config_,
const mygsl::unary_function_dict_type functors_ 
)
virtual

Initialization.

Reimplemented from mygsl::i_unary_function.

◆ is_initialized()

virtual bool mctools::signal::triangle_gate_signal_shape::is_initialized ( ) const
virtual

Check initialization status.

Reimplemented from mygsl::i_unary_function.

◆ is_valid()

bool mctools::signal::triangle_gate_signal_shape::is_valid ( ) const

Check the validity.

◆ reset()

virtual void mctools::signal::triangle_gate_signal_shape::reset ( )
virtual

Reset.

Reimplemented from mygsl::i_unary_function.

◆ reset_polarity()

void mctools::signal::triangle_gate_signal_shape::reset_polarity ( )

Reset the polarity of the signal.

◆ set_amplitude()

void mctools::signal::triangle_gate_signal_shape::set_amplitude ( double  )

Set the amplitude of the signal.

◆ set_polarity()

void mctools::signal::triangle_gate_signal_shape::set_polarity ( polarity_type  )

Set the polarity of the signal.

◆ set_t0()

void mctools::signal::triangle_gate_signal_shape::set_t0 ( double  )

Set the starting time of the signal.

◆ set_t1()

void mctools::signal::triangle_gate_signal_shape::set_t1 ( double  )

Set the starting time of the plateau.

◆ set_t2()

void mctools::signal::triangle_gate_signal_shape::set_t2 ( double  )

Set the stopping time of the plateau.

◆ set_t3()

void mctools::signal::triangle_gate_signal_shape::set_t3 ( double  )

Set the stopping time of the signal.

◆ tree_dump()

virtual void mctools::signal::triangle_gate_signal_shape::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart printing.

Reimplemented from mygsl::i_unary_function.


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