CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Attributes
InitialClusteringStepBase Class Referenceabstract

#include <InitialClusteringStepBase.h>

Inheritance diagram for InitialClusteringStepBase:
Basic2DGenericTopoClusterizer GenericSimClusterMapper

Public Member Functions

virtual void buildClusters (const edm::Handle< reco::PFRecHitCollection > &, const std::vector< bool > &mask, const std::vector< bool > &seeds, reco::PFClusterCollection &)=0
 
 InitialClusteringStepBase (const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
 
 InitialClusteringStepBase (const ICSB &)=delete
 
std::ostream & operator<< (std::ostream &o)
 
ICSBoperator= (const ICSB &)=delete
 
void reset ()
 
virtual void update (const edm::EventSetup &)
 
virtual void updateEvent (const edm::Event &)
 
virtual ~InitialClusteringStepBase ()
 

Protected Member Functions

reco::PFRecHitRef makeRefhit (const edm::Handle< reco::PFRecHitCollection > &h, const unsigned i) const
 

Protected Attributes

const std::unordered_map< std::string, int > _layerMap
 
unsigned _nClustersFound
 
unsigned _nSeeds
 
std::unordered_map< int, std::pair< double, double > > _thresholds
 

Private Types

typedef InitialClusteringStepBase ICSB
 

Private Attributes

const std::string _algoName
 

Detailed Description

Definition at line 23 of file InitialClusteringStepBase.h.

Member Typedef Documentation

Definition at line 24 of file InitialClusteringStepBase.h.

Constructor & Destructor Documentation

InitialClusteringStepBase::InitialClusteringStepBase ( const edm::ParameterSet conf,
edm::ConsumesCollector sumes 
)
inline

Definition at line 26 of file InitialClusteringStepBase.h.

References PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, mps_splice::entry, Exception, PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, PFLayer::HF_EM, PFLayer::HF_HAD, PFLayer::HGCAL, createfilelist::int, PFLayer::NONE, PFLayer::PS1, PFLayer::PS2, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, and particleFlowRecHitECAL_cfi::thresholds.

27  :
28  _nSeeds(0), _nClustersFound(0),
29  _layerMap({ {"PS2",(int)PFLayer::PS2},
30  {"PS1",(int)PFLayer::PS1},
31  {"ECAL_ENDCAP",(int)PFLayer::ECAL_ENDCAP},
32  {"ECAL_BARREL",(int)PFLayer::ECAL_BARREL},
33  {"NONE",(int)PFLayer::NONE},
34  {"HCAL_BARREL1",(int)PFLayer::HCAL_BARREL1},
35  {"HCAL_BARREL2_RING0",(int)PFLayer::HCAL_BARREL2},
36  {"HCAL_BARREL2_RING1",100*(int)PFLayer::HCAL_BARREL2},
37  {"HCAL_ENDCAP",(int)PFLayer::HCAL_ENDCAP},
38  {"HF_EM",(int)PFLayer::HF_EM},
39  {"HF_HAD",(int)PFLayer::HF_HAD},
40  {"HGCAL",(int)PFLayer::HGCAL} }),
41  _algoName(conf.getParameter<std::string>("algoName")) {
42  const std::vector<edm::ParameterSet>& thresholds =
43  conf.getParameterSetVector("thresholdsByDetector");
44  for( const auto& pset : thresholds ) {
45  const std::string& det = pset.getParameter<std::string>("detector");
46  const double& thresh_E =
47  pset.getParameter<double>("gatheringThreshold");
48  const double& thresh_pT =
49  pset.getParameter<double>("gatheringThresholdPt");
50  const double thresh_pT2 = thresh_pT*thresh_pT;
51  auto entry = _layerMap.find(det);
52  if( entry == _layerMap.end() ) {
53  throw cms::Exception("InvalidDetectorLayer")
54  << "Detector layer : " << det << " is not in the list of recognized"
55  << " detector layers!";
56  }
57  _thresholds.emplace(_layerMap.find(det)->second,
58  std::make_pair(thresh_E,thresh_pT2));
59  }
60  }
T getParameter(std::string const &) const
VParameterSet const & getParameterSetVector(std::string const &name) const
const std::unordered_map< std::string, int > _layerMap
std::unordered_map< int, std::pair< double, double > > _thresholds
virtual InitialClusteringStepBase::~InitialClusteringStepBase ( )
inlinevirtual

Definition at line 61 of file InitialClusteringStepBase.h.

61 { }
InitialClusteringStepBase::InitialClusteringStepBase ( const ICSB )
delete

Member Function Documentation

virtual void InitialClusteringStepBase::buildClusters ( const edm::Handle< reco::PFRecHitCollection > &  ,
const std::vector< bool > &  mask,
const std::vector< bool > &  seeds,
reco::PFClusterCollection  
)
pure virtual
reco::PFRecHitRef InitialClusteringStepBase::makeRefhit ( const edm::Handle< reco::PFRecHitCollection > &  h,
const unsigned  i 
) const
inlineprotected

Definition at line 85 of file InitialClusteringStepBase.h.

Referenced by GenericSimClusterMapper::buildClusters(), and Basic2DGenericTopoClusterizer::buildTopoCluster().

86  {
87  return reco::PFRecHitRef(h,i);
88  }
edm::Ref< PFRecHitCollection > PFRecHitRef
persistent reference to PFRecHit objects
Definition: PFRecHitFwd.h:15
std::ostream& InitialClusteringStepBase::operator<< ( std::ostream &  o)
inline

Definition at line 75 of file InitialClusteringStepBase.h.

References connectstrParser::o.

75  {
76  o << "InitialClusteringStep with algo \"" << _algoName
77  << "\" located " << _nSeeds << " seeds and built "
78  << _nClustersFound << " clusters from those seeds. ";
79  return o;
80  }
ICSB& InitialClusteringStepBase::operator= ( const ICSB )
delete
void InitialClusteringStepBase::reset ( void  )
inline
virtual void InitialClusteringStepBase::update ( const edm::EventSetup )
inlinevirtual

Definition at line 66 of file InitialClusteringStepBase.h.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

66 { }
virtual void InitialClusteringStepBase::updateEvent ( const edm::Event )
inlinevirtual

Reimplemented in GenericSimClusterMapper.

Definition at line 68 of file InitialClusteringStepBase.h.

References RecoTauDiscriminantConfiguration::mask.

68 { }

Member Data Documentation

const std::string InitialClusteringStepBase::_algoName
private

Definition at line 95 of file InitialClusteringStepBase.h.

const std::unordered_map<std::string,int> InitialClusteringStepBase::_layerMap
protected

Definition at line 90 of file InitialClusteringStepBase.h.

unsigned InitialClusteringStepBase::_nClustersFound
protected

Definition at line 89 of file InitialClusteringStepBase.h.

unsigned InitialClusteringStepBase::_nSeeds
protected

Definition at line 89 of file InitialClusteringStepBase.h.

std::unordered_map<int,std::pair<double,double> > InitialClusteringStepBase::_thresholds
protected