#include <HIVertexSelectionTool.h>
|
| virtual void | print () const |
| | Print the state of the tool.
|
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
|
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
|
| virtual StatusCode | sysInitialize () override |
| | Perform system initialization for an algorithm.
|
| virtual StatusCode | sysStart () override |
| | Handle START transition.
|
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles.
|
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles.
|
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
| template<class T> |
| const T * | getProperty (const std::string &name) const |
| | Get one of the tool's properties.
|
| const std::string & | msg_level_name () const __attribute__((deprecated)) |
| | A deprecated function for getting the message level's name.
|
| const std::string & | getName (const void *ptr) const |
| | Get the name of an object that is / should be in the event store.
|
| SG::sgkey_t | getKey (const void *ptr) const |
| | Get the (hashed) key of an object that is in the event store.
|
Definition at line 18 of file HIVertexSelectionTool.h.
◆ StoreGateSvc_t
◆ ~HIVertexSelectionTool()
| HI::HIVertexSelectionTool::~HIVertexSelectionTool |
( |
| ) |
|
|
privatedefault |
◆ accept() [1/2]
The main accept method: the actual cuts are applied here.
Implements HI::IHIVertexSelectionTool.
Definition at line 76 of file HIVertexSelectionTool.cxx.
77{
78 asg::AcceptData acceptData (&
m_accept);
79 ATH_MSG_ERROR(
"Vertex selection tool should not be passed an IParticle." );
80 throw std::invalid_argument( "Vertex selection tool given an IParticle." );
81 return acceptData;
82}
◆ accept() [2/2]
Implements HI::IHIVertexSelectionTool.
Definition at line 84 of file HIVertexSelectionTool.cxx.
85{
86 asg::AcceptData acceptData (&
m_accept);
87
89 acceptData.setCutResult( "type", true );
90 }
92 acceptData.setCutResult( "z", true );
93 }
97 int nPassed = 0;
98 double sumPtSq = 0.;
100 if ( !
track.isValid() )
continue;
102
103 if (countTracks) {
104 nPassed++;
106 acceptData.setCutResult( "ntrk", true );
107 countTracks = false;
108 }
109 }
110 if (countPt) {
111 auto pt = (*track)->pt();
114 acceptData.setCutResult( "pt", true);
115 countPt = false;
116 }
117 }
118
119 if (!countTracks && !countPt) break;
120 }
121 }
122
123 return acceptData;
124}
float z() const
Returns the z position.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
VxType::VertexType vertexType() const
The type of the vertex.
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ extraDeps_update_handler()
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
◆ finalize()
| StatusCode HI::HIVertexSelectionTool::finalize |
( |
| ) |
|
|
overrideprivatevirtual |
◆ getAcceptInfo()
◆ 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
-
| ptr | The 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
123
124 return evtStore()->event()->getKey( ptr );
125#else
127 return ( proxy ==
nullptr ? 0 :
proxy->sgkey() );
128#endif
129 }
ServiceHandle< StoreGateSvc > & evtStore()
◆ 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
-
| ptr | The 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
110
111 return evtStore()->event()->getName( ptr );
112#else
114 static const std::string
dummy =
"";
115 return ( proxy ==
nullptr ? dummy :
proxy->name() );
116#endif
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 HI::HIVertexSelectionTool::initialize |
( |
void | | ) |
|
|
overrideprivatevirtual |
Implements HI::IHIVertexSelectionTool.
Definition at line 29 of file HIVertexSelectionTool.cxx.
30{
33
34
36 ATH_MSG_INFO(
"Requiring vertex to be a primary vertex" );
37 m_accept.addCut(
"type",
"Whether the vertex satisfies the requirement to be a primary vertex" );
38 }
39 else {
40 ATH_MSG_INFO(
"NOT requiring vertex to be a primary vertex" );
41 }
42
45 m_accept.addCut(
"z",
"Whether the vertex's |z| is in an allowed range" );
46 }
47
51 m_accept.addCut(
"ntrk",
"Whether the vertex has the minimum number of tracks" );
52 }
56 m_accept.addCut(
"pt",
"Whether the vertex's tracks RMS pt is sufficient" );
57 }
58
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
◆ inputHandles()
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.
◆ msg()
◆ 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
104 }
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
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 |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in AsgHelloTool, HI::HIPileupTool, JetBottomUpSoftDrop, JetConstituentsRetriever, JetDumper, JetFinder, JetFromPseudojet, JetModifiedMassDrop, JetPileupLabelingTool, JetPruner, JetPseudojetRetriever, JetReclusterer, JetReclusteringTool, JetRecTool, JetRecursiveSoftDrop, JetSoftDrop, JetSplitter, JetSubStructureMomentToolsBase, JetToolRunner, JetTrimmer, JetTruthLabelingTool, KtDeltaRTool, and LundVariablesTool.
Definition at line 131 of file AsgTool.cxx.
131 {
132
134 return;
135 }
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
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)
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_accept
◆ m_checkTracks
| bool HI::HIVertexSelectionTool::m_checkTracks = false |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_maxAbsZ
| double HI::HIVertexSelectionTool::m_maxAbsZ = -1 |
|
private |
◆ m_minNtrk
| int HI::HIVertexSelectionTool::m_minNtrk = -1 |
|
private |
◆ m_minRmsPt
| double HI::HIVertexSelectionTool::m_minRmsPt = -1. |
|
private |
◆ m_requirePrimary
| bool HI::HIVertexSelectionTool::m_requirePrimary = true |
|
private |
◆ m_trkSelTool
track selection tool which can be optionally used for N_trk and sum pt cuts
Definition at line 44 of file HIVertexSelectionTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: