![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "GaudiKernel/ITHistSvc.h"
22 #include "GaudiKernel/SystemOfUnits.h"
35 m_treeFolder(
"/calibration/"),
36 m_treeDescription(
"Calibration Ntuple"),
37 m_truthJetContainerName(
"MyAntiKt10TruthJets"),
38 m_vertexContainerName(
"PrimaryVertices"),
40 m_recoIsoPtCut(100.*
GeV),
42 m_trueIsoPtCut(100.*
GeV),
47 m_etaDetCalo(nullptr),
52 m_etaDetCorr(nullptr),
85 return StatusCode::FAILURE;
90 return StatusCode::SUCCESS;
133 ITHistSvc* tHistSvc =
nullptr;
134 if (service(
"THistSvc",tHistSvc).isFailure()) {
135 ATH_MSG_ERROR(
"initialize() Could not find Hist Service!" );
136 return StatusCode::FAILURE;
142 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree!" );
143 return StatusCode::FAILURE;
153 return StatusCode::FAILURE;
156 ATH_MSG_INFO(
"Calibration Tree booked and registered successfully!");
158 return StatusCode::SUCCESS;
170 float ev_weight =
evt->mcEventWeight();
173 if (not truths)
return StatusCode::FAILURE;
176 if (not vertices)
return StatusCode::FAILURE;
179 float mu=
evt->averageInteractionsPerCrossing();
184 for (
const auto&
vertex : *vertices) {
185 if (
vertex->nTrackParticles()>=2)
190 const auto *
const jets = getContainer<xAOD::JetContainer>(
name);
208 for (
const auto& truth: *truths) {
212 std::vector<const xAOD::Jet*>
matched = {};
217 if (Nmatches==0)
continue;
262 return StatusCode::SUCCESS;
273 double dr = truth->
p4().DeltaR(
jets->at(
ind)->p4());
293 for (
const auto&
jet : *
jets) {
295 double Dr = myjet->
p4().DeltaR(
jet->p4());
306 const auto& partLinks =
jet->constituentLinks();
309 if (not link.isValid()) {
317 float det_eta = tcc->
eta();
320 det_eta = acc_detEta(*tcc);
322 ATH_MSG_WARNING(
"DetectorEta decoration not found for TCCs! Using eta...");
324 double pt = tcc->
p4().P()/cosh(det_eta);
327 p4CorrCl.SetPtEtaPhiE(
pt, det_eta, tcc->
p4().Phi(), tcc->
p4().E());
328 if(tcc->
p4().E() < 0.) p4CorrCl*=-1.;
358 return StatusCode::SUCCESS;
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Class describing a TrackCaloCluster.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
TLorentzVector FourMom_t
Definition of the 4-momentum type.
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual FourMom_t p4() const
The full 4-momentum of the particle.
#define ATH_MSG_WARNING(x)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)