|
ATLAS Offline Software
|
Go to the documentation of this file.
20 const IInterface*
p) :
25 declareInterface<DerivationFramework::IAugmentationTool>(
this);
33 ATH_MSG_ERROR(
"No SG name provided for the output of invariant mass tool!");
34 return StatusCode::FAILURE;
44 return StatusCode::SUCCESS;
50 return StatusCode::SUCCESS;
57 ATH_MSG_ERROR(
"Tool is attempting to write a StoreGate key " <<
m_sgName <<
" which already exists. Please use a different key");
58 return StatusCode::FAILURE;
60 std::unique_ptr<std::vector<float> > deltaRs(
new std::vector<float>());
66 return StatusCode::SUCCESS;
75 deltaRs->push_back(0.0);
76 return StatusCode::FAILURE;
78 bool secondContainer(
false);
85 if (secondContainer) {
87 secondParticles=particleHdl2.cptr();
91 std::vector<int>
entries, entries2;
98 return StatusCode::FAILURE;
100 unsigned int nEntries2(0);
101 if (secondContainer) {
103 else {entries2.assign(secondParticles->
size(),1);}
104 nEntries2 = entries2.size();
106 if (secondParticles->
size() != nEntries2 ) {
108 return StatusCode::FAILURE;
113 std::vector<std::vector<int> >
pairs;
114 if (!secondContainer) {
115 unsigned int outerIt, innerIt;
116 for (outerIt=0; outerIt<
nEntries; ++outerIt) {
117 for (innerIt=outerIt+1; innerIt<
nEntries; ++innerIt) {
118 std::vector<int> tmpPair;
120 tmpPair.push_back(outerIt); tmpPair.push_back(innerIt);
121 pairs.push_back(tmpPair);
127 if (secondContainer) {
128 unsigned int coll1It, coll2It;
129 for (coll1It=0; coll1It<
nEntries; ++coll1It) {
130 for (coll2It=0; coll2It<nEntries2; ++coll2It) {
131 std::vector<int> tmpPair;
132 if (
entries[coll1It]==1 && entries2[coll2It]==1) {
133 tmpPair.push_back(coll1It); tmpPair.push_back(coll2It);
134 pairs.push_back(tmpPair);
141 std::vector<std::vector<int> >
::iterator pairIt;
142 for (pairIt=
pairs.begin(); pairIt!=
pairs.end(); ++pairIt) {
143 unsigned int first = (*pairIt)[0];
144 unsigned int second = (*pairIt)[1];
145 if (!secondContainer) {
146 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*particles)[
second])->p4().Phi();
147 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*particles)[
second])->p4().Eta();
149 deltaRs->push_back(
deltaR);
151 if (secondContainer) {
152 float phi1f = ((*particles)[
first])->p4().Phi();
float phi2f = ((*secondParticles)[
second])->p4().Phi();
153 float eta1f = ((*particles)[
first])->p4().Eta();
float eta2f = ((*secondParticles)[
second])->p4().Eta();
155 deltaRs->push_back(
deltaR);
159 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
StatusCode finalizeParser()
double deltaEtaSq(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
std::conditional< NUM_PARSER==1, std::unique_ptr< ExpressionParsing::ExpressionParser >, std::array< std::unique_ptr< ExpressionParsing::ExpressionParser >, NUM_PARSER > >::type m_parser
setEt setPhi setE277 setWeta2 eta1
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
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)
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.