ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ParticleJetTools
ParticleJetTools
SmallRJetPileupLabelEnum.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- c++ -*-
2
/*
3
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4
*/
5
#ifndef PARTICLEJETTOOLS_SMALLRJETPILEUPLABELENUM_H
6
#define PARTICLEJETTOOLS_SMALLRJETPILEUPLABELENUM_H
7
8
// ROOT include(s).
9
#include <TString.h>
10
11
namespace
SmallRJetPileupLabel
12
{
13
enum
TypeEnum
:
int
14
{
15
HS
= 0,
// HS match
16
MixHS
,
// multiple HS matches
17
HSPU
,
// HS and PU matches
18
ITPU
,
// In time PU match
19
MixPU
,
// Multiple PU matches
20
OOTPU
,
// Out of time PU match
21
Unknown
,
// Other
22
};
23
24
inline
int
enumToInt
(
const
TypeEnum
type
)
25
{
26
return
static_cast<
std::underlying_type_t< TypeEnum >
>
(
type
);
27
}
28
29
inline
TypeEnum
stringToEnum
(
const
TString& name)
30
{
31
#define TRY(STRING) if (name.EqualTo(#STRING, TString::kIgnoreCase)) return STRING
32
TRY
(
HS
);
33
TRY
(
MixHS
);
34
TRY
(
HSPU
);
35
TRY
(
ITPU
);
36
TRY
(
MixPU
);
37
TRY
(
OOTPU
);
38
TRY
(
Unknown
);
39
#undef TRY
40
return
Unknown
;
41
}
42
}
43
44
#endif
TRY
#define TRY(STRING)
SmallRJetPileupLabel
Definition
SmallRJetPileupLabelEnum.h:12
SmallRJetPileupLabel::stringToEnum
TypeEnum stringToEnum(const TString &name)
Definition
SmallRJetPileupLabelEnum.h:29
SmallRJetPileupLabel::TypeEnum
TypeEnum
Definition
SmallRJetPileupLabelEnum.h:14
SmallRJetPileupLabel::ITPU
@ ITPU
Definition
SmallRJetPileupLabelEnum.h:18
SmallRJetPileupLabel::MixPU
@ MixPU
Definition
SmallRJetPileupLabelEnum.h:19
SmallRJetPileupLabel::Unknown
@ Unknown
Definition
SmallRJetPileupLabelEnum.h:21
SmallRJetPileupLabel::HS
@ HS
Definition
SmallRJetPileupLabelEnum.h:15
SmallRJetPileupLabel::HSPU
@ HSPU
Definition
SmallRJetPileupLabelEnum.h:17
SmallRJetPileupLabel::MixHS
@ MixHS
Definition
SmallRJetPileupLabelEnum.h:16
SmallRJetPileupLabel::OOTPU
@ OOTPU
Definition
SmallRJetPileupLabelEnum.h:20
SmallRJetPileupLabel::enumToInt
int enumToInt(const TypeEnum type)
Definition
SmallRJetPileupLabelEnum.h:24
type
Generated on
for ATLAS Offline Software by
1.16.1