ATLAS Offline Software
Loading...
Searching...
No Matches
LArRawEvent/LArRawEvent/LArPedestal.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARPEDESTAL_H
6#define LARPEDESTAL_H
7/********************************************************************
8
9 NAME: LArPedestal.h
10 PACKAGE: offline/LArCalorimeter/LArRawEvent
11
12 AUTHORS: M. AHARROUCHE
13 CREATED: Jan. 12, 2004
14 UPDATED: Mar. 10, 2004 by Remi Lafaye
15
16 PURPOSE: Interchanges the data with LArPedestalMaker for
17 calculation of pedestal and rms.
18
19 ********************************************************************/
20// Include files
21#include <string>
22#include <vector>
23#include <math.h>
24#include <stdint.h>
25
26class LArPedestal
27{
28 private:
29
30 // Lower bound of window
31 short m_min;
32 // Upper bound of window
33 short m_max;
34 // Sum of components
35 std::vector<uint32_t> m_sum;
36 // Sum of squares
37 std::vector<uint64_t> m_sumSquares;
38 // Event counter
40
41 public:
42
43 // Constructor
45 // Destructor
47
48 // Reset m_sum, m_matrix and m_nped
49 void zero();
50
51 // Set lower value
52 void set_min(const short min);
53
54 // Set upper value
55 void set_max(const short max);
56
57 // Get number of entries
58 inline int get_nentries() const { return m_nped; }
59
60 // Get sum
61 double get_sum() const;
62 double get_sum(const unsigned isample) const;
63
64 // Get mean value
65 double get_mean() const;
66 double get_mean(const unsigned isample) const;
67
68 double get_mean(const unsigned isample_min, const unsigned isample_max) const;
69
70 // Get rms value
71 double get_rms() const;
72 double get_rms(const unsigned isample) const;
73 double get_rms(const unsigned isample_min, const unsigned isample_max) const;
74
75
76 // Get number of samples
77 inline unsigned get_nsamples() const { return m_sum.size();}
78
79 // Get lower value
80 inline const short& get_min() const { return m_min; }
81
82 // Get uper value
83 inline const short& get_max() const { return m_max; }
84
85 // Fill the m_sum and m_matrix vector
86 void add(const std::vector<short>& samples);
87
88};
89
90#endif
91
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
double get_mean(const unsigned isample) const
void add(const std::vector< short > &samples)
const short & get_min() const
double get_mean(const unsigned isample_min, const unsigned isample_max) const
const short & get_max() const
double get_sum() const
std::vector< uint64_t > m_sumSquares
double get_rms(const unsigned isample_min, const unsigned isample_max) const
void set_max(const short max)
double get_rms() const
double get_sum(const unsigned isample) const
double get_rms(const unsigned isample) const
double get_mean() const
void set_min(const short min)
setEventNumber uint32_t