ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloPedestalCumul.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGT1CALOCALIBCONDITIONS_L1CALOPEDESTALCUMUL_H
6#define TRIGT1CALOCALIBCONDITIONS_L1CALOPEDESTALCUMUL_H
7
8#include <string>
9#include <vector>
10#include <math.h>
11
20
22{
23 private:
24
25 // Lower bound of window
26 short m_min;
27 // Upper bound of window
28 short m_max;
29 // Sum of components
30 std::vector<double> m_sum;
31 // Sum of squares
32 std::vector<double> m_matrix;
33 // Event counter
34 int m_nped;
35
36 public:
37
38 // Constructor
40 // Destructor
42
43 // Reset m_sum, m_matrix and m_nped
44 void clear();
45
46 // Set lower value
47 void set_min(const short min) { m_min = min; };
48
49 // Set upper value
50 void set_max(const short max) { m_max = max; };
51
52 // Get number of entries
53 inline int get_nentries() const { return m_nped; }
54
55 // Get sum
56 double get_sum() const;
57 double get_sum(const unsigned isample) const;
58
59 // Get mean value
60 double get_mean() const;
61 double get_mean(const unsigned isample) const;
62
63 // Get rms value
64 double get_rms() const;
65 double get_rms(const unsigned isample) const;
66
67 // Get number of samples
68 inline unsigned get_nsamples() const { return m_sum.size();}
69
70 // Get lower value
71 inline const short& get_min() const { return m_min; }
72
73 // Get uper value
74 inline const short& get_max() const { return m_max; }
75
76 // Fill the m_sum and m_matrix vector
77 void add(const std::vector<int>& samples);
78
79};
80
81#endif
82
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
unsigned get_nsamples() const
std::vector< double > m_matrix
std::vector< double > m_sum
void set_max(const short max)
void add(const std::vector< int > &samples)
void set_min(const short min)
const short & get_min() const
const short & get_max() const