|
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 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
139 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree!" );
140 return StatusCode::FAILURE;
150 return StatusCode::FAILURE;
153 ATH_MSG_INFO(
"Calibration Tree booked and registered successfully!");
155 return StatusCode::SUCCESS;
167 float ev_weight =
evt->mcEventWeight();
170 if (not truths)
return StatusCode::FAILURE;
173 if (not vertices)
return StatusCode::FAILURE;
176 float mu=
evt->averageInteractionsPerCrossing();
181 for (
const auto vertex : *vertices) {
182 if (
vertex->nTrackParticles()>=2)
187 const auto *
const jets = getContainer<xAOD::JetContainer>(
name);
205 for (
const auto truth: *truths) {
209 std::vector<const xAOD::Jet*>
matched = {};
214 if (Nmatches==0)
continue;
259 return StatusCode::SUCCESS;
270 double dr = truth->
p4().DeltaR(
jets->at(
ind)->p4());
292 double Dr = myjet->
p4().DeltaR(
jet->p4());
303 const auto& partLinks =
jet->constituentLinks();
306 if (not link.isValid()) {
314 float det_eta = tcc->
eta();
317 det_eta = acc_detEta(*tcc);
319 ATH_MSG_WARNING(
"DetectorEta decoration not found for TCCs! Using eta...");
321 double pt = tcc->
p4().P()/cosh(det_eta);
324 p4CorrCl.SetPtEtaPhiE(
pt, det_eta, tcc->
p4().Phi(), tcc->
p4().E());
325 if(tcc->
p4().E() < 0.) p4CorrCl*=-1.;
355 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)