CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CaloDualConeSelector< T > Class Template Reference

#include <CaloDualConeSelector.h>

Public Member Functions

 CaloDualConeSelector (double dRmin, double dRmax, const CaloGeometry *geom)
 
 CaloDualConeSelector (double dRmin, double dRmax, 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 deltaRmax_
 
double deltaRmin_
 
DetId::Detector detector_
 
const CaloGeometrygeom_
 
int subdet_
 

Detailed Description

template<class T>
class CaloDualConeSelector< T >

Author
J. Mans - Minnesota

Definition at line 14 of file CaloDualConeSelector.h.

Constructor & Destructor Documentation

◆ CaloDualConeSelector() [1/2]

template<class T>
CaloDualConeSelector< T >::CaloDualConeSelector ( double  dRmin,
double  dRmax,
const CaloGeometry geom 
)
inline

Definition at line 16 of file CaloDualConeSelector.h.

17  : geom_(geom), deltaRmin_(dRmin), deltaRmax_(dRmax), detector_(DetId::Detector(0)), subdet_(0) {}

◆ CaloDualConeSelector() [2/2]

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

Definition at line 19 of file CaloDualConeSelector.h.

20  : geom_(geom), deltaRmin_(dRmin), deltaRmax_(dRmax), detector_(detector), subdet_(subdet) {}

Member Function Documentation

◆ selectCallback() [1/2]

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

Definition at line 30 of file CaloDualConeSelector.h.

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

References edmIntegrityCheck::callback, CaloDualConeSelector< T >::deltaRmax_, CaloDualConeSelector< T >::deltaRmin_, CaloDualConeSelector< T >::detector_, CaloDualConeSelector< T >::geom_, CaloSubdetectorGeometry::getCells(), CaloGeometry::getSubdetectorGeometry(), mps_fire::i, HLT_FULL_cff::inputCollection, dqmiolumiharvest::j, AlCaHLTBitMon_ParallelJobs::p, and CaloDualConeSelector< T >::subdet_.

◆ selectCallback() [2/2]

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

Member Data Documentation

◆ deltaRmax_

template<class T>
double CaloDualConeSelector< T >::deltaRmax_
private

Definition at line 62 of file CaloDualConeSelector.h.

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

◆ deltaRmin_

template<class T>
double CaloDualConeSelector< T >::deltaRmin_
private

Definition at line 62 of file CaloDualConeSelector.h.

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

◆ detector_

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

Definition at line 63 of file CaloDualConeSelector.h.

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

◆ geom_

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

Definition at line 61 of file CaloDualConeSelector.h.

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

◆ subdet_

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

Definition at line 64 of file CaloDualConeSelector.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
CaloDualConeSelector::subdet_
int subdet_
Definition: CaloDualConeSelector.h:64
CaloSubdetectorGeometry::DetIdSet
std::set< DetId > DetIdSet
Definition: CaloSubdetectorGeometry.h:27
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
PVValHelper::eta
Definition: PVValidationHelpers.h:70
Geom::Cylindrical2Cartesian
Definition: CoordinateSets.h:34
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
CaloDualConeSelector::selectCallback
void selectCallback(double eta, double phi, const edm::SortedCollection< T > &inputCollection, std::function< void(const T &)> callback)
Definition: CaloDualConeSelector.h:22
Point3DBase< float, GlobalTag >
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLT_FULL_cff.inputCollection
inputCollection
Definition: HLT_FULL_cff.py:11721
CaloDualConeSelector::deltaRmin_
double deltaRmin_
Definition: CaloDualConeSelector.h:62
DetId::Detector
Detector
Definition: DetId.h:24
DDAxes::phi
edmIntegrityCheck.callback
callback
Definition: edmIntegrityCheck.py:75
CaloDualConeSelector::deltaRmax_
double deltaRmax_
Definition: CaloDualConeSelector.h:62
CaloDualConeSelector::geom_
const CaloGeometry * geom_
Definition: CaloDualConeSelector.h:61
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CaloDualConeSelector::detector_
DetId::Detector detector_
Definition: CaloDualConeSelector.h:63