|
ATLAS Offline Software
|
Go to the documentation of this file.
23 constexpr
int electronId(11);
24 constexpr
int gammaId(22);
28 for (
uint i = 0;
i < nPar;
i++) {
29 for (
const int & ancestorID : allowedAncestors) {
30 if (std::abs(
particle->parent(
i)->pdgId()) == ancestorID) {
35 for (
uint i = 0;
i < nPar;
i++) {
37 if (hasAncestor(
parent, allowedAncestors))
return true;
45 const IInterface*
parent) :
50 declareInterface<IAthSelectionTool>(
this);
52 declareProperty(
"maxEta", m_maxEta = 2.5);
53 declareProperty(
"minPt", m_minPt = 400);
54 declareProperty(
"maxPt", m_maxPt = -1);
55 declareProperty(
"requireOnlyPrimary", m_requireOnlyPrimary =
true);
56 declareProperty(
"requireCharged", m_requireCharged =
true);
57 declareProperty(
"selectedCharge", m_selectedCharge = 0);
58 declareProperty(
"requireStable", m_requireStable =
true);
59 declareProperty(
"requireSiHit", m_requireSiHit = 0);
60 declareProperty(
"maxProdVertRadius", m_maxProdVertRadius = 110.);
61 declareProperty(
"pdgId", m_pdgId = -1);
62 declareProperty(
"hasNoGrandparent", m_grandparent =
false);
63 declareProperty(
"ancestorList", m_ancestors = {});
64 declareProperty(
"poselectronfromgamma", m_poselectronfromgamma =
false);
65 declareProperty(
"radiusCylinder", m_radiusCylinder=-1,
"Select truth particle based on extrapolated position on cylinder placed at this radius. Enabled if greater than 0.");
66 declareProperty(
"minZCylinder", m_minZCylinder=0.0,
"Minimum |Z| on cylinder for accepting extrapolated truth particle to surface.");
67 declareProperty(
"maxZCylinder", m_maxZCylinder=0.0,
"Maximum |Z| on cylinder for accepting extrapolated truth particle to surface.");
68 declareProperty(
"zDisc", m_zDisc=-1.0,
"Select truth particle based on extrapolated position on disks placed at +/- z positions. Enabled if greater than 0.");
69 declareProperty(
"minRadiusDisc", m_minRadiusDisc=0.0,
"Minimum radius on disk for accepting extrapolated truth particle to surface.");
70 declareProperty(
"maxRadiusDisc", m_maxRadiusDisc=0.0,
"Maximum radius on disk for accepting extrapolated truth particle to surface.");
79 const std::vector<Accept_t> filters = {
83 Accept_t([
this](
const P_t&
p) ->
bool {
84 return((
p.pt() > 0.1) ? (std::abs(
p.eta()) <
m_maxEta) :
false);
85 }, std::string(
"eta")),
86 Accept_t([
this](
const P_t&
p) ->
bool {
88 }, std::string(
"min_pt"))
128 return(std::abs(
p.pdgId()) ==
m_pdgId);
133 return((
p.nParents() == 0) || ((
p.nParents() == 1)and((
p.parent(0))->nParents() == 0)));
134 },
"hasNoGrandparent"));
140 if (not pTruth)
return false;
146 return((
p.absPdgId() == electronId)and(
p.nParents() >= 1) and(
p.parent(0)) and(
p.parent(0)->pdgId() == gammaId));
147 },
"poselectronfromgamma"));
157 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
161 if (ptruthVertex ==
nullptr) {
166 const auto xPos = ptruthVertex->
x();
167 const auto yPos = ptruthVertex->
y();
168 const auto z_truth = ptruthVertex->
z();
180 ATH_MSG_VERBOSE(
"Extrapolated parameters to cylinder: " << *exParameters);
181 const float ex_abs_z = fabs(exParameters->
position().z());
189 },
"SelectCylinder"));
199 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
203 if (ptruthVertex ==
nullptr) {
208 const auto xPos = ptruthVertex->
x();
209 const auto yPos = ptruthVertex->
y();
210 const auto z_truth = ptruthVertex->
z();
227 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Test next disc");
240 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Rejecting");
256 return StatusCode::SUCCESS;
262 return StatusCode::SUCCESS;
266 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.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
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,...