Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-26 23:26:30

0001 #ifndef CondFormats_EcalObjects_EcalMultifitConditionsSoA_h
0002 #define CondFormats_EcalObjects_EcalMultifitConditionsSoA_h
0003 
0004 #include <array>
0005 #include <Eigen/Dense>
0006 #include "DataFormats/SoATemplate/interface/SoACommon.h"
0007 #include "DataFormats/SoATemplate/interface/SoALayout.h"
0008 #include "DataFormats/EcalDigi/interface/EcalConstants.h"
0009 #include "CondFormats/EcalObjects/interface/EcalPulseShapes.h"
0010 
0011 using PulseShapeArray = std::array<float, EcalPulseShape::TEMPLATESAMPLES>;
0012 using SampleCorrelationArray = std::array<double, ecalPh1::sampleSize>;
0013 
0014 using CovarianceMatrix = Eigen::Matrix<float, EcalPulseShape::TEMPLATESAMPLES, EcalPulseShape::TEMPLATESAMPLES>;
0015 
0016 constexpr size_t kMaxTimeBiasCorrectionBinsEB = 71;
0017 constexpr size_t kMaxTimeBiasCorrectionBinsEE = 58;
0018 using TimeBiasCorrArrayEB = std::array<float, kMaxTimeBiasCorrectionBinsEB>;
0019 using TimeBiasCorrArrayEE = std::array<float, kMaxTimeBiasCorrectionBinsEE>;
0020 
0021 GENERATE_SOA_LAYOUT(EcalMultifitConditionsSoALayout,
0022                     SOA_COLUMN(uint32_t, rawid),
0023                     SOA_COLUMN(float, pedestals_mean_x12),
0024                     SOA_COLUMN(float, pedestals_mean_x6),
0025                     SOA_COLUMN(float, pedestals_mean_x1),
0026                     SOA_COLUMN(float, pedestals_rms_x12),
0027                     SOA_COLUMN(float, pedestals_rms_x6),
0028                     SOA_COLUMN(float, pedestals_rms_x1),
0029                     SOA_COLUMN(PulseShapeArray, pulseShapes),
0030                     // NxN  N=templatesamples  for each xtal
0031                     SOA_EIGEN_COLUMN(CovarianceMatrix, pulseCovariance),
0032                     SOA_COLUMN(float, gain12Over6),
0033                     SOA_COLUMN(float, gain6Over1),
0034                     SOA_COLUMN(float, timeCalibConstants),
0035                     // timeBiasCorrections (fixed since 2011)
0036                     SOA_SCALAR(TimeBiasCorrArrayEB, timeBiasCorrections_amplitude_EB),
0037                     SOA_SCALAR(TimeBiasCorrArrayEB, timeBiasCorrections_shift_EB),
0038                     SOA_SCALAR(TimeBiasCorrArrayEE, timeBiasCorrections_amplitude_EE),
0039                     SOA_SCALAR(TimeBiasCorrArrayEE, timeBiasCorrections_shift_EE),
0040                     SOA_SCALAR(size_t, timeBiasCorrectionSizeEB),
0041                     SOA_SCALAR(size_t, timeBiasCorrectionSizeEE),
0042                     // Sample correlation scalar: array of 10 values for each gain in EB and EE
0043                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EB_G12),
0044                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EB_G6),
0045                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EB_G1),
0046                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EE_G12),
0047                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EE_G6),
0048                     SOA_SCALAR(SampleCorrelationArray, sampleCorrelation_EE_G1),
0049                     // Samples Masks
0050                     SOA_SCALAR(unsigned int, sampleMask_EB),
0051                     SOA_SCALAR(unsigned int, sampleMask_EE),
0052                     SOA_SCALAR(float, timeOffset_EB),
0053                     SOA_SCALAR(float, timeOffset_EE),
0054                     // offset for hashed ID access to EE items of columns
0055                     SOA_SCALAR(uint32_t, offsetEE))
0056 
0057 using EcalMultifitConditionsSoA = EcalMultifitConditionsSoALayout<>;
0058 
0059 #endif