ATLAS Offline Software
Public Types | Public Member Functions | Static 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 { Pythia6 =0, Pythia8 =1, HerwigPP =2, 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

std::string m_mcName
 
double m_HadronPtMinCut
 
double m_HadronEtaMaxCut
 
int m_DSID
 
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 31 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 50 of file HadronOriginClassifier.h.

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

◆ 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 43 of file HadronOriginClassifier.h.

43  {extrajet=0,
44  c_MPI =-1, b_MPI =1,
45  c_FSR =-2, b_FSR =2,
46  c_from_W =-3, b_from_W =3,
47  c_from_top=-4, b_from_top =4,
48  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 
)

MeV

Definition at line 9 of file HadronOriginClassifier.cxx.

9  :
10  AthAlgTool(t,n,p),
11  m_mcName("TruthEvents"),
14  m_DSID(0)
15  {
16  declareInterface<DerivationFramework::HadronOriginClassifier>(this);
17 
18  declareProperty("MCCollectionName",m_mcName="TruthEvents");
19  declareProperty("HadronpTMinCut",m_HadronPtMinCut=5000.);
20  declareProperty("HadronetaMaxCut",m_HadronEtaMaxCut=2.5);
21  declareProperty("DSID",m_DSID=410000);
22  }

◆ ~HadronOriginClassifier()

DerivationFramework::HadronOriginClassifier::~HadronOriginClassifier ( )
virtual

Definition at line 24 of file HadronOriginClassifier.cxx.

24 {}

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 227 of file HadronOriginClassifier.cxx.

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

◆ 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 362 of file HadronOriginClassifier.cxx.

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

◆ 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 644 of file HadronOriginClassifier.cxx.

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

◆ GetOriginMap()

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

Definition at line 159 of file HadronOriginClassifier.cxx.

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

◆ initialize()

StatusCode DerivationFramework::HadronOriginClassifier::initialize ( )
overridevirtual

Definition at line 26 of file HadronOriginClassifier.cxx.

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

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

◆ interfaceID()

static const InterfaceID& DerivationFramework::HadronOriginClassifier::interfaceID ( )
inlinestatic

Definition at line 40 of file HadronOriginClassifier.h.

40 { return IID_HadronOriginClassifier; }

◆ isCHadronFromB()

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

Definition at line 340 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFromGluonQuark()

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

Definition at line 462 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFromQuarkTop()

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

Definition at line 511 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFromQuarkTopPythia8()

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

Definition at line 559 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFromTop()

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

Definition at line 417 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFromWTop()

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

Definition at line 443 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFSR()

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

Definition at line 498 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFSRPythia6()

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

Definition at line 478 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyFSRPythia8()

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

Definition at line 538 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyMPIPythia6()

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

Definition at line 592 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyMPIPythia8()

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

Definition at line 603 of file HadronOriginClassifier.cxx.

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

◆ isDirectlyMPISherpa()

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

Definition at line 608 of file HadronOriginClassifier.cxx.

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

◆ isFromGluonQuark()

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

Definition at line 473 of file HadronOriginClassifier.cxx.

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

◆ isFromQuarkTop()

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

Definition at line 531 of file HadronOriginClassifier.cxx.

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

◆ isFromQuarkTopPythia8()

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

Definition at line 585 of file HadronOriginClassifier.cxx.

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

◆ isFromTop()

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

Definition at line 409 of file HadronOriginClassifier.cxx.

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

◆ isFromWTop()

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

Definition at line 436 of file HadronOriginClassifier.cxx.

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

◆ IsHerwigPP()

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

Definition at line 93 of file HadronOriginClassifier.h.

93 {return m_GenUsed==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 621 of file HadronOriginClassifier.cxx.

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

◆ IsPythia6()

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

Definition at line 95 of file HadronOriginClassifier.h.

95 {return m_GenUsed==Pythia6;};

◆ IsPythia8()

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

Definition at line 94 of file HadronOriginClassifier.h.

94 {return m_GenUsed==Pythia8;};

◆ IsSherpa()

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

Definition at line 96 of file HadronOriginClassifier.h.

96 {return m_GenUsed==Sherpa;};

◆ IsTtBb()

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

Definition at line 97 of file HadronOriginClassifier.h.

97 {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

int DerivationFramework::HadronOriginClassifier::m_DSID
private

Definition at line 102 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 103 of file HadronOriginClassifier.h.

◆ m_HadronEtaMaxCut

double DerivationFramework::HadronOriginClassifier::m_HadronEtaMaxCut
private

Definition at line 101 of file HadronOriginClassifier.h.

◆ m_HadronPtMinCut

double DerivationFramework::HadronOriginClassifier::m_HadronPtMinCut
private

Definition at line 100 of file HadronOriginClassifier.h.

◆ m_mcName

std::string DerivationFramework::HadronOriginClassifier::m_mcName
private

Definition at line 99 of file HadronOriginClassifier.h.

◆ m_ttbb

bool DerivationFramework::HadronOriginClassifier::m_ttbb = false
private

Definition at line 104 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:603
MCTruthPartClassifier::hadron
@ hadron
Definition: TruthClassifiers.h:148
DerivationFramework::HadronOriginClassifier::isFromTop
bool isFromTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:409
DerivationFramework::HadronOriginClassifier::isDirectlyMPISherpa
static bool isDirectlyMPISherpa(const xAOD::TruthParticle *part)
Definition: HadronOriginClassifier.cxx:608
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::HadronOriginClassifier::b_FSR
@ b_FSR
Definition: HadronOriginClassifier.h:45
DerivationFramework::HadronOriginClassifier::c_from_H
@ c_from_H
Definition: HadronOriginClassifier.h:48
MC::Pythia8::isConditionC
bool isConditionC(const T &p)
Definition: HepMCHelpers.h:27
DerivationFramework::HadronOriginClassifier::c_FSR
@ c_FSR
Definition: HadronOriginClassifier.h:45
DerivationFramework::HadronOriginClassifier::IsHerwigPP
bool IsHerwigPP() const
Definition: HadronOriginClassifier.h:93
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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::HerwigPP
@ HerwigPP
Definition: HadronOriginClassifier.h:50
DerivationFramework::HadronOriginClassifier::c_MPI
@ c_MPI
Definition: HadronOriginClassifier.h:44
DerivationFramework::HadronOriginClassifier::m_HadronEtaMaxCut
double m_HadronEtaMaxCut
Definition: HadronOriginClassifier.h:101
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::HadronOriginClassifier::HF_id
HF_id
Definition: HadronOriginClassifier.h:43
DerivationFramework::HadronOriginClassifier::c_from_W
@ c_from_W
Definition: HadronOriginClassifier.h:46
DerivationFramework::HadronOriginClassifier::isDirectlyFSR
bool isDirectlyFSR(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:498
isBottomHadron
bool isBottomHadron(const T &p)
Definition: AtlasPID.h:509
DerivationFramework::HadronOriginClassifier::isFromGluonQuark
bool isFromGluonQuark(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:473
DerivationFramework::HadronOriginClassifier::c_from_top
@ c_from_top
Definition: HadronOriginClassifier.h:47
isGluon
bool isGluon(const T &p)
Definition: AtlasPID.h:167
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Pythia8
Author: James Monk (jmonk@cern.ch)
Definition: IPythia8Custom.h:13
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
DerivationFramework::HadronOriginClassifier::b_from_W
@ b_from_W
Definition: HadronOriginClassifier.h:46
DerivationFramework::HadronOriginClassifier::isFromQuarkTop
bool isFromQuarkTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:531
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:362
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:96
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:644
DerivationFramework::HadronOriginClassifier::m_ttbb
bool m_ttbb
Definition: HadronOriginClassifier.h:104
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:592
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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:342
DerivationFramework::HadronOriginClassifier::b_MPI
@ b_MPI
Definition: HadronOriginClassifier.h:44
lumiFormat.i
int i
Definition: lumiFormat.py:85
leadingQuark
int leadingQuark(const T &p)
Definition: AtlasPID.h:487
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::HadronOriginClassifier::GEN_id
GEN_id
Definition: HadronOriginClassifier.h:50
DerivationFramework::HadronOriginClassifier::Pythia8
@ Pythia8
Definition: HadronOriginClassifier.h:50
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:436
DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia8
bool isDirectlyFSRPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:538
DerivationFramework::HadronOriginClassifier::m_GenUsed
GEN_id m_GenUsed
Definition: HadronOriginClassifier.h:103
DerivationFramework::HadronOriginClassifier::m_HadronPtMinCut
double m_HadronPtMinCut
Definition: HadronOriginClassifier.h:100
test_pyathena.parent
parent
Definition: test_pyathena.py:15
DerivationFramework::HadronOriginClassifier::isDirectlyFSRPythia6
bool isDirectlyFSRPythia6(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:478
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DerivationFramework::HadronOriginClassifier::Pythia6
@ Pythia6
Definition: HadronOriginClassifier.h:50
DerivationFramework::HadronOriginClassifier::isDirectlyFromGluonQuark
static bool isDirectlyFromGluonQuark(const xAOD::TruthParticle *part, bool looping)
Definition: HadronOriginClassifier.cxx:462
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
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:559
DerivationFramework::HadronOriginClassifier::isDirectlyFromQuarkTop
bool isDirectlyFromQuarkTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:511
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:417
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DerivationFramework::HadronOriginClassifier::IsPythia6
bool IsPythia6() const
Definition: HadronOriginClassifier.h:95
DerivationFramework::HadronOriginClassifier::b_from_H
@ b_from_H
Definition: HadronOriginClassifier.h:48
python.PyAthena.v
v
Definition: PyAthena.py:154
DerivationFramework::HadronOriginClassifier::IsPythia8
bool IsPythia8() const
Definition: HadronOriginClassifier.h:94
DerivationFramework::HadronOriginClassifier::m_mcName
std::string m_mcName
Definition: HadronOriginClassifier.h:99
isW
bool isW(const T &p)
Definition: AtlasPID.h:176
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
h
DerivationFramework::HadronOriginClassifier::isDirectlyFromWTop
bool isDirectlyFromWTop(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:443
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::HadronOriginClassifier::IsTtBb
bool IsTtBb() const
Definition: HadronOriginClassifier.h:97
DerivationFramework::HadronOriginClassifier::isFromQuarkTopPythia8
bool isFromQuarkTopPythia8(const xAOD::TruthParticle *part, bool looping) const
Definition: HadronOriginClassifier.cxx:585
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
xAOD::TruthParticle_v1::child
const TruthParticle_v1 * child(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:149
isCharmHadron
bool isCharmHadron(const T &p)
Definition: AtlasPID.h:508
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DerivationFramework::HadronOriginClassifier::m_DSID
int m_DSID
Definition: HadronOriginClassifier.h:102
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
DerivationFramework::HadronOriginClassifier::extrajet
@ extrajet
Definition: HadronOriginClassifier.h:43
HepMC::status
int status(const T &p)
Definition: MagicNumbers.h:125
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:227
DerivationFramework::HadronOriginClassifier::b_from_top
@ b_from_top
Definition: HadronOriginClassifier.h:47
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:621
fitman.k
k
Definition: fitman.py:528
DerivationFramework::HadronOriginClassifier::Sherpa
@ Sherpa
Definition: HadronOriginClassifier.h:50
DerivationFramework::HadronOriginClassifier::isCHadronFromB
bool isCHadronFromB(const xAOD::TruthParticle *part, std::shared_ptr< std::set< const xAOD::TruthParticle * >> checked=nullptr) const
Definition: HadronOriginClassifier.cxx:340