|
ATLAS Offline Software
|
Go to the documentation of this file.
20 const IInterface*
p) :
24 m_massHypothesis(0.0),
25 m_massHypothesis2(0.0)
27 declareInterface<DerivationFramework::IAugmentationTool>(
this);
37 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
38 return StatusCode::FAILURE;
52 return StatusCode::SUCCESS;
58 return StatusCode::SUCCESS;
65 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
66 return StatusCode::FAILURE;
68 std::unique_ptr<std::vector<float> >
masses(
new std::vector<float>());
73 return StatusCode::SUCCESS;
83 return StatusCode::FAILURE;
88 bool from2Collections(
false);
92 particles2=particleHdl2.cptr();
93 from2Collections =
true;
100 unsigned int nEntries2 = entries2.size();
103 if (!from2Collections) {
105 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
107 return StatusCode::FAILURE;
110 if (from2Collections) {
112 ATH_MSG_ERROR(
"Branch sizes incompatible - returning zero. Check your selection strings.");
114 return StatusCode::FAILURE;
119 unsigned int outerIt, innerIt;
120 std::vector<std::vector<int> >
pairs;
122 if (!from2Collections) {
123 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
124 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
125 std::vector<int> tmpPair;
126 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
127 pairs.push_back(tmpPair);
131 std::vector<std::vector<int> >
::iterator pairIt;
132 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
133 unsigned int first = (*pairIt)[0];
134 unsigned int second = (*pairIt)[1];
147 if (from2Collections) {
148 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
149 if (
entries[outerIt]==0)
continue;
150 for (innerIt=0; innerIt<nEntries2; ++innerIt) {
151 if (entries2[innerIt]==0)
continue;
152 std::vector<int> tmpPair;
153 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
154 pairs.push_back(tmpPair);
158 std::vector<std::vector<int> >
::iterator pairIt;
159 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
160 unsigned int first = (*pairIt)[0];
161 unsigned int second = (*pairIt)[1];
163 ((*particles2)[
second])->p4().Vect(),
170 return StatusCode::SUCCESS;
174 TLorentzVector
p1(v1, M1 > 0 ? std::hypot(M1, v1.Mag()) : v1.Mag());
175 TLorentzVector
p2(
v2, M2 > 0 ? std::hypot(M2,
v2.Mag()) :
v2.Mag());
JetConstituentVector::iterator iterator
StatusCode finalizeParser()
@ kInvariantMassToolParserNum
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
const std::string & key() const
Return the StoreGate ID for the referenced object.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::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 initializeParser(const ExpressionParsing::SelectionArg< NUM_PARSER > &selection_string)
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
@ kInvariantMassToolParser1