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

Steven Schramm
February 2014. More...

#include <JetVertexFractionTool.h>

Inheritance diagram for JetVertexFractionTool:
Collaboration diagram for JetVertexFractionTool:

Public Member Functions

 JetVertexFractionTool (const std::string &name)
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode decorate (const xAOD::JetContainer &jetCont) const override
 Decorate a jet collection without otherwise modifying it. More...
 
float getCorrJetVertexFraction (const xAOD::Vertex *, const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *&, const jet::TrackVertexAssociation *) const
 
ElementLink< xAOD::VertexContainergetMaxJetVertexFraction (const xAOD::VertexContainer *, const std::vector< float > &) const
 
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
 
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier. More...
 

Protected Member Functions

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

Gaudi::Property< bool > m_isTrigger {this, "IsTrigger", false, "Is this in the trigger?"}
 
Gaudi::Property< bool > m_useOriginVertex = {this, "UseOriginVertex", false, "use origin vertex for each jet"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_jvfCorrVtxHandleKey
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::vector< float > getEmptyJetVertexFraction (const xAOD::VertexContainer *) const
 
int getPileupTrackCount (const xAOD::Vertex *, const xAOD::TrackParticleContainer *&, const jet::TrackVertexAssociation *) const
 
const xAOD::VertexfindHSVertex (const xAOD::VertexContainer *&) const
 
std::pair< float, float > getJetVertexTrackSums (const xAOD::Vertex *, const std::vector< const xAOD::TrackParticle * > &, const jet::TrackVertexAssociation *) const
 
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

Gaudi::Property< std::string > m_jetContainerName {this, "JetContainer", "", "SG key for input jet container"}
 
Gaudi::Property< std::string > m_assocTracksName {this, "AssociatedTracks", "", "Name of associated track container"}
 
Gaudi::Property< float > m_kcorrJVF {this, "K_JVFCorrScale", 0.01, "Value of k for JVFCorr calculation"}
 
Gaudi::Property< float > m_PUtrkptcut {this, "PUTrkPtCut", 30000., "Pileup track pt cut (MeV)"}
 
Gaudi::Property< bool > m_suppressInputDeps {this, "SuppressInputDependence", false, "Will SumPtTrk be created in the same algorithm that uses this tool?"}
 
ToolHandle< InDet::IInDetTrackSelectionToolm_htsel {this, "TrackSelector", "", "Track selector tool"}
 
SG::ReadHandleKey< xAOD::VertexContainerm_vertexContainer_key {this, "VertexContainer", "", "Input vertex container"}
 
SG::ReadHandleKey< jet::TrackVertexAssociationm_tva_key {this, "TrackVertexAssociation", "", "Input track-vertex association"}
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_tracksCont_key {this, "TrackParticleContainer", "", "Input track container"}
 
SG::ReadDecorHandleKey< xAOD::JetContainerm_sumPtTrkKey {this, "SumPtTrkName", "SumPtTrkPt500", "SG key for input SumPtTrk decoration"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_jvfKey {this, "JVFName", "JVF", "SG key for output JVF decoration"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_jvfCorrKey {this, "JVFCorrName", "JVFCorr", "SG key for output JVFCorr decoration"}
 
SG::WriteDecorHandleKey< xAOD::JetContainerm_maxJvfVtxKey {this, "HighestJVFVertexName", "HighestJVFVtx", "SG key for output HighestJVFVertex decoration"}
 
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

Steven Schramm
February 2014.

Updated for Run 3 by Bill Balunas March 2020

Tool to calculate the jet vertex fraction (JVF) JVF is a vector<float> with respect to all vertices

Calculation requires three main types of information

  1. Vertex container for the event (from evtStore), which the JVF vector is aligned with
  2. Tracks associated to the input jet (in the jet aux store)
  3. Track vertex association object (from evtStore)

Using this information, the procedure can be broken into three main steps:

  1. Retrieve necessary information
  2. Helper method to create the full vector given the information
  3. Helper method to create the JVF value for one vertex given the information

Properties: VertexContainer - name of the vertex container AssociatedTracks - name for attribute holding the list of associated tracks TrackVertexAssociation - name for the container holding the track-vertex associations TrackSelector - tool to select tracks (none ==> no selection) JVFName - name for the JVF array attribute (default is "JVF")

Definition at line 57 of file JetVertexFractionTool.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

◆ JetVertexFractionTool()

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

Definition at line 13 of file JetVertexFractionTool.cxx.

14  : asg::AsgTool(name) {
15 }

Member Function Documentation

◆ 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  }

◆ decorate()

StatusCode JetVertexFractionTool::decorate ( const xAOD::JetContainer jets) const
overridevirtual

Decorate a jet collection without otherwise modifying it.

Implements IJetDecorator.

Definition at line 61 of file JetVertexFractionTool.cxx.

61  {
62 
63  // Get the vertices container
64  auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
65  if (!vertexContainer.isValid()){
66  ATH_MSG_WARNING("Invalid xAOD::VertexContainer datahandle"
67  << m_vertexContainer_key.key());
68  return StatusCode::FAILURE;
69  }
70  const auto *vertices = vertexContainer.cptr();
71 
72  ATH_MSG_DEBUG("Successfully retrieved VertexContainer: "
73  << m_vertexContainer_key.key());
74 
75  // Get the Tracks container
76  auto tracksContainer = SG::makeHandle (m_tracksCont_key);
77  if (!tracksContainer.isValid()){
78  ATH_MSG_ERROR("Could not retrieve the TrackParticleContainer: "
79  << m_tracksCont_key.key());
80  return StatusCode::FAILURE;
81  }
82  const auto *tracksCont = tracksContainer.cptr();
83 
84  ATH_MSG_DEBUG("Successfully retrieved TrackParticleContainer: "
85  << m_tracksCont_key.key());
86 
87  // Get the TVA object
88  auto tvaContainer = SG::makeHandle (m_tva_key);
89  if (!tvaContainer.isValid()){
90  ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation: "
91  << m_tva_key.key());
92  return StatusCode::FAILURE;
93  }
94  const auto *tva = tvaContainer.cptr();
95 
96  ATH_MSG_DEBUG("Successfully retrieved TrackVertexAssociation: "
97  << m_tva_key.key());
98 
99  if (vertices->empty() ) {
100  ATH_MSG_WARNING("There are no vertices in the container. Exiting");
101  return StatusCode::SUCCESS;
102  }
103 
104  // Get the vertex to calculate with respect to
105  // Only appropriate if we are using a single vertex interpretation, not if using OriginVertex
106  const xAOD::Vertex* HSvertex = nullptr;
107  if (!m_useOriginVertex)
108  HSvertex = findHSVertex(vertices);
109 
110  // Count pileup tracks - currently done for each collection
111  // Only appropriate if we are using a single vertex interpretation, not if using OriginVertex
112  const int n_putracks = !m_useOriginVertex ? getPileupTrackCount(HSvertex, tracksCont, tva) : -1;
113 
117 
118  // We don't want to initialize this handle if this is trigger
119  std::unique_ptr<SG::WriteDecorHandle<xAOD::JetContainer, ElementLink<xAOD::VertexContainer> > > maxJvfVtxHandle;
120  if(!m_isTrigger)
121  maxJvfVtxHandle = std::make_unique<SG::WriteDecorHandle<xAOD::JetContainer, ElementLink<xAOD::VertexContainer> > >(m_maxJvfVtxKey);
122 
123  for(const xAOD::Jet * jet : jetCont) {
124  // Get origin-vertex-specific information if relevant
125  if (m_useOriginVertex)
126  {
127  HSvertex = jet->getAssociatedObject<xAOD::Vertex>("OriginVertex");
128  if (!HSvertex) // nullptr if the attribute doesn't exist
129  {
130  ATH_MSG_ERROR("OriginVertex was requested, but the jet does not contain an OriginVertex");
131  return StatusCode::FAILURE;
132  }
133  else
134  ATH_MSG_VERBOSE("JetVertexFractionTool " << name() << " is using OriginVertex at index: " << HSvertex->index());
135  }
136  const int n_putracks_local = !m_useOriginVertex ? n_putracks : getPileupTrackCount(HSvertex,tracksCont,tva);
137 
138  // Get the tracks associated to the jet
139  // Note that there may be no tracks - this is both normal and an error case
140  std::vector<const xAOD::TrackParticle*> tracks;
141  if ( ! jet->getAssociatedObjects(m_assocTracksName, tracks) ) {
142  ATH_MSG_DEBUG("Associated tracks not found.");
143  }
144 
145  // Get the track pT sums for all tracks in the jet (first key) and those associated to PU (second key) vertices.
146  const std::pair<float,float> tracksums = getJetVertexTrackSums(HSvertex, tracks, tva);
147  // Get the track pT sums for each individual vertex
148  std::vector<float> vsumpttrk = sumPtTrkHandle(*jet);
149  float sumpttrk_all = tracksums.first;
150  float sumpttrk_nonPV = tracksums.second;
151  float sumpttrk_PV = vsumpttrk[HSvertex->index() - (*vertices)[0]->index()];
152 
153  // Get and set the JVF vector
154  std::vector<float> jvf(vertices->size());
155  for(size_t vtxi=0; vtxi<vertices->size(); ++vtxi) {
156  jvf[vtxi] = sumpttrk_all > 1e-9 ? vsumpttrk[vtxi] / sumpttrk_all : -1;
157  }
158  jvfHandle(*jet) = jvf;
159 
160  // Get and set the highest JVF vertex
161  if(!m_isTrigger) {
162  (*maxJvfVtxHandle)(*jet) = getMaxJetVertexFraction(vertices,jvf);
163  }
164  // Calculate JVFCorr
165  // Default JVFcorr to -1 when no tracks are associated.
166  float jvfcorr = -999.;
167  if(sumpttrk_PV + sumpttrk_nonPV > 0) {
168  jvfcorr = sumpttrk_PV / (sumpttrk_PV + ( sumpttrk_nonPV / (m_kcorrJVF * std::max(n_putracks_local, 1) ) ) );
169  } else {
170  jvfcorr = -1;
171  }
172  jvfCorrHandle(*jet) = jvfcorr;
173  }
174 
175  if (m_useOriginVertex) { // Add extra info to compute JVT for jets assuming other vertices as origin
176  std::vector<float> jvfCorrVtx;
177 
178  auto jvfCorrVtxHandle = std::make_unique<SG::WriteDecorHandle<xAOD::JetContainer, std::vector<float> > >(m_jvfCorrVtxHandleKey);
179 
180  for(const xAOD::Jet * jet : jetCont) {
181  jvfCorrVtx.clear();
182  std::vector<float> vsumpttrk = sumPtTrkHandle(*jet);
183 
184  // Loop over vertices
185  for(const xAOD::Vertex* pv : *vertices){
186 
187  // Calculate JVFCorr for a given vertex
188  // Default JVFcorr to -1 when no tracks are associated. - copied from JetVertexFractionTool.cxx
189  // Get the tracks associated to the jet
190  // Note that there may be no tracks - this is both normal and an error case
191  std::vector<const xAOD::TrackParticle*> tracks;
192  if ( ! jet->getAssociatedObjects(m_assocTracksName, tracks) ) {
193  ATH_MSG_DEBUG("Associated tracks not found.");
194  }
195 
196  const int n_putracks = getPileupTrackCount(pv, tracksCont, tva);
197 
198  // Get the track pT sums for all tracks in the jet (first key) and those associated to PU(?) (second key) vertices.
199  const std::pair<float,float> tracksums = getJetVertexTrackSums(pv, tracks, tva);
200  // Get the track pT sums for each individual vertex
201 
202  float sumpttrk_PV = vsumpttrk[pv->index()];
203  float sumpttrk_nonPV = tracksums.second; // Consider as "PU" all vertices not matching the one I'm looping over
204  float jvfcorr = -999.;
205  float kcorrJVF = 0.01;
206  if(sumpttrk_PV + sumpttrk_nonPV > 0) {
207  jvfcorr = sumpttrk_PV / (sumpttrk_PV + ( sumpttrk_nonPV / (kcorrJVF * std::max(n_putracks, 1) ) ) );
208  } else {
209  jvfcorr = -1;
210  }
211  jvfCorrVtx.push_back(jvfcorr);
212  }
213 
214  (*jvfCorrVtxHandle)(*jet) = jvfCorrVtx;
215  // Done
216 
217  }
218  }
219  return StatusCode::SUCCESS;
220 }

◆ 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

◆ findHSVertex()

const xAOD::Vertex * JetVertexFractionTool::findHSVertex ( const xAOD::VertexContainer *&  vertices) const
private

Definition at line 314 of file JetVertexFractionTool.cxx.

315 {
316  const xAOD::Vertex* primvert = nullptr;
317  for (const xAOD::Vertex* pv : *vertices) {
318  if (pv->vertexType() == xAOD::VxType::PriVtx ) {
319  primvert = pv;
320  ATH_MSG_VERBOSE("JetVertexFractionTool " << name() << " Found HS vertex.");
321  break;
322  }
323  }
324  if (primvert == nullptr ) {
325  ATH_MSG_VERBOSE("There is no vertex of type PriVx. Taking default vertex.");
326  primvert = *(vertices->begin());
327  }
328  return primvert;
329 }

◆ getCorrJetVertexFraction()

float JetVertexFractionTool::getCorrJetVertexFraction ( const xAOD::Vertex ,
const std::vector< const xAOD::TrackParticle * > &  ,
const xAOD::TrackParticleContainer *&  ,
const jet::TrackVertexAssociation  
) const

◆ getEmptyJetVertexFraction()

std::vector<float> JetVertexFractionTool::getEmptyJetVertexFraction ( const xAOD::VertexContainer ) const
private

◆ getJetVertexTrackSums()

std::pair< float, float > JetVertexFractionTool::getJetVertexTrackSums ( const xAOD::Vertex vertex,
const std::vector< const xAOD::TrackParticle * > &  tracks,
const jet::TrackVertexAssociation tva 
) const
private

Definition at line 242 of file JetVertexFractionTool.cxx.

244  {
245  float sumTrackAll = 0;
246  float sumTracknotPV = 0;
247  bool notsel = m_htsel.empty();
248  unsigned int nkeep = 0;
249  unsigned int nskip = 0;
250  for (size_t iTrack = 0; iTrack < tracks.size(); ++iTrack) {
251  const xAOD::TrackParticle* track = tracks.at(iTrack);
252  if ( notsel || m_htsel->accept(*track) ) {
253  sumTrackAll += track->pt();
254 
255  const xAOD::Vertex* ptvtx = tva->associatedVertex(track);
256  if( ptvtx != nullptr ) {
257  // Track has vertex, assign to appropriate pT sum
258  if ( ptvtx->index() != vertex->index() ) {sumTracknotPV += track->pt(); }
259  }
260  ++nkeep;
261  }
262  else { ++nskip; }
263  }
264  ATH_MSG_VERBOSE("JetVertexTaggerTool " << name()
265  << ": nsel=" << nkeep
266  << ", nrej=" << nskip );
267 
268  return std::make_pair(sumTrackAll,sumTracknotPV);
269 
270 }

◆ 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  }

◆ getMaxJetVertexFraction()

ElementLink< xAOD::VertexContainer > JetVertexFractionTool::getMaxJetVertexFraction ( const xAOD::VertexContainer vertices,
const std::vector< float > &  jvf 
) const

Definition at line 224 of file JetVertexFractionTool.cxx.

226  {
227  size_t maxIndex = 0;
228  float maxVal = -100;
229  for ( size_t iVertex = 0; iVertex < jvf.size(); ++iVertex ) {
230  if ( jvf.at(iVertex) > maxVal ) {
231  maxIndex = iVertex;
232  maxVal = jvf.at(iVertex);
233  }
234  }
236  ElementLink<xAOD::VertexContainer>(*vertices,vertices->at(maxIndex)->index());
237  return link;
238 }

◆ 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  }

◆ getPileupTrackCount()

int JetVertexFractionTool::getPileupTrackCount ( const xAOD::Vertex vertex,
const xAOD::TrackParticleContainer *&  tracksCont,
const jet::TrackVertexAssociation tva 
) const
private

Definition at line 275 of file JetVertexFractionTool.cxx.

278 {
279  int n_pileuptrackcount = 0;
280  bool notsel = m_htsel.empty();
281  unsigned int nkeep = 0;
282  unsigned int nskip = 0;
283  int tot_count = 0;
284  for(size_t iTrack = 0; iTrack < tracksCont->size(); ++iTrack)
285  {
286  const xAOD::TrackParticle * track = tracksCont->at(iTrack);
287  if ( notsel || m_htsel->accept(*track) ) {
288  const xAOD::Vertex* ptvtx = tva->associatedVertex(track);
289  // Count track as PU if associated with non-primary vertex and within pT cut.
290  // N.B. tracks with no vertex associated may be added to PV track sums, but not PU sums, nor the PU vertex counting.
291  if ( ptvtx != nullptr ) {
292  if ( (ptvtx->index() != vertex->index() ) && (track->pt() < m_PUtrkptcut) ) ++n_pileuptrackcount;
293  }
294  tot_count++;
295  ++nkeep;
296  }
297  else { ++nskip; }
298  }
299  const int n_pileuptracks = n_pileuptrackcount;
300 
301  ATH_MSG_VERBOSE("JetVertexFractionTool " << name()
302  << ": nsel=" << nkeep
303  << ", nrej=" << nskip
304  << ", total " << tracksCont->size() );
305  ATH_MSG_VERBOSE("JetVertexFractionTool " << name()
306  << ": n_PUtracks=" << n_pileuptracks
307  << ", total=" << tot_count );
308 
309  return n_pileuptracks;
310 }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

StatusCode JetVertexFractionTool::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 asg::AsgTool.

Definition at line 19 of file JetVertexFractionTool.cxx.

19  {
20  ATH_MSG_INFO("Initializing JetVertexFractionTool " << name());
21  ATH_MSG_INFO("Using origin vertex: " << m_useOriginVertex);
22 
23  if(m_jetContainerName.empty()){
24  ATH_MSG_ERROR("JetVertexFractionTool needs to have its input jet container name configured!");
25  return StatusCode::FAILURE;
26  }
27 
28  if ( m_htsel.empty() ) {
29  ATH_MSG_INFO(" No track selector.");
30  } else {
31  ATH_MSG_INFO(" Track selector: " << m_htsel->name());
32  }
33  ATH_MSG_INFO(" Attribute name: " << m_jvfKey.key());
34 
36  m_jvfKey = m_jetContainerName + "." + m_jvfKey.key();
39  m_jvfCorrVtxHandleKey = m_jvfCorrKey.key() + "Vec";
40 
41 #ifndef XAOD_STANDALONE
43  // The user has promised that this will be produced by the same alg running JVF.
44  // Tell the scheduler to ignore it to avoid circular dependencies.
46  }
47 #endif
48 
49  ATH_CHECK(m_vertexContainer_key.initialize());
52  ATH_CHECK(m_sumPtTrkKey.initialize());
53  ATH_CHECK(m_jvfKey.initialize());
54  ATH_CHECK(m_jvfCorrKey.initialize());
55  ATH_CHECK(m_maxJvfVtxKey.initialize(!m_isTrigger));
57 
58  return StatusCode::SUCCESS;
59 }

◆ 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.

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32 {return decorate(jets);};

◆ 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

◆ 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_assocTracksName

Gaudi::Property<std::string> JetVertexFractionTool::m_assocTracksName {this, "AssociatedTracks", "", "Name of associated track container"}
private

Definition at line 89 of file JetVertexFractionTool.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_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_htsel

ToolHandle<InDet::IInDetTrackSelectionTool> JetVertexFractionTool::m_htsel {this, "TrackSelector", "", "Track selector tool"}
private

Definition at line 94 of file JetVertexFractionTool.h.

◆ m_isTrigger

Gaudi::Property<bool> JetVertexFractionTool::m_isTrigger {this, "IsTrigger", false, "Is this in the trigger?"}
protected

Definition at line 124 of file JetVertexFractionTool.h.

◆ m_jetContainerName

Gaudi::Property<std::string> JetVertexFractionTool::m_jetContainerName {this, "JetContainer", "", "SG key for input jet container"}
private

Definition at line 88 of file JetVertexFractionTool.h.

◆ m_jvfCorrKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetVertexFractionTool::m_jvfCorrKey {this, "JVFCorrName", "JVFCorr", "SG key for output JVFCorr decoration"}
private

Definition at line 100 of file JetVertexFractionTool.h.

◆ m_jvfCorrVtxHandleKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetVertexFractionTool::m_jvfCorrVtxHandleKey
protected

Definition at line 126 of file JetVertexFractionTool.h.

◆ m_jvfKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetVertexFractionTool::m_jvfKey {this, "JVFName", "JVF", "SG key for output JVF decoration"}
private

Definition at line 99 of file JetVertexFractionTool.h.

◆ m_kcorrJVF

Gaudi::Property<float> JetVertexFractionTool::m_kcorrJVF {this, "K_JVFCorrScale", 0.01, "Value of k for JVFCorr calculation"}
private

Definition at line 90 of file JetVertexFractionTool.h.

◆ m_maxJvfVtxKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetVertexFractionTool::m_maxJvfVtxKey {this, "HighestJVFVertexName", "HighestJVFVtx", "SG key for output HighestJVFVertex decoration"}
private

Definition at line 101 of file JetVertexFractionTool.h.

◆ m_PUtrkptcut

Gaudi::Property<float> JetVertexFractionTool::m_PUtrkptcut {this, "PUTrkPtCut", 30000., "Pileup track pt cut (MeV)"}
private

Definition at line 91 of file JetVertexFractionTool.h.

◆ m_sumPtTrkKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetVertexFractionTool::m_sumPtTrkKey {this, "SumPtTrkName", "SumPtTrkPt500", "SG key for input SumPtTrk decoration"}
private

Definition at line 98 of file JetVertexFractionTool.h.

◆ m_suppressInputDeps

Gaudi::Property<bool> JetVertexFractionTool::m_suppressInputDeps {this, "SuppressInputDependence", false, "Will SumPtTrk be created in the same algorithm that uses this tool?"}
private

Definition at line 92 of file JetVertexFractionTool.h.

◆ m_tracksCont_key

SG::ReadHandleKey<xAOD::TrackParticleContainer> JetVertexFractionTool::m_tracksCont_key {this, "TrackParticleContainer", "", "Input track container"}
private

Definition at line 97 of file JetVertexFractionTool.h.

◆ m_tva_key

SG::ReadHandleKey<jet::TrackVertexAssociation> JetVertexFractionTool::m_tva_key {this, "TrackVertexAssociation", "", "Input track-vertex association"}
private

Definition at line 96 of file JetVertexFractionTool.h.

◆ m_useOriginVertex

Gaudi::Property<bool> JetVertexFractionTool::m_useOriginVertex = {this, "UseOriginVertex", false, "use origin vertex for each jet"}
protected

Definition at line 125 of file JetVertexFractionTool.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> JetVertexFractionTool::m_vertexContainer_key {this, "VertexContainer", "", "Input vertex container"}
private

Definition at line 95 of file JetVertexFractionTool.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:
JetVertexFractionTool::m_jetContainerName
Gaudi::Property< std::string > m_jetContainerName
Definition: JetVertexFractionTool.h:88
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
JetVertexFractionTool::m_maxJvfVtxKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_maxJvfVtxKey
Definition: JetVertexFractionTool.h:101
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetVertexFractionTool::m_vertexContainer_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Definition: JetVertexFractionTool.h:95
JetVertexFractionTool::m_suppressInputDeps
Gaudi::Property< bool > m_suppressInputDeps
Definition: JetVertexFractionTool.h:92
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
JetVertexFractionTool::m_jvfCorrVtxHandleKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jvfCorrVtxHandleKey
Definition: JetVertexFractionTool.h:126
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
JetVertexFractionTool::m_tva_key
SG::ReadHandleKey< jet::TrackVertexAssociation > m_tva_key
Definition: JetVertexFractionTool.h:96
JetVertexFractionTool::m_tracksCont_key
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksCont_key
Definition: JetVertexFractionTool.h:97
AthCommonDataStore< AthCommonMsg< AlgTool > >::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
JetVertexFractionTool::m_jvfKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jvfKey
Definition: JetVertexFractionTool.h:99
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
JetVertexFractionTool::m_kcorrJVF
Gaudi::Property< float > m_kcorrJVF
Definition: JetVertexFractionTool.h:90
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
JetVertexFractionTool::m_sumPtTrkKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_sumPtTrkKey
Definition: JetVertexFractionTool.h:98
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
JetVertexFractionTool::m_useOriginVertex
Gaudi::Property< bool > m_useOriginVertex
Definition: JetVertexFractionTool.h:125
JetVertexFractionTool::getJetVertexTrackSums
std::pair< float, float > getJetVertexTrackSums(const xAOD::Vertex *, const std::vector< const xAOD::TrackParticle * > &, const jet::TrackVertexAssociation *) const
Definition: JetVertexFractionTool.cxx:242
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
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
JetVertexFractionTool::getMaxJetVertexFraction
ElementLink< xAOD::VertexContainer > getMaxJetVertexFraction(const xAOD::VertexContainer *, const std::vector< float > &) const
Definition: JetVertexFractionTool.cxx:225
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
JetVertexFractionTool::m_isTrigger
Gaudi::Property< bool > m_isTrigger
Definition: JetVertexFractionTool.h:124
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
jet::TrackVertexAssociation::associatedVertex
const xAOD::Vertex * associatedVertex(const xAOD::TrackParticle *trk) const
Definition: TrackVertexAssociation.cxx:23
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
JetVertexFractionTool::findHSVertex
const xAOD::Vertex * findHSVertex(const xAOD::VertexContainer *&) const
Definition: JetVertexFractionTool.cxx:314
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
mc.nskip
nskip
Definition: mc.PhPy8EG_Hto4l_NNLOPS_nnlo_30_ggH125_ZZ4l.py:41
JetVertexFractionTool::m_PUtrkptcut
Gaudi::Property< float > m_PUtrkptcut
Definition: JetVertexFractionTool.h:91
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
JetVertexFractionTool::getPileupTrackCount
int getPileupTrackCount(const xAOD::Vertex *, const xAOD::TrackParticleContainer *&, const jet::TrackVertexAssociation *) const
Definition: JetVertexFractionTool.cxx:275
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
IJetDecorator::decorate
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.
JetVertexFractionTool::m_htsel
ToolHandle< InDet::IInDetTrackSelectionTool > m_htsel
Definition: JetVertexFractionTool.h:94
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
python.changerun.pv
pv
Definition: changerun.py:81
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
JetVertexFractionTool::m_assocTracksName
Gaudi::Property< std::string > m_assocTracksName
Definition: JetVertexFractionTool.h:89
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
SG::DataProxy
Definition: DataProxy.h:45
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
JetVertexFractionTool::m_jvfCorrKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_jvfCorrKey
Definition: JetVertexFractionTool.h:100