![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
22 constexpr
int electronId(11);
23 constexpr
int gammaId(22);
27 for (
uint i = 0;
i < nPar;
i++) {
28 for (
const int & ancestorID : allowedAncestors) {
29 if (std::abs(
particle->parent(
i)->pdgId()) == ancestorID) {
34 for (
uint i = 0;
i < nPar;
i++) {
36 if (hasAncestor(
parent, allowedAncestors))
return true;
44 const IInterface*
parent) :
49 declareInterface<IAthSelectionTool>(
this);
63 declareProperty(
"poselectronfromgamma", m_poselectronfromgamma =
false);
64 declareProperty(
"radiusCylinder", m_radiusCylinder=-1,
"Select truth particle based on extrapolated position on cylinder placed at this radius. Enabled if greater than 0.");
65 declareProperty(
"minZCylinder", m_minZCylinder=0.0,
"Minimum |Z| on cylinder for accepting extrapolated truth particle to surface.");
66 declareProperty(
"maxZCylinder", m_maxZCylinder=0.0,
"Maximum |Z| on cylinder for accepting extrapolated truth particle to surface.");
67 declareProperty(
"zDisc", m_zDisc=-1.0,
"Select truth particle based on extrapolated position on disks placed at +/- z positions. Enabled if greater than 0.");
68 declareProperty(
"minRadiusDisc", m_minRadiusDisc=0.0,
"Minimum radius on disk for accepting extrapolated truth particle to surface.");
69 declareProperty(
"maxRadiusDisc", m_maxRadiusDisc=0.0,
"Maximum radius on disk for accepting extrapolated truth particle to surface.");
78 const std::vector<Accept_t> filters = {
82 Accept_t([
this](
const P_t&
p) ->
bool {
83 return((
p.pt() > 0.1) ? (std::abs(
p.eta()) <
m_maxEta) :
false);
84 }, std::string(
"eta")),
85 Accept_t([
this](
const P_t&
p) ->
bool {
87 }, std::string(
"min_pt"))
122 return(
p.status() == 1);
127 return(std::abs(
p.pdgId()) ==
m_pdgId);
132 return((
p.nParents() == 0) || ((
p.nParents() == 1)and((
p.parent(0))->nParents() == 0)));
133 },
"hasNoGrandparent"));
139 if (not pTruth)
return false;
145 return((
p.absPdgId() == electronId)and(
p.nParents() >= 1) and(
p.parent(0)) and(
p.parent(0)->pdgId() == gammaId));
146 },
"poselectronfromgamma"));
156 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
160 if (ptruthVertex ==
nullptr) {
165 const auto xPos = ptruthVertex->
x();
166 const auto yPos = ptruthVertex->
y();
167 const auto z_truth = ptruthVertex->
z();
179 ATH_MSG_VERBOSE(
"Extrapolated parameters to cylinder: " << *exParameters);
180 const float ex_abs_z = fabs(exParameters->
position().z());
188 },
"SelectCylinder"));
198 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
202 if (ptruthVertex ==
nullptr) {
207 const auto xPos = ptruthVertex->
x();
208 const auto yPos = ptruthVertex->
y();
209 const auto z_truth = ptruthVertex->
z();
226 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Test next disc");
239 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Rejecting");
255 return StatusCode::SUCCESS;
261 return StatusCode::SUCCESS;
265 std::vector<std::string>
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
const Amg::Vector3D & position() const
Access method for the position.
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
Templated CutList class to contain a group of cuts.
float y() const
Vertex y displacement.
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.
Class describing a truth particle in the MC record.
Eigen::Affine3d Transform3D
TruthParticle_v1 TruthParticle
Typedef to implementation.
Class describing a truth vertex in the MC record.
std::string to_string(const DetectorType &type)
Eigen::Matrix< double, 3, 1 > Vector3D
float x() const
Vertex x displacement.
float z() const
Vertex longitudinal distance along the beam line form the origin.
Eigen::Translation< double, 3 > Translation3D
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Templated class containing a cut, name of cut and description of cut(optional) Typically,...