 |
ATLAS Offline Software
|
Go to the documentation of this file.
38 return StatusCode::SUCCESS;
50 CHECK(h_outputJets.
record(std::make_unique<xAOD::JetContainer>(),
51 std::make_unique<xAOD::JetAuxContainer>()));
55 CHECK(h_caloClusters.isValid());
56 ATH_MSG_DEBUG(
"Read in " << h_caloClusters->size() <<
" clusters");
58 const auto&
clusters = *h_caloClusters;
62 std::vector<Gep::Cluster> gepClusters;
65 std::back_inserter(gepClusters),
66 [](
const auto& cluster){
67 return Gep::Cluster(cluster->p4());});
72 std::unique_ptr<Gep::IJetMaker> jetMaker{};
83 CHECK(h_seeds.isValid());
89 auto WTAConeJetMaker = std::make_unique<Gep::WTAConeJetMaker>();
93 WTAConeJetMaker->m_GEPWTAParameters.SetJet_dR2(
m_WTAJet_dR2);
94 WTAConeJetMaker->m_GEPWTAParameters.SetIso_dR2(
m_WTAJet_dR2);
99 WTAConeJetMaker->SetSeedCleaningAlgo(0);
102 jetMaker = std::move(WTAConeJetMaker);
106 return StatusCode::FAILURE;
111 std::vector<Gep::Jet> gepJets = jetMaker->makeJets( gepClusters );
117 if( gepJets.empty() ){
118 return StatusCode::SUCCESS;
122 for(
const auto& gjet: gepJets){
124 std::unique_ptr<xAOD::Jet> xAODJet{
new xAOD::Jet()};
130 h_outputJets->
push_back(std::move(xAODJet));
133 p4.SetPt(gjet.vec.Pt());
134 p4.SetEta(gjet.vec.Eta());
135 p4.SetPhi(gjet.vec.Phi());
136 p4.SetM(gjet.vec.M());
145 for (
const auto&
i: gjet.constituentsIndices) {
151 return StatusCode::SUCCESS;
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetsKey
Gaudi::Property< float > m_WTAJet_dR2
Gaudi::Property< unsigned int > m_WTAMaxSeedSortingN
GepJetAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< xAOD::JetContainer > m_outputGepJetsKey
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_WTASeedCleaningName
Gaudi::Property< unsigned int > m_WTAMaxConstN
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< unsigned int > m_WTABlockN
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.
Gaudi::Property< float > m_WTAConstEtCut
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< float > m_WTASeedEtCut
Gaudi::Property< std::string > m_jetAlgName
Jet_v1 Jet
Definition of the current "jet version".