#include <InvariantMassTool.h>
|
std::string | m_expression |
|
std::string | m_expression2 |
|
SG::WriteHandleKey< std::vector< float > > | m_sgName {this,"StoreGateEntryName","","SG key of output object"} |
|
float | m_massHypothesis |
|
float | m_massHypothesis2 |
|
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 25 of file InvariantMassTool.h.
◆ InvariantMassTool()
DerivationFramework::InvariantMassTool::InvariantMassTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::InvariantMassTool::addBranches |
( |
| ) |
const |
|
virtual |
Definition at line 60 of file InvariantMassTool.cxx.
64 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
65 return StatusCode::FAILURE;
67 std::unique_ptr<std::vector<float> >
masses(
new std::vector<float>());
72 return StatusCode::SUCCESS;
◆ calculateInvariantMass()
float DerivationFramework::InvariantMassTool::calculateInvariantMass |
( |
const TVector3 & |
v1, |
|
|
const TVector3 & |
v2, |
|
|
float |
M1, |
|
|
float |
M2 |
|
) |
| |
|
staticprivate |
Definition at line 172 of file InvariantMassTool.cxx.
173 TLorentzVector
p1(v1, M1 > 0 ? std::hypot(M1, v1.Mag()) : v1.Mag());
174 TLorentzVector
p2(
v2, M2 > 0 ? std::hypot(M2,
v2.Mag()) :
v2.Mag());
◆ finalize()
StatusCode DerivationFramework::InvariantMassTool::finalize |
( |
| ) |
|
◆ getInvariantMasses()
StatusCode DerivationFramework::InvariantMassTool::getInvariantMasses |
( |
std::vector< float > * |
masses | ) |
const |
|
private |
Definition at line 75 of file InvariantMassTool.cxx.
82 return StatusCode::FAILURE;
87 bool from2Collections(
false);
91 particles2=particleHdl2.cptr();
92 from2Collections =
true;
99 unsigned int nEntries2 = entries2.size();
102 if (!from2Collections) {
104 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
106 return StatusCode::FAILURE;
109 if (from2Collections) {
111 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
113 return StatusCode::FAILURE;
118 unsigned int outerIt, innerIt;
119 std::vector<std::vector<int> >
pairs;
121 if (!from2Collections) {
122 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
123 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
124 std::vector<int> tmpPair;
125 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
126 pairs.push_back(tmpPair);
130 std::vector<std::vector<int> >
::iterator pairIt;
131 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
132 unsigned int first = (*pairIt)[0];
133 unsigned int second = (*pairIt)[1];
146 if (from2Collections) {
147 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
148 if (
entries[outerIt]==0)
continue;
149 for (innerIt=0; innerIt<nEntries2; ++innerIt) {
150 if (entries2[innerIt]==0)
continue;
151 std::vector<int> tmpPair;
152 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
153 pairs.push_back(tmpPair);
157 std::vector<std::vector<int> >
::iterator pairIt;
158 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
159 unsigned int first = (*pairIt)[0];
160 unsigned int second = (*pairIt)[1];
162 ((*particles2)[
second])->p4().Vect(),
169 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::InvariantMassTool::initialize |
( |
| ) |
|
Definition at line 33 of file InvariantMassTool.cxx.
36 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
37 return StatusCode::FAILURE;
51 return StatusCode::SUCCESS;
◆ m_containerName
◆ m_containerName2
◆ m_expression
std::string DerivationFramework::InvariantMassTool::m_expression |
|
private |
◆ m_expression2
std::string DerivationFramework::InvariantMassTool::m_expression2 |
|
private |
◆ m_inputDecorNames
◆ m_massHypothesis
float DerivationFramework::InvariantMassTool::m_massHypothesis |
|
private |
◆ m_massHypothesis2
float DerivationFramework::InvariantMassTool::m_massHypothesis2 |
|
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: