ATLAS Offline Software
Loading...
Searching...
No Matches
MissingETCompositionBase.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef XAODMISSINGET_VERSIONS_MISSINGETCOMPOSITIONBASE_H
8#define XAODMISSINGET_VERSIONS_MISSINGETCOMPOSITIONBASE_H
9
11
12#include "xAODBase/IParticle.h"
14
16#include "AthLinks/ElementLink.h"
17#include "CxxUtils/bitmask.h"
18
20
22
23#include <vector>
24#include <iterator>
25
27namespace MissingETBase
28{
29 namespace Types
30 {
49
51
58 typedef std::vector<objlink_t> objlink_vector_t;
59 typedef std::vector<const xAOD::IParticle*> object_vector_t;
61 } // namespace MissingETBase::Types
62
70 struct Status
71 {
73 enum class Reco : Types::bitmask_t {
74 Total = 0x01000000,
75 ContributedTerm = 0x02000000,
76 CorrectedTerm = 0x04000000,
77 AlternativeTerm = 0x08000000,
78 StandAlone = 0x00000000,
80 };
81
82 enum class Vertex : Types::bitmask_t {
83 Primary = 0x00100000,
84 Secondary = 0x00200000,
85 Event = 0x00010000,
86 Nominal = 0x00020000,
87 Specific = 0x00040000,
88 NoVertex = 0x00000000,
90 };
91
97 Corrected = 0x00001000,
98 Pileup = 0x00001100,
99 PileupCalo = 0x00001110,
100 PileupTrack = 0x00001120,
101 PileupSTVF = 0x00001121,
102 PileupJetVertex = 0x00001122,
103 PileupJetArea = 0x00001140,
104 NotCorrected = 0x00000000,
106 };
107
121
122 struct Tags
123 {
124 static Types::bitmask_t setPattern(Reco rec, Vertex vtx, Correction cor) { return ( rec | vtx ) | cor; }
125
126 static Types::bitmask_t total(Vertex vtx=Vertex::Nominal,Correction cor=Correction::NotCorrected) { return setPattern(Reco::Total,vtx,cor); }
130
131 template<class T>
132 static bool hasPattern(Types::bitmask_t sw, T pat) { return ( sw & pat ) == static_cast<Types::bitmask_t>(pat); }
133
134 static bool isTotal(Types::bitmask_t sw) { return hasPattern(sw,Reco::Total); }
138 }; // struct MissingETBase::Status::Tags
139 }; // struct MissingETBase::Status
140
141 namespace Container
142 {
158 template<class ITER>
159 size_t iteratorDiff(ITER first,ITER last) { return (size_t)(std::distance(first,last)); }
173 template<class ITER>
174 ITER iteratorAdvance(ITER iter,size_t step) { ITER fIter(iter); std::advance(iter,step); return fIter; }
176 } // namespace MissingETBase::Container
177
179 namespace UsageHandler
180 {
182 enum Policy {
183 AllCalo = 0x0010,
184 OnlyCluster = 0x0011,
185 OnlyTrack = 0x0012,
186 TrackCluster = 0x0014,
187 PhysicsObject = 0x0020,
188 ParticleFlow = 0x0040,
189 TruthParticle = 0x0100,
190 UnknownPolicy = 0x0000 };
191 } // namespace MissingETBase::OverlapHandler
192} // namespace MissingETBase
193#endif
194
DataVector adapter that acts like it holds const pointers.
Helpers for treating a class enum as a bitmask.
DataVector adapter that acts like it holds const pointers.
ITER iteratorAdvance(ITER iter, size_t step)
Advance an iterator by a number of steps.
size_t iteratorDiff(ITER first, ITER last)
Difference (number of steps) between two iterators.
Namespace for generally used type definitions.
std::vector< const xAOD::IParticle * > object_vector_t
Vector of object type.
uint64_t bitmask_t
Type for status word bit mask.
ElementLink< xAOD::MissingETContainer > metlink_t
Link to MissingET object.
ElementLink< xAOD::JetContainer > jetlink_t
Link to Jet object.
std::vector< objlink_t > objlink_vector_t
Vector of object links type.
ConstDataVector< xAOD::IParticleContainer > const_signal_vector_t
ElementLink< xAOD::IParticleContainer > objlink_t
Link to contributing object.
Signal usage for ambiguity resolution control.
@ AllCalo
Inclusive except tracks.
@ OnlyCluster
CaloCluster based only.
@ ParticleFlow
Particle Flow Object based.
@ TrackCluster
Both cluster and track based.
General namespace for MET EDM software.
static Types::bitmask_t contributedTerm(Vertex vtx=Vertex::Nominal, Correction cor=Correction::NotCorrected)
static bool isContributedTerm(Types::bitmask_t sw)
static Types::bitmask_t setPattern(Reco rec, Vertex vtx, Correction cor)
static Types::bitmask_t correctedTerm(Vertex vtx=Vertex::Nominal, Correction cor=Correction::Corrected)
static bool isAlternativeTerm(Types::bitmask_t sw)
static Types::bitmask_t alternativeTerm(Vertex vtx=Vertex::Nominal, Correction cor=Correction::NotCorrected)
static Types::bitmask_t total(Vertex vtx=Vertex::Nominal, Correction cor=Correction::NotCorrected)
static bool hasPattern(Types::bitmask_t sw, T pat)
static bool isStandAlone(Types::bitmask_t sw)
static bool isTotal(Types::bitmask_t sw)
Namespace for status word tags.
static const Types::bitmask_t generalHardTermTag
General hard term contribution tag.
static const Types::bitmask_t generalSummedTag
General summed MET tag.
static Types::bitmask_t contributedHardTerm()
General hard term contribution tag accessor.
Vertex
Indicator for vertex choice in MET reconstruction.
@ Primary
MET (term) is calculated with respect to primary vertex.
@ Secondary
MET (term) is calculated with respect to secondary vertex.
@ Nominal
Primary vertex is nominal vertex.
@ Event
Vertex recconstructed in event.
@ Specific
MET term is calculated with respect to object vertices.
static Types::bitmask_t clearedStatus()
Cleared term tag accessor.
static const Types::bitmask_t clearedStatusTag
General cleared term tag.
static const Types::bitmask_t generalSoftTermTag
General soft term contribution tag.
static Types::bitmask_t summedTerm()
General summed term tag accessor.
static const Types::bitmask_t generalContribTag
General contribution tag.
static Types::bitmask_t contributedTerm()
General contribution tag accesssor.
Correction
Indicator for correction.
@ Pileup
MET term is pile-up corrected.
@ PileupSTVF
STVF correction is applied.
@ PileupCalo
Calorimeter signal based pile-up correction.
@ PileupTrack
Reconstructed track based pile-up correction.
@ PileupJetArea
Jet area based pileup correction.
@ NotCorrected
No MET specific correction applied to term.
@ Corrected
Indicator for corrected MET.
@ PileupJetVertex
JVF based filter is applied.
static Types::bitmask_t contributedSoftTerm()
General soft term contribution tag accessor.
@ StandAlone
Unknown/standalone reconstruction.
@ Total
Total MET for given composition.
@ CorrectedTerm
Corrected term (replaces default contributed term.
@ ContributedTerm
Contribution to total MET.