ATLAS Offline Software
Loading...
Searching...
No Matches
CombinedShapeErrorGetter.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "TMath.h"
8
9#include <iostream>
10using std::cout;
11using std::endl;
12
13using namespace LArSamples;
14
15
16std::unique_ptr<ShapeErrorData> CombinedShapeErrorGetter::shapeErrorData(unsigned int hash, CaloGain::CaloGain gain, const Residual* /*toExclude*/) const
17{
18 TVectorD offsets(32);
19 CovMatrix errors(32);
20 std::unique_ptr<ShapeErrorData> sed;
21 for (const AbsShapeErrorGetter* getter : m_getters) {
22 std::unique_ptr<const ShapeErrorData> other = getter->shapeErrorData(hash, gain);
23 if (!other) continue;
24 if (!sed)
25 sed = std::make_unique<ShapeErrorData>(*other);
26 else {
27 sed = sed->add(*other);
28 if (!sed) return nullptr;
29 }
30 }
31 return sed;
32}
std::vector< const AbsShapeErrorGetter * > m_getters
virtual std::unique_ptr< ShapeErrorData > shapeErrorData(unsigned int hash, CaloGain::CaloGain gain, const Residual *toExclude=0) const override
std::unique_ptr< ShapeErrorData > add(const ShapeErrorData &other) const