ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_TrackDecaySelectionTool Class Reference

#include <HGTD_TrackDecaySelectionTool.h>

Inheritance diagram for HGTD_TrackDecaySelectionTool:
Collaboration diagram for HGTD_TrackDecaySelectionTool:

Public Member Functions

 HGTD_TrackDecaySelectionTool (const std::string &, const std::string &, const IInterface *)
virtual ~HGTD_TrackDecaySelectionTool ()=default
virtual StatusCode initialize () override final
virtual bool trackPassesSelection (const xAOD::TrackParticle *track_particle) const override final
 Selects tracks that have a valid link to a truth particle and for which the decay vertex is inside of a box in the z/r plane defined by the selected min/max values.

Private Attributes

Gaudi::Property< float > m_min_radius_prod
Gaudi::Property< float > m_max_radius_prod
Gaudi::Property< float > m_min_z_prod
Gaudi::Property< float > m_max_z_prod
Gaudi::Property< float > m_min_radius_dec
Gaudi::Property< float > m_max_radius_dec
Gaudi::Property< float > m_min_z_dec
Gaudi::Property< float > m_max_z_dec

Detailed Description

Definition at line 12 of file HGTD_TrackDecaySelectionTool.h.

Constructor & Destructor Documentation

◆ HGTD_TrackDecaySelectionTool()

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

Definition at line 11 of file HGTD_TrackDecaySelectionTool.cxx.

14 : base_class(t, n, p) {}

◆ ~HGTD_TrackDecaySelectionTool()

virtual HGTD_TrackDecaySelectionTool::~HGTD_TrackDecaySelectionTool ( )
virtualdefault

Member Function Documentation

◆ initialize()

StatusCode HGTD_TrackDecaySelectionTool::initialize ( )
finaloverridevirtual

Definition at line 16 of file HGTD_TrackDecaySelectionTool.cxx.

16 {
17 return StatusCode::SUCCESS;
18}

◆ trackPassesSelection()

bool HGTD_TrackDecaySelectionTool::trackPassesSelection ( const xAOD::TrackParticle * track_particle) const
finaloverridevirtual

Selects tracks that have a valid link to a truth particle and for which the decay vertex is inside of a box in the z/r plane defined by the selected min/max values.

Definition at line 24 of file HGTD_TrackDecaySelectionTool.cxx.

25 {
26
27 const xAOD::TruthParticle* truth_particle =
29
30 if (truth_particle and truth_particle->hasProdVtx()) {
31
32 const xAOD::TruthVertex* truth_vertex_prod = truth_particle->prodVtx();
33
34 float prodVTX_r_abs = std::hypot(std::abs(truth_vertex_prod->x()),
35 std::abs(truth_vertex_prod->y()));
36 float prodVTX_z_abs = std::abs(truth_vertex_prod->z());
37
38 if (prodVTX_r_abs < m_min_radius_prod or
39 prodVTX_r_abs > m_max_radius_prod or prodVTX_z_abs < m_min_z_prod or
40 prodVTX_z_abs > m_max_z_prod) {
41 return false;
42 }
43
44 const xAOD::TruthVertex* truth_vertex_decay = truth_particle->decayVtx();
45 if (not truth_vertex_decay) {
46 return true;
47 }
48
49 float decayVTX_r_abs = std::hypot(std::abs(truth_vertex_decay->x()),
50 std::abs(truth_vertex_decay->y()));
51 float decayVTX_z_abs = std::abs(truth_vertex_decay->z());
52
53 ATH_MSG_DEBUG("Track has a decay vertex at z = "
54 << decayVTX_z_abs << " and r = " << decayVTX_r_abs);
55
56 return decayVTX_r_abs > m_min_radius_dec and
57 decayVTX_r_abs < m_max_radius_dec and
58 decayVTX_z_abs > m_min_z_dec and decayVTX_z_abs < m_max_z_dec;
59 }
60
61 return false;
62}
#define ATH_MSG_DEBUG(x,...)
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
bool hasProdVtx() const
Check for a production vertex on this particle.
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
float z() const
Vertex longitudinal distance along the beam line form the origin.
float y() const
Vertex y displacement.
float x() const
Vertex x displacement.
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any).
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15
TruthParticle_v1 TruthParticle
Typedef to implementation.

Member Data Documentation

◆ m_max_radius_dec

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_max_radius_dec
private
Initial value:
{
this, "MazRadiusDecay", 999999999,
"Maximum accepted radius of the decay vertex"}

Definition at line 47 of file HGTD_TrackDecaySelectionTool.h.

47 {
48 this, "MazRadiusDecay", 999999999,
49 "Maximum accepted radius of the decay vertex"};

◆ m_max_radius_prod

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_max_radius_prod
private
Initial value:
{
this, "MazRadiusProduction", 10,
"Maximum accepted radius of the production vertex"}

Definition at line 35 of file HGTD_TrackDecaySelectionTool.h.

35 {
36 this, "MazRadiusProduction", 10,
37 "Maximum accepted radius of the production vertex"};

◆ m_max_z_dec

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_max_z_dec
private
Initial value:
{
this, "MaxZDecay", 999999999,
"Maximum accepted z coordinate of the decay vertex"}

Definition at line 53 of file HGTD_TrackDecaySelectionTool.h.

53 {
54 this, "MaxZDecay", 999999999,
55 "Maximum accepted z coordinate of the decay vertex"};

◆ m_max_z_prod

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_max_z_prod
private
Initial value:
{
this, "MaxZProduction", 100,
"Maximum accepted z coordinate of the production vertex"}

Definition at line 41 of file HGTD_TrackDecaySelectionTool.h.

41 {
42 this, "MaxZProduction", 100,
43 "Maximum accepted z coordinate of the production vertex"};

◆ m_min_radius_dec

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_min_radius_dec
private
Initial value:
{
this, "MinRadiusDecay", 0, "Minimum accepted radius of the decay vertex"}

Definition at line 45 of file HGTD_TrackDecaySelectionTool.h.

45 {
46 this, "MinRadiusDecay", 0, "Minimum accepted radius of the decay vertex"};

◆ m_min_radius_prod

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_min_radius_prod
private
Initial value:
{
this, "MinRadiusProduction", 0,
"Minimum accepted radius of the production vertex"}

Definition at line 32 of file HGTD_TrackDecaySelectionTool.h.

32 {
33 this, "MinRadiusProduction", 0,
34 "Minimum accepted radius of the production vertex"};

◆ m_min_z_dec

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_min_z_dec
private
Initial value:
{
this, "MinZDecay", 3479,
"Minimum accepted z coordinate of the decay vertex"}

Definition at line 50 of file HGTD_TrackDecaySelectionTool.h.

50 {
51 this, "MinZDecay", 3479,
52 "Minimum accepted z coordinate of the decay vertex"};

◆ m_min_z_prod

Gaudi::Property<float> HGTD_TrackDecaySelectionTool::m_min_z_prod
private
Initial value:
{
this, "MinZProduction", 0,
"Minimum accepted z coordinate of the production vertex"}

Definition at line 38 of file HGTD_TrackDecaySelectionTool.h.

38 {
39 this, "MinZProduction", 0,
40 "Minimum accepted z coordinate of the production vertex"};

The documentation for this class was generated from the following files: