|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "boost/multi_array.hpp"
12 const size_t nLArGains,
13 const size_t nTileCells,
14 const size_t nTileGains,
17 : m_caloCellId(caloCellId)
18 , m_noiseType(noisetype)
21 boost::multi_array_types::extent_gen lar_extent_gen;
22 m_larNoise.resize(lar_extent_gen[nLArGains][nLArCells]);
23 boost::multi_array_types::extent_gen tile_extent_gen;
24 m_tileNoise.resize(tile_extent_gen[nTileGains][nTileCells]);
49 if((sigma1 == 0. && sigma2 == 0.) ||
e == 0.)
return 0.;
50 if(sigma1 == 0.)
return e/sigma2;
51 if((
ratio == 0.) || sigma2 == 0.)
return e/sigma1;
52 const double x1 =
e/sigma1;
53 const double x2 =
e/sigma2;
55 constexpr std::array<float,2> valid_range{0.9,7.5};
56 const float wide_gauss_sigma =
std::min(std::abs(
x1),std::abs(
x2));
57 if(wide_gauss_sigma > valid_range[1])
return wide_gauss_sigma;
59 const float narrow_gauss_sigma=
std::max(std::abs(
x1),std::abs(
x2));
60 if(narrow_gauss_sigma < valid_range[0])
return narrow_gauss_sigma;
63 const double y1= TMath::Erf(M_SQRT1_2*
x1);
64 const double y2= TMath::Erf(M_SQRT1_2*
x2);
66 const double z = (
y1*sigma1 +
ratio*
y2*sigma2 )/( sigma1 +
ratio*sigma2);
73 return M_SQRT2*TMath::ErfInverse(
z);
105 else if (objver==2) {
#define CXXUTILS_TRAPPING_FP
T getData(const unsigned int channel, const unsigned int adc, const unsigned int idx) const
Returns a single T belonging to a channel/gain.
NOISETYPE
Conditions Data Object holding the calorimeter noise per cell and per gain.
Class for storing a number of floats (Flt) and functions on those.
void setTileBlob(const CaloCondBlobFlt *flt, const float lumi)
float calcSig(const IdentifierHash tilehash, const int gain, const float energy) const
boost::multi_array< float, 2 > m_larNoise
boost::multi_array< float, 2 > m_tileNoise
uint16_t getObjVersion() const
Returns the BLOB object version.
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
const CaloCell_Base_ID * m_caloCellId
Thrown if object version in BLOB does not agree with class version.
Tell the compiler to optimize assuming that FP may trap.
float getTileEffSigma(const IdentifierHash subHash, const int gain, const float e) const
static unsigned int getDbCaloGain(int caloGain)
Returns the non-negative gainId to be used with the COOL DB.
unsigned m_tileHashOffset
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Helper base class for offline cell identifiers.
const CaloCondBlobFlt * m_tileBlob