![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
14 , m_accept(
"TrackTruthSelection")
15 , m_numTruthProcessed(0)
16 , m_numTruthPassed(0) {
17 declareInterface<IAsgSelectionTool>(
this);
35 return StatusCode::FAILURE;
42 m_cuts.emplace_back(
"eta",
"Cut on (absolute) particle eta");
45 m_cuts.emplace_back(
"min_pt",
"Cut on minimum particle pT");
48 m_cuts.emplace_back(
"max_pt",
"Cut on maximum particle pT");
52 m_cuts.emplace_back(
"OnlyPrimary",
"Cut on origin");
56 m_cuts.emplace_back(
"charged",
"Require charged particle");
59 m_cuts.emplace_back(
"status_1",
"Particle status=1");
63 m_cuts.emplace_back(
"decay_before_pixel",
"Decays before first pixel layer");
67 m_cuts.emplace_back(
"pdgId",
"Pdg Id cut");
72 ATH_MSG_ERROR(
"Failed to add cut " <<
cut.first <<
" because the AcceptInfo object is full.");
73 return StatusCode::FAILURE;
80 return StatusCode::SUCCESS;
93 ATH_MSG_ERROR(
"accept(...) Function received a null pointer");
97 ATH_MSG_ERROR(
"accept(...) Function received a non-TruthParticle");
138 std::lock_guard<std::mutex> lock{
m_mutex};
143 m_numTruthPassedCuts[
pos]++;
160 return StatusCode::SUCCESS;
167 <<
cut.first <<
" cut.");
170 return StatusCode::SUCCESS;
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode accept(const xAOD::Muon *mu)
unsigned int getCutPosition(const std::string &cutName) const
Get the bit position of a cut.
Class providing the definition of the 4-vector interface.
unsigned int getCutPosition(const std::string &cutName) const
Get the bit position of a cut.
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...
::StatusCode StatusCode
StatusCode definition for legacy code.
unsigned int getNCuts() const
Get the number of cuts defined.
Class describing a truth particle in the MC record.
TruthParticle_v1 TruthParticle
Typedef to implementation.
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.
void setCutResult(const std::string &cutName, bool cutResult)
Set the result of a cut, based on the cut name (safer)
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
int addCut(const std::string &cutName, const std::string &cutDescription)
Add a cut; returning the cut position.