CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
BaselinePFSCRegression Class Reference

#include <BaselinePFSCRegression.h>

Public Member Functions

 BaselinePFSCRegression ()
 
void set (const reco::SuperCluster &, std::vector< float > &) const
 
void setEvent (const edm::Event &)
 
void setTokens (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
void update (const edm::EventSetup &)
 

Private Attributes

edm::ESHandle< CaloGeometrycalogeom
 
edm::ESHandle< CaloTopologycalotopo
 
const CaloGeometryRecordgeom_record
 
edm::EDGetTokenT< EcalRecHitCollectioninputTagEBRecHits_
 
edm::EDGetTokenT< EcalRecHitCollectioninputTagEERecHits_
 
edm::EDGetTokenT< reco::VertexCollectioninputTagVertices_
 
edm::Handle< EcalRecHitCollectionrechitsEB
 
edm::Handle< EcalRecHitCollectionrechitsEE
 
const CaloTopologyRecordtopo_record
 
edm::Handle< reco::VertexCollectionvertices
 

Detailed Description

Definition at line 29 of file BaselinePFSCRegression.h.

Constructor & Destructor Documentation

BaselinePFSCRegression::BaselinePFSCRegression ( )
inline

Definition at line 31 of file BaselinePFSCRegression.h.

References setEvent(), setTokens(), and update().

31 : topo_record(nullptr), geom_record(nullptr) {};
const CaloTopologyRecord * topo_record
const CaloGeometryRecord * geom_record

Member Function Documentation

void BaselinePFSCRegression::set ( const reco::SuperCluster sc,
std::vector< float > &  vars 
) const

Definition at line 24 of file BaselinePFSCRegression.cc.

References calogeom, calotopo, EcalBarrel, EcalEndcap, Exception, EcalRegressionData::fill(), EcalRegressionData::fillVec(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), rechitsEB, rechitsEE, reco::SuperCluster::seed(), setTokens(), and vertices.

25  {
26  EcalRegressionData regData;
27  regData.fill(sc,rechitsEB.product(),rechitsEE.product(),calogeom.product(),calotopo.product(),vertices.product());
28  regData.fillVec(vars);
29 
30  //solely to reproduce old exception behaviour, unnessessary although it likely is
31  if( sc.seed()->hitsAndFractions().at(0).first.subdetId()!=EcalBarrel &&
32  sc.seed()->hitsAndFractions().at(0).first.subdetId()!=EcalEndcap){
33  throw cms::Exception("PFECALSuperClusterProducer::calculateRegressedEnergy")
34  << "Supercluster seed is either EB nor EE!" << std::endl;
35  }
36 
37 
38 }
void fill(const reco::SuperCluster &superClus, const EcalRecHitCollection *ebRecHits, const EcalRecHitCollection *eeRecHits, const CaloGeometry *geom, const CaloTopology *topology, const reco::VertexCollection *vertices)
edm::Handle< reco::VertexCollection > vertices
edm::Handle< EcalRecHitCollection > rechitsEB
edm::ESHandle< CaloTopology > calotopo
void fillVec(std::vector< float > &inputVec) const
edm::ESHandle< CaloGeometry > calogeom
T const * product() const
Definition: Handle.h:74
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
vars
Definition: DeepTauId.cc:77
T const * product() const
Definition: ESHandle.h:86
edm::Handle< EcalRecHitCollection > rechitsEE
void BaselinePFSCRegression::setEvent ( const edm::Event ev)

Definition at line 50 of file BaselinePFSCRegression.cc.

References edm::Event::getByToken(), inputTagEBRecHits_, inputTagEERecHits_, inputTagVertices_, rechitsEB, rechitsEE, and vertices.

Referenced by BaselinePFSCRegression().

50  {
54 }
edm::EDGetTokenT< EcalRecHitCollection > inputTagEERecHits_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::Handle< reco::VertexCollection > vertices
edm::Handle< EcalRecHitCollection > rechitsEB
edm::EDGetTokenT< EcalRecHitCollection > inputTagEBRecHits_
edm::EDGetTokenT< reco::VertexCollection > inputTagVertices_
edm::Handle< EcalRecHitCollection > rechitsEE
void BaselinePFSCRegression::setTokens ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  cc 
)

Definition at line 41 of file BaselinePFSCRegression.cc.

References edm::ParameterSet::getParameter(), inputTagEBRecHits_, inputTagEERecHits_, inputTagVertices_, and extraflags_cff::vtx.

Referenced by BaselinePFSCRegression(), and set().

41  {
42  const edm::InputTag rceb = ps.getParameter<edm::InputTag>("ecalRecHitsEB");
43  const edm::InputTag rcee = ps.getParameter<edm::InputTag>("ecalRecHitsEE");
44  const edm::InputTag vtx = ps.getParameter<edm::InputTag>("vertexCollection");
48 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > inputTagEERecHits_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< EcalRecHitCollection > inputTagEBRecHits_
edm::EDGetTokenT< reco::VertexCollection > inputTagVertices_
void BaselinePFSCRegression::update ( const edm::EventSetup es)

Definition at line 9 of file BaselinePFSCRegression.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), calogeom, calotopo, geom_record, edm::EventSetup::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), and topo_record.

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), BaselinePFSCRegression(), 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().

9  {
10  const CaloTopologyRecord& topofrom_es = es.get<CaloTopologyRecord>();
11  if( !topo_record ||
12  topofrom_es.cacheIdentifier() != topo_record->cacheIdentifier() ) {
13  topo_record = &topofrom_es;
15  }
16  const CaloGeometryRecord& geomfrom_es = es.get<CaloGeometryRecord>();
17  if( !geom_record ||
18  geomfrom_es.cacheIdentifier() != geom_record->cacheIdentifier() ) {
19  geom_record = &geomfrom_es;
21  }
22 }
unsigned long long cacheIdentifier() const
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESHandle< CaloTopology > calotopo
const CaloTopologyRecord * topo_record
edm::ESHandle< CaloGeometry > calogeom
T get() const
Definition: EventSetup.h:71
const CaloGeometryRecord * geom_record

Member Data Documentation

edm::ESHandle<CaloGeometry> BaselinePFSCRegression::calogeom
private

Definition at line 41 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

edm::ESHandle<CaloTopology> BaselinePFSCRegression::calotopo
private

Definition at line 40 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

const CaloGeometryRecord* BaselinePFSCRegression::geom_record
private

Definition at line 39 of file BaselinePFSCRegression.h.

Referenced by update().

edm::EDGetTokenT<EcalRecHitCollection> BaselinePFSCRegression::inputTagEBRecHits_
private

Definition at line 42 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

edm::EDGetTokenT<EcalRecHitCollection> BaselinePFSCRegression::inputTagEERecHits_
private

Definition at line 43 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

edm::EDGetTokenT<reco::VertexCollection> BaselinePFSCRegression::inputTagVertices_
private

Definition at line 44 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

edm::Handle<EcalRecHitCollection> BaselinePFSCRegression::rechitsEB
private

Definition at line 46 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

edm::Handle<EcalRecHitCollection> BaselinePFSCRegression::rechitsEE
private

Definition at line 46 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

const CaloTopologyRecord* BaselinePFSCRegression::topo_record
private

Definition at line 38 of file BaselinePFSCRegression.h.

Referenced by update().

edm::Handle<reco::VertexCollection> BaselinePFSCRegression::vertices
private

Definition at line 45 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().