#include <DeltaRTool.h>
Definition at line 24 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 EventContext & |
ctx | ) |
const |
|
virtual |
Definition at line 46 of file DeltaRTool.cxx.
50 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
51 return StatusCode::FAILURE;
53 std::unique_ptr<std::vector<float> > deltaRs(
new std::vector<float>());
57 ATH_CHECK(writeHandle.record(std::move(deltaRs)));
59 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 EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 62 of file DeltaRTool.cxx.
68 deltaRs->push_back(0.0);
69 return StatusCode::FAILURE;
71 bool secondContainer(
false);
78 if (secondContainer) {
80 secondParticles=particleHdl2.cptr();
84 std::vector<int>
entries, entries2;
91 return StatusCode::FAILURE;
93 unsigned int nEntries2(0);
94 if (secondContainer) {
96 else {entries2.assign(secondParticles->size(),1);}
97 nEntries2 = entries2.size();
99 if (secondParticles->size() != nEntries2 ) {
101 return StatusCode::FAILURE;
106 std::vector<std::vector<int> >
pairs;
107 if (!secondContainer) {
108 unsigned int outerIt, innerIt;
109 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
110 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
111 std::vector<int> tmpPair;
113 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
114 pairs.push_back(tmpPair);
120 if (secondContainer) {
121 unsigned int coll1It, coll2It;
122 for (coll1It=0; coll1It<
nEntries; ++coll1It) {
123 for (coll2It=0; coll2It<nEntries2; ++coll2It) {
124 std::vector<int> tmpPair;
125 if (
entries[coll1It]==1 && entries2[coll2It]==1) {
126 tmpPair.push_back(coll1It); tmpPair.push_back(coll2It);
127 pairs.push_back(tmpPair);
134 std::vector<std::vector<int> >
::iterator pairIt;
135 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
136 unsigned int first = (*pairIt)[0];
137 unsigned int second = (*pairIt)[1];
138 if (!secondContainer) {
139 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*particles)[
second])->p4().Phi();
140 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*particles)[
second])->p4().Eta();
142 deltaRs->push_back(
deltaR);
144 if (secondContainer) {
145 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*secondParticles)[
second])->p4().Phi();
146 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*secondParticles)[
second])->p4().Eta();
148 deltaRs->push_back(
deltaR);
152 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode DerivationFramework::DeltaRTool::initialize |
( |
| ) |
|
Definition at line 23 of file DeltaRTool.cxx.
26 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
27 return StatusCode::FAILURE;
37 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: