CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloConeSelector< T > Class Template 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)
 
void selectCallback (const GlobalPoint &p, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
 
void selectCallback (double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
 

Private Attributes

double deltaR_
 
DetId::Detector detector_
 
const CaloGeometrygeom_
 
int subdet_
 

Detailed Description

template<class T>
class CaloConeSelector< T >

Author
J. Mans - Minnesota

Definition at line 15 of file CaloConeSelector.h.

Constructor & Destructor Documentation

◆ CaloConeSelector() [1/2]

template<class T >
CaloConeSelector< T >::CaloConeSelector ( double  dR,
const CaloGeometry geom 
)
inline

Definition at line 17 of file CaloConeSelector.h.

◆ CaloConeSelector() [2/2]

template<class T >
CaloConeSelector< T >::CaloConeSelector ( double  dR,
const CaloGeometry geom,
DetId::Detector  detector,
int  subdet = 0 
)
inline

Definition at line 20 of file CaloConeSelector.h.

21  : geom_(geom), deltaR_(dR), detector_(detector), subdet_(subdet) {}

Member Function Documentation

◆ selectCallback() [1/2]

template<class T >
void CaloConeSelector< T >::selectCallback ( const GlobalPoint p,
const edm::SortedCollection< T > &  inputCollection,
std::function< void(const T &)>  callback 
)
inline

Definition at line 31 of file CaloConeSelector.h.

33  {
34  // TODO: handle default setting of detector_ (loops over subdet)
35  // TODO: heuristics of when it is better to loop over inputCollection instead (small # hits)
36  for (int subdet = subdet_; subdet <= 7 && (subdet_ == 0 || subdet_ == subdet); subdet++) {
38  if (sdg != nullptr) {
39  // get the list of detids within range (from geometry)
41  // loop over detids...
43 
44  for (CaloSubdetectorGeometry::DetIdSet::iterator i = dis.begin(); i != dis.end(); i++) {
45  if (i->subdetId() != subdet)
46  continue; // possible for HCAL where the same geometry object handles all the detectors
47  j = inputCollection.find(*i);
48  if (j != je)
49  callback(*j);
50  }
51  }
52  }
53  }

References edmIntegrityCheck::callback, CaloConeSelector< T >::deltaR_, CaloConeSelector< T >::detector_, CaloConeSelector< T >::geom_, CaloSubdetectorGeometry::getCells(), CaloGeometry::getSubdetectorGeometry(), mps_fire::i, PDWG_EXOHSCP_cff::inputCollection, dqmiolumiharvest::j, AlCaHLTBitMon_ParallelJobs::p, and CaloConeSelector< T >::subdet_.

◆ selectCallback() [2/2]

template<class T >
void CaloConeSelector< T >::selectCallback ( double  eta,
double  phi,
const edm::SortedCollection< T > &  inputCollection,
std::function< void(const T &)>  callback 
)
inline

Member Data Documentation

◆ deltaR_

template<class T >
double CaloConeSelector< T >::deltaR_
private

Definition at line 57 of file CaloConeSelector.h.

Referenced by CaloConeSelector< T >::selectCallback().

◆ detector_

template<class T >
DetId::Detector CaloConeSelector< T >::detector_
private

Definition at line 58 of file CaloConeSelector.h.

Referenced by CaloConeSelector< T >::selectCallback().

◆ geom_

template<class T >
const CaloGeometry* CaloConeSelector< T >::geom_
private

Definition at line 56 of file CaloConeSelector.h.

Referenced by CaloConeSelector< T >::selectCallback().

◆ subdet_

template<class T >
int CaloConeSelector< T >::subdet_
private

Definition at line 59 of file CaloConeSelector.h.

Referenced by CaloConeSelector< T >::selectCallback().

mps_fire.i
i
Definition: mps_fire.py:355
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
CaloConeSelector::selectCallback
void selectCallback(double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
Definition: CaloConeSelector.h:23
CaloSubdetectorGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: CaloSubdetectorGeometry.h:27
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
CaloSubdetectorGeometry::getCells
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
Definition: CaloSubdetectorGeometry.cc:66
PDWG_EXOHSCP_cff.inputCollection
inputCollection
Definition: PDWG_EXOHSCP_cff.py:56
PVValHelper::eta
Definition: PVValidationHelpers.h:69
Geom::Cylindrical2Cartesian
Definition: CoordinateSets.h:34
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
Point3DBase< float, GlobalTag >
CaloConeSelector::deltaR_
double deltaR_
Definition: CaloConeSelector.h:57
CaloConeSelector::detector_
DetId::Detector detector_
Definition: CaloConeSelector.h:58
CaloConeSelector::geom_
const CaloGeometry * geom_
Definition: CaloConeSelector.h:56
CaloConeSelector::subdet_
int subdet_
Definition: CaloConeSelector.h:59
DetId::Detector
Detector
Definition: DetId.h:24
DDAxes::phi
edmIntegrityCheck.callback
callback
Definition: edmIntegrityCheck.py:75
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66