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

#include <BoostedHadTopAndTopPairFilterTool.h>

Inheritance diagram for DerivationFramework::BoostedHadTopAndTopPairFilterTool:
Collaboration diagram for DerivationFramework::BoostedHadTopAndTopPairFilterTool:

Public Member Functions

 BoostedHadTopAndTopPairFilterTool (const std::string &t, const std::string &n, const IInterface *p)
 
virtual ~BoostedHadTopAndTopPairFilterTool ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
int filterFlag (double, double) const
 
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
 

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

const xAOD::TruthParticlefindInitial (const xAOD::TruthParticle *part) const
 
bool isFromTop (const xAOD::TruthParticle *part) const
 
bool isHadronic (const xAOD::TruthParticle *part) const
 
bool isFinalParticle (const xAOD::TruthParticle *part) const
 
double PxBofW (const xAOD::TruthParticle *part) const
 
double PyBofW (const xAOD::TruthParticle *part) 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

std::string m_mcName
 
int m_cutPtOf
 
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 23 of file BoostedHadTopAndTopPairFilterTool.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

◆ BoostedHadTopAndTopPairFilterTool()

DerivationFramework::BoostedHadTopAndTopPairFilterTool::BoostedHadTopAndTopPairFilterTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 11 of file BoostedHadTopAndTopPairFilterTool.cxx.

12  : AthAlgTool(t,n,p)
13 {
14 
15  declareProperty("MCCollectionName",m_mcName ="TruthEvents");
16  declareProperty("cutPtOf", m_cutPtOf = 0);
17  // use values directly in filterFlag to make tool more flexible for now...
18  //declareProperty("tHadPtCut", m_tHadPtCut = 500000.0);
19  //declareProperty("tPairPtCut", m_tPairPtCut = 350000.0);
20 
21 }

◆ ~BoostedHadTopAndTopPairFilterTool()

DerivationFramework::BoostedHadTopAndTopPairFilterTool::~BoostedHadTopAndTopPairFilterTool ( )
virtual

Definition at line 24 of file BoostedHadTopAndTopPairFilterTool.cxx.

24 {}

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  }

◆ 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

◆ filterFlag()

int DerivationFramework::BoostedHadTopAndTopPairFilterTool::filterFlag ( double  tHadPtCut,
double  tPairPtCut 
) const

Definition at line 33 of file BoostedHadTopAndTopPairFilterTool.cxx.

33  {
34 
35 
36  // if true, the event pass the filter :
37  int filterCode = 0;
38  bool passTopHad = false;
39  bool passTopPair = false;
40 
41  double topPt=0.0;
42  double topPx=0.0;
43  double topPy=0.0;
44  double topbarPt=0.0;
45  double topbarPx=0.0;
46  double topbarPy=0.0;
47 
48  double topChildrenPx=0.0;
49  double topChildrenPy=0.0;
50  double topbarChildrenPx=0.0;
51  double topbarChildrenPy=0.0;
52 
53  double hadtopPt = -1;
54  double hadtopbarPt = -1;
55  double hadtopChildrenPt = -1;
56 
57  double bPx=0.0;
58  double bPy=0.0;
59 
60  const xAOD::TruthEventContainer* xTruthEventContainer = 0;
61  if (evtStore()->retrieve(xTruthEventContainer,m_mcName).isFailure()) {
62  ATH_MSG_WARNING("could not retrieve TruthEventContainer " <<m_mcName);
63  return -1;
64  }
65  for ( const auto* truthevent : *xTruthEventContainer ) {
66 
67  // Loop over all truth particles in the event
68  for(unsigned int i = 0; i < truthevent->nTruthParticles(); i++){
69 
70  const xAOD::TruthParticle* part = truthevent->truthParticle(i);
71  // In release 21 we'll have a thinned truth record in the AODs.
72  // Specifically, geant particle are removed in most cases. The subsequent
73  // nullptr check is supposed to catch these truth particles,
74  // unfortunately however, there's no way to check whether this truth
75  // particle would have had an impact on what we do further down.
76  if (not part){
77  // We could possibly also use break since the thinned truth particles
78  // in principle should have no simulated particles.
79  continue;
80  }
81 
83  int pdgId = part->pdgId();
84 
85  // pdgId t quark = 6
86  if ( pdgId == MC::TQUARK && isFinalParticle(part) ){
87  if ( part->pt() > topPt ){
88  topPx = part->px();
89  topPy = part->py();
90  topPt = part->pt();}
91  }
92 
93  if ( pdgId == -MC::TQUARK && isFinalParticle(part) ){
94  if ( part->pt() > topbarPt ){
95  topbarPx = part->px();
96  topbarPy = part->py();
97  topbarPt = part->pt();}
98  }
99 
100  // pdgId W boson = 24
101  if ( !MC::isW(pdgId) || !isFinalParticle(part) ) continue;
102 
103  // "part" is now a W boson
104  bPx=PxBofW(part);
105  bPy=PyBofW(part);
106  if (isFromTop(part)){
107  if (pdgId > 0) {
108  topChildrenPx=( part->px() + bPx );
109  topChildrenPy=( part->py() + bPy );
110  }
111  else {
112  topbarChildrenPx=( part->px() + bPx );
113  topbarChildrenPy=( part->py() + bPy );
114  }
115 
116  if (isHadronic(part)){
117  double pT = sqrt( pow( part->px() + bPx,2) + pow( part->py() + bPy,2));
118  if (pT > hadtopChildrenPt){
119  hadtopChildrenPt = pT;
120  if (pdgId > 0) hadtopPt = topPt;
121  else hadtopbarPt = topbarPt;
122  }
123  } // isHadronic
124  } // isFromTop
125  } // particle loop
126  } // event loop
127 
128 
129  double TTBarSysPt = sqrt( pow( topPx + topbarPx , 2 ) + pow( topPy + topbarPy , 2 ));
130  double TTBarChildrenSysPt = sqrt( pow( topChildrenPx + topbarChildrenPx , 2 ) + pow( topChildrenPy + topbarChildrenPy , 2 ));
131 
132  if (m_cutPtOf == 0){ // cut on the pT of top on the truth list
133  if (hadtopPt >= tHadPtCut || hadtopbarPt >= tHadPtCut ) passTopHad = true;
134  if (TTBarSysPt >= tPairPtCut ) passTopPair = true;
135  }
136  else if( m_cutPtOf == 1){ // cut on the pT of top decay products (b, q, qbar') on the truth list
137  if (hadtopChildrenPt >= tHadPtCut ) passTopHad = true;
138  if (TTBarChildrenSysPt >= tPairPtCut ) passTopPair = true;
139  }
140 
141 
142  //return which flags were passed
143  if ( !passTopPair && !passTopHad) filterCode = 0;
144  if ( passTopPair && !passTopHad) filterCode = 1;
145  if ( !passTopPair && passTopHad ) filterCode = 2;
146  if ( passTopPair && passTopHad ) filterCode = 3;
147  return filterCode;
148 }

◆ finalize()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterTool::finalize ( )
virtual

Definition at line 30 of file BoostedHadTopAndTopPairFilterTool.cxx.

30 {return StatusCode::SUCCESS;}

◆ findInitial()

const xAOD::TruthParticle * DerivationFramework::BoostedHadTopAndTopPairFilterTool::findInitial ( const xAOD::TruthParticle part) const
private

Definition at line 150 of file BoostedHadTopAndTopPairFilterTool.cxx.

150  {
151 
152  if(!part->nParents()) return part;
153 
154  for(unsigned int i=0; i<part->nParents(); ++i){
155  const xAOD::TruthParticle* parent = part->parent(i);
156  if( part->pdgId() == parent->pdgId() ) return findInitial(parent);
157  }
158 
159  return part;
160 }

◆ initialize()

StatusCode DerivationFramework::BoostedHadTopAndTopPairFilterTool::initialize ( )
virtual

Definition at line 27 of file BoostedHadTopAndTopPairFilterTool.cxx.

27 {ATH_MSG_INFO("Initialize " ); 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.

◆ isFinalParticle()

bool DerivationFramework::BoostedHadTopAndTopPairFilterTool::isFinalParticle ( const xAOD::TruthParticle part) const
private

Definition at line 186 of file BoostedHadTopAndTopPairFilterTool.cxx.

186  {
187  int type = part->pdgId();
188  for(unsigned j = 0; j < part->nChildren(); j++){
189  const xAOD::TruthParticle* child = part->child(j);
190  int childtype = child->pdgId();
191  if( childtype == type ) return false;
192  }
193 
194  return true;
195 
196 }

◆ isFromTop()

bool DerivationFramework::BoostedHadTopAndTopPairFilterTool::isFromTop ( const xAOD::TruthParticle part) const
private

Definition at line 163 of file BoostedHadTopAndTopPairFilterTool.cxx.

163  {
164 
165  if(!part->nParents()) return false;
166 
167  for(unsigned int i=0; i<part->nParents(); ++i){
168  const xAOD::TruthParticle* parent = part->parent(i);
169  if( MC::isTop(parent->pdgId()) ) return true;
170  }
171 
172  return false;
173 }

◆ isHadronic()

bool DerivationFramework::BoostedHadTopAndTopPairFilterTool::isHadronic ( const xAOD::TruthParticle part) const
private

Definition at line 176 of file BoostedHadTopAndTopPairFilterTool.cxx.

176  {
177 
178  for(unsigned j = 0; j < part->nChildren(); j++){
179  const xAOD::TruthParticle* child = part->child(j);
180  if( abs(child->pdgId()) <= MC::BQUARK ) return true;
181  }
182  return false;
183 }

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

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

◆ PxBofW()

double DerivationFramework::BoostedHadTopAndTopPairFilterTool::PxBofW ( const xAOD::TruthParticle part) const
private

Definition at line 200 of file BoostedHadTopAndTopPairFilterTool.cxx.

200  {
201 
202  const xAOD::TruthParticle* initpart = findInitial(part);
203 
204  double px=0.0;
205 
206  for(unsigned j = 0; j < initpart->nChildren(); j++){
207  const xAOD::TruthParticle* child = initpart->child(j);
208  if( MC::isBottom(child->pdgId()) ){
209  px = child->px();
210  }
211  }
212  return px;
213 }

◆ PyBofW()

double DerivationFramework::BoostedHadTopAndTopPairFilterTool::PyBofW ( const xAOD::TruthParticle part) const
private

Definition at line 216 of file BoostedHadTopAndTopPairFilterTool.cxx.

216  {
217 
218  const xAOD::TruthParticle* initpart = findInitial(part);
219 
220  double py=0.0;
221 
222  for(unsigned j = 0; j < initpart->nChildren(); j++){
223  const xAOD::TruthParticle* child = initpart->child(j);
224  if( MC::isBottom( child->pdgId() ) ){
225  py = child->py();
226  }
227  }
228  return py;
229 }

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

int DerivationFramework::BoostedHadTopAndTopPairFilterTool::m_cutPtOf
private

Definition at line 39 of file BoostedHadTopAndTopPairFilterTool.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_mcName

std::string DerivationFramework::BoostedHadTopAndTopPairFilterTool::m_mcName
private

Definition at line 33 of file BoostedHadTopAndTopPairFilterTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.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:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
test_pyathena.px
px
Definition: test_pyathena.py:18
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
DerivationFramework::BoostedHadTopAndTopPairFilterTool::findInitial
const xAOD::TruthParticle * findInitial(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:150
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::BoostedHadTopAndTopPairFilterTool::m_cutPtOf
int m_cutPtOf
Definition: BoostedHadTopAndTopPairFilterTool.h:39
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
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
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
DerivationFramework::BoostedHadTopAndTopPairFilterTool::isFromTop
bool isFromTop(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:163
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
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
isBottom
bool isBottom(const T &p)
Definition: AtlasPID.h:172
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:355
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
DerivationFramework::BoostedHadTopAndTopPairFilterTool::isHadronic
bool isHadronic(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:176
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DerivationFramework::BoostedHadTopAndTopPairFilterTool::m_mcName
std::string m_mcName
Definition: BoostedHadTopAndTopPairFilterTool.h:33
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
xAOD::TruthParticle_v1::nChildren
size_t nChildren() const
Number of children of this particle.
Definition: TruthParticle_v1.cxx:140
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
DerivationFramework::BoostedHadTopAndTopPairFilterTool::isFinalParticle
bool isFinalParticle(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:186
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
xAOD::TruthParticle_v1::child
const TruthParticle_v1 * child(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:149
isW
bool isW(const T &p)
Definition: AtlasPID.h:355
a
TList * a
Definition: liststreamerinfos.cxx:10
isTop
bool isTop(const T &p)
Definition: AtlasPID.h:175
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
DerivationFramework::BoostedHadTopAndTopPairFilterTool::PxBofW
double PxBofW(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:200
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
DerivationFramework::BoostedHadTopAndTopPairFilterTool::PyBofW
double PyBofW(const xAOD::TruthParticle *part) const
Definition: BoostedHadTopAndTopPairFilterTool.cxx:216
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
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