Fork me on GitHub

Changeset 391 in svn for trunk/src


Ignore:
Timestamp:
May 18, 2009, 6:49:32 PM (15 years ago)
Author:
Xavier Rouby
Message:

new 'D_CaloTower::getElement() const' method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CaloUtil.cc

    r264 r391  
    216216  return dummyTower; // if not found
    217217}
     218
     219const D_CaloTower& D_CaloTowerList::getElement(const float eta, const float phi) const {
     220  if(!_sorted) cout << "Warning: unsorted list!";
     221  for (unsigned int i=0; i< _calotowers.size(); i++) {
     222        if(_calotowers[i].getEta() == eta &&
     223           _calotowers[i].getPhi() == phi )
     224                return _calotowers[i];
     225  }
     226  return dummyTower; // if not found
     227}
     228
Note: See TracChangeset for help on using the changeset viewer.