 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 const IInterface*
p) :
23 m_massHypothesis(0.0),
24 m_massHypothesis2(0.0)
35 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
36 return StatusCode::FAILURE;
50 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
63 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
64 return StatusCode::FAILURE;
66 std::unique_ptr<std::vector<float> >
masses(
new std::vector<float>());
71 return StatusCode::SUCCESS;
81 return StatusCode::FAILURE;
86 bool from2Collections(
false);
90 particles2=particleHdl2.cptr();
91 from2Collections =
true;
98 unsigned int nEntries2 = entries2.size();
101 if (!from2Collections) {
103 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
105 return StatusCode::FAILURE;
108 if (from2Collections) {
110 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
112 return StatusCode::FAILURE;
117 unsigned int outerIt, innerIt;
118 std::vector<std::pair<int, int> >
pairs;
120 if (!from2Collections) {
121 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
122 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
123 pairs.push_back({
static_cast<int>(outerIt),
static_cast<int>(innerIt)});
139 if (from2Collections) {
140 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
141 if (
entries[outerIt]==0)
continue;
142 for (innerIt=0; innerIt<nEntries2; ++innerIt) {
143 if (entries2[innerIt]==0)
continue;
144 pairs.push_back({
static_cast<int>(outerIt),
static_cast<int>(innerIt)});
150 ((*particles2)[
second])->p4().Vect(),
157 return StatusCode::SUCCESS;
161 TLorentzVector
p1(v1, M1 > 0 ? std::hypot(M1, v1.Mag()) : v1.Mag());
162 TLorentzVector
p2(
v2, M2 > 0 ? std::hypot(M2,
v2.Mag()) :
v2.Mag());
const std::string & key() const
Return the StoreGate ID for the referenced object.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
@ kInvariantMassToolParser2
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
@ kInvariantMassToolParser1