ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawChannel.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7//***************************************************************************
8// Filename : TileRawChannel.h
9// Author : Ed Frank, Ambreesh Gupta, Frank Merritt
10// Created : Mar, 2002
11//
12// DESCRIPTION:
13// A TileRawChannel is the final result of simulation, and represents the
14// raw information (pulse height, time, quality) for the in-time beam
15// crossing in the Tile channel.
16// Optimal filtering has been carried out, but energy has not been
17// extracted.
18//
19// HISTORY:
20// 02Mar02 Created to replace the (now obsolete) TileRawCell class.
21// 20Sep02 Move to DataVector (A.Solodkov)
22// 02Oct02 Now sub-class of TileRawData (A.Solodkov)
23//
24// BUGS:
25// Question: the amplitude in a TileRawChannel is in ADC counts (not
26// calibrated). What about time?
27//
28// ***************************************************************************
29
30#ifndef TILEEVENT_TILERAWCHANNEL_H
31#define TILEEVENT_TILERAWCHANNEL_H
32
34
36 public:
37
38 /* Constructors */
39
41 : m_pedestal(0) {
42 }
43
44 // nb. Overload for HWIdentifier should come before that for Identifier;
45 // otherwise, pyroot gets overload resolution wrong.
46 TileRawChannel(const HWIdentifier& HWid, float amplitude, float time, float quality, float ped = 0.0);
47 TileRawChannel(const HWIdentifier& HWid,
48 std::vector<float>&& amplitude,
49 std::vector<float>&& time,
50 std::vector<float>&& quality,
51 float ped = 0.0);
52 TileRawChannel(const Identifier& id, float amplitude, float time, float quality, float ped = 0.0);
53
54 TileRawChannel (const TileRawChannel&) = default;
58
59 /* Destructor */
60
61 ~TileRawChannel() = default;
62
63 void assign (const HWIdentifier& id,
64 float amplitude,
65 float time,
66 float quality,
67 float ped = 0.0)
68 {
69 TileRawData::operator= (TileRawData (id));
70 m_amplitude.resize(1);
72 m_time.resize(1);
73 m_time[0] = time;
74 m_quality.resize(1);
75 m_quality[0] = quality;
76 m_pedestal = ped;
77 }
78
79 template <class IteratorA, class IteratorT, class IteratorQ>
80 void assign (const HWIdentifier& id,
81 IteratorA amplitude_beg, IteratorA amplitude_end,
82 IteratorT time_beg, IteratorT time_end,
83 IteratorQ qual_beg, IteratorQ qual_end,
84 float ped = 0.0)
85 {
86 TileRawData::operator= (TileRawData (id));
87 m_amplitude.assign (amplitude_beg, amplitude_end);
88 m_time.assign (time_beg, time_end);
89 m_quality.assign (qual_beg, qual_end);
90 m_pedestal = ped;
91 }
92
93 int add(float amplitude, float time, float quality);
94 void setPedestal(float ped) { m_pedestal = ped; }
95 void scaleAmplitude(float scale);
96 void insertTime(float time);
97 int insert(float amplitude, float time, float quality);
98
99 /* Inline access methods */
100
101 inline float amplitude(int ind = 0) const { return m_amplitude[ind]; }
102 inline void setAmplitude (float a, int ind=0) { m_amplitude[ind] = a; }
103 inline float time(int ind = 0) const { return m_time[ind]; }
104 inline float uncorrTime() const { return m_time[m_time.size() - 1]; }
105 inline float quality(int ind = 0) const { return m_quality[ind]; }
106 inline float pedestal(void) const { return m_pedestal; }
107
108 inline int size() const { return m_amplitude.size(); }
109 inline int sizeTime() const { return m_time.size(); }
110 inline int sizeQuality() const { return m_quality.size(); }
111
112 std::string whoami(void) const { return "TileRawChannel"; }
113 void print(void) const;
114 // Conversion operator to a std::string
115 // Can be used in a cast operation : (std::string) TileRawChannel
116 operator std::string() const;
117
118 private:
119
120 std::vector<float> m_amplitude; // amplitude in ADC counts (max=1023)
121 std::vector<float> m_time; // time relative to triggering bunch
122 std::vector<float> m_quality; // quality of the sampling distribution
123 float m_pedestal; // reconstructed pedestal value
124
125 // quality is a number in [0,1] obtained by integrating the parent
126 // distribution for the "goodness" from the DSP. In hypothesis testing
127 // terms, it is the significance of the hypothisis that the input
128 // to the DSP matches the signal-model used to tune the DSP.
129};
130
131#endif //TILEEVENT_TILERAWCHANNEL_H
132
static Double_t a
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
std::vector< float > m_time
TileRawChannel(TileRawChannel &&)=default
void insertTime(float time)
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
int add(float amplitude, float time, float quality)
int size() const
void setPedestal(float ped)
~TileRawChannel()=default
TileRawChannel(const TileRawChannel &)=default
void setAmplitude(float a, int ind=0)
int sizeTime() const
std::vector< float > m_quality
std::string whoami(void) const
int insert(float amplitude, float time, float quality)
float uncorrTime() const
TileRawChannel & operator=(const TileRawChannel &)=default
void assign(const HWIdentifier &id, IteratorA amplitude_beg, IteratorA amplitude_end, IteratorT time_beg, IteratorT time_end, IteratorQ qual_beg, IteratorQ qual_end, float ped=0.0)
void print(void) const
float amplitude(int ind=0) const
std::vector< float > m_amplitude
void scaleAmplitude(float scale)
int sizeQuality() const