ATLAS Offline Software
Loading...
Searching...
No Matches
LArMLencoding Class Reference

#include <LArMLencoding.h>

Collaboration diagram for LArMLencoding:

Static Public Member Functions

static int get_MultiLinearCode_eFEX (int Et, bool saturated=false, bool invalid=false, bool empty=false)
static int get_MultiLinearCode_jFEX (int Et, bool invalid=false, bool empty=false)
static int get_MultiLinearCode_gFEX (int Et, bool invalid=false, bool empty=false)

Detailed Description

Definition at line 8 of file LArMLencoding.h.

Member Function Documentation

◆ get_MultiLinearCode_eFEX()

int LArMLencoding::get_MultiLinearCode_eFEX ( int Et,
bool saturated = false,
bool invalid = false,
bool empty = false )
static

Definition at line 10 of file LArMLencoding.cxx.

10 {
11 // for special codes
12 if (empty) return 0;
13 else if (invalid) return 1022;
14 else if (saturated) return 1023;
15
16 // for specific energies
17 else if (Et < -60) return 1;
18 else if (Et < 448) return (Et+60)/2 + 2;
19 else if (Et < 1472) return (Et/4) + 144;
20 else if (Et < 3520) return (Et/8) + 328;
21 else if (Et < 11584) return (Et/32) + 658;
22 else return 1020;
23}
static const Attributes_t empty

◆ get_MultiLinearCode_gFEX()

int LArMLencoding::get_MultiLinearCode_gFEX ( int Et,
bool invalid = false,
bool empty = false )
static

Definition at line 43 of file LArMLencoding.cxx.

43 {
44 //for special codes
45 if (empty) return 0;
46 else if (invalid) return 4095;
47
48 //for specific codes
49 if (Et < -8096) return 1;
50 else if (Et < -4000) return (Et+8096)/1024 + 2;
51 else if (Et < -1024) return (Et+4000)/4 + 6;
52 else if (Et < 1024) return (Et+1024)/2 + 750;
53 else if (Et < 4096) return (Et-1024)/4 + 1774;
54 else if (Et < 16000) return (Et-4096)/8 + 2542;
55 else if (Et < 81536) return (Et-16000)/2048 + 4030;
56 else return 4062;
57}

◆ get_MultiLinearCode_jFEX()

int LArMLencoding::get_MultiLinearCode_jFEX ( int Et,
bool invalid = false,
bool empty = false )
static

Definition at line 26 of file LArMLencoding.cxx.

26 {
27 // for special code
28 if (empty) return 0;
29 else if (invalid) return 4095;
30
31 // for specific energies
32 else if (Et < -252) return 1;
33 else if (Et < 512) return (Et+512)/2 + 2;
34 else if (Et < 64000)
35 {
36 const int pow = log(Et/512)/log(4);
37 return Et/(std::pow(2,pow+2))+256*std::pow(2,pow);
38 }
39 else return 4048;
40}
constexpr int pow(int base, int exp) noexcept

The documentation for this class was generated from the following files: