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