ATLAS Offline Software
Loading...
Searching...
No Matches
TileSamplingFraction.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TILECONDITIONS_TILESAMPLINGFRACTION_H
6#define TILECONDITIONS_TILESAMPLINGFRACTION_H
7
8// Tile includes
10
15
17 public:
18
19
20 TileSamplingFraction(std::unique_ptr<TileCalibDataFlt> samplingFraction)
21 : m_samplingFraction{std::move(samplingFraction)} {};
22
23 virtual ~TileSamplingFraction() = default;
24
31 float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const;
32
39 float getNumberOfPhotoElectrons(unsigned int drawerIdx, unsigned int channel) const;
40
43
44 private:
45
46 //=== TileCalibData
47 std::unique_ptr<TileCalibDataFlt> m_samplingFraction;
48
49};
50
51// inlines
52inline
53float TileSamplingFraction::getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const {
54 return m_samplingFraction->getCalibDrawer(drawerIdx)->getData(channel, 0, 0);
55}
56
57inline
58float TileSamplingFraction::getNumberOfPhotoElectrons(unsigned int drawerIdx, unsigned int channel) const {
59 return m_samplingFraction->getCalibDrawer(drawerIdx)->getData(channel, 0, 1);
60}
61
64
67
68#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Condition object to keep and provide Tile Calorimeter sampling fraction and number of photoelectrons.
std::unique_ptr< TileCalibDataFlt > m_samplingFraction
float getNumberOfPhotoElectrons(unsigned int drawerIdx, unsigned int channel) const
Return number of photoelectrons per 1 GeV in Tile Calorimeter scintilator.
TileSamplingFraction(std::unique_ptr< TileCalibDataFlt > samplingFraction)
TileSamplingFraction & operator=(const TileSamplingFraction &)=delete
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
TileSamplingFraction(const TileSamplingFraction &)=delete
virtual ~TileSamplingFraction()=default
STL namespace.