ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
JetClustererByVertex Class Reference

#include <JetClustererByVertex.h>

Inheritance diagram for JetClustererByVertex:
Collaboration diagram for JetClustererByVertex:

Public Member Functions

 JetClustererByVertex (const std::string &name)
 
StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > getJets () const override
 Return the final jets with their aux store. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
StatusCode getAndRecordJets (SG::WriteHandle< xAOD::JetContainer > &jetHandle) const
 Method to allow the client to pass in a WriteHandle for the container and aux container to be recorded, while the client remains free to modify the output but does not need to know the type of the aux container. More...
 
virtual StatusCode initWithOutput (const SG::WriteHandleKey< xAOD::JetContainer > &)
 Method to allow the client to pass in a WriteHandle during initialisation, in case this is needed for anything... More...
 

Protected Member Functions

fastjet::AreaDefinition buildAreaDefinition (bool &seedsok) const
 Build the area definition when running with area calculation. The seedsok flag is set to false when error occurs when retrieving event/run number to initiate the seeds. More...
 
std::unique_ptr< fastjet::ClusterSequence > buildClusterSequence (const PseudoJetVector *pseudoJetvector) const
 Used to create the cluster sequence. More...
 
void processPseudoJet (const fastjet::PseudoJet &pj, const PseudoJetContainer &pjCont, xAOD::JetContainer *jets, const xAOD::Vertex *vertex) const
 translate to xAOD::Jet More...
 
bool isVariableR () const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventinfokey {"EventInfo"}
 Handle to EventInfo. This is used to get the evt&run number to set the Ghost area random seeds. More...
 
SG::ReadHandleKey< PseudoJetContainerm_inputPseudoJets {this, "InputPseudoJets", "inputpseudojet", "input constituents"}
 Handle Input PseudoJetContainer. More...
 
SG::WriteHandleKey< PseudoJetVectorm_finalPseudoJets {this, "FinalPseudoJets_DONOTSET", "", "output pseudojets -- autoconfigured name"}
 used to build the key under which the final PJ will be stored in evtStore() More...
 
SG::WriteHandleKey< jet::ClusterSequencem_clusterSequence {this, "ClusterSequence_DONOTSET", "", "output pseudojets -- autoconfigured name"}
 
Gaudi::Property< std::string > m_jetRank {this, "jetRankName", "jetRank", "name for accessor for jet rank"}
 
Gaudi::Property< std::string > m_jetalg {this, "JetAlgorithm", "AntiKt", "alg type : AntiKt, Kt, CA..."}
 
Gaudi::Property< float > m_jetrad {this, "JetRadius", 0.4 , "jet size parameter"}
 
Gaudi::Property< float > m_ptmin {this, "PtMin", 0.0, "pT min in MeV"}
 
Gaudi::Property< float > m_ghostarea {this, "GhostArea", 0.0, "Area for ghosts. 0==>no ghosts."}
 
Gaudi::Property< int > m_ranopt {this, "RandomOption", 1, "Rand option: 0=fj default, 1=run/event"}
 
Gaudi::Property< int > m_inputType {this, "JetInputType", 0, "input type as in xAOD::JetInput (see xAODJet/JetContainerInfo.h)"}
 
fastjet::JetAlgorithm m_fjalg
 
bool m_useArea
 
Gaudi::Property< float > m_minrad {this, "VariableRMinRadius", -1.0, "Variable-R min radius" }
 
Gaudi::Property< float > m_massscale {this, "VariableRMassScale", -1.0, "Variable-R mass scale" }
 
bool m_isVariableR
 
SG::AuxElement::Accessor< int > m_jetRankAccessor
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::VertexContainerm_vertexContainer_key {this, "VertexContainer", "PrimaryVertices", "SG key for input vertex container"}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 43 of file JetClustererByVertex.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetClustererByVertex()

JetClustererByVertex::JetClustererByVertex ( const std::string &  name)

Definition at line 26 of file JetClustererByVertex.cxx.

26 : JetClusterer(myname) {}

Member Function Documentation

◆ buildAreaDefinition()

fastjet::AreaDefinition JetClusterer::buildAreaDefinition ( bool &  seedsok) const
protectedinherited

Build the area definition when running with area calculation. The seedsok flag is set to false when error occurs when retrieving event/run number to initiate the seeds.

Definition at line 271 of file JetClusterer.cxx.

272 {
273 
274  fastjet::GhostedAreaSpec gspec(5.0, 1, m_ghostarea);
275  seedsok = true;
276  std::vector<int> seeds;
277 
278  if (m_ranopt == 1)
279  {
280  // Use run/event number as random number seeds.
281  auto evtInfoHandle = SG::makeHandle(m_eventinfokey);
282  if (!evtInfoHandle.isValid())
283  {
284  ATH_MSG_ERROR("Unable to retrieve event info");
285  seedsok = false;
286  return {};
287  }
288 
289  JetClustererHelper::seedsFromEventInfo(evtInfoHandle.cptr(), seeds);
290  }
291 
292  ATH_MSG_DEBUG("Active area specs:");
293  ATH_MSG_DEBUG(" Requested ghost area: " << m_ghostarea);
294  ATH_MSG_DEBUG(" Actual ghost area: " << gspec.actual_ghost_area());
295  ATH_MSG_DEBUG(" Max eta: " << gspec.ghost_etamax());
296  ATH_MSG_DEBUG(" # ghosts: " << gspec.n_ghosts());
297  ATH_MSG_DEBUG(" # rapidity bins: " << gspec.nrap());
298  ATH_MSG_DEBUG(" # phi bins: " << gspec.nphi());
299 
300  if (seeds.size() == 2)
301  {
302  ATH_MSG_DEBUG(" Random seeds: " << seeds[0] << ", " << seeds[1]);
303  }
304  else
305  {
306  ATH_MSG_WARNING("Random generator size is not 2: " << seeds.size());
307  ATH_MSG_DEBUG(" Random seeds: ");
308  for (auto seed : seeds)
309  ATH_MSG_DEBUG(" " << seed);
310  }
311 
312  // We use with_fixed_seed() as recommended for thread safety in
313  // fastjet 3.4.0.
314  return fastjet::AreaDefinition(fastjet::active_area,
315  gspec)
316  .with_fixed_seed(seeds);
317 }

◆ buildClusterSequence()

std::unique_ptr< fastjet::ClusterSequence > JetClusterer::buildClusterSequence ( const PseudoJetVector pseudoJetvector) const
protectedinherited

Used to create the cluster sequence.

Definition at line 91 of file JetClusterer.cxx.

92 {
93 
94  fastjet::JetDefinition jetdef(m_fjalg, m_jetrad);
95  using fastjet::contrib::VariableRPlugin;
96  std::unique_ptr<VariableRPlugin> VRJetPlugin(nullptr);
97 
98  if (m_isVariableR)
99  {
100  /* clustering algorithm
101  * They correspond to p parameter of Sequential recombination algs
102  * AKTLIKE = -1, CALIKE = 0, KTLIKE = 1
103  */
104  VariableRPlugin::ClusterType VRClusterType = VariableRPlugin::AKTLIKE;
105  switch (m_fjalg)
106  {
108  VRClusterType = VariableRPlugin::KTLIKE;
109  break;
111  VRClusterType = VariableRPlugin::AKTLIKE;
112  break;
114  VRClusterType = VariableRPlugin::CALIKE;
115  break;
116  default:
117  ATH_MSG_ERROR("Unsupported clustering algorithm for Variable-R jet finding.");
118  return nullptr;
119  }
120  VRJetPlugin = std::make_unique<VariableRPlugin>(m_massscale, m_minrad, m_jetrad, VRClusterType, false);
121  jetdef = fastjet::JetDefinition(VRJetPlugin.get());
122  }
123 
124  std::unique_ptr<fastjet::ClusterSequence> clSequence(nullptr);
125 
126  if (m_useArea)
127  {
128  // Prepare ghost area specifications -------------
129  ATH_MSG_DEBUG("Creating input area cluster sequence");
130  bool seedsok = true;
131  fastjet::AreaDefinition adef = buildAreaDefinition(seedsok);
132 
133  if (seedsok)
134  {
135  clSequence = std::make_unique<fastjet::ClusterSequenceArea>(*pseudoJetVector, jetdef, adef);
136  }
137  else
138  {
139  return nullptr;
140  }
141  }
142  else
143  {
144  ATH_MSG_DEBUG("Creating input cluster sequence");
145  clSequence = std::make_unique<fastjet::ClusterSequence>(*pseudoJetVector, jetdef);
146  }
147 
148  return clSequence;
149 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getAndRecordJets()

StatusCode JetProvider< xAOD::JetAuxContainer >::getAndRecordJets ( SG::WriteHandle< xAOD::JetContainer > &  jetHandle) const
inlinevirtualinherited

Method to allow the client to pass in a WriteHandle for the container and aux container to be recorded, while the client remains free to modify the output but does not need to know the type of the aux container.

Every class derived from IJetProvider needs to implement the record, providing the explicit type – we should give StoreGate maximal information rather than recording AuxContainerBase

The recommended solution is for the concrete tool to inherit from the templated JetProvider class provided below.

Implements IJetProvider.

Definition at line 81 of file IJetProvider.h.

81  {
82  std::unique_ptr<xAOD::JetContainer> jets(nullptr);
83  std::unique_ptr<SG::IAuxStore> auxCont(nullptr);
84  std::tie(jets, auxCont) = getJets();
85  if(jets.get()==nullptr || auxCont.get()==nullptr) {return StatusCode::FAILURE;}
86 
87  // Convert the aux container pointer to the known base class
88  std::unique_ptr<CONCRETEAUX> auxCont_derived(static_cast<CONCRETEAUX*>(auxCont.release()));
89 
90  // Write out JetContainer and JetAuxContainer
91  return jetHandle.record(std::move(jets), std::move(auxCont_derived));
92  }

◆ getJets()

std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > JetClustererByVertex::getJets ( ) const
overridevirtual

Return the final jets with their aux store.

Can return a pair of null pointers if an error occurs.

Reimplemented from JetClusterer.

Definition at line 36 of file JetClustererByVertex.cxx.

37 {
38  // Return this in case of any problems
39  auto nullreturn = std::make_pair(std::unique_ptr<xAOD::JetContainer>(nullptr), std::unique_ptr<SG::IAuxStore>(nullptr));
40 
41  // -----------------------
42  // retrieve input
44  if (!pjContHandle.isValid())
45  {
46  ATH_MSG_ERROR("No valid PseudoJetContainer with key " << m_inputPseudoJets.key());
47  return nullreturn;
48  }
49 
50  // Get reco vertices
52  const xAOD::VertexContainer *vertices = vertexHandle.cptr();
53  unsigned numVertices = vertices->size();
54  ATH_MSG_DEBUG("Retrieved vertex container for by-vertex clustering");
55 
56  // Build the container to be returned
57  // Avoid memory leaks with unique_ptr
58  auto jets = std::make_unique<xAOD::JetContainer>();
59  auto auxCont = std::make_unique<xAOD::JetAuxContainer>();
60  jets->setStore(auxCont.get());
61 
62  // Create a copy of the PseudoJet container that we modify for each vertex
63  // There is no valid copy constructor, but can use the `append` method instead
64  PseudoJetContainer pjContCopy;
65  pjContCopy.append(pjContHandle.cptr());
66 
67  // The pointer to the PseudoJetVector (non-const) that we can modify for each iteration
68  PseudoJetVector *inputPseudoJetVector = pjContCopy.casVectorPseudoJet();
69  // We need to keep a copy of the original vector, otherwise we will lose information
70  const PseudoJetVector cachedPseudoJetVector(*inputPseudoJetVector);
71 
72  ATH_MSG_DEBUG("Pseudojet input container has size " << inputPseudoJetVector->size());
73 
74  std::unique_ptr<fastjet::ClusterSequence> clSequence = std::make_unique<fastjet::ClusterSequence>();
75 
76  std::unique_ptr<PseudoJetVector> outputPseudoJetVector = std::make_unique<PseudoJetVector>();
77 
78  for (unsigned int iVertex{0}; iVertex < numVertices; iVertex++)
79  {
80  const xAOD::Vertex *vertex = vertices->at(iVertex);
81 
82  for (unsigned int iJet{0}; iJet < inputPseudoJetVector->size(); iJet++)
83  {
84  fastjet::PseudoJet &pseudoJet = inputPseudoJetVector->at(iJet);
85  // Check if pseudoJet has VertexIndexedConstituentUserInfo
86  if (pseudoJet.has_user_info<jet::VertexIndexedConstituentUserInfo>())
87  {
89  const xAOD::Vertex *originVertex = userInfo.vertex();
90  // Reset state
91  pseudoJet = cachedPseudoJetVector.at(iJet);
92  if (originVertex != vertex)
93  {
94  // pseudoJet should not affect this vertex iteration
95  // nullify its four-momentum
96  pseudoJet *= 1e-12;
97  }
98  else
99  {
100  // Do nothing -- this is the correct vertex
101  ATH_MSG_VERBOSE("Constituent found with pT = " << pseudoJet.pt() << " belonging to vertex index: " << userInfo.vertex()->index());
102  }
103  }
104  // Else we expect this to be a ghost, so do nothing
105  }
106  std::unique_ptr<fastjet::ClusterSequence> clSequenceByVertex = buildClusterSequence(inputPseudoJetVector);
107  if (!clSequenceByVertex)
108  return nullreturn;
109 
110  // -----------------------
111  // Build a new pointer to a PseudoJetVector containing the final PseudoJet
112  // This allows us to own the vector of PseudoJet which we will put in the evt store.
113  // Thus the contained PseudoJet will be kept frozen there and we can safely use pointer to them from the xAOD::Jet objects
114 
115  auto outputPseudoJetVectorByVertex = std::make_unique<PseudoJetVector>(fastjet::sorted_by_pt(clSequenceByVertex->inclusive_jets(m_ptmin)));
116  if (msgLvl(MSG::VERBOSE))
117  {
118  for (const auto &pj : *outputPseudoJetVectorByVertex)
119  {
120  msg() << " Pseudojet with pt " << std::setprecision(4) << pj.Et() * 1e-3 << " has " << pj.constituents().size() << " constituents" << endmsg;
121  }
122  }
123 
124  // No PseudoJets, so there's nothing else to do
125  // Delete the cluster sequence before we go
126  if (!outputPseudoJetVectorByVertex->empty())
127  {
128  for (const fastjet::PseudoJet &pj : *outputPseudoJetVectorByVertex)
129  {
130  processPseudoJet(pj, pjContCopy, jets.get(), vertex);
131  }
132  }
133  ATH_MSG_DEBUG("For vertex index " << iVertex << ", total reconstructed jet count so far: " << jets->size() << " clusterseq=" << clSequenceByVertex.get());
134 
135  // Copy the contents of pjVectorByVertex into pjVector
136  for (const fastjet::PseudoJet &pj : *outputPseudoJetVectorByVertex)
137  {
138  outputPseudoJetVector->emplace_back(pj);
139  }
140 
141  // We want to add the clSequence from this vertex to the total one
142  // TODO: how to best achieve this?
143  // Looks like this will simply delete the old sequence..
144  // clSequence->transfer_from_sequence(*clSequenceByVertex);
145  }
146 
147  if (!outputPseudoJetVector->empty())
148  {
149  // -------------------------------------
150  // record final PseudoJetVector
152  if (!pjVectorHandle.record(std::move(outputPseudoJetVector)))
153  {
154  ATH_MSG_ERROR("Can't record PseudoJetVector under key " << m_finalPseudoJets);
155  return nullreturn;
156  }
157  // -------------------------------------
158  // record ClusterSequences vector
160  if (!clusterSeqHandle.record(std::move(clSequence)))
161  {
162  ATH_MSG_ERROR("Can't record ClusterSequence under key " << m_clusterSequence);
163  return nullreturn;
164  }
165  }
166 
167  // Return the jet container and aux, use move to transfer
168  // ownership of pointers to caller
169  return std::make_pair(std::move(jets), std::move(auxCont));
170 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode JetClustererByVertex::initialize ( )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from JetClusterer.

Definition at line 28 of file JetClustererByVertex.cxx.

29 {
31  ATH_CHECK(m_vertexContainer_key.initialize());
32 
33  return StatusCode::SUCCESS;
34 }

◆ initWithOutput()

virtual StatusCode IJetProvider::initWithOutput ( const SG::WriteHandleKey< xAOD::JetContainer > &  )
inlinevirtualinherited

Method to allow the client to pass in a WriteHandle during initialisation, in case this is needed for anything...

The main (only?) use case is for copying jets, and propagating any decorations already on the original to the copy in StoreGate

Quietly return success in the general case – the JetRecAlg will always call this, so as to remain agnostic as to the concrete type.

Reimplemented in JetCopier.

Definition at line 65 of file IJetProvider.h.

65 {return StatusCode::SUCCESS;};

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isVariableR()

bool JetClusterer::isVariableR ( ) const
inlineprotectedinherited

Definition at line 111 of file JetClusterer.h.

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ processPseudoJet()

void JetClusterer::processPseudoJet ( const fastjet::PseudoJet &  pj,
const PseudoJetContainer pjCont,
xAOD::JetContainer jets,
const xAOD::Vertex vertex 
) const
protectedinherited

translate to xAOD::Jet

Definition at line 151 of file JetClusterer.cxx.

152 {
153 
154  // -------------------------------------
155  // translate to xAOD::Jet
156  ATH_MSG_DEBUG("Converting pseudojets to xAOD::Jet");
157  static const SG::AuxElement::Accessor<const fastjet::PseudoJet *> pjAccessor("PseudoJet");
158  PseudoJetTranslator pjTranslator(m_useArea, m_useArea);
159 
160  // create the xAOD::Jet from the PseudoJet, doing the signal & constituents extraction
161  xAOD::Jet &jet = pjTranslator.translate(pj, pjCont, *jets, originVertex);
162 
163  // Add the PseudoJet onto the xAOD jet. Maybe we should do it in the above JetFromPseudojet call ??
164  pjAccessor(jet) = &pj;
165 
166  jet.setInputType(xAOD::JetInput::Type(m_inputType.value()));
168  jet.setAlgorithmType(ialg);
169  jet.setSizeParameter(m_jetrad.value());
170  if (m_isVariableR)
171  {
172  jet.setAttribute(xAOD::JetAttribute::VariableRMinRadius, m_minrad.value());
174  }
175  if (m_useArea)
176  jet.setAttribute(xAOD::JetAttribute::JetGhostArea, m_ghostarea.value());
177 
178  ATH_MSG_VERBOSE(" xAOD::Jet with pt " << std::setprecision(4) << jet.pt() * 1e-3 << " has " << jet.getConstituents().size() << " constituents");
179  ATH_MSG_VERBOSE(" Leading constituent is of type " << jet.getConstituents()[0].rawConstituent()->type());
180 
181  // Perhaps better to make configurable
182  if (originVertex)
183  {
184  jet.setAssociatedObject("OriginVertex", originVertex);
185  }
186  else
187  {
188  ATH_MSG_VERBOSE("Could not set OriginVertex for jet!");
189  }
190 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_clusterSequence

SG::WriteHandleKey<jet::ClusterSequence> JetClusterer::m_clusterSequence {this, "ClusterSequence_DONOTSET", "", "output pseudojets -- autoconfigured name"}
protectedinherited

Definition at line 91 of file JetClusterer.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventinfokey

SG::ReadHandleKey<xAOD::EventInfo> JetClusterer::m_eventinfokey {"EventInfo"}
protectedinherited

Handle to EventInfo. This is used to get the evt&run number to set the Ghost area random seeds.

Definition at line 84 of file JetClusterer.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_finalPseudoJets

SG::WriteHandleKey<PseudoJetVector> JetClusterer::m_finalPseudoJets {this, "FinalPseudoJets_DONOTSET", "", "output pseudojets -- autoconfigured name"}
protectedinherited

used to build the key under which the final PJ will be stored in evtStore()

Definition at line 90 of file JetClusterer.h.

◆ m_fjalg

fastjet::JetAlgorithm JetClusterer::m_fjalg
protectedinherited

Definition at line 105 of file JetClusterer.h.

◆ m_ghostarea

Gaudi::Property<float> JetClusterer::m_ghostarea {this, "GhostArea", 0.0, "Area for ghosts. 0==>no ghosts."}
protectedinherited

Definition at line 98 of file JetClusterer.h.

◆ m_inputPseudoJets

SG::ReadHandleKey<PseudoJetContainer> JetClusterer::m_inputPseudoJets {this, "InputPseudoJets", "inputpseudojet", "input constituents"}
protectedinherited

Handle Input PseudoJetContainer.

Definition at line 87 of file JetClusterer.h.

◆ m_inputType

Gaudi::Property<int> JetClusterer::m_inputType {this, "JetInputType", 0, "input type as in xAOD::JetInput (see xAODJet/JetContainerInfo.h)"}
protectedinherited

Definition at line 101 of file JetClusterer.h.

◆ m_isVariableR

bool JetClusterer::m_isVariableR
protectedinherited

Definition at line 110 of file JetClusterer.h.

◆ m_jetalg

Gaudi::Property<std::string> JetClusterer::m_jetalg {this, "JetAlgorithm", "AntiKt", "alg type : AntiKt, Kt, CA..."}
protectedinherited

Definition at line 95 of file JetClusterer.h.

◆ m_jetrad

Gaudi::Property<float> JetClusterer::m_jetrad {this, "JetRadius", 0.4 , "jet size parameter"}
protectedinherited

Definition at line 96 of file JetClusterer.h.

◆ m_jetRank

Gaudi::Property<std::string> JetClusterer::m_jetRank {this, "jetRankName", "jetRank", "name for accessor for jet rank"}
protectedinherited

Definition at line 92 of file JetClusterer.h.

◆ m_jetRankAccessor

SG::AuxElement::Accessor<int> JetClusterer::m_jetRankAccessor
protectedinherited

Definition at line 113 of file JetClusterer.h.

◆ m_massscale

Gaudi::Property<float> JetClusterer::m_massscale {this, "VariableRMassScale", -1.0, "Variable-R mass scale" }
protectedinherited

Definition at line 109 of file JetClusterer.h.

◆ m_minrad

Gaudi::Property<float> JetClusterer::m_minrad {this, "VariableRMinRadius", -1.0, "Variable-R min radius" }
protectedinherited

Definition at line 108 of file JetClusterer.h.

◆ m_ptmin

Gaudi::Property<float> JetClusterer::m_ptmin {this, "PtMin", 0.0, "pT min in MeV"}
protectedinherited

Definition at line 97 of file JetClusterer.h.

◆ m_ranopt

Gaudi::Property<int> JetClusterer::m_ranopt {this, "RandomOption", 1, "Rand option: 0=fj default, 1=run/event"}
protectedinherited

Definition at line 99 of file JetClusterer.h.

◆ m_useArea

bool JetClusterer::m_useArea
protectedinherited

Definition at line 106 of file JetClusterer.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainer_key

SG::ReadHandleKey<xAOD::VertexContainer> JetClustererByVertex::m_vertexContainer_key {this, "VertexContainer", "PrimaryVertices", "SG key for input vertex container"}
private

Definition at line 69 of file JetClustererByVertex.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
JetClusterer::m_eventinfokey
SG::ReadHandleKey< xAOD::EventInfo > m_eventinfokey
Handle to EventInfo. This is used to get the evt&run number to set the Ghost area random seeds.
Definition: JetClusterer.h:84
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
jet::VertexIndexedConstituentUserInfo::vertex
const xAOD::Vertex * vertex() const
Returns the associated vertex if this constit is a track. Else returns null. *‍/.
Definition: VertexIndexedConstituentUserInfo.h:28
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
xAOD::JetAlgorithmType::kt_algorithm
@ kt_algorithm
Definition: JetContainerInfo.h:31
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
JetClusterer::m_ghostarea
Gaudi::Property< float > m_ghostarea
Definition: JetClusterer.h:98
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::JetAttribute::VariableRMassScale
@ VariableRMassScale
Definition: JetAttributes.h:208
JetClustererByVertex::m_vertexContainer_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Definition: JetClustererByVertex.h:69
JetClusterer::JetClusterer
JetClusterer(const std::string &name)
Definition: JetClusterer.h:60
JetClusterer::m_inputType
Gaudi::Property< int > m_inputType
Definition: JetClusterer.h:101
JetClusterer::m_ranopt
Gaudi::Property< int > m_ranopt
Definition: JetClusterer.h:99
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
xAOD::JetAttribute::VariableRMinRadius
@ VariableRMinRadius
Definition: JetAttributes.h:207
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
JetClusterer::m_jetrad
Gaudi::Property< float > m_jetrad
Definition: JetClusterer.h:96
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
xAOD::JetAttribute::JetGhostArea
@ JetGhostArea
Definition: JetAttributes.h:41
JetClusterer::m_clusterSequence
SG::WriteHandleKey< jet::ClusterSequence > m_clusterSequence
Definition: JetClusterer.h:91
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PseudoJetContainer
Definition: PseudoJetContainer.h:48
JetClusterer::m_massscale
Gaudi::Property< float > m_massscale
Definition: JetClusterer.h:109
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
JetClusterer::m_isVariableR
bool m_isVariableR
Definition: JetClusterer.h:110
JetClusterer::buildAreaDefinition
fastjet::AreaDefinition buildAreaDefinition(bool &seedsok) const
Build the area definition when running with area calculation. The seedsok flag is set to false when e...
Definition: JetClusterer.cxx:271
JetClusterer::m_fjalg
fastjet::JetAlgorithm m_fjalg
Definition: JetClusterer.h:105
JetClusterer::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: JetClusterer.cxx:44
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
PseudoJetTranslator
Definition: PseudoJetTranslator.h:12
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
JetClusterer::m_inputPseudoJets
SG::ReadHandleKey< PseudoJetContainer > m_inputPseudoJets
Handle Input PseudoJetContainer.
Definition: JetClusterer.h:87
JetClusterer::m_minrad
Gaudi::Property< float > m_minrad
Definition: JetClusterer.h:108
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
JetClustererHelper::seedsFromEventInfo
void seedsFromEventInfo(const xAOD::EventInfo *ei, std::vector< int > &seeds)
Fill seeds vector from run & event number. This functio is separated from the class so it's easier to...
Definition: JetClusterer.cxx:27
JetClusterer::buildClusterSequence
std::unique_ptr< fastjet::ClusterSequence > buildClusterSequence(const PseudoJetVector *pseudoJetvector) const
Used to create the cluster sequence.
Definition: JetClusterer.cxx:91
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
jet::VertexIndexedConstituentUserInfo
Definition: VertexIndexedConstituentUserInfo.h:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::JetAlgorithmType::ID
ID
//////////////////////////////////////// JetAlgorithmType::ID defines most common physics jet finding...
Definition: JetContainerInfo.h:29
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
xAOD::JetInput::Type
Type
Definition: JetContainerInfo.h:54
PseudoJetContainer::append
void append(const PseudoJetContainer *)
Definition: PseudoJetContainer.cxx:145
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
xAOD::JetAlgorithmType::cambridge_algorithm
@ cambridge_algorithm
Definition: JetContainerInfo.h:32
xAOD::JetAlgorithmType::antikt_algorithm
@ antikt_algorithm
Definition: JetContainerInfo.h:33
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
IJetProvider::getJets
virtual std::pair< std::unique_ptr< xAOD::JetContainer >, std::unique_ptr< SG::IAuxStore > > getJets() const =0
Method to build the collection and return it to the caller.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
PseudoJetVector
std::vector< fastjet::PseudoJet > PseudoJetVector
Definition: JetConstituentFiller.cxx:17
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
JetClusterer::m_finalPseudoJets
SG::WriteHandleKey< PseudoJetVector > m_finalPseudoJets
used to build the key under which the final PJ will be stored in evtStore()
Definition: JetClusterer.h:90
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::JetAlgorithmType::algId
ID algId(const std::string &n)
Converts a string into a JetAlgorithmType::ID.
Definition: JetContainerInfo.cxx:76
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
JetClusterer::m_ptmin
Gaudi::Property< float > m_ptmin
Definition: JetClusterer.h:97
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
PseudoJetContainer::casVectorPseudoJet
const std::vector< PseudoJet > * casVectorPseudoJet() const
Definition: PseudoJetContainer.cxx:135
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
SG::DataProxy
Definition: DataProxy.h:44
JetClusterer::m_useArea
bool m_useArea
Definition: JetClusterer.h:106
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
JetClusterer::processPseudoJet
void processPseudoJet(const fastjet::PseudoJet &pj, const PseudoJetContainer &pjCont, xAOD::JetContainer *jets, const xAOD::Vertex *vertex) const
translate to xAOD::Jet
Definition: JetClusterer.cxx:151