|
ATLAS Offline Software
|
Go to the documentation of this file.
35 return StatusCode::SUCCESS;
40 return StatusCode::SUCCESS;
49 CHECK(h_caloClusters.isValid());
50 ATH_MSG_DEBUG(
"Read in " << h_caloClusters->size() <<
" clusters");
51 const auto& caloClusters = *h_caloClusters;
58 return StatusCode::SUCCESS;
63 const EventContext& context)
const {
72 for (
const auto* cluster : caloClusters ) {
73 grid += SignedKinematics::fromEtEtaPhi(cluster->et(), cluster->eta(), cluster->phi() );
89 std::vector<SignedKinematics> masked;
93 masked.push_back(tower);
124 auto METObj = std::make_unique<xAOD::EnergySumRoI>();
127 METObj->setEnergyX(
sum.mpx);
128 METObj->setEnergyY(
sum.mpy);
129 METObj->setEnergyT(
sum.met());
131 h_outputMET = std::move(METObj);
135 return StatusCode::SUCCESS;
Bins energy deposits into a grid.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
Eigen::VectorXd pufit(const Eigen::Vector2d &pileupSum, const Eigen::Matrix2d &pileupCovariance, const Eigen::VectorXd &towerExpectations, const Eigen::VectorXd &towerVariances, const Eigen::VectorXd &correctionDirections, double constraintImportance)
Perform the pile-up fit.
constexpr float caloResSqrtTerm
Eigen::Vector2d sum
The sum.
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
SG::WriteHandleKey< xAOD::EnergySumRoI > m_outputMETPufitKey
Eigen::Matrix2d covariance
The covariance matrix.
Helper struct to hold the sum over pileup objects and its covariance.
GepMETPufitAlg(const std::string &name, ISvcLocator *pSvcLocator)
constexpr float caloResFloor
An algorithm that can be simultaneously executed in multiple threads.
constexpr std::size_t nEtaBins
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Auxiliary store for an EnergySum RoI object.
Class to describe the kinematics of an object that can have negative energies.
::StatusCode StatusCode
StatusCode definition for legacy code.
Describes a single element of the grid.
StatusCode PufitMET(const xAOD::CaloClusterContainer &, float inputSigma, const EventContext &) const
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual ~GepMETPufitAlg()
virtual StatusCode finalize() override
virtual StatusCode execute(const EventContext &) const override
void trimmedMeanAndVariance(const std::vector< double > &sorted, double trimFraction, double &mean, double &variance)
Calculate the trimmed mean and variance for a vector of tower sumEts.
Helper struct to build up MET values before moving them into the EDM.
Provide a base class for the grids used in some pufit algorithms.
constexpr float trimFactor
CovarianceSum & add(const SignedKinematics &kin, double sigma)
Add a new contribution to the sum.
Parameters describing a grid.
virtual StatusCode initialize() override
constexpr float constraintWeight
constexpr std::size_t nPhiBins
virtual void setFilterPassed(bool state, const EventContext &ctx) const