CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CaloConeSelector Class Reference

#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 CaloGeometrygeom_
 
int subdet_
 

Detailed Description

Date:
2006/08/29 12:49:10
Revision:
1.1
Author
J. Mans - Minnesota

Definition at line 14 of file CaloConeSelector.h.

Constructor & Destructor Documentation

CaloConeSelector::CaloConeSelector ( double  dR,
const CaloGeometry geom 
)
CaloConeSelector::CaloConeSelector ( double  dR,
const CaloGeometry geom,
DetId::Detector  detector,
int  subdet = 0 
)

Definition at line 9 of file CaloConeSelector.cc.

Member Function Documentation

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.

13  {
15  return select(p,inputCollection);
16 }
std::auto_ptr< CaloRecHitMetaCollectionV > select(double eta, double phi, const CaloRecHitMetaCollectionV &inputCollection)
T eta() const
Definition: DDAxes.h:10
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_.

18  {
20 
21  // TODO: handle default setting of detector_ (loops over subdet)
22  // TODO: heuristics of when it is better to loop over inputCollection instead (small # hits)
23  for (int subdet=subdet_; subdet<=7 && (subdet_==0 || subdet_==subdet); subdet++) {
25  if (sdg!=0) {
26  // get the list of detids within range (from geometry)
28  // loop over detids...
29  CaloRecHitMetaCollectionV::const_iterator j,je=inputCollection.end();
30 
31  for (CaloSubdetectorGeometry::DetIdSet::iterator i=dis.begin(); i!=dis.end(); i++) {
32  if (i->subdetId()!=subdet) continue; // possible for HCAL where the same geometry object handles all the detectors
33  j=inputCollection.find(*i);
34  if (j!=je) c->add(&(*j));
35  }
36  }
37  }
38 
39  return std::auto_ptr<CaloRecHitMetaCollectionV>(c);
40 }
virtual const_iterator find(const DetId &id) const
find by id (default version is very slow unsorted find)
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:43
int i
Definition: DBlmapReader.cc:9
void add(const CaloRecHit *hit)
add an item to the collection
const_iterator end() const
get the ending iterator
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
int j
Definition: DBlmapReader.cc:9
DetId::Detector detector_
const CaloGeometry * geom_

Member Data Documentation

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().