 |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef COLUMNAR_MET_MET_ASSOCIATION_H
9 #define COLUMNAR_MET_MET_ASSOCIATION_H
29 template<
typename IteratorType,
class FunctionType>
32 template<
typename IteratorType,
class FunctionType>
58 template<
typename IteratorType,
class FunctionType>
61 friend class FilterRangeIterator<IteratorType,FunctionType>;
106 static constexpr std::size_t
invalidIndex = MissingETBase::Constants::invalidIndex;
109 :
calpx (columnarBase,
"calpx"),
110 calpy (columnarBase,
"calpy"),
111 calpz (columnarBase,
"calpz"),
112 cale (columnarBase,
"cale"),
113 calsumpt (columnarBase,
"calsumpt"),
115 trkpx (columnarBase,
"trkpx"),
116 trkpy (columnarBase,
"trkpy"),
117 trkpz (columnarBase,
"trkpz"),
118 trke (columnarBase,
"trke"),
119 trksumpt (columnarBase,
"trksumpt"),
121 jettrkpx (columnarBase,
"jettrkpx"),
122 jettrkpy (columnarBase,
"jettrkpy"),
123 jettrkpz (columnarBase,
"jettrkpz"),
124 jettrke (columnarBase,
"jettrke"),
127 jetLink (columnarBase,
"jetLink"),
128 isMisc (columnarBase,
"isMisc"),
186 return cale(assoc).size();}
196 template<ContainerIdConcept CI>
199 for (
size_t iKey = 0; iKey < this->
sizeCal(assoc); iKey++) {
201 totalvec+=this->
calVec(assoc, iKey);
213 return trke(assoc).size();}
223 template<ContainerIdConcept CI>
226 for (
size_t iKey = 0; iKey < this->
sizeTrk(assoc); iKey++) {
228 totalvec+=this->
trkVec(assoc,iKey);
233 for (
size_t iKey = 0; iKey < this->
sizeTrk(assoc); iKey++) {
235 totalvec+=this->
trkVec(assoc,iKey);
262 if (objIdx ==
invalidIndex)
return std::span<const std::size_t>();
264 return objIdx <
indices.size() ?
indices[objIdx] : std::span<const std::size_t>(); }
267 if (objIdx ==
invalidIndex)
return std::span<const unsigned char>();
269 return objIdx < types.size() ? types[objIdx] : std::span<const unsigned char>(); }
273 template<ContainerIdConcept CI>
294 if (
isMisc(assoc))
return false;
296 if (!
refJet)
return false;
307 for (
size_t iKey = 0; iKey <
sizeCal(assoc); iKey++)
if (
mask &
calkey(assoc)[iKey]) newpt +=
calVec(assoc,iKey);
308 newvec.SetPxPyPzE(newpt.
cpx(),newpt.
cpy(),newpt.
cpz(),newpt.
ce());
328 for (
auto assocIter = map.rbegin(); assocIter != map.rend(); ++assocIter)
340 template<
typename CM>
class MetAssociationHelper
final
357 static constexpr std::size_t
invalidIndex = MissingETBase::Constants::invalidIndex;
373 throw std::logic_error (
"can't call xAOD function in columnar mode");}
386 template<ContainerIdConcept CI>
397 if (objIdx >=
sizeof(
bitmask_t)*8)
return false;
403 template<ContainerIdConcept CI>
423 if (objIdx >=
sizeof(
bitmask_t)*8)
return;
431 template<ContainerIdConcept CI>
445 auto types =
m_accessors->overlapTypes(assocId, objIdx);
446 for(
size_t iOL=0; iOL<
indices.size(); ++iOL) {
463 if(types[iOL] & 1) {
break;}
480 bool overlaps(
false);
482 if (overlaps)
return false;
496 for (
auto assoc :
m_map) {
501 return std::nullopt;}
505 template<ContainerIdConcept CI>
512 return (accessors->findIndex(assoc,pPart) != invalidIndex);});}
536 for (
size_t iKey = 0; iKey <
m_accessors->sizeCal(assoc); iKey++) {
544 for (
size_t iKey = 0; iKey <
m_accessors->sizeTrk(assoc); iKey++) {
570 template<
typename CM>
577 template<
typename CM>
FilterRange(const FilterRange &)=default
const FilterRange< IteratorType, FunctionType > * m_range
auto begin() const noexcept
bool operator!=(const FilterRangeIterator &that) const noexcept
@ TruthParticle
Truth particle based.
std::pair< long int, long int > indices
static double ceError()
Access error return value for constituent vector .
FilterRange(IteratorType begin, IteratorType end, FunctionType &&filter)
void setObjSelectionFlag(const MissingETAssociation_v1 *assoc, size_t objIdx, bool status)
Flag object as selected for MET calculation.
FilterRange(FilterRange &&)=default
FilterRange implements the range (ie: [min, max]) the filters will use to take their filtering decisi...
static double cpxError()
Access error return value for constituent vector .
a class representing a single optional object (electron, muons, etc.)
static double sumptError()
Access error return value for constituent vector sumpt.
bool const RAWDATA *ch2 const
uint64_t bitmask_t
Type for status word bit mask.
@ OnlyCluster
CaloCluster based only.
Class providing the definition of the 4-vector interface.
a class representing a continuous sequence of objects (a.k.a. a container)
friend class FilterRangeIterator< IteratorType, FunctionType >
Vector sum of constituents for subtractive overlap removal.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
static double cpzError()
Access error return value for constituent vector .
bool empty() const noexcept
float cpy() const
Returns .
xAOD::MissingETAssociation_v1::ConstVec constvec_t
Type for constituent vector.
@ ParticleFlow
The object is a particle-flow object.
auto operator*() const noexcept
@ TrackCluster
Both cluster and track based.
float cpz() const
Returns .
Policy
Policies on usage checks.
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
a class representing a single object (electron, muons, etc.)
FilterRange & operator=(FilterRange &&)=default
@ AllCalo
Inclusive except tracks.
static double cpyError()
Access error return value for constituent vector .
@ OnlyTrack
Track based only.
ObjectId< ContainerId::particle > ParticleId
bool objSelected(const MissingETAssociation_v1 *assoc, size_t objIdx) const
Test if object is selected for MET calculation.
@ ParticleFlow
Particle Flow Object based.
the raw column accessor template class
float cpx() const
Returns .
auto end() const noexcept
MissingETBase::Types::bitmask_t getObjSelectionFlags(const MissingETAssociation_v1 *assoc) const
Return object selection bitmask for the given association.
setBGCode setTAP setLVL2ErrorBits bool
a simple range adaptor that filters the elements of a range
float ce() const
Returns .
an accessor that allows to access the xAOD object type of an input object
FilterRangeIterator(const IteratorType &val_iterator, const FilterRange< IteratorType, FunctionType > *val_range) noexcept
bool operator==(const FilterRangeIterator &that) const noexcept
FilterRangeIterator & operator++() noexcept