19{ this->
wpx() += wght.
wpx(); this->
wpy() += wght.
wpy(); this->
wet() += wght.
wet();
return *
this; }
22{ this->
wpx() -= wght.
wpx(); this->
wpy() -= wght.
wpy(); this->
wet() -= wght.
wet();
return *
this; }
25{ this->
wpx() *= wght.
wpx(); this->
wpy() *= wght.
wpy(); this->
wet() *= wght.
wet();
return *
this; }
28{ this->
wpx() *= scale; this->
wpy() *= scale; this->
wet() *= scale;
return *
this; }
40 if ( scale == 0. ) { this->
wpx() = 0.; this->
wpy() = 0.; this->
wet() = 0.;
return *
this; }
105 if((&compDescr) !=
this) {
167 if ( this->
empty() ) {
return false; }
169 {
size_t nEnt(this->
size());
for (
size_t pIdx(0); pIdx<nEnt; ++pIdx ) { this->
f_removeContrib(pIdx); }
return true; }
174 objlink_vector_t::iterator fCon(this->
f_objectLinks().begin()); std::advance<objlink_vector_t::iterator>(fCon,pIdx);
176 std::vector<double>::iterator fWpx(this->
f_wpx().begin()); std::advance<std::vector<double>::iterator>(fWpx,pIdx);
177 this->
f_wpx().erase(fWpx);
178 std::vector<double>::iterator fWpy(this->
f_wpy().begin()); std::advance<std::vector<double>::iterator>(fWpy,pIdx);
179 this->
f_wpy().erase(fWpy);
180 std::vector<double>::iterator fWet(this->
f_wet().begin()); std::advance<std::vector<double>::iterator>(fWet,pIdx);
181 this->
f_wet().erase(fWet);
199 if ( this->
empty() ) {
return false; }
202 size_t nEnt(this->
size());
203 for (
size_t pIdx(0); pIdx < nEnt; ++pIdx)
215 objlink_vector_t::const_iterator fLnk(this->
objectLinks().begin());
216 while(fLnk != this->
objectLinks().end() && *(*fLnk) != pPart){ ++fLnk; }
218 return std::distance(this->
objectLinks().begin(),fLnk);
227{ this->
f_wpx().clear(); this->
f_wpx().insert(this->
f_wpx().end(),wcv.begin(),wcv.end());
return !this->
f_wpx().empty(); }
229{ this->
f_wpy().clear(); this->
f_wpy().insert(this->
f_wpy().end(),wcv.begin(),wcv.end());
return !this->
f_wpy().empty(); }
231{ this->
f_wet().clear(); this->
f_wet().insert(this->
f_wet().end(),wcv.begin(),wcv.end());
return !this->
f_wet().empty(); }
251 bool wasSet(this->
f_metLink().getStorableObjectPointer() !=
nullptr);
259 bool wasSet(this->
f_metLink().getStorableObjectPointer() !=
nullptr);
266 bool wasSet(this->
f_metLink().getStorableObjectPointer() !=
nullptr);
275 for(MissingETBase::Types::objlink_vector_t::iterator iLink=this->
f_objectLinks().begin();
297 std::vector<const IParticle*> pVec;
298 for ( objlink_vector_t::const_iterator fLnk(this->
objectLinks().begin()); fLnk != this->
objectLinks().end(); ++fLnk) { pVec.push_back(*(*fLnk)); }
305 std::vector<const IParticle*> pVec(nEnt,(
const IParticle*)
nullptr);
306 kinePars.clear(); kinePars.resize(nEnt,Weight(0.,0.,0.));
307 for (
size_t idx(0); idx < nEnt; ++idx )
308 { pVec[idx] = *(this->
objectLinks().at(idx)); kinePars.at(idx) = Weight(this->
wpx().at(idx),this->
wpy().at(idx),this->
wet().at(idx)); }
312std::vector<const IParticle*>
MissingETComponent_v1::objects(
const std::vector<double>*& wpxPtr,
const std::vector<double>*& wpyPtr,
const std::vector<double>*& wetPtr)
const
313{ wpxPtr = &(this->
wpx()); wpyPtr = &(this->
wpy()); wetPtr = &(this->
wet());
return this->
objects(); }
bool toIndexedElement(BaseConstReference data, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by index and pointer to container.
void makePrivateStore()
Create a new (empty) private store for this object.
AuxElement()
Default constructor.
Class providing the definition of the 4-vector interface.
Kinematic weight descriptor.
Weight & operator-=(const Weight &wght)
Subtract another weight.
bool operator==(const Weight &wght) const
Equality comparator.
double wpx() const
Returns .
Weight & operator*=(const Weight &wght)
Multiply two weights.
double wpy() const
Returns .
double wet() const
Returns .
Weight & operator+=(const Weight &wght)
Add another weight.
Weight()
Default constructor.
Weight & operator/=(const Weight &wght)
Divide two weights.
bool f_removeContrib(size_t pIdx)
Copy the contribution data from a source.
size_t size() const
[Deprecated] Update all internally used ElementLink instances
MissingETComponent_v1 & operator=(const MissingETComponent_v1 &compDescr)
const std::vector< double > & wpx() const
Get the vector of weight components.
MissingETBase::Types::bitmask_t & f_statusWord()
Weight weight(const IParticle *pPart) const
Get kinematic weight for a given object.
const std::vector< double > & wet() const
Get the vector of weight components.
std::vector< double > & f_wet()
MissingETBase::Types::bitmask_t statusWord() const
Get the statusword.
bool empty() const
Empty list of contributing objects indicator.
std::vector< const IParticle * > objects() const
Access contributing objects.
void f_setObject(const POBJ *pObj, LINK &elemLink)
Generalized link manager.
bool setWet(const std::vector< double > &wcv)
Set the vector of weight components.
bool addObject(const IParticle *pPart, const Weight &wght=Weight())
Add object (particle) from pointer reference with optional kinematic weight.
MissingETBase::Types::objlink_vector_t & f_objectLinks()
Non-const link reference.
bool setMET(const MissingET *pmetObj, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Set MET object by object pointer reference.
const MissingETBase::Types::objlink_vector_t & objectLinks() const
Get the vector of links to the contributing physics or signal objects.
std::vector< double > & f_wpx()
bool removeContrib()
Remove all contributions.
bool resetContrib()
Reset all contribution parameters.
size_t findIndex(const IParticle *pPart) const
Find index of given object in contributing object store.
MissingETBase::Types::metlink_t & f_metLink()
Non-const link reference.
virtual ~MissingETComponent_v1()
Assignment operator.
void createPrivateStore()
Function initialising the object to work in standalone mode.
bool operator==(const MissingETComponent_v1 &contrib) const
bool setObjectLinks(const MissingETBase::Types::objlink_vector_t &objLnks)
Set the vector of links to the contributing physics or signal objects.
const std::vector< double > & wpy() const
Get the vector of weight components.
MissingETComponent_v1(bool createStore=false)
Default constructor.
const MissingETBase::Types::metlink_t & metLink() const
Get the link to the MET object.
bool f_setLink(LINK &elemLink)
bool setStatusWord(MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Set the statusword of a MET term.
bool setWpy(const std::vector< double > &wpyVector)
Set the vector of weight components.
bool setWpx(const std::vector< double > &wcv)
Set the vector of weight components.
bool setMetLink(const MissingETBase::Types::metlink_t &metLnk)
Set the link to the MET object.
bool setWeight(const IParticle *pPart, const Weight &wght=Weight())
Set the kinematic weight of an object contribution referenced by pointer.
std::vector< double > & f_wpy()
Container for xAOD::MissingET_v1 objects.
Namespace for generally used type definitions.
std::vector< weight_t > weight_vector_t
Vector type for kinematic weight containers.
uint64_t bitmask_t
Type for status word bit mask.
ElementLink< xAOD::MissingETContainer > metlink_t
Link to MissingET object.
std::vector< objlink_t > objlink_vector_t
Vector of object links type.
ElementLink< xAOD::IParticleContainer > objlink_t
Link to contributing object.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
MissingET_v1 MissingET
Version control by type defintion.
static double wpxDefault()
Access default kinematic weight .
static double wpyError()
Access error return value for kinematic weight .
static double wpxError()
Access error return value for kinematic weight .
static double wetDefault()
Access default kinematic weight .
static double divide(double x, double y)
Failsafe division.
static bool isEqual(double x, double y)
Test of equality.
static size_t invalidIndex()
Access invalid index indicator.
static double wetError()
Access error return value for kinematic weight .
static double wpyDefault()
Access default kinematic weight .
static Types::bitmask_t clearedStatus()
Cleared term tag accessor.