#include <CaloConeSelector.h>
Public Member Functions | |
CaloConeSelector (double dR, const CaloGeometry *geom) | |
CaloConeSelector (double dR, const CaloGeometry *geom, DetId::Detector detector, int subdet=0) | |
std::auto_ptr < CaloRecHitMetaCollectionV > | select (double eta, double phi, const CaloRecHitMetaCollectionV &inputCollection) |
std::auto_ptr < CaloRecHitMetaCollectionV > | select (const GlobalPoint &p, const CaloRecHitMetaCollectionV &inputCollection) |
Private Attributes | |
double | deltaR_ |
DetId::Detector | detector_ |
const CaloGeometry * | geom_ |
int | subdet_ |
CaloConeSelector::CaloConeSelector | ( | double | dR, |
const CaloGeometry * | geom | ||
) |
Definition at line 5 of file CaloConeSelector.cc.
CaloConeSelector::CaloConeSelector | ( | double | dR, |
const CaloGeometry * | geom, | ||
DetId::Detector | detector, | ||
int | subdet = 0 |
||
) |
std::auto_ptr< CaloRecHitMetaCollectionV > CaloConeSelector::select | ( | double | eta, |
double | phi, | ||
const CaloRecHitMetaCollectionV & | inputCollection | ||
) |
Definition at line 13 of file CaloConeSelector.cc.
References AlCaHLTBitMon_ParallelJobs::p.
{ GlobalPoint p(GlobalPoint::Cylindrical(1,phi,tanh(eta))); return select(p,inputCollection); }
std::auto_ptr< CaloRecHitMetaCollectionV > CaloConeSelector::select | ( | const GlobalPoint & | p, |
const CaloRecHitMetaCollectionV & | inputCollection | ||
) |
Definition at line 18 of file CaloConeSelector.cc.
References CaloRecHitMetaCollectionFast::add(), trackerHits::c, deltaR_, detector_, CaloRecHitMetaCollectionV::end(), CaloRecHitMetaCollectionV::find(), geom_, CaloSubdetectorGeometry::getCells(), CaloGeometry::getSubdetectorGeometry(), i, j, and subdet_.
{ CaloRecHitMetaCollectionFast* c=new CaloRecHitMetaCollectionFast(); // TODO: handle default setting of detector_ (loops over subdet) // TODO: heuristics of when it is better to loop over inputCollection instead (small # hits) for (int subdet=subdet_; subdet<=7 && (subdet_==0 || subdet_==subdet); subdet++) { const CaloSubdetectorGeometry* sdg=geom_->getSubdetectorGeometry(detector_,subdet); if (sdg!=0) { // get the list of detids within range (from geometry) CaloSubdetectorGeometry::DetIdSet dis=sdg->getCells(p,deltaR_); // loop over detids... CaloRecHitMetaCollectionV::const_iterator j,je=inputCollection.end(); for (CaloSubdetectorGeometry::DetIdSet::iterator i=dis.begin(); i!=dis.end(); i++) { if (i->subdetId()!=subdet) continue; // possible for HCAL where the same geometry object handles all the detectors j=inputCollection.find(*i); if (j!=je) c->add(&(*j)); } } } return std::auto_ptr<CaloRecHitMetaCollectionV>(c); }
double CaloConeSelector::deltaR_ [private] |
Definition at line 23 of file CaloConeSelector.h.
Referenced by select().
DetId::Detector CaloConeSelector::detector_ [private] |
Definition at line 24 of file CaloConeSelector.h.
Referenced by select().
const CaloGeometry* CaloConeSelector::geom_ [private] |
Definition at line 22 of file CaloConeSelector.h.
Referenced by select().
int CaloConeSelector::subdet_ [private] |
Definition at line 25 of file CaloConeSelector.h.
Referenced by select().