HerdSoftware  0.4.0
CaloIsCMOSChannelInfo.h
Go to the documentation of this file.
1 /*
2  * CaloIsCMOSChannelInfo.h
3  *
4  * Created on: 28th Nov 2022
5  * Author: Nicola Mori
6  */
7 
10 #ifndef HERD_CALOISCMOSCHANNELINFO_H_
11 #define HERD_CALOISCMOSCHANNELINFO_H_
12 
15 
16 #include <vector>
17 
18 #ifdef HS_USE_ROOT
19 #include "Rtypes.h"
20 #endif
21 
22 namespace Herd {
23 
32 
34  CaloIsCMOSChannelInfo() = default;
35 
47  CaloIsCMOSChannelInfo(std::vector<float> &&mipValue, std::vector<float> &&pedestalValue,
48  std::vector<int> &&fiberIndexX, std::vector<int> &&fiberIndexY);
49 
51  virtual ~CaloIsCMOSChannelInfo() = default;
52 
53  [[nodiscard]] unsigned int NChannels() { return m_mipValue.size(); };
54 
60  [[nodiscard]] float MipValue(unsigned int volID) const { return m_mipValue[volID]; };
61 
67  [[nodiscard]] float Pedestal(unsigned int volID) const { return m_pedestalValue[volID]; };
68 
69  // TODO: assess if for the two high and low gain cameras two different X-Y mappings are needed.
78  [[nodiscard]] std::pair<int, int> FiberIsCMOSIndexes(unsigned int volID) const {
79  return {m_fiberIndexX[volID], m_fiberIndexY[volID]};
80  };
81 
82 private:
83  std::vector<float> m_mipValue;
84  std::vector<float> m_pedestalValue;
85  std::vector<int> m_fiberIndexX, m_fiberIndexY;
86 
87 #ifdef HS_USE_ROOT
88  ClassDef(CaloIsCMOSChannelInfo, 1)
89 #endif
90 };
91 
92 } // namespace Herd
93 
94 #endif /* HERD_CALOISCMOSCHANNELINFO_H_ */
Point.h
Herd::CaloIsCMOSChannelInfo::m_fiberIndexY
std::vector< int > m_fiberIndexY
Indexes of the fibers on IsCMOS sensors.
Definition: CaloIsCMOSChannelInfo.h:85
Herd::CaloIsCMOSChannelInfo::m_fiberIndexX
std::vector< int > m_fiberIndexX
Definition: CaloIsCMOSChannelInfo.h:85
Herd::CaloIsCMOSChannelInfo::m_pedestalValue
std::vector< float > m_pedestalValue
Pedestals values for each fiber channel.
Definition: CaloIsCMOSChannelInfo.h:84
AxesArray.h
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Herd::CaloIsCMOSChannelInfo
Data structure for the CALO IsCMOS readout information.
Definition: CaloIsCMOSChannelInfo.h:31
Herd::CaloIsCMOSChannelInfo::NChannels
unsigned int NChannels()
Definition: CaloIsCMOSChannelInfo.h:53
Herd::CaloIsCMOSChannelInfo::MipValue
float MipValue(unsigned int volID) const
Return the MIP value (grayscale).
Definition: CaloIsCMOSChannelInfo.h:60
Herd::CaloIsCMOSChannelInfo::m_mipValue
std::vector< float > m_mipValue
MIP values for each fiber channel.
Definition: CaloIsCMOSChannelInfo.h:80
Herd::CaloIsCMOSChannelInfo::CaloIsCMOSChannelInfo
CaloIsCMOSChannelInfo()=default
Default constructor.
Herd::CaloIsCMOSChannelInfo::Pedestal
float Pedestal(unsigned int volID) const
Return the pedestal value for high gain (grayscale).
Definition: CaloIsCMOSChannelInfo.h:67
Herd::CaloIsCMOSChannelInfo::FiberIsCMOSIndexes
std::pair< int, int > FiberIsCMOSIndexes(unsigned int volID) const
Return the X-Y indexes of the fibers on the IsCMOS sensor.
Definition: CaloIsCMOSChannelInfo.h:78
Herd::CaloIsCMOSChannelInfo::~CaloIsCMOSChannelInfo
virtual ~CaloIsCMOSChannelInfo()=default
Destructor.