|
ATLAS Offline Software
|
Go to the documentation of this file.
37 return StatusCode::SUCCESS;
49 CHECK(h_outputJets.
record(std::make_unique<xAOD::JetContainer>(),
50 std::make_unique<xAOD::JetAuxContainer>()));
54 CHECK(h_caloClusters.isValid());
55 ATH_MSG_DEBUG(
"Read in " << h_caloClusters->size() <<
" clusters");
57 const auto&
clusters = *h_caloClusters;
61 std::vector<Gep::Cluster> gepClusters;
64 std::back_inserter(gepClusters),
65 [](
const auto& cluster){
66 return Gep::Cluster(cluster->p4());});
71 std::unique_ptr<Gep::IJetMaker> jetMaker{};
82 CHECK(h_seeds.isValid());
88 return StatusCode::FAILURE;
93 std::vector<Gep::Jet> gepJets = jetMaker->makeJets( gepClusters );
99 if( gepJets.empty() ){
100 return StatusCode::SUCCESS;
104 for(
const auto& gjet: gepJets){
106 std::unique_ptr<xAOD::Jet> xAODJet{
new xAOD::Jet()};
112 h_outputJets->
push_back(std::move(xAODJet));
115 p4.SetPt(gjet.vec.Pt());
116 p4.SetEta(gjet.vec.Eta());
117 p4.SetPhi(gjet.vec.Phi());
118 p4.SetM(gjet.vec.M());
127 for (
const auto&
i: gjet.constituentsIndices) {
133 return StatusCode::SUCCESS;
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetsKey
GepJetAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< xAOD::JetContainer > m_outputGepJetsKey
virtual StatusCode initialize() override
An algorithm that can be simultaneously executed in multiple threads.
void setJetP4(const JetFourMom_t &p4)
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode execute(const EventContext &) const override
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void addConstituent(const ElementLink< IParticleContainer > &link, float weight=1.0)
Add a constituent directly in the ElementLink format.
void setAttribute(const std::string &name, const T &v)
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Gaudi::Property< std::string > m_jetAlgName
Jet_v1 Jet
Definition of the current "jet version".