#include <DeltaRTool.h>
Definition at line 26 of file DeltaRTool.h.
◆ DeltaRTool()
DerivationFramework::DeltaRTool::DeltaRTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ addBranches()
StatusCode DerivationFramework::DeltaRTool::addBranches |
( |
| ) |
const |
|
virtual |
Definition at line 52 of file DeltaRTool.cxx.
56 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
57 return StatusCode::FAILURE;
59 std::unique_ptr<std::vector<float> > deltaRs(
new std::vector<float>());
63 ATH_CHECK(writeHandle.record(std::move(deltaRs)));
65 return StatusCode::SUCCESS;
◆ calculateDeltaR()
float DerivationFramework::DeltaRTool::calculateDeltaR |
( |
float |
phi1, |
|
|
float |
phi2, |
|
|
float |
eta1, |
|
|
float |
eta2 |
|
) |
| |
|
staticprivate |
◆ finalize()
StatusCode DerivationFramework::DeltaRTool::finalize |
( |
| ) |
|
◆ getDeltaRs()
StatusCode DerivationFramework::DeltaRTool::getDeltaRs |
( |
std::vector< float > * |
deltaRs | ) |
const |
|
private |
Definition at line 68 of file DeltaRTool.cxx.
74 deltaRs->push_back(0.0);
75 return StatusCode::FAILURE;
77 bool secondContainer(
false);
84 if (secondContainer) {
86 secondParticles=particleHdl2.cptr();
90 std::vector<int>
entries, entries2;
97 return StatusCode::FAILURE;
99 unsigned int nEntries2(0);
100 if (secondContainer) {
102 else {entries2.assign(secondParticles->size(),1);}
103 nEntries2 = entries2.size();
105 if (secondParticles->size() != nEntries2 ) {
107 return StatusCode::FAILURE;
112 std::vector<std::vector<int> >
pairs;
113 if (!secondContainer) {
114 unsigned int outerIt, innerIt;
115 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
116 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
117 std::vector<int> tmpPair;
119 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
120 pairs.push_back(tmpPair);
126 if (secondContainer) {
127 unsigned int coll1It, coll2It;
128 for (coll1It=0; coll1It<
nEntries; ++coll1It) {
129 for (coll2It=0; coll2It<nEntries2; ++coll2It) {
130 std::vector<int> tmpPair;
131 if (
entries[coll1It]==1 && entries2[coll2It]==1) {
132 tmpPair.push_back(coll1It); tmpPair.push_back(coll2It);
133 pairs.push_back(tmpPair);
140 std::vector<std::vector<int> >
::iterator pairIt;
141 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
142 unsigned int first = (*pairIt)[0];
143 unsigned int second = (*pairIt)[1];
144 if (!secondContainer) {
145 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*particles)[
second])->p4().Phi();
146 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*particles)[
second])->p4().Eta();
148 deltaRs->push_back(
deltaR);
150 if (secondContainer) {
151 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*secondParticles)[
second])->p4().Phi();
152 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*secondParticles)[
second])->p4().Eta();
154 deltaRs->push_back(
deltaR);
158 return StatusCode::SUCCESS;
◆ initialize()
StatusCode DerivationFramework::DeltaRTool::initialize |
( |
| ) |
|
Definition at line 29 of file DeltaRTool.cxx.
32 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
33 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
◆ m_2ndExpression
std::string DerivationFramework::DeltaRTool::m_2ndExpression |
|
private |
◆ m_containerName
◆ m_containerName2
◆ m_expression
std::string DerivationFramework::DeltaRTool::m_expression |
|
private |
◆ m_sgName
SG::WriteHandleKey<std::vector<float> > DerivationFramework::DeltaRTool::m_sgName {this,"StoreGateEntryName","","SG key of output object"} |
|
private |
The documentation for this class was generated from the following files: