ATLAS Offline Software
Loading...
Searching...
No Matches
StorePIDinfo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef INDETTRT_STOREPIDINFO
5#define INDETTRT_STOREPIDINFO
6
8// StorePIDinfo.h , (c) ATLAS Detector software
10#include <vector>
11#include "GaudiKernel/StatusCode.h"
12
14 public:
15 //defaults (rule of 5)
16 StorePIDinfo() = default;
17 StorePIDinfo(const StorePIDinfo&) = default;
21 ~StorePIDinfo() = default;
22
23 StorePIDinfo(int nbins, float min, float max, const std::vector<float>& values);
24 void update(int nbins, float min, float max, const std::vector<float>& values);
25 void push_back(float value);
26 StatusCode check(int gas, int detpart) const;
27 float GetValue(float input) const { return m_values.at(GetBin(input)); }
28 float GetBinValue(int bin) const { return m_values.at(bin); }
29 int GetBin(float input) const;
30
31 private:
32 unsigned int m_nbins = 0;
33 float m_min = -9999.9;
34 float m_max = 10000000 * 2;
35 std::vector<float> m_values;
36};
37#endif
38
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
StorePIDinfo()=default
float GetValue(float input) const
~StorePIDinfo()=default
StorePIDinfo & operator=(const StorePIDinfo &)=default
int GetBin(float input) const
unsigned int m_nbins
void push_back(float value)
StorePIDinfo(StorePIDinfo &&)=default
StorePIDinfo(const StorePIDinfo &)=default
float GetBinValue(int bin) const
StorePIDinfo & operator=(StorePIDinfo &&)=default
void update(int nbins, float min, float max, const std::vector< float > &values)
StatusCode check(int gas, int detpart) const
std::vector< float > m_values