ATLAS Offline Software
TruthDecoratorHelpers.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRUTH_DECORATOR_HELPERS_HH
6 #define TRUTH_DECORATOR_HELPERS_HH
7 
10 
12 
13 namespace FlavorTagDiscriminants {
14  namespace TruthDecoratorHelpers {
15  namespace TruthType {
16  enum Label {
17  NoTruth = 0,
18  Other = 1,
19  Pion = 2,
20  Kaon = 3,
21  Lambda = 4,
22  Electron = 5,
23  Muon = 6,
24  Photon = 7
25  };
26  }
27  namespace TruthSource {
28  enum Label {
29  NoTruth = 0,
35  Other = 6
36  };
37  }
38  bool sort_particles(const xAOD::IParticle* particle_A, const xAOD::IParticle* particle_B);
39  int get_truth_type(const xAOD::TruthParticle* truth_particle);
40  int get_source_type(const int origin);
41 
42  bool is_bc_hadron(const xAOD::TruthParticle* truth_particle, int flavour);
43  bool is_weakly_decaying_hadron(const xAOD::TruthParticle* truth_particle);
44  bool is_weakly_decaying_hadron(const xAOD::TruthParticle* truth_particle, int flavour);
45  const xAOD::TruthParticle* get_parent_hadron(const xAOD::TruthParticle* truth_particle, bool user_called=true, int depth=0);
46 
48  float get_distance(const xAOD::TruthVertex* vertex_A, const xAOD::TruthVertex* vertex_B);
50  const xAOD::TruthVertex* truth_PV,
51  std::vector<const xAOD::TruthVertex*>& seen_vertices,
52  const float truthVertexMergeDistance);
53  }
54 }
55 
56 #endif
FlavorTagDiscriminants::TruthDecoratorHelpers::is_bc_hadron
bool is_bc_hadron(const xAOD::TruthParticle *truth_particle, int flavour)
Definition: TruthDecoratorHelpers.cxx:34
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
FlavorTagDiscriminants::TruthDecoratorHelpers::get_distance
float get_distance(const xAOD::TruthVertex *vertex_A, const xAOD::TruthVertex *vertex_B)
Definition: TruthDecoratorHelpers.cxx:29
FlavorTagDiscriminants
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: AssociationEnums.h:11
FlavorTagDiscriminants::TruthDecoratorHelpers::is_weakly_decaying_hadron
bool is_weakly_decaying_hadron(const xAOD::TruthParticle *truth_particle)
Definition: TruthDecoratorHelpers.cxx:50
FlavorTagDiscriminants::TruthDecoratorHelpers::get_parent_hadron
const xAOD::TruthParticle * get_parent_hadron(const xAOD::TruthParticle *truth_particle, bool user_called=true, int depth=0)
Definition: TruthDecoratorHelpers.cxx:54
FlavorTagDiscriminants::TruthDecoratorHelpers::get_source_type
int get_source_type(const int origin)
Definition: TruthDecoratorHelpers.cxx:88
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::Kaon
@ Kaon
Definition: TruthDecoratorHelpers.h:20
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::NotSecondary
@ NotSecondary
Definition: TruthDecoratorHelpers.h:30
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
Photon
Class describing an photon
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::Label
Label
Definition: TruthDecoratorHelpers.h:28
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::StrangeMesonDecay
@ StrangeMesonDecay
Definition: TruthDecoratorHelpers.h:32
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
FlavorTagDiscriminants::TruthDecoratorHelpers::get_truth_vertex
const xAOD::TruthVertex * get_truth_vertex(const xAOD::TruthParticle *truth)
Definition: TruthDecoratorHelpers.cxx:16
TruthVertex.h
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::HadronicInteraction
@ HadronicInteraction
Definition: TruthDecoratorHelpers.h:31
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::Other
@ Other
Definition: TruthDecoratorHelpers.h:18
FlavorTagDiscriminants::TruthDecoratorHelpers::get_vertex_index
int get_vertex_index(const xAOD::TruthVertex *vertex, const xAOD::TruthVertex *truth_PV, std::vector< const xAOD::TruthVertex * > &seen_vertices, const float truthVertexMergeDistance)
Definition: TruthDecoratorHelpers.cxx:101
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::GammaConversion
@ GammaConversion
Definition: TruthDecoratorHelpers.h:34
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::Other
@ Other
Definition: TruthDecoratorHelpers.h:35
InDetTrackTruthOriginDefs.h
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::NoTruth
@ NoTruth
Definition: TruthDecoratorHelpers.h:17
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
FlavorTagDiscriminants::TruthDecoratorHelpers::sort_particles
bool sort_particles(const xAOD::IParticle *particle_A, const xAOD::IParticle *particle_B)
Definition: TruthDecoratorHelpers.cxx:12
Electron
Class describing an electron.
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::StrangeBaryonDecay
@ StrangeBaryonDecay
Definition: TruthDecoratorHelpers.h:33
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthSource::NoTruth
@ NoTruth
Definition: TruthDecoratorHelpers.h:29
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::Pion
@ Pion
Definition: TruthDecoratorHelpers.h:19
FlavorTagDiscriminants::TruthDecoratorHelpers::get_truth_type
int get_truth_type(const xAOD::TruthParticle *truth_particle)
Definition: TruthDecoratorHelpers.cxx:75
TruthParticle.h
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::Lambda
@ Lambda
Definition: TruthDecoratorHelpers.h:21
FlavorTagDiscriminants::TruthDecoratorHelpers::TruthType::Label
Label
Definition: TruthDecoratorHelpers.h:16