Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
DerivationFramework::HadronOriginClassifier Class Reference

#include <HadronOriginClassifier.h>

Inheritance diagram for DerivationFramework::HadronOriginClassifier:
Collaboration diagram for DerivationFramework::HadronOriginClassifier:

Public Types

enum  HF_id {
  extrajet =0, c_MPI =-1, b_MPI =1, c_FSR =-2,
  b_FSR =2, c_from_W =-3, b_from_W =3, c_from_top =-4,
  b_from_top =4, c_from_H =-5, b_from_H =5
}
 
enum  GEN_id { GEN_id::Pythia6 =0, GEN_id::Pythia8 =1, GEN_id::HerwigPP =2, GEN_id::Sherpa =3 }
 

Public Member Functions

 HadronOriginClassifier (const std::string &t, const std::string &n, const IInterface *p)
 
virtual ~HadronOriginClassifier ()
 
virtual StatusCode initialize () override
 
std::map< const xAOD::TruthParticle *, HF_idGetOriginMap () 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

void fillHadronMap (std::set< const xAOD::TruthParticle * > &usedHadron, std::map< const xAOD::TruthParticle *, int > &mainHadronMap, const xAOD::TruthParticle *mainhad, const xAOD::TruthParticle *ihad, bool decayed=false) const
 
void buildPartonsHadronsMaps (std::map< const xAOD::TruthParticle *, int > &mainHadronMap, std::map< const xAOD::TruthParticle *, HF_id > &partonsOrigin) const
 
bool isCHadronFromB (const xAOD::TruthParticle *part, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
 
bool isLooping (const xAOD::TruthParticle *part, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
 init_part needed to detect looping graphs (sherpa) up to know only seen at parton level More...
 
const xAOD::TruthParticlefindInitial (const xAOD::TruthParticle *part, bool looping, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
 
bool isFromTop (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFromWTop (const xAOD::TruthParticle *part, bool looping) const
 
bool isFromGluonQuark (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFSRPythia6 (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFromQuarkTop (const xAOD::TruthParticle *part, bool looping) const
 
bool isFromQuarkTop (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFSR (const xAOD::TruthParticle *part, bool looping) const
 
bool isFromWTop (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyMPIPythia8 (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFromQuarkTopPythia8 (const xAOD::TruthParticle *part, bool looping) const
 
bool isFromQuarkTopPythia8 (const xAOD::TruthParticle *part, bool looping) const
 
bool isDirectlyFSRPythia8 (const xAOD::TruthParticle *part, bool looping) const
 
bool IsHerwigPP () const
 
bool IsPythia8 () const
 
bool IsPythia6 () const
 
bool IsSherpa () const
 
bool IsTtBb () 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...
 

Static Private Member Functions

static bool isDirectlyFromTop (const xAOD::TruthParticle *part, bool looping)
 
static bool isDirectlyFromGluonQuark (const xAOD::TruthParticle *part, bool looping)
 
static bool isDirectlyMPIPythia6 (const xAOD::TruthParticle *part, bool looping)
 
static bool isDirectlyMPISherpa (const xAOD::TruthParticle *part)
 

Private Attributes

Gaudi::Property< std::string > m_mcName {this, "MCCollectionName", "TruthEvents"}
 
Gaudi::Property< double > m_HadronPtMinCut {this, "HadronpTMinCut", 5000.}
 
Gaudi::Property< double > m_HadronEtaMaxCut {this, "HadronetaMaxCut", 2.5}
 MeV. More...
 
Gaudi::Property< int > m_DSID {this, "DSID", 410000}
 
GEN_id m_GenUsed {}
 
bool m_ttbb {false}
 
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 27 of file HadronOriginClassifier.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ GEN_id

Enumerator
Pythia6 
Pythia8 
HerwigPP 
Sherpa 

Definition at line 43 of file HadronOriginClassifier.h.

43 { Pythia6=0, Pythia8=1, HerwigPP=2, Sherpa=3 };

◆ HF_id

Enumerator
extrajet 
c_MPI 
b_MPI 
c_FSR 
b_FSR 
c_from_W 
b_from_W 
c_from_top 
b_from_top 
c_from_H 
b_from_H 

Definition at line 36 of file HadronOriginClassifier.h.

36  {extrajet=0,
37  c_MPI =-1, b_MPI =1,
38  c_FSR =-2, b_FSR =2,
39  c_from_W =-3, b_from_W =3,
40  c_from_top=-4, b_from_top =4,
41  c_from_H =-5, b_from_H =5} HF_id;

Constructor & Destructor Documentation

◆ HadronOriginClassifier()

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

Definition at line 30 of file HadronOriginClassifier.cxx.

30  :
31  AthAlgTool(t,n,p)
32  {
33  }

◆ ~HadronOriginClassifier()

DerivationFramework::HadronOriginClassifier::~HadronOriginClassifier ( )
virtual

Definition at line 35 of file HadronOriginClassifier.cxx.

35 {}

Member Function Documentation

◆ buildPartonsHadronsMaps()

void DerivationFramework::HadronOriginClassifier::buildPartonsHadronsMaps ( std::map< const xAOD::TruthParticle *, int > &  mainHadronMap,
std::map< const xAOD::TruthParticle *, HF_id > &  partonsOrigin 
) const
private

Definition at line 229 of file HadronOriginClassifier.cxx.

229  {
230  // Extract the TruthParticles container.
231  const xAOD::TruthEventContainer* xTruthEventContainer = nullptr;
232  if (evtStore()->retrieve(xTruthEventContainer,m_mcName).isFailure()) {
233  ATH_MSG_WARNING("could not retrieve TruthEventContainer " <<m_mcName);
234  }
235  // Create a container with TruthParticles to store the hadrons that has already been saved.
236  std::set<const xAOD::TruthParticle*> usedHadron;
237  for ( const auto* truthevent : *xTruthEventContainer ) {
238  // Use a for to go through the TruthParticles.
239  for(unsigned int i = 0; i < truthevent->nTruthParticles(); i++){
240  // Extract the i-th particle.
241  const xAOD::TruthParticle* part = truthevent->truthParticle(i);
242  if(!part) continue;
243  // Simulated particles are not considered.
245  // Create a set of boolean variables to indicate the type of particle.
246  bool isbquark = false; // The particle is a b-quark.
247  bool iscquark = false; // The particle is a c-quark.
248  bool isHFhadron = false; // The particle is a HF hadron.
249  // Extract the pdgid of the particle and use it to determine the type of particle.
250  int pdgid = abs(part->pdgId());
251  if( MC::isBottom(pdgid) ){
252  isbquark=true;
253  }
254  else if( MC::isCharm(pdgid) ){
255  iscquark=true;
256  }
258  isHFhadron=true;
259  }
260  else{
261  continue;
262  }
263  // For HF quarks (b or c), check their category.
264  // The category is determined looking for the parents.
265  if(isbquark){
266  // In this case, the parton is a b-quark.
267  // Create a boolean that indicates when to stop to look for parents.
268  bool islooping = isLooping(part);
269  // Check the category of the b-quark.
270  if(isDirectlyFromWTop(part, islooping)){
271  partonsOrigin[ part ] = b_from_W;
272  }
273  else if(isDirectlyFromTop(part, islooping)){
274  partonsOrigin[ part ] = b_from_top;
275  }
276  else if(!IsTtBb()&&(IsHerwigPP()||IsSherpa())&&isDirectlyFSR(part,islooping)){
277  partonsOrigin[ part ] = b_FSR;
278  }
279  else if(!IsTtBb()&&IsPythia8()&&isDirectlyFSRPythia8(part,islooping)){
280  partonsOrigin[ part ] = b_FSR;
281  }
282  else if(!IsTtBb()&&IsPythia6()&&isDirectlyFSRPythia6(part,islooping)){
283  partonsOrigin[ part ] = b_FSR;
284  }
285  else if(!IsTtBb()&&IsPythia6()&&isDirectlyMPIPythia6(part, islooping)){
286  partonsOrigin[ part ] = b_MPI;
287  }
288  else if(!IsTtBb()&&IsPythia8()&&isDirectlyMPIPythia8(part, islooping)){
289  partonsOrigin[ part ] = b_MPI;
290  }
291  else if(!IsTtBb()&&IsSherpa()&&isDirectlyMPISherpa(part)){
292  partonsOrigin[ part ] = b_MPI;
293  }
294  }
295  if(iscquark){
296  // In this case, the parton is a c-quark.
297  // Create a boolean that indicates when to stop to look for parents.
298  bool islooping = isLooping(part);
299  // Check the category of the b-quark.
300  if(isDirectlyFromWTop(part, islooping)){
301  partonsOrigin[ part ] = c_from_W;
302  }
303  else if(isDirectlyFromTop(part, islooping)){
304  partonsOrigin[ part ] = c_from_top;
305  }
306  else if(!IsTtBb()&&(IsHerwigPP()&&IsSherpa())&&isDirectlyFSR(part,islooping)){
307  partonsOrigin[ part ] = c_FSR;
308  }
309  else if(!IsTtBb()&&IsPythia8()&&isDirectlyFSRPythia8(part,islooping)){
310  partonsOrigin[ part ] = c_FSR;
311  }
312  else if(!IsTtBb()&&IsPythia6()&&isDirectlyFSRPythia6(part,islooping)){
313  partonsOrigin[ part ] = c_FSR;
314  }
315  else if(!IsTtBb()&&IsPythia6()&&isDirectlyMPIPythia6(part, islooping)){
316  partonsOrigin[ part ] = c_MPI;
317  }
318  else if(!IsTtBb()&&IsPythia8()&&isDirectlyMPIPythia8(part, islooping)){
319  partonsOrigin[ part ] = c_MPI;
320  }
321  else if(!IsTtBb()&&IsSherpa()&&isDirectlyMPISherpa(part)){
322  partonsOrigin[ part ] = c_MPI;
323  }
324  }
325  // The HF hadrons are stored in the map mainHadronMap if they are not repeated.
326  if(isHFhadron && !isCHadronFromB(part)){
327  // In this case, the particle is a HF hadron but not a C-Hadron from a B-hadron.
328  // If the hadron is not in usedHadron, then add it in mainHadronMap with fillHadronMap function.
329  if(usedHadron.insert(part).second) {
330  fillHadronMap(usedHadron, mainHadronMap,part,part);
331  }
332  }
333  }//loop on particles
334  }//loop on truthevent container
335  }

◆ 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

◆ fillHadronMap()

void DerivationFramework::HadronOriginClassifier::fillHadronMap ( std::set< const xAOD::TruthParticle * > &  usedHadron,
std::map< const xAOD::TruthParticle *, int > &  mainHadronMap,
const xAOD::TruthParticle mainhad,
const xAOD::TruthParticle ihad,
bool  decayed = false 
) const
private

Definition at line 364 of file HadronOriginClassifier.cxx.

364  {
365  // Fist, check that the consdired hadron has a non-null pointer
366  if (!ihad) return;
367  usedHadron.insert(ihad);
368  // Create two variables to indicate the flavour of the parents and childrens particles that will be considered.
369  // Create a boolean to indicate if the particles considered are from the final state.
370  int parent_flav,child_flav;
371  bool isFinal = true;
372  // Check if the considered hadron has children.
373  if(!ihad->nChildren()) return;
374  // Use a for to go through the children.
375  for(unsigned int j=0; j<ihad->nChildren(); ++j){
376  // Extract the j-th children.
377  const xAOD::TruthParticle* child = ihad->child(j);
378  if(!child) continue;
379  if(decayed){
380  fillHadronMap(usedHadron, mainHadronMap,mainhad,child,true);
381  isFinal=false;
382  }
383  else{
384  child_flav = std::abs(MC::leadingQuark(child));
385  if(child_flav!=4 && child_flav!=5) continue;
386  parent_flav = std::abs(MC::leadingQuark(mainhad));
387  if(child_flav!=parent_flav) continue;
388  fillHadronMap(usedHadron, mainHadronMap,mainhad,child);
389  isFinal=false;
390  }
391  }
392 
393  if(isFinal && !decayed){
394  mainHadronMap[mainhad]=std::abs(MC::leadingQuark(mainhad));
395  for(unsigned int j=0; j<ihad->nChildren(); ++j){
396  const xAOD::TruthParticle* child = ihad->child(j);
397  if(!child) continue;
398  fillHadronMap(usedHadron, mainHadronMap,mainhad,child,true);
399  }
400  }
401  }

◆ findInitial()

const xAOD::TruthParticle * DerivationFramework::HadronOriginClassifier::findInitial ( const xAOD::TruthParticle part,
bool  looping,
std::shared_ptr< std::set< const xAOD::TruthParticle * >>  checked = nullptr 
) const
private

Definition at line 646 of file HadronOriginClassifier.cxx.

646  {
647  // If the particle has no parent, return the particle.
648  if(!part->nParents()) return part;
649  if (!checked) checked = std::make_shared<std::set<const xAOD::TruthParticle*>>();
650  // Use a for to go through the parents.
651  for(unsigned int i=0; i<part->nParents(); ++i){
652  // Extract the i-th parent.
653  const xAOD::TruthParticle* parent = part->parent(i);
654  if(!parent) continue;
655  if(checked->count(parent) && looping) continue;
656  checked->insert(parent);
657  // If the parent has the same pdgId as the particle, then it means that the parent is the same as the considered particle.
658  // This happens if the particle irradiates for example.
659  // In this case, try to look for the first parent of i-th parent that is being considered.
660  // Repeat the process until you find a particle different from the considred one or that has no parent.
661 
662  if( part->pdgId() == parent->pdgId() ){
663  return findInitial(parent, looping, checked);
664  }
665  }
666  // In this case, no parent different from the considered particle has been found.
667  // Hence, return the particle.
668  return part;
669  }

◆ GetOriginMap()

std::map< const xAOD::TruthParticle *, DerivationFramework::HadronOriginClassifier::HF_id > DerivationFramework::HadronOriginClassifier::GetOriginMap ( ) const

Definition at line 161 of file HadronOriginClassifier.cxx.

161  {
162  // Create a set of maps to store the information about the hadrons and the partons
163  std::map<const xAOD::TruthParticle*, int> mainHadronMap; // Map with main hadrons and their flavor.
164  std::map<const xAOD::TruthParticle*, HF_id> partonsOrigin; // Map with partons and their category (from top, W, H, MPI, FSR, extra).
165  std::map<const xAOD::TruthParticle*, const xAOD::TruthParticle*> hadronsPartons; // Map with hadrons and their matched parton.
166  std::map<const xAOD::TruthParticle*, HF_id> hadronsOrigin; // Map with hadrons and their category (from top, W, H, MPI, FSR, extra)
167  // Fill the maps mainHadronMap and partonsOrigin
168  buildPartonsHadronsMaps(mainHadronMap, partonsOrigin);
169  // Create two maps to know which partons and hadrons have already been matched.
170  std::vector<const xAOD::TruthParticle*> matched_partons;
171  std::vector<const xAOD::TruthParticle*> matched_hadrons;
172  // Use a while to go through the HF hadrons in mainHadronMap and partons in partonsOrigin.
173  while (matched_partons.size()<partonsOrigin.size() && matched_hadrons.size()<mainHadronMap.size()){
174  // Create a float variable to store the DeltaR between a parton and the closest hadron.
175  float dR=999.;
176  // Create two pointers for TruthParticle type to go through the partons and hadrons.
177  const xAOD::TruthParticle* hadron=nullptr;
178  const xAOD::TruthParticle* parton=nullptr;
179  // Use a for to go through the partonsOrigin.
180  for(std::map<const xAOD::TruthParticle*, HF_id>::iterator itr = partonsOrigin.begin(); itr!=partonsOrigin.end(); ++itr){
181  // Check if the parton has already been matched to an hadron.
182  if(std::find(matched_partons.begin(), matched_partons.end(), (*itr).first) != matched_partons.end()) continue;
183  // Extract the pt of the parton.
184  TVector3 v, vtmp;
185  if ((*itr).first->pt()>0.)
186  v.SetPtEtaPhi((*itr).first->pt(),(*itr).first->eta(),(*itr).first->phi());
187  else // Protection against FPE from eta and phi calculation
188  v.SetXYZ(0.,0.,(*itr).first->pz());
189  // Use a for to go through the HF hadrons in mainHadronMap.
190  for(std::map<const xAOD::TruthParticle*, int>::iterator it = mainHadronMap.begin(); it!=mainHadronMap.end(); ++it){
191  // Check if the hadron has already been matched to a parton.
192  if(std::find(matched_hadrons.begin(), matched_hadrons.end(), (*it).first) != matched_hadrons.end()) continue;
193  // Check if the hadron's flavour mathces the one of the parton.
194  if((*it).second != abs((*itr).first->pdgId()) ) continue;
195  // Extract the pt of the hadron.
196  vtmp.SetPtEtaPhi((*it).first->pt(),(*it).first->eta(),(*it).first->phi());
197  // Compute Delta R between hadron and parton and store in dR if it is smaller than the current value.
198  // Also store the parton and hadron in the pointers that have been previous created.
199  if(vtmp.DeltaR(v) < dR){
200  dR = vtmp.DeltaR(v);
201  hadron = (*it).first;
202  parton = (*itr).first;
203  }
204  }//loop hadrons
205  }//loop partons
206  // Add the matched part-hadron pair in the corresponding maps.
207  matched_partons.push_back(parton);
208  matched_hadrons.push_back(hadron);
209  hadronsPartons[ hadron ] = parton;
210  }
211 
212  // Use a for to go through the HF hadrons in mainHadronMap.
213  for(std::map<const xAOD::TruthParticle*, int>::iterator it = mainHadronMap.begin(); it!=mainHadronMap.end(); ++it){
214  // Extract the current hadron.
215  const xAOD::TruthParticle* hadron = (*it).first;
216  // Check if the hadron has been matched to a parton.
217  // If it has been matched to any hadron, use it to determine the origin.
218  // Otherwise, the hadron is considered extra.
219  if(hadronsPartons.find(hadron)!=hadronsPartons.end()){
220  hadronsOrigin[hadron] = partonsOrigin[ hadronsPartons[hadron] ];
221  } else{
222  hadronsOrigin[hadron] = extrajet;
223  }
224  }
225  return hadronsOrigin;
226  }

◆ initialize()

StatusCode DerivationFramework::HadronOriginClassifier::initialize ( )
overridevirtual

Definition at line 37 of file HadronOriginClassifier.cxx.

37  {
38  ATH_MSG_INFO("Initialize " );
39  ATH_MSG_INFO("DSID " << m_DSID );
40 
41  static const std::vector<Sample> samples = {
42  // all Herwig++/Herwig7 showered samples
43  {410003, GEN_id::HerwigPP}, {410008, GEN_id::HerwigPP}, //aMC@NLO+Hpp
44  {410004, GEN_id::HerwigPP}, {410163, GEN_id::HerwigPP}, //Powheg+Hpp
45  {410232, 410233, GEN_id::HerwigPP}, //first attempt for Powheg+H7 / aMC@NLO+H7
46  {410525, 410530, GEN_id::HerwigPP}, //New Powheg+H7 samples
47  {407037, 407040, GEN_id::HerwigPP}, //Powheg+Hpp MET/HT sliced
48  {410536, 410537, GEN_id::HerwigPP}, {410245, GEN_id::HerwigPP, true}, //aMC@NLO+H++ , ttbb
49  {410557, 410559, GEN_id::HerwigPP}, // new Powheg+H7, mc16
50  {411082, 411090, GEN_id::HerwigPP}, //Powheg+H7 HF-filtered
51  {407354, 407356, GEN_id::HerwigPP}, //Powheg+H7 ttbar HT-filtered
52  {411233, 411234, GEN_id::HerwigPP}, //Powheg+H7.1.3 ttbar
53  {411316, GEN_id::HerwigPP}, //Powheg+H7 allhad ttbar
54  {411329, 411334, GEN_id::HerwigPP}, //Powheg+H7.1.3 ttbar HF-filtered
55  {411335, 411337, GEN_id::HerwigPP}, //Powheg+H7.1.3 ttbar HT-filtered
56  {412116, 412117, GEN_id::HerwigPP}, //amc@NLO+H7.1.3 ttbar
57  {504329, GEN_id::HerwigPP}, {504333, GEN_id::HerwigPP}, {504341, GEN_id::HerwigPP}, //amc@NLO+H7.2.1 refined ttZ
58  {601239, 601240, GEN_id::HerwigPP, true},
59  {601668, GEN_id::HerwigPP, true},
60  {603905, 603906, GEN_id::HerwigPP, true}, // ttbb Powheg+H7 dilep, ljet, allhad
61 
62  // all Pythia8 showered samples
63  {410006, GEN_id::Pythia8}, //Powheg+P8 old main31
64  {410500, GEN_id::Pythia8}, //Powheg+P8 new main31, hdamp=mt
65  {410501, 410508, GEN_id::Pythia8}, //Powheg+P8 new main31, hdamp=1.5m // Boosted samples are included 410507 410508
66  {410511, 410524, GEN_id::Pythia8}, //Powheg+P8 new main31, hdamp=1.5mt, radiation systematics
67  {410531, 410535, GEN_id::Pythia8}, //Powheg+P8 allhad samples
68  {346343, 346345, GEN_id::Pythia8}, //Powheg+P8 ttH
69  {412123, GEN_id::Pythia8}, // MG+P8 ttW
70  {410155, GEN_id::Pythia8}, // aMC@NlO+P8 ttW
71  {410159, 410160, GEN_id::Pythia8}, //aMC@NLO+P8, old settings
72  {410218, 410220, GEN_id::Pythia8}, // aMC@NlO+P8 ttZ
73  {410276, 410278, GEN_id::Pythia8}, // aMC@NlO+P8 ttZ_lowMass
74  {410225, 410227, GEN_id::Pythia8}, {410274, 410275, GEN_id::Pythia8}, //aMC@NLO+P8, new settings
75  {410568, 410569, GEN_id::Pythia8}, // nonallhad boosted c-filtered
76  {410244, GEN_id::Pythia8, true}, //aMC@NLO+P8, ttbb (old)
77  {410441, 410442, GEN_id::Pythia8}, //new aMC@NLO+P8 mc16, new shower starting scale
78  {410464, 410466, GEN_id::Pythia8}, //new aMC@NLO+P8 mc16, new shower starting scale, no shower weights
79  {410470, 410472, GEN_id::Pythia8}, {410480, 410482, GEN_id::Pythia8}, //new Powheg+P8 mc16
80  {410452, GEN_id::Pythia8}, //new aMC@NLO+P8 FxFx mc16
81  {411073, 411081, GEN_id::Pythia8}, //Powheg+P8 HF-filtered
82  {412066, 412074, GEN_id::Pythia8}, //aMC@NLO+P8 HF-filtered
83  {411068, 411070, GEN_id::Pythia8, true}, //Powheg+P8 ttbb
84  {410265, 410267, GEN_id::Pythia8, true}, //aMC@NLO+P8 ttbb
85  {411178, 411180, GEN_id::Pythia8, true}, {411275, GEN_id::Pythia8, true}, //Powheg+P8 ttbb OTF production - ATLMCPROD-7240
86  {600791, 600792, GEN_id::Pythia8, true}, //Powheg+P8 ttbb - ATLMCPROD-9179
87  {600737, 600738, GEN_id::Pythia8, true}, //Powheg+P8 ttbb - ATLMCPROD-9179
88  {601226, 601227, GEN_id::Pythia8, true}, // Powheg+P8 ttbb bornzerodamp cut 5, ATLMCPROD-9694
89  {407342, 407344, GEN_id::Pythia8}, //Powheg+P8 ttbar HT-filtered
90  {407345, 407347, GEN_id::Pythia8}, //Powheg+P8 ttbar MET-filtered
91  {407348, 407350, GEN_id::Pythia8}, //aMC@NLO+P8 ttbar HT-filtered
92  {504330, 504332, GEN_id::Pythia8}, {504334, 504336, GEN_id::Pythia8}, {504338, GEN_id::Pythia8}, {504342, 504344, GEN_id::Pythia8}, {504346, GEN_id::Pythia8}, //aMC@NLO+P8 refined ttZ
93  {601491, 601492, GEN_id::Pythia8}, //Pow+Py8 ttbar pTHard variations - ATLMCPROD-10168
94  {601495, 601498, GEN_id::Pythia8}, //Pow+Py8 ttbar pTHard variations - ATLMCPROD-10168
95  {601229, 601230, GEN_id::Pythia8}, // mc23 ttbar dilep, singlelep
96  {601237, GEN_id::Pythia8}, // mc23 ttbar allhad
97  {601398, 601399, GEN_id::Pythia8}, // mc23 ttbar dilep, singlelep hdamp517p5
98  {601491, GEN_id::Pythia8}, {601495, GEN_id::Pythia8}, {601497, GEN_id::Pythia8}, // mc23 ttbar pThard variations, dilep, singlelep, allhad
99  {601783, 601784, GEN_id::Pythia8, true}, // Powheg+P8 ttbb bornzerodamp cut 5 pThard variations - ATLMCPROD-10527
100  {603003, 603004, GEN_id::Pythia8, true}, // Powheg+P8 ttbb nominal and pthard1 allhad
101  {603190, 603193, GEN_id::Pythia8, true}, // Powheg+P8 ttbb nominal and pthard1 dilep, ljet
102 
103  // all Sherpa showered samples
104  {410186, 410189, GEN_id::Sherpa}, //Sherpa 2.2.0
105  {410249, 410252, GEN_id::Sherpa}, //Sherpa 2.2.1
106  {410342, 410347, GEN_id::Sherpa}, //Sherpa 2.2.1 sys
107  {410350, 410355, GEN_id::Sherpa}, //Sherpa 2.2.1 sys
108  {410357, 410359, GEN_id::Sherpa}, //Sherpa 2.2.1 sys
109  {410361, 410367, GEN_id::Sherpa}, //Sherpa 2.2.1 sys
110  {410281, 410283, GEN_id::Sherpa}, //Sherpa BFilter
111  {410051, GEN_id::Sherpa, true}, //Sherpa ttbb (ICHEP sample)
112  {410323, 410325, GEN_id::Sherpa, true}, {410369, GEN_id::Sherpa, true}, //New Sherpa 2.2.1 ttbb
113  {364345, 364348, GEN_id::Sherpa}, //Sherpa 2.2.4 (test)
114  {410424, 410427, GEN_id::Sherpa}, //Sherpa 2.2.4
115  {410661, 410664, GEN_id::Sherpa, true}, //Sherpa 2.2.4 ttbb
116  {421152, 421158, GEN_id::Sherpa}, //Sherpa2.2.8 ttbar
117  {413023, GEN_id::Sherpa}, // sherpa 2.2.1 ttZ
118  {700000, GEN_id::Sherpa}, // Sherpa 2.2.8 ttW
119  {700168, GEN_id::Sherpa}, // Sherpa 2.2.10 ttW
120  {700205, GEN_id::Sherpa}, // Sherpa 2.2.10 ttW EWK
121  {700309, GEN_id::Sherpa}, // Sherpa 2.2.11 ttZ
122  {700051, 700054, GEN_id::Sherpa, true}, //Sherpa2.2.8 ttbb
123  {700121, 700124, GEN_id::Sherpa}, //Sherpa2.2.10 ttbar
124  {700164, 700167, GEN_id::Sherpa, true}, //Sherpa2.2.10 ttbb
125  {700807, 700809, GEN_id::Sherpa}, //Sherpa2.2.14 ttbar
126 
127  };
128 
129  // Linear search for sample and assign properties:
130  for (const auto& s : samples) {
131  if (m_DSID>=s.low && m_DSID<=s.high) {
132  m_GenUsed = s.gen;
133  m_ttbb = s.ttbb;
134  return StatusCode::SUCCESS;
135  }
136  }
137 
138  // the default is Pythia6, so no need to list the Pythia6 showered samples
139  // these are:
140  // 410000-410002
141  // 410007, 410009, 410120-410121
142  // 301528-301532
143  // 303722-303726
144  // 407009-407012
145  // 407029-407036
146  // 410120
147  // 426090-426097
148  // 429007
150 
151  return StatusCode::SUCCESS;
152  }

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

◆ isCHadronFromB()

bool DerivationFramework::HadronOriginClassifier::isCHadronFromB ( const xAOD::TruthParticle part,
std::shared_ptr< std::set< const xAOD::TruthParticle * >>  checked = nullptr 
) const
private

Definition at line 342 of file HadronOriginClassifier.cxx.

342  {
343  if(!MC::isCharmHadron(part)) return false;
344  if (!checked) checked = std::make_shared<std::set<const xAOD::TruthParticle*>>();
345  checked ->insert(part);
346 
347  for(unsigned int i=0; i<part->nParents(); ++i){
348  const xAOD::TruthParticle* parent = part->parent(i);
349  if(!parent) continue;
350  if(checked->count(parent)) continue;
351  checked->insert(parent);
352  if( MC::isBottomHadron(parent) ){
353  return true;
354  }
356  if(isCHadronFromB(parent))return true;
357  }
358  }
359 
360  return false;
361  }

◆ isDirectlyFromGluonQuark()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFromGluonQuark ( const xAOD::TruthParticle part,
bool  looping 
)
staticprivate

Definition at line 464 of file HadronOriginClassifier.cxx.

464  {
465  if(!part->nParents()) return false;
466  for(unsigned int i=0; i<part->nParents(); ++i){
467  const xAOD::TruthParticle* parent = part->parent(i);
468  if(!parent) continue;
469  if( looping ) continue;
470  if( MC::isPhoton(parent) || abs(parent->pdgId())<MC::BQUARK ) return true;
471  }
472  return false;
473  }

◆ isDirectlyFromQuarkTop()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFromQuarkTop ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 513 of file HadronOriginClassifier.cxx.

513  {
514  if(!part->nParents()) return false;
515  for(unsigned int i=0; i<part->nParents(); ++i){
516  const xAOD::TruthParticle* parent = part->parent(i);
517  if(!parent) continue;
518  if( looping ) continue;
519  if( abs(parent->pdgId())<MC::TQUARK ) {
520 
521  if(isFromTop(parent,looping)){
522  return true;
523  }
524  else if(isFromWTop(parent,looping)){
525  return true;
526  }
527  }
528  }
529 
530  return false;
531  }

◆ isDirectlyFromQuarkTopPythia8()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFromQuarkTopPythia8 ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 561 of file HadronOriginClassifier.cxx.

561  {
562  // First, make sure the consdired particle has a non-null pointer and it has parents.
563  // Otherwise, return false.
564  if(!part->nParents()) return false;
565  // Use a for to go through the parents.
566  for(unsigned int i=0; i<part->nParents(); ++i){
567  // Extract the i-th parent.
568  const xAOD::TruthParticle* parent = part->parent(i);
569  if(!parent) continue;
570  if(looping ) continue;
571  // Check if the parent is a quark different from the top.
572  if( abs(parent->pdgId())<MC::TQUARK ) {
573  // In this case, the parent is a quark different from top.
574  // Check if it comes from the decay chain of the t->Wb.
575  // If it is the case, return true.
576  if(isFromWTop(parent,looping)){
577  return true;
578  }
579  }
580  }
581  // In this case, any of the parents of the particle comes from t->Wb chaing.
582  // Hence, the particle does not come from the top directly and false is returned.
583  return false;
584  }

◆ isDirectlyFromTop()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFromTop ( const xAOD::TruthParticle part,
bool  looping 
)
staticprivate

Definition at line 419 of file HadronOriginClassifier.cxx.

419  {
420  // First, make sure the consdired particle has a non-null pointer and it has parents.
421  // Otherwise, return false.
422  if(!part || !part->nParents()) return false;
423  // Go through the parents of the particle.
424  for(unsigned int i=0; i<part->nParents(); ++i){
425  // Extract the i-th parent.
426  const xAOD::TruthParticle* parent = part->parent(i);
427  if(!parent) continue;
428  if(looping) continue;
429  // If the i-th parent is a top, then return true
430  if( MC::isTop(parent) ) return true;
431  }
432  // If a top is no the parent, then return false.
433  return false;
434  }

◆ isDirectlyFromWTop()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFromWTop ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 445 of file HadronOriginClassifier.cxx.

445  {
446  // First, make sure the consdired particle has a non-null pointer and it has parents.
447  // Otherwise, return false.
448  if(!part || !part->nParents()) return false;
449  // Use a for to go though the parents.
450  for(unsigned int i=0; i<part->nParents(); ++i){
451  // Get the i-th parent.
452  const xAOD::TruthParticle* parent = part->parent(i);
453  if(!parent) continue;
454  if(looping) continue;
455  if( MC::isW(parent)){
456  if( isFromTop(parent, looping) ) return true;
457  }
458  }
459  // In this case, none of the parents of the particle is a W from top.
460  // Hence, return false.
461  return false;
462  }

◆ isDirectlyFSR()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFSR ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 500 of file HadronOriginClassifier.cxx.

500  {
501  if(!part->nParents()) return false;
502  for(unsigned int i=0; i<part->nParents(); ++i){
503  const xAOD::TruthParticle* parent = part->parent(i);
504  if(!parent) continue;
505  if( looping ) continue;
507  if( isFromQuarkTop( parent,looping ) ) return true;
508  }
509  }
510  return false;
511  }

◆ isDirectlyFSRPythia6()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia6 ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 480 of file HadronOriginClassifier.cxx.

480  {
481  if(!part->nParents()) return false;
482  for(unsigned int i=0; i<part->nParents(); ++i){
483  const xAOD::TruthParticle* parent = part->parent(i);
484  if(!parent) continue;
485  if(looping ) continue;
486  if(!MC::isW(parent)) continue;
487  if(MC::isCharm(part)){
488  //trick to get at least 50% of PowhegPythia c from FSR
489  if(part->pdgId()==-(parent->pdgId())/6){
490  if( isFromGluonQuark(parent, looping) ) return true;
491  }
492  }
493  else{
494  if( isFromGluonQuark(parent, looping) ) return true;
495  }
496  }
497  return false;
498  }

◆ isDirectlyFSRPythia8()

bool DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia8 ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 540 of file HadronOriginClassifier.cxx.

540  {
541  // First, check if the particle has parents and return false if it does not.
542  if(!part->nParents()) return false;
543  // Use a for to go through the parents.
544  for(unsigned int i=0; i<part->nParents(); ++i){
545 
546  // Extract the i-th parent.
547 
548  const xAOD::TruthParticle* parent = part->parent(i);
549  if(!parent) continue;
550  if( looping ) continue;
552  if( isFromQuarkTopPythia8( parent,looping ) ) return true;
553  }
554  }
555  // In this case, no parent from the particle is a gluon or a photon coming from a top
556  // Hence, the particle is not from FSR and false is not returned.
557  return false;
558  }

◆ isDirectlyMPIPythia6()

bool DerivationFramework::HadronOriginClassifier::isDirectlyMPIPythia6 ( const xAOD::TruthParticle part,
bool  looping 
)
staticprivate

Definition at line 594 of file HadronOriginClassifier.cxx.

594  {
595  if(!part->nParents()) return false;
596  for(unsigned int i=0; i<part->nParents(); ++i){
597  const xAOD::TruthParticle* parent = part->parent(i);
598  if(!parent) continue;
599  if( looping ) continue;
600  if( abs(parent->pdgId()) == MC::PROTON && MC::isPhysical(part) ) return true;
601  }
602  return false;
603  }

◆ isDirectlyMPIPythia8()

bool DerivationFramework::HadronOriginClassifier::isDirectlyMPIPythia8 ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 605 of file HadronOriginClassifier.cxx.

605  {
606  const xAOD::TruthParticle* initpart = findInitial(part, looping);
607  return MC::Pythia8::isConditionC(initpart);
608  }

◆ isDirectlyMPISherpa()

bool DerivationFramework::HadronOriginClassifier::isDirectlyMPISherpa ( const xAOD::TruthParticle part)
staticprivate

Definition at line 610 of file HadronOriginClassifier.cxx.

610  {
611  if(!part->hasProdVtx()) return false;
612  const xAOD::TruthVertex* vertex = part->prodVtx();
613  return HepMC::status(vertex) == 2;
614  }

◆ isFromGluonQuark()

bool DerivationFramework::HadronOriginClassifier::isFromGluonQuark ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 475 of file HadronOriginClassifier.cxx.

475  {
476  const xAOD::TruthParticle* initpart = findInitial(part, looping);
477  return isDirectlyFromGluonQuark(initpart, looping);
478  }

◆ isFromQuarkTop()

bool DerivationFramework::HadronOriginClassifier::isFromQuarkTop ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 533 of file HadronOriginClassifier.cxx.

533  {
534  const xAOD::TruthParticle* initpart = findInitial(part, looping);
535  return isDirectlyFromQuarkTop(initpart, looping);
536  }

◆ isFromQuarkTopPythia8()

bool DerivationFramework::HadronOriginClassifier::isFromQuarkTopPythia8 ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 587 of file HadronOriginClassifier.cxx.

587  {
588  // Find the first parent of the considered particle that is different from the particle.
589  const xAOD::TruthParticle* initpart = findInitial(part, looping);
590  // Check if this parent comes from the top with function isDirectlyFromQuarkTopPythia8.
591  return isDirectlyFromQuarkTopPythia8(initpart, looping);
592  }

◆ isFromTop()

bool DerivationFramework::HadronOriginClassifier::isFromTop ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 411 of file HadronOriginClassifier.cxx.

411  {
412  // Find the first parent of the considered particle that is different from the particle.
413  const xAOD::TruthParticle* initpart = findInitial(part, looping);
414  // Check if this parent comes from the top with function isDirectlyFromTop.
415  return isDirectlyFromTop(initpart, looping);
416  }

◆ isFromWTop()

bool DerivationFramework::HadronOriginClassifier::isFromWTop ( const xAOD::TruthParticle part,
bool  looping 
) const
private

Definition at line 438 of file HadronOriginClassifier.cxx.

438  {
439  // Find the first parent of the considered particle that is different from the particle.
440  const xAOD::TruthParticle* initpart = findInitial(part, looping);
441  return isDirectlyFromWTop(initpart, looping);
442  }

◆ IsHerwigPP()

bool DerivationFramework::HadronOriginClassifier::IsHerwigPP ( ) const
inlineprivate

Definition at line 86 of file HadronOriginClassifier.h.

86 {return m_GenUsed==GEN_id::HerwigPP;};

◆ isLooping()

bool DerivationFramework::HadronOriginClassifier::isLooping ( const xAOD::TruthParticle part,
std::shared_ptr< std::set< const xAOD::TruthParticle * >>  checked = nullptr 
) const
private

init_part needed to detect looping graphs (sherpa) up to know only seen at parton level

Definition at line 623 of file HadronOriginClassifier.cxx.

623  {
624  // First, check if the particle has parents and return false if it does not.
625  if(!part->nParents()) return false;
626  // In this case, the particle has parents.
627  // Store the particle in the container init_part.
628  if (!init_part) init_part = std::make_shared<std::set<const xAOD::TruthParticle*>>();
629  init_part->insert(part);
630  // Use a for to go through the parents.
631  for(unsigned int i=0; i<part->nParents(); ++i){
632  // Get the i-th parent and check if it is in the container init_part.
633  // If it is not, return true because the parent need to be checked.
634  // Otherwise, check the parent of the parent and keep going until there is a parent to check or all parents are checked.
635  const xAOD::TruthParticle* parent = part->parent(i);
636  if(!parent) continue;
637  if( init_part->count(parent)) return true;
638  if( isLooping(parent, init_part) ) return true;
639  }
640  // If this point is reached, then it means that no parent needs to be checked.
641  // Hence, return false.
642  return false;
643  }

◆ IsPythia6()

bool DerivationFramework::HadronOriginClassifier::IsPythia6 ( ) const
inlineprivate

Definition at line 88 of file HadronOriginClassifier.h.

88 {return m_GenUsed==GEN_id::Pythia6;};

◆ IsPythia8()

bool DerivationFramework::HadronOriginClassifier::IsPythia8 ( ) const
inlineprivate

Definition at line 87 of file HadronOriginClassifier.h.

87 {return m_GenUsed==GEN_id::Pythia8;};

◆ IsSherpa()

bool DerivationFramework::HadronOriginClassifier::IsSherpa ( ) const
inlineprivate

Definition at line 89 of file HadronOriginClassifier.h.

89 {return m_GenUsed==GEN_id::Sherpa;};

◆ IsTtBb()

bool DerivationFramework::HadronOriginClassifier::IsTtBb ( ) const
inlineprivate

Definition at line 90 of file HadronOriginClassifier.h.

90 {return m_ttbb;}

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

◆ 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_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_DSID

Gaudi::Property<int> DerivationFramework::HadronOriginClassifier::m_DSID {this, "DSID", 410000}
private

Definition at line 95 of file HadronOriginClassifier.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_GenUsed

GEN_id DerivationFramework::HadronOriginClassifier::m_GenUsed {}
private

Definition at line 96 of file HadronOriginClassifier.h.

◆ m_HadronEtaMaxCut

Gaudi::Property<double> DerivationFramework::HadronOriginClassifier::m_HadronEtaMaxCut {this, "HadronetaMaxCut", 2.5}
private

MeV.

Definition at line 94 of file HadronOriginClassifier.h.

◆ m_HadronPtMinCut

Gaudi::Property<double> DerivationFramework::HadronOriginClassifier::m_HadronPtMinCut {this, "HadronpTMinCut", 5000.}
private

Definition at line 93 of file HadronOriginClassifier.h.

◆ m_mcName

Gaudi::Property<std::string> DerivationFramework::HadronOriginClassifier::m_mcName {this, "MCCollectionName", "TruthEvents"}
private

Definition at line 92 of file HadronOriginClassifier.h.

◆ m_ttbb

bool DerivationFramework::HadronOriginClassifier::m_ttbb {false}
private

Definition at line 97 of file HadronOriginClassifier.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
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
DerivationFramework::HadronOriginClassifier::isDirectlyMPIPythia8
bool isDirectlyMPIPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:605
DerivationFramework::HadronOriginClassifier::m_DSID
Gaudi::Property< int > m_DSID
Definition: HadronOriginClassifier.h:95
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MCTruthPartClassifier::hadron
@ hadron
Definition: TruthClassifiers.h:148
DerivationFramework::HadronOriginClassifier::isFromTop
bool isFromTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:411
DerivationFramework::HadronOriginClassifier::isDirectlyMPISherpa
static bool isDirectlyMPISherpa(const xAOD::TruthParticle *part)
Definition: HadronOriginClassifier.cxx:610
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DerivationFramework::HadronOriginClassifier::GEN_id::HerwigPP
@ HerwigPP
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::HadronOriginClassifier::b_FSR
@ b_FSR
Definition: HadronOriginClassifier.h:38
DerivationFramework::HadronOriginClassifier::c_from_H
@ c_from_H
Definition: HadronOriginClassifier.h:41
DerivationFramework::HadronOriginClassifier::GEN_id::Sherpa
@ Sherpa
MC::Pythia8::isConditionC
bool isConditionC(const T &p)
Definition: HepMCHelpers.h:27
DerivationFramework::HadronOriginClassifier::c_FSR
@ c_FSR
Definition: HadronOriginClassifier.h:38
DerivationFramework::HadronOriginClassifier::IsHerwigPP
bool IsHerwigPP() const
Definition: HadronOriginClassifier.h:86
skel.it
it
Definition: skel.GENtoEVGEN.py:407
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
DerivationFramework::HadronOriginClassifier::c_MPI
@ c_MPI
Definition: HadronOriginClassifier.h:37
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::HadronOriginClassifier::HF_id
HF_id
Definition: HadronOriginClassifier.h:36
DerivationFramework::HadronOriginClassifier::c_from_W
@ c_from_W
Definition: HadronOriginClassifier.h:39
DerivationFramework::HadronOriginClassifier::isDirectlyFSR
bool isDirectlyFSR(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:500
isBottomHadron
bool isBottomHadron(const T &p)
Definition: AtlasPID.h:846
DerivationFramework::HadronOriginClassifier::isFromGluonQuark
bool isFromGluonQuark(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:475
DerivationFramework::HadronOriginClassifier::c_from_top
@ c_from_top
Definition: HadronOriginClassifier.h:40
isGluon
bool isGluon(const T &p)
Definition: AtlasPID.h:346
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Pythia8
Author: James Monk (jmonk@cern.ch)
Definition: IPythia8Custom.h:10
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
DerivationFramework::HadronOriginClassifier::b_from_W
@ b_from_W
Definition: HadronOriginClassifier.h:39
DerivationFramework::HadronOriginClassifier::isFromQuarkTop
bool isFromQuarkTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:533
DerivationFramework::HadronOriginClassifier::fillHadronMap
void fillHadronMap(std::set< const xAOD::TruthParticle * > &usedHadron, std::map< const xAOD::TruthParticle *, int > &mainHadronMap, const xAOD::TruthParticle *mainhad, const xAOD::TruthParticle *ihad, bool decayed=false) const
Definition: HadronOriginClassifier.cxx:364
MC::isPhysical
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
Definition: HepMCHelpers.h:51
DerivationFramework::HadronOriginClassifier::IsSherpa
bool IsSherpa() const
Definition: HadronOriginClassifier.h:89
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
DerivationFramework::HadronOriginClassifier::findInitial
const xAOD::TruthParticle * findInitial(const xAOD::TruthParticle *part, bool looping, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
Definition: HadronOriginClassifier.cxx:646
DerivationFramework::HadronOriginClassifier::m_ttbb
bool m_ttbb
Definition: HadronOriginClassifier.h:97
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::HadronOriginClassifier::isDirectlyMPIPythia6
static bool isDirectlyMPIPythia6(const xAOD::TruthParticle *part, bool looping)
Definition: HadronOriginClassifier.cxx:594
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
DerivationFramework::HadronOriginClassifier::b_MPI
@ b_MPI
Definition: HadronOriginClassifier.h:37
lumiFormat.i
int i
Definition: lumiFormat.py:85
leadingQuark
int leadingQuark(const T &p)
Definition: AtlasPID.h:823
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::HadronOriginClassifier::isFromWTop
bool isFromWTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:438
DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia8
bool isDirectlyFSRPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:540
DerivationFramework::HadronOriginClassifier::m_GenUsed
GEN_id m_GenUsed
Definition: HadronOriginClassifier.h:96
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DerivationFramework::HadronOriginClassifier::GEN_id::Pythia8
@ Pythia8
DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia6
bool isDirectlyFSRPythia6(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:480
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DerivationFramework::HadronOriginClassifier::isDirectlyFromGluonQuark
static bool isDirectlyFromGluonQuark(const xAOD::TruthParticle *part, bool looping)
Definition: HadronOriginClassifier.cxx:464
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
DerivationFramework::HadronOriginClassifier::isDirectlyFromQuarkTopPythia8
bool isDirectlyFromQuarkTopPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:561
DerivationFramework::HadronOriginClassifier::isDirectlyFromQuarkTop
bool isDirectlyFromQuarkTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:513
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
xAOD::TruthParticle_v1::nChildren
size_t nChildren() const
Number of children of this particle.
Definition: TruthParticle_v1.cxx:140
DerivationFramework::HadronOriginClassifier::isDirectlyFromTop
static bool isDirectlyFromTop(const xAOD::TruthParticle *part, bool looping)
Definition: HadronOriginClassifier.cxx:419
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
DerivationFramework::HadronOriginClassifier::IsPythia6
bool IsPythia6() const
Definition: HadronOriginClassifier.h:88
DerivationFramework::HadronOriginClassifier::b_from_H
@ b_from_H
Definition: HadronOriginClassifier.h:41
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
DerivationFramework::HadronOriginClassifier::m_mcName
Gaudi::Property< std::string > m_mcName
Definition: HadronOriginClassifier.h:92
python.PyAthena.v
v
Definition: PyAthena.py:154
DerivationFramework::HadronOriginClassifier::IsPythia8
bool IsPythia8() const
Definition: HadronOriginClassifier.h:87
isW
bool isW(const T &p)
Definition: AtlasPID.h:355
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
isTop
bool isTop(const T &p)
Definition: AtlasPID.h:175
h
DerivationFramework::HadronOriginClassifier::isDirectlyFromWTop
bool isDirectlyFromWTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:445
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::HadronOriginClassifier::IsTtBb
bool IsTtBb() const
Definition: HadronOriginClassifier.h:90
DerivationFramework::HadronOriginClassifier::isFromQuarkTopPythia8
bool isFromQuarkTopPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:587
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
isCharm
bool isCharm(const T &p)
Definition: AtlasPID.h:169
isCharmHadron
bool isCharmHadron(const T &p)
Definition: AtlasPID.h:845
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::HadronOriginClassifier::extrajet
@ extrajet
Definition: HadronOriginClassifier.h:36
HepMC::status
int status(const T &p)
Definition: MagicNumbers.h:138
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::HadronOriginClassifier::buildPartonsHadronsMaps
void buildPartonsHadronsMaps(std::map< const xAOD::TruthParticle *, int > &mainHadronMap, std::map< const xAOD::TruthParticle *, HF_id > &partonsOrigin) const
Definition: HadronOriginClassifier.cxx:229
DerivationFramework::HadronOriginClassifier::b_from_top
@ b_from_top
Definition: HadronOriginClassifier.h:40
DerivationFramework::HadronOriginClassifier::isLooping
bool isLooping(const xAOD::TruthParticle *part, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
init_part needed to detect looping graphs (sherpa) up to know only seen at parton level
Definition: HadronOriginClassifier.cxx:623
fitman.k
k
Definition: fitman.py:528
DerivationFramework::HadronOriginClassifier::isCHadronFromB
bool isCHadronFromB(const xAOD::TruthParticle *part, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
Definition: HadronOriginClassifier.cxx:342
DerivationFramework::HadronOriginClassifier::GEN_id::Pythia6
@ Pythia6