#include <HBHEIsolatedNoiseAlgos.h>
Public Member Functions | |
void | getDiHits (std::vector< HBHEHitMap > &v, double energy) const |
void | getHPDs (std::vector< HBHEHitMap > &v, double energy) const |
void | getMonoHits (std::vector< HBHEHitMap > &v, double energy) const |
void | getRBXs (std::vector< HBHEHitMap > &v, double energy) const |
HBHEHitMapOrganizer (const edm::Handle< HBHERecHitCollection > &hbhehitcoll_h, const ObjectValidatorAbs &objvalidator, const PhysicsTowerOrganizer &pto) | |
virtual | ~HBHEHitMapOrganizer () |
Private Member Functions | |
void | getHPDNeighbors (const HBHERecHit *hit, std::vector< const HBHERecHit * > &neighbors, const PhysicsTowerOrganizer &pto) |
Private Attributes | |
std::vector< HBHEHitMap > | dihits_ |
std::map< int, HBHEHitMap > | hpds_ |
std::vector< HBHEHitMap > | monohits_ |
std::map< int, HBHEHitMap > | rbxs_ |
Definition at line 332 of file HBHEIsolatedNoiseAlgos.h.
HBHEHitMapOrganizer::HBHEHitMapOrganizer | ( | const edm::Handle< HBHERecHitCollection > & | hbhehitcoll_h, |
const ObjectValidatorAbs & | objvalidator, | ||
const PhysicsTowerOrganizer & | pto | ||
) |
Definition at line 712 of file HBHEIsolatedNoiseAlgos.cc.
References dihits_, CaloRecHit::energy(), PhysicsTowerOrganizer::findNeighbors(), PhysicsTowerOrganizer::findTower(), getHPDNeighbors(), hpds_, HBHERecHit::id(), HcalDetId::ieta(), HcalHPDRBXMap::indexHPD(), HcalHPDRBXMap::indexRBX(), HBHEHitMap::insert(), HcalDetId::iphi(), monohits_, rbxs_, and ObjectValidatorAbs::validHit().
{ // loop over the hits for(HBHERecHitCollection::const_iterator it=hbhehitcoll_h->begin(); it!=hbhehitcoll_h->end(); ++it) { const HBHERecHit *hit=&(*it); if(!objvalidator.validHit(*hit)) continue; // get the Physics Tower and the neighbors const PhysicsTower* tower=pto.findTower(hit->id().ieta(), hit->id().iphi()); std::set<const PhysicsTower*> neighbors; pto.findNeighbors(hit->id().ieta(), hit->id().iphi(), neighbors); // organize the RBXs int rbxidnum = HcalHPDRBXMap::indexRBX(hit->id()); rbxs_[rbxidnum].insert(hit, tower, neighbors); // organize the HPDs int hpdidnum = HcalHPDRBXMap::indexHPD(hit->id()); hpds_[hpdidnum].insert(hit, tower, neighbors); // organize the dihits std::vector<const HBHERecHit*> hpdneighbors; getHPDNeighbors(hit, hpdneighbors, pto); if(hpdneighbors.size()==1) { std::vector<const HBHERecHit*> hpdneighborsneighbors; getHPDNeighbors(hpdneighbors[0], hpdneighborsneighbors, pto); if(hpdneighborsneighbors.size()==1 && hpdneighborsneighbors[0]==hit && hit->energy()>hpdneighbors[0]->energy()) { // we've found two hits who are neighbors in the same HPD, but who have no other // neighbors (in the same HPD) in common. In order not to double-count, we // require that the first hit has more energy const PhysicsTower* tower2=pto.findTower(hpdneighbors[0]->id().ieta(), hpdneighbors[0]->id().iphi()); std::set<const PhysicsTower*> neighbors2; pto.findNeighbors(hpdneighbors[0]->id().ieta(), hpdneighbors[0]->id().iphi(), neighbors2); HBHEHitMap dihit; dihit.insert(hit, tower, neighbors); dihit.insert(hpdneighbors[0], tower2, neighbors2); dihits_.push_back(dihit); } } else if(hpdneighbors.size()==0) { // organize the monohits HBHEHitMap monohit; monohit.insert(hit, tower, neighbors); monohits_.push_back(monohit); } } // finished looping over HBHERecHits return; }
virtual HBHEHitMapOrganizer::~HBHEHitMapOrganizer | ( | ) | [inline, virtual] |
Definition at line 339 of file HBHEIsolatedNoiseAlgos.h.
{}
void HBHEHitMapOrganizer::getDiHits | ( | std::vector< HBHEHitMap > & | v, |
double | energy | ||
) | const |
Definition at line 788 of file HBHEIsolatedNoiseAlgos.cc.
References dihits_, and relval_parameters_module::energy.
Referenced by HBHEIsolatedNoiseReflagger::produce().
void HBHEHitMapOrganizer::getHPDNeighbors | ( | const HBHERecHit * | hit, |
std::vector< const HBHERecHit * > & | neighbors, | ||
const PhysicsTowerOrganizer & | pto | ||
) | [private] |
Definition at line 806 of file HBHEIsolatedNoiseAlgos.cc.
References PhysicsTowerOrganizer::findNeighbors(), PhysicsTowerOrganizer::findTower(), HBHERecHit::id(), HcalDetId::ieta(), HcalHPDRBXMap::indexHPD(), HcalDetId::iphi(), and cond::rpcobtemp::temp.
Referenced by HBHEHitMapOrganizer().
{ std::set<const PhysicsTower*> temp; pto.findNeighbors(hit->id().ieta(), hit->id().iphi(), temp); // make sure to include the same tower that the hit is in temp.insert(pto.findTower(hit->id().ieta(), hit->id().iphi())); // loop over the rechits in the temp neighbors for(std::set<const PhysicsTower*>::const_iterator it1=temp.begin(); it1!=temp.end(); ++it1) { for(std::set<const HBHERecHit*>::const_iterator it2=(*it1)->hcalhits.begin(); it2!=(*it1)->hcalhits.end(); ++it2) { const HBHERecHit* hit2(*it2); if(hit!=hit2 && HcalHPDRBXMap::indexHPD(hit->id())==HcalHPDRBXMap::indexHPD(hit2->id())) { neighbors.push_back(hit2); } } } return; }
void HBHEHitMapOrganizer::getHPDs | ( | std::vector< HBHEHitMap > & | v, |
double | energy | ||
) | const |
Definition at line 779 of file HBHEIsolatedNoiseAlgos.cc.
References relval_parameters_module::energy, HBHEHitMap::hitEnergy(), and hpds_.
Referenced by HBHEIsolatedNoiseReflagger::produce().
void HBHEHitMapOrganizer::getMonoHits | ( | std::vector< HBHEHitMap > & | v, |
double | energy | ||
) | const |
Definition at line 796 of file HBHEIsolatedNoiseAlgos.cc.
References relval_parameters_module::energy, and monohits_.
Referenced by HBHEIsolatedNoiseReflagger::produce().
void HBHEHitMapOrganizer::getRBXs | ( | std::vector< HBHEHitMap > & | v, |
double | energy | ||
) | const |
Definition at line 770 of file HBHEIsolatedNoiseAlgos.cc.
References relval_parameters_module::energy, HBHEHitMap::hitEnergy(), and rbxs_.
Referenced by HBHEIsolatedNoiseReflagger::produce().
std::vector<HBHEHitMap> HBHEHitMapOrganizer::dihits_ [private] |
Definition at line 349 of file HBHEIsolatedNoiseAlgos.h.
Referenced by getDiHits(), and HBHEHitMapOrganizer().
std::map<int, HBHEHitMap> HBHEHitMapOrganizer::hpds_ [private] |
Definition at line 348 of file HBHEIsolatedNoiseAlgos.h.
Referenced by getHPDs(), and HBHEHitMapOrganizer().
std::vector<HBHEHitMap> HBHEHitMapOrganizer::monohits_ [private] |
Definition at line 349 of file HBHEIsolatedNoiseAlgos.h.
Referenced by getMonoHits(), and HBHEHitMapOrganizer().
std::map<int, HBHEHitMap> HBHEHitMapOrganizer::rbxs_ [private] |
Definition at line 348 of file HBHEIsolatedNoiseAlgos.h.
Referenced by getRBXs(), and HBHEHitMapOrganizer().