#include <InvariantMassTool.h>
|
| Gaudi::Property< std::string > | m_expression {this, "ObjectRequirements", "true"} |
| |
| Gaudi::Property< std::string > | m_expression2 {this, "SecondObjectRequirements", ""} |
| |
| SG::WriteHandleKey< std::vector< float > > | m_sgName {this,"StoreGateEntryName","","SG key of output object"} |
| |
| Gaudi::Property< float > | m_massHypothesis {this, "MassHypothesis", 0.0} |
| |
| Gaudi::Property< float > | m_massHypothesis2 {this, "SecondMassHypothesis", 2.0} |
| |
| SG::ReadHandleKey< xAOD::IParticleContainer > | m_containerName {this,"ContainerName","","SG key of first container"} |
| |
| SG::ReadHandleKey< xAOD::IParticleContainer > | m_containerName2 {this,"SecondContainerName","","SG key of second container"} |
| |
| SG::ReadDecorHandleKeyArray< xAOD::IParticleContainer > | m_inputDecorNames {this, "InputDecorNames",{},"SG keys for decorations of first (and second) container(s)"} |
| |
Definition at line 26 of file InvariantMassTool.h.
◆ addBranches()
| StatusCode DerivationFramework::InvariantMassTool::addBranches |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 37 of file InvariantMassTool.cxx.
41 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
42 return StatusCode::FAILURE;
44 std::unique_ptr<std::vector<float> >
masses(
new std::vector<float>());
48 return StatusCode::SUCCESS;
◆ calculateInvariantMass()
| float DerivationFramework::InvariantMassTool::calculateInvariantMass |
( |
const TVector3 & |
v1, |
|
|
const TVector3 & |
v2, |
|
|
float |
M1, |
|
|
float |
M2 |
|
) |
| |
|
staticprivate |
Definition at line 138 of file InvariantMassTool.cxx.
139 TLorentzVector
p1(v1, M1 > 0 ? std::hypot(M1, v1.Mag()) : v1.Mag());
140 TLorentzVector
p2(
v2, M2 > 0 ? std::hypot(M2,
v2.Mag()) :
v2.Mag());
◆ finalize()
| StatusCode DerivationFramework::InvariantMassTool::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ getInvariantMasses()
| StatusCode DerivationFramework::InvariantMassTool::getInvariantMasses |
( |
std::vector< float > * |
masses, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 51 of file InvariantMassTool.cxx.
58 return StatusCode::FAILURE;
63 bool from2Collections(
false);
67 particles2=particleHdl2.cptr();
68 from2Collections =
true;
75 unsigned int nEntries2 = entries2.size();
78 if (!from2Collections) {
80 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
82 return StatusCode::FAILURE;
85 if (from2Collections) {
87 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
89 return StatusCode::FAILURE;
94 unsigned int outerIt, innerIt;
95 std::vector<std::pair<int, int> >
pairs;
97 if (!from2Collections) {
98 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
99 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
100 pairs.push_back({
static_cast<int>(outerIt),
static_cast<int>(innerIt)});
116 if (from2Collections) {
117 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
118 if (
entries[outerIt]==0)
continue;
119 for (innerIt=0; innerIt<nEntries2; ++innerIt) {
120 if (entries2[innerIt]==0)
continue;
121 pairs.push_back({
static_cast<int>(outerIt),
static_cast<int>(innerIt)});
127 ((*particles2)[
second])->p4().Vect(),
134 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode DerivationFramework::InvariantMassTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ m_containerName
◆ m_containerName2
◆ m_expression
| Gaudi::Property<std::string> DerivationFramework::InvariantMassTool::m_expression {this, "ObjectRequirements", "true"} |
|
private |
◆ m_expression2
| Gaudi::Property<std::string> DerivationFramework::InvariantMassTool::m_expression2 {this, "SecondObjectRequirements", ""} |
|
private |
◆ m_inputDecorNames
◆ m_massHypothesis
| Gaudi::Property<float> DerivationFramework::InvariantMassTool::m_massHypothesis {this, "MassHypothesis", 0.0} |
|
private |
◆ m_massHypothesis2
| Gaudi::Property<float> DerivationFramework::InvariantMassTool::m_massHypothesis2 {this, "SecondMassHypothesis", 2.0} |
|
private |
◆ m_sgName
| SG::WriteHandleKey<std::vector<float> > DerivationFramework::InvariantMassTool::m_sgName {this,"StoreGateEntryName","","SG key of output object"} |
|
private |
The documentation for this class was generated from the following files: