ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace LArProv {
13 enum LArProvenance : uint16_t {
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 SuperCells or neighbors
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
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 DEADFEB = 0x4000, //Front-End board broken or inactive
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/*
53Bit definitions :
54The first four bits are enumberating the peak reconstruction method
550 RecoMethod1
561 RecoMethod2
572 RecoMethod3
583 RecoMethod4
59
60Bits 4 to 15 are flags:
614 -> 0x10 RAMPCONST
625 -> 0x20 RAMPDB
636 -> 0x40 PEDSAMPLEZERO
647 -> 0x80 PEDDB
658 -> 0x0100 ITERCONVERGED
669
6710 -> 0x0400 SATURATED
6811 -> 0x0800 MASKED
6912 -> 0x1000 DSPCALC
7013 -> 0x2000 QTPRESENT
7114
7215
73
74
75Copy from https://twiki.cern.ch/twiki/bin/view/AtlasComputing/CaloEventDataModel
76The Provenance (16 bits unsigned) defining how the LArRawChannel was reconstructed. The bit meaning is
770x00FF 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.
780x0100 is used to store the information on the convergence of the OFC iteration.
790x0400 saturated pulse (ADC>=4095 or =< 0 )
800x0800 cell is masked as noisy cell (E/t/Q set to 0)
810x1000 is used to tell that the raw channel comes from the DSP and not offline computation.
820x2000 is used to tell that time and quality information are available for this channel
83*/
84
bool test(const uint16_t prov, const LArProvenance check)