19 constexpr unsigned int max_short_flt = 0x7f7f7fff;
20 union {
unsigned int u;
float f;} m;
21 vc.reserve(vf.size());
22 for (
const auto& value : vf){
24 if ( (m.u & 0x7fffffff) > max_short_flt) vc.push_back (m.u>>16);
25 else vc.push_back((m.u+0x8000)>>16);
30 union {
unsigned int u;
float f;} m;
31 vf.reserve(vc.size());
32 for (
const auto& value : vc){
33 unsigned int ui(value << 16);
42 vi.reserve(vf.size()*
m_bits/16+17);
44 unsigned int format=0;
45 unsigned int vfs=vf.size();
55 int rounding=0x1<<(bshift-1);
56 unsigned int vmax= 0x7f7<<20;
57 vmax |= 0x000fffff xor (rounding);
58 unsigned int rems=0xffffffff;
64 union {
unsigned int u;
float f;} m;
71 unsigned int CUR=0;
int IN=0;
72 for (
const auto& value : vf){
74 if ( (m.u & 0x7fffffff) > vmax) IN=m.u>>bshift;
75 else IN=(m.u+rounding)>>bshift;
103 for (
const auto& value : vf){
117 std::vector<unsigned int>::const_iterator i=vi.begin();
119 int format=(*i); ++i;
125 unsigned int vecs=(format>>6)&0xfffffff;
129 vf.reserve(vi.size()*
m_bits/16+17);
133 int CP=0;
int FP=0;
int REM=0;
134 unsigned int V=0xffffffff>>(32-L);
unsigned int R=0;
137 union {
unsigned int u;
float f;} m;
142 R = ( ui >> (32-FP) ) & V;
156 R = ( ui & (0xffffffff >>
CP) ) << REM;
159 R |= ui >> (32-REM) ;
161 if (
m_sign) R &= 0x7fffffff;
void expandFromUStoFloat(const std::vector< unsigned short > &vi, std::vector< float > &vf)
void reduceToUS(const std::vector< float > &vf, std::vector< unsigned short > &vi)
void expandToFloat(const std::vector< unsigned int > &vc, std::vector< float > &vf)
void reduce(const std::vector< float > &vf, std::vector< unsigned int > &vi)
Select isolated Photons, Electrons and Muons.