delphi-edm4hep
DELPHI SDST/FDST -> EDM4hep converter
Loading...
Searching...
No Matches
BeamSpotStatus.h
Go to the documentation of this file.
1
// BeamSpotStatus.h -- whether SKELANA's beam spot describes the current event.
2
//
3
// PSBEAM fills PSCBSP through VDBSPT from the per-processing database under
4
// $DELPHI_DAT (e.g. 95C2.DB), looked up by run and file. IERRBS reports the
5
// outcome (vdbeam.car:582-651):
6
// 0 the entry for this run and file;
7
// 1 no entry for this file; the preceding entry is used instead;
8
// 2 no usable entry. The position is then whatever row the neighbour search
9
// stopped on -- another run's beam spot, or an out-of-range read that can
10
// give (0,0,0) -- so it describes nothing.
11
// If the database file cannot be opened, VDBSPT returns on the first event
12
// without setting IERRBS (vdbeam.car:1167-1171) and reports 2 afterwards, so a
13
// missing file would otherwise pass as a run of code-2 events.
14
15
#pragma once
16
17
namespace
delphi_edm4hep::beamspot
{
18
19
enum
ErrorCode
:
int
{
kOwnEntry
= 0,
kPrecedingEntry
= 1,
kNoEntry
= 2 };
20
21
// True when the position and widths describe a measured beam spot and may be
22
// written; otherwise they are written as NaN.
23
constexpr
bool
positionUsable
(
int
errorCode) {
24
return
errorCode ==
kOwnEntry
|| errorCode ==
kPrecedingEntry
;
25
}
26
27
// Refuse the event when the database was never read. A successful lookup
28
// always has non-zero widths, because PSBEAM folds the beam size into them
29
// (SETBS, vdbeam.car:656-672), so code 0 with all widths zero can only be the
30
// unopened-file path. Both passes call this first thing for every event.
31
void
requireDatabase
();
32
33
}
// namespace delphi_edm4hep::beamspot
delphi_edm4hep::beamspot
Definition
BeamSpotStatus.h:17
delphi_edm4hep::beamspot::ErrorCode
ErrorCode
Definition
BeamSpotStatus.h:19
delphi_edm4hep::beamspot::kNoEntry
@ kNoEntry
Definition
BeamSpotStatus.h:19
delphi_edm4hep::beamspot::kOwnEntry
@ kOwnEntry
Definition
BeamSpotStatus.h:19
delphi_edm4hep::beamspot::kPrecedingEntry
@ kPrecedingEntry
Definition
BeamSpotStatus.h:19
delphi_edm4hep::beamspot::requireDatabase
void requireDatabase()
Definition
BeamSpotStatus.cpp:13
delphi_edm4hep::beamspot::positionUsable
constexpr bool positionUsable(int errorCode)
Definition
BeamSpotStatus.h:23
delphi_edm4hep
include
delphi_edm4hep
internal
BeamSpotStatus.h
Generated by
1.15.0