2#ifndef _ClusterSplitProbabilityContainer_H_
3#define _ClusterSplitProbabilityContainer_H_
5#include "Identifier/Identifier.h"
7#include <unordered_map>
48 constexpr int splitmask = 0x7fff;
49 prob1 = int(prob1 * splitmask)/(1.*splitmask);
50 prob2 = int(prob2 * splitmask)/(1.*splitmask);
51 std::pair<std::unordered_map<ClusterIdentifier, ProbabilityInfo>::iterator,
bool>
56 throw std::runtime_error(
"Failed to set cluster splitting probability.");
58 iter->second.updateSplitProbabilities(prob1,prob2);
62 return ret.first->second;
70 const std::unordered_map<ClusterIdentifier, ProbabilityInfo>&
81#ifndef CLIDSVC_CLASSDEF_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
unsigned int hashAndIndex() const
combined index
Container to associate Cluster with cluster splitting probabilities.
static const ProbabilityInfo & getNoSplitProbability()
void setTooBigToBeSplit(const PrepRawData *cluster)
friend class ClusterSplitProbabilityContainerCnv_p1
ProbabilityInfo & setSplitInformation(const PrepRawData *cluster, float prob1, float prob2)
const ProbabilityInfo & splitProbability(const PrepRawData *cluster) const
const std::unordered_map< ClusterIdentifier, ProbabilityInfo > & splitProbMap() const
static const ProbabilityInfo s_unset
unsigned int ClusterIdentifier
std::unordered_map< ClusterIdentifier, ProbabilityInfo > m_splitProbMap
ProbabilityInfo * getSplitProbability(const PrepRawData *cluster)
const IdentContIndex & getHashAndIndex() const
Ensure that the ATLAS eigen extensions are properly loaded.
float splitProbability1() const
float splitProbability2() const
void updateSplitProbabilities(float prob1, float prob2)
bool isTooBigToBeSplit() const
ProbabilityInfo(float prob1, float prob2)
void setSplit(bool split)