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
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
 
EcalClusterLocal ecl_
 
const CaloGeometryRecordgeom_record
 
edm::EDGetTokenT
< EcalRecHitCollection
inputTagEBRecHits_
 
edm::EDGetTokenT
< EcalRecHitCollection
inputTagEERecHits_
 
edm::EDGetTokenT
< reco::VertexCollection
inputTagVertices_
 
edm::Handle< EcalRecHitCollectionrechitsEB
 
edm::Handle< EcalRecHitCollectionrechitsEE
 
const CaloTopologyRecordtopo_record
 
edm::Handle
< reco::VertexCollection
vertices
 

Detailed Description

Definition at line 30 of file BaselinePFSCRegression.h.

Constructor & Destructor Documentation

BaselinePFSCRegression::BaselinePFSCRegression ( )
inline

Definition at line 32 of file BaselinePFSCRegression.h.

#define NULL
Definition: scimark2.h:8
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, edm::hlt::Exception, EcalRegressionData::fill(), EcalRegressionData::fillVec(), edm::Handle< T >::product(), edm::ESHandle< class >::product(), rechitsEB, rechitsEE, reco::SuperCluster::seed(), and vertices.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

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:81
T const * product() const
Definition: ESHandle.h:86
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
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.

50  {
54 }
edm::EDGetTokenT< EcalRecHitCollection > inputTagEERecHits_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
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_, and inputTagVertices_.

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::EventSetupRecord::get(), and topo_record.

Referenced by progressbar.ProgressBar::__next__(), relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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
void get(HolderT &iHolder) const
edm::ESHandle< CaloTopology > calotopo
const CaloTopologyRecord * topo_record
edm::ESHandle< CaloGeometry > calogeom
const T & get() const
Definition: EventSetup.h:55
const CaloGeometryRecord * geom_record

Member Data Documentation

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

Definition at line 43 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

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

Definition at line 42 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

EcalClusterLocal BaselinePFSCRegression::ecl_
private

Definition at line 41 of file BaselinePFSCRegression.h.

const CaloGeometryRecord* BaselinePFSCRegression::geom_record
private

Definition at line 40 of file BaselinePFSCRegression.h.

Referenced by update().

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

Definition at line 44 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

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

Definition at line 45 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

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

Definition at line 46 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

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

Definition at line 48 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

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

Definition at line 48 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

const CaloTopologyRecord* BaselinePFSCRegression::topo_record
private

Definition at line 39 of file BaselinePFSCRegression.h.

Referenced by update().

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

Definition at line 47 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().