Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 const IInterface*
p) :
32 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
33 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
49 return StatusCode::SUCCESS;
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>());
65 return StatusCode::SUCCESS;
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;
JetConstituentVector::iterator iterator
double deltaEtaSq(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
setEt setPhi setE277 setWeta2 eta1
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
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
double deltaPhiSq(const I4Momentum &pA, const I4Momentum &pB)
delta Phi squared in range ([-pi,pi[)^2 from two I4momentum references
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
size_type size() const noexcept
Returns the number of elements in the collection.