|
ATLAS Offline Software
|
Go to the documentation of this file.
14 declareInterface<IAsgSelectionTool>(
this);
22 return StatusCode::FAILURE;
29 m_cuts.emplace_back(
"eta",
"Cut on (absolute) particle eta");
32 m_cuts.emplace_back(
"min_pt",
"Cut on minimum particle pT");
35 m_cuts.emplace_back(
"max_pt",
"Cut on maximum particle pT");
39 m_cuts.emplace_back(
"OnlyPrimary",
"Cut on origin");
43 m_cuts.emplace_back(
"charged",
"Require charged particle");
46 m_cuts.emplace_back(
"stable",
"Particle stable");
50 m_cuts.emplace_back(
"decay_before_pixel",
"Decays before first pixel layer");
54 m_cuts.emplace_back(
"pdgId",
"Pdg Id cut");
59 ATH_MSG_ERROR(
"Failed to add cut " <<
cut.first <<
" because the AcceptInfo object is full.");
60 return StatusCode::FAILURE;
67 return StatusCode::SUCCESS;
80 ATH_MSG_ERROR(
"accept(...) Function received a null pointer");
84 ATH_MSG_ERROR(
"accept(...) Function received a non-TruthParticle");
125 std::lock_guard<std::mutex> lock{
m_mutex};
130 m_numTruthPassedCuts[
pos]++;
147 return StatusCode::SUCCESS;
154 <<
cut.first <<
" cut.");
157 return StatusCode::SUCCESS;
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.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
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.