71 ATH_MSG_FATAL(
"Both InputMETContainer and InputMETKey must be provided.");
72 return StatusCode::FAILURE;
85 float eta_min = 0., eta_max = 0.;
96 std::string lowerName = std::to_string(eta_min), higherName = std::to_string(eta_max);
97 lowerName.erase(lowerName.find_last_not_of(
'0') + 1, std::string::npos);
98 higherName.erase(higherName.find_last_not_of(
'0') + 1, std::string::npos);
99 if(lowerName[lowerName.size()-1] ==
'.') lowerName.append(
"0");
100 if(higherName[higherName.size()-1] ==
'.') higherName.append(
"0");
101 std::replace(lowerName.begin(),lowerName.end(),
'.',
'p');
102 std::replace(higherName.begin(),higherName.end(),
'.',
'p');
108 std::pair<float, float> currentPair(eta_min,eta_max);
112 return StatusCode::SUCCESS;
119 return StatusCode::SUCCESS;
132 if (!base_met_container.
isValid()) {
134 return StatusCode::SUCCESS;
142 return StatusCode::SUCCESS;
149 ATH_MSG_DEBUG(
"METRegionsTool expecting a MissingETContainer given an inconsistent type.");
150 return StatusCode::SUCCESS;
157 if( iterBaseCont == base_met_container->end() ) {
159 return StatusCode::SUCCESS;
162 if( iterBaseConstit == base_met_map->end() ) {
164 return StatusCode::SUCCESS;
173 currentMetTerm = metTerm_central;
176 currentMetTerm =
new MissingET(0.,0.,0.);
177 ATH_MSG_DEBUG(
"Adding MET Term " << currentMetTerm->
name() <<
" to MET container" );
188 if(!(*iterBaseConstit)->empty()) {
189 vector<const IParticle*> objectList = (*iterBaseConstit)->objects();
190 vector<const IParticle*> dummyList;
192 for(
const auto *iObj : objectList) {
194 for(
auto & it : mapRangeToMET) {
195 if( fabs(iObj->eta()) > it.first.first && fabs(iObj->eta()) < it.first.second ) {
196 it.second->add(iObj->pt()*cos(iObj->phi())*objWeight.
wpx(),
197 iObj->pt()*sin(iObj->phi())*objWeight.
wpy(),
198 iObj->pt()*objWeight.
wet());
205 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
DataModel_detail::const_iterator< DataVector > const_iterator
const T * back() const
Access the last element in the collection as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const SG::AuxVectorData * container() const
Return the container holding this element.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
Class providing the definition of the 4-vector interface.
double wpx() const
Returns .
double wpy() const
Returns .
double wet() const
Returns .
const std::string & name() const
Identifier getters.
void setName(const std::string &name)
Set the name of the MET object.
xAOD::MissingETComponent_v1::Weight weight_t
Type for kinematic weight.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
MissingETComponent_v1 MissingETComponent
Version control by type definition.
MissingETComponentMap_v1 MissingETComponentMap
Version control by type definition.
MissingET_v1 MissingET
Version control by type defintion.
MissingETContainer_v1 MissingETContainer
static MissingETComponentMap::const_iterator find(const MissingETComponentMap *pMap, const MissingET *pmetObj)
Find non-modifiable contribution for a given MET object.
static bool insert(MissingETComponentMap *pMap, const MissingET *pMET, const IParticle *pPart, MissingETBase::Types::weight_t weight=MissingETBase::Types::weight_t())
Insert contributing signal or physics object by pointer, with optional kinematic weight object.
static bool add(MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Adding a MissingET object to the map.
Collection of functions managing the MET composition map and association map.