|
ATLAS Offline Software
|
Go to the documentation of this file.
48 ATH_MSG_ERROR(
"Input JVT key does not match the input jet key!");
49 return StatusCode::FAILURE;
62 const EventContext &context,
65 using namespace PufitUtils;
68 if (!inputJets.isValid())
71 return StatusCode::FAILURE;
78 return StatusCode::FAILURE;
88 return StatusCode::FAILURE;
94 CovarianceSum pileupSum;
99 std::set<const xAOD::IParticle *> hardScatterInputs;
100 std::vector<SignedKinematics> hardScatterJets;
101 std::vector<float> jetAreas;
118 hardScatterJets.push_back(*ijet);
119 jetAreas.push_back(accArea(*ijet));
120 for (
const auto &link : ijet->constituentLinks())
126 hardScatterInputs.insert(original);
128 hardScatterInputs.insert(constituent);
135 if (hardScatterJets.size() > 0)
142 bool isHS = hardScatterInputs.count(original);
144 ipart->e(), ipart->eta(), ipart->phi());
149 bool outOfRange =
false;
150 std::size_t
idx = grid.
getIndex(ipart->eta(), ipart->phi(), outOfRange);
162 double towerMean = 0;
163 double towerVariance = 0;
166 std::vector<double> means;
167 std::vector<double> variances;
168 means.reserve(jetAreas.size());
169 variances.reserve(jetAreas.size());
170 for (
float area : jetAreas)
176 std::vector<SignedKinematics> corrections =
pufit(
178 pileupSum.covariance,
184 for (std::size_t ii = 0; ii < hardScatterJets.size(); ++ii)
192 jetAreas.at(ii) *
rho, kin.
eta(), kin.
phi());
194 sum += corrections.at(ii);
201 return StatusCode::SUCCESS;
float towerArea(float eta)
Get the GCaloTower areas from their eta bins.
Bins energy deposits into a grid.
std::string contKeyFromKey(const std::string &key)
Extract the container part of key.
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.
Gaudi::Property< bool > m_useDetectorEta
SG::ReadHandleKey< xAOD::EventShape > m_rhoKey
Gaudi::Property< float > m_constraintImportance
The relative constraint importance.
Gaudi::Property< float > m_centralEta
std::size_t getIndex(double eta, double phi, bool &outOfRange) const
Get the index for the given eta, phi values.
Helper class to provide constant type-safe access to aux data.
Gaudi::Property< std::size_t > m_nPhiBins
double getSigma(const SignedKinematics &kin) const
Calculate the estimate on the variance of a tower.
Class providing the definition of the 4-vector interface.
Some common helper functions used by decoration handles.
double absPt() const
unsigned pt
MHTPufitFex(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Property< float > m_jvtCut
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Gaudi::Property< float > m_forwardPt
double phiWidth() const
The bin width in phi.
Gaudi::Property< bool > m_jetCalibIncludesAreaSub
Gaudi::Property< float > m_caloStoch
The coefficient of the stochastic term in the calo resolution estimate.
Class to describe the kinematics of an object that can have negative energies.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Gaudi::Property< float > m_maxPt
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_inputJvtKey
The input JVT decoration.
Gaudi::Property< float > m_minPt
Describes a single element of the grid.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode fillMET(xAOD::TrigMissingET &met, const EventContext &context, MonGroupBuilder &monitors) const override
Calculate and fill the output MET value.
void fillMETComponent(std::size_t idx, xAOD::TrigMissingET &met) const
Fill a component of the MET with this.
static SignedKinematics fromEnergyEtaPhi(double energy, double eta, double phi)
Factory function to construct from energy, eta, phi (massless)
StatusCode initializeBase(const std::vector< std::string > &componentNames)
Initialize the base class.
Helper struct to build up MET values before moving them into the EDM.
void unmaskedMeanAndVariance(const PufitGrid &grid, double &mean, double &variance)
Calculate the mean and variance of unmasked towers.
Gaudi::Property< float > m_caloNoise
The coefficient of the noise term in the calo resolution estimate.
#define ATH_MSG_WARNING(x)
Class holding the Missing ET trigger fex results.
virtual StatusCode initialize() override
Initialize the fex.
Gaudi::Property< std::size_t > m_nEtaBins
The number of bins in eta.
Gaudi::Property< float > m_maxEta
The eta range of the grid.
SG::ReadHandleKey< xAOD::JetContainer > m_inputJetsKey
Input objects.
Handle class for reading a decoration on an object.
const IParticle * getOriginalObject(const IParticle ©)
This function can be used to conveniently get a pointer back to the original object from which a copy...
Handle class for reading from StoreGate.
void mask(bool value=true)
Set the mask on this tower.
double etaWidth() const
The bin width in eta.
SG::ReadHandleKey< xAOD::IParticleContainer > m_inputKey
The input clusters or PFOs.
double eta() const
Direction.