ATLAS Offline Software
LArProvenance.h
Go to the documentation of this file.
1 //Dear emacs, this is -*-c++-*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef LARELECCALIB_LARPROVENANCE
8 #define LARELECCALIB_LARPROVENANCE
9 
10 #include <stdint.h>
11 
12 namespace LArProv {
14 
15  PEAKAVG = 0x1, // Only used in early commissioning
16  PEAKPARABOLA = 0x3, // Only used in early commissioning
17  PEAKCUBIC = 0x4, // Only used in early commissioning
18  PEAKOFC = 0x5, // Default Run 1 - Run 3
19  PEAKTILEINFO = 0x6, // Only used in early commissioning
20  PEAKNN = 0x7, // Neural-Network peak reco (run 4 plans)
21  PATCHED = 0x8, // patched from the SuperCell container
22  RAMPCONST = 0x10, //use hard-coded constant Ramp value (only early commissioning)
23  RAMPDB = 0x20, //Ramp from DB (default)
24  PEDSAMPLEZERO = 0x40, //use ADC[0] as pedestal value (only early commissioning)
25  SCPASSBCIDMAX = 0x40, //Supercell peak finder (overlap with PEDSAMPLEZERO should not matter)
26  PEDDB = 0x80, //Pedestal from DB (default)
27 
28  DEFAULTRECO = PEAKOFC | RAMPDB | PEDDB, //0x00A5;
29  ITERCONVERGED = 0x0100, //Iteration convered (in case of OF-Iteration)
30  SCTIMEPASS = 0x0200, //Supercell inside time-window
31  SATURATED = 0x0400, //ADC 0 or 4096
32  MASKED = 0x0800, //Known noisy cell, E set to zero
33  DSPCALC = 0x1000, //Energy from online calculation
34  QTPRESENT = 0x2000, //Quality and time values are valid
35 
36  };
37 
38  inline bool test(const uint16_t prov, const LArProvenance check) {
39  if (check & 0xF) {
40  //The first four bits are a number, require exact match
41  if ((prov & 0xF) != (check &0xF)) return false;
42  }
43  //The remaining bits are independent, check only if 'check' bits are set
44  return (((prov >>4) & (check >>4)) == (check >>4));
45  }
46 
47 
48 } // end namespace
49 
50 #endif
51 
52 /*
53 Bit definitions :
54 The first four bits are enumberating the peak reconstruction method
55 0 RecoMethod1
56 1 RecoMethod2
57 2 RecoMethod3
58 3 RecoMethod4
59 
60 Bits 4 to 15 are flags:
61 4 -> 0x10 RAMPCONST
62 5 -> 0x20 RAMPDB
63 6 -> 0x40 PEDSAMPLEZERO
64 7 -> 0x80 PEDDB
65 8 -> 0x0100 ITERCONVERGED
66 9
67 10 -> 0x0400 SATURATED
68 11 -> 0x0800 MASKED
69 12 -> 0x1000 DSPCALC
70 13 -> 0x2000 QTPRESENT
71 14
72 15
73 
74 
75 Copy from https://twiki.cern.ch/twiki/bin/view/AtlasComputing/CaloEventDataModel
76 The Provenance (16 bits unsigned) defining how the LArRawChannel was reconstructed. The bit meaning is
77 0x00FF are used the store the offline algorithm used, in the same way as now. For instance provenance & 0x00FF == 0x00A5 would tell that the pulse was reconstructed with the OFC with all calibrations from the database.
78 0x0100 is used to store the information on the convergence of the OFC iteration.
79 0x0400 saturated pulse (ADC>=4095 or =< 0 )
80 0x0800 cell is masked as noisy cell (E/t/Q set to 0)
81 0x1000 is used to tell that the raw channel comes from the DSP and not offline computation.
82 0x2000 is used to tell that time and quality information are available for this channel
83 */
84 
LArProv::PEDSAMPLEZERO
@ PEDSAMPLEZERO
Definition: LArProvenance.h:24
LArProv::PEAKOFC
@ PEAKOFC
Definition: LArProvenance.h:18
LArProv::SCPASSBCIDMAX
@ SCPASSBCIDMAX
Definition: LArProvenance.h:25
LArProv::PEAKAVG
@ PEAKAVG
Definition: LArProvenance.h:15
LArProv::RAMPCONST
@ RAMPCONST
Definition: LArProvenance.h:22
LArProv::PATCHED
@ PATCHED
Definition: LArProvenance.h:21
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
LArProv::QTPRESENT
@ QTPRESENT
Definition: LArProvenance.h:34
LArProv::DEFAULTRECO
@ DEFAULTRECO
Definition: LArProvenance.h:28
LArProv::SCTIMEPASS
@ SCTIMEPASS
Definition: LArProvenance.h:30
LArProv::DSPCALC
@ DSPCALC
Definition: LArProvenance.h:33
LArProv::PEAKNN
@ PEAKNN
Definition: LArProvenance.h:20
LArProv::PEDDB
@ PEDDB
Definition: LArProvenance.h:26
LArProv::test
bool test(const uint16_t prov, const LArProvenance check)
Definition: LArProvenance.h:38
LArProv::MASKED
@ MASKED
Definition: LArProvenance.h:32
LArProv::RAMPDB
@ RAMPDB
Definition: LArProvenance.h:23
LArNewCalib_Delay_OFC_Cali.check
check
Definition: LArNewCalib_Delay_OFC_Cali.py:267
LArProv
Definition: LArProvenance.h:12
LArProv::PEAKTILEINFO
@ PEAKTILEINFO
Definition: LArProvenance.h:19
LArProv::ITERCONVERGED
@ ITERCONVERGED
Definition: LArProvenance.h:29
LArProv::PEAKCUBIC
@ PEAKCUBIC
Definition: LArProvenance.h:17
LArProv::LArProvenance
LArProvenance
Definition: LArProvenance.h:13
LArProv::PEAKPARABOLA
@ PEAKPARABOLA
Definition: LArProvenance.h:16
LArProv::SATURATED
@ SATURATED
Definition: LArProvenance.h:31