#include <DeltaRTool.h>
|
| Gaudi::Property< std::string > | m_expression {this, "ObjectRequirements", ""} |
| |
| Gaudi::Property< std::string > | m_2ndExpression {this, "SecondObjectRequirements", ""} |
| |
| SG::WriteHandleKey< std::vector< float > > | m_sgName {this,"StoreGateEntryName","","SG key of output object"} |
| |
| SG::ReadHandleKey< xAOD::IParticleContainer > | m_containerName {this,"ContainerName","","SG key of first container"} |
| |
| SG::ReadHandleKey< xAOD::IParticleContainer > | m_containerName2 {this,"SecondContainerName","","SG key of first container"} |
| |
Definition at line 24 of file DeltaRTool.h.
◆ addBranches()
| StatusCode DerivationFramework::DeltaRTool::addBranches |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 36 of file DeltaRTool.cxx.
40 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
41 return StatusCode::FAILURE;
43 std::unique_ptr<std::vector<float> > deltaRs(
new std::vector<float>());
47 ATH_CHECK(writeHandle.record(std::move(deltaRs)));
49 return StatusCode::SUCCESS;
◆ calculateDeltaR()
| float DerivationFramework::DeltaRTool::calculateDeltaR |
( |
float |
phi1, |
|
|
float |
phi2, |
|
|
float |
eta1, |
|
|
float |
eta2 |
|
) |
| |
|
staticprivate |
◆ finalize()
| StatusCode DerivationFramework::DeltaRTool::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ getDeltaRs()
| StatusCode DerivationFramework::DeltaRTool::getDeltaRs |
( |
std::vector< float > * |
deltaRs, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 52 of file DeltaRTool.cxx.
58 deltaRs->push_back(0.0);
59 return StatusCode::FAILURE;
61 bool secondContainer(
false);
68 if (secondContainer) {
70 secondParticles=particleHdl2.cptr();
74 std::vector<int>
entries, entries2;
81 return StatusCode::FAILURE;
83 unsigned int nEntries2(0);
84 if (secondContainer) {
86 else {entries2.assign(secondParticles->size(),1);}
87 nEntries2 = entries2.size();
89 if (secondParticles->size() != nEntries2 ) {
91 return StatusCode::FAILURE;
96 std::vector<std::pair<unsigned, unsigned>>
pairs;
97 if (!secondContainer) {
98 for (
unsigned outerIt=0; outerIt<
nEntries; ++outerIt) {
99 for (
unsigned innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
101 pairs.emplace_back(outerIt, innerIt);
107 if (secondContainer) {
108 for (
unsigned coll1It=0; coll1It<
nEntries; ++coll1It) {
109 for (
unsigned coll2It=0; coll2It<nEntries2; ++coll2It) {
111 if (
entries[coll1It]==1 && entries2[coll2It]==1) {
112 pairs.emplace_back(coll1It, coll2It);
120 if (!secondContainer) {
121 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*particles)[
second])->p4().Phi();
122 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*particles)[
second])->p4().Eta();
124 deltaRs->push_back(
deltaR);
126 if (secondContainer) {
127 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*secondParticles)[
second])->p4().Phi();
128 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*secondParticles)[
second])->p4().Eta();
130 deltaRs->push_back(
deltaR);
134 return StatusCode::SUCCESS;
◆ initialize()
| StatusCode DerivationFramework::DeltaRTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Definition at line 13 of file DeltaRTool.cxx.
16 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
17 return StatusCode::FAILURE;
27 return StatusCode::SUCCESS;
◆ m_2ndExpression
| Gaudi::Property<std::string> DerivationFramework::DeltaRTool::m_2ndExpression {this, "SecondObjectRequirements", ""} |
|
private |
◆ m_containerName
◆ m_containerName2
◆ m_expression
| Gaudi::Property<std::string> DerivationFramework::DeltaRTool::m_expression {this, "ObjectRequirements", ""} |
|
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: