|
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) :
49 declareInterface<IAthSelectionTool>(
this);
58 const std::vector<Accept_t> filters = {
62 Accept_t([
this](
const P_t&
p) ->
bool {
63 return((
p.pt() > 0.1) ? (std::abs(
p.eta()) <
m_maxEta) :
false);
64 }, std::string(
"eta")),
65 Accept_t([
this](
const P_t&
p) ->
bool {
67 }, std::string(
"min_pt"))
107 return(std::abs(
p.pdgId()) ==
m_pdgId);
112 return((
p.nParents() == 0) || ((
p.nParents() == 1)and((
p.parent(0))->nParents() == 0)));
113 },
"hasNoGrandparent"));
119 if (not pTruth)
return false;
125 return((
p.absPdgId() == electronId)and(
p.nParents() >= 1) and(
p.parent(0)) and(
p.parent(0)->pdgId() == gammaId));
126 },
"poselectronfromgamma"));
136 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
140 if (ptruthVertex ==
nullptr) {
145 const auto xPos = ptruthVertex->
x();
146 const auto yPos = ptruthVertex->
y();
147 const auto z_truth = ptruthVertex->
z();
159 ATH_MSG_VERBOSE(
"Extrapolated parameters to cylinder: " << *exParameters);
160 const float ex_abs_z = fabs(exParameters->
position().z());
168 },
"SelectCylinder"));
178 m_cutList.add(Accept_t([
this](
const P_t&
p) ->
bool {
182 if (ptruthVertex ==
nullptr) {
187 const auto xPos = ptruthVertex->
x();
188 const auto yPos = ptruthVertex->
y();
189 const auto z_truth = ptruthVertex->
z();
206 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Test next disc");
219 ATH_MSG_VERBOSE(
"Strange, extrapolation succeeded but extrapolated position not within disc radius! Rejecting");
235 return StatusCode::SUCCESS;
241 return StatusCode::SUCCESS;
245 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,...
constexpr int pow(int base, int exp) noexcept