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_
 
EcalRecHitCollection const * rechitsEB = nullptr
 
EcalRecHitCollection const * rechitsEE = nullptr
 
const CaloTopologyRecordtopo_record
 
reco::VertexCollection const * vertices = nullptr
 

Detailed Description

Definition at line 27 of file BaselinePFSCRegression.h.

Constructor & Destructor Documentation

◆ BaselinePFSCRegression()

BaselinePFSCRegression::BaselinePFSCRegression ( )
inline

Definition at line 29 of file BaselinePFSCRegression.h.

29 : topo_record(nullptr), geom_record(nullptr){};

Member Function Documentation

◆ set()

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

Definition at line 22 of file BaselinePFSCRegression.cc.

22  {
23  EcalRegressionData regData;
25  regData.fillVec(vars);
26 
27  //solely to reproduce old exception behaviour, unnessessary although it likely is
28  if (sc.seed()->hitsAndFractions().at(0).first.subdetId() != EcalBarrel &&
29  sc.seed()->hitsAndFractions().at(0).first.subdetId() != EcalEndcap) {
30  throw cms::Exception("PFECALSuperClusterProducer::calculateRegressedEnergy")
31  << "Supercluster seed is either EB nor EE!" << std::endl;
32  }
33 }

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

◆ setEvent()

void BaselinePFSCRegression::setEvent ( const edm::Event ev)

◆ setTokens()

void BaselinePFSCRegression::setTokens ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  cc 
)

Definition at line 35 of file BaselinePFSCRegression.cc.

35  {
36  inputTagEBRecHits_ = cc.consumes(ps.getParameter<edm::InputTag>("ecalRecHitsEB"));
37  inputTagEERecHits_ = cc.consumes(ps.getParameter<edm::InputTag>("ecalRecHitsEE"));
38  inputTagVertices_ = cc.consumes(ps.getParameter<edm::InputTag>("vertexCollection"));
39 }

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

◆ update()

void BaselinePFSCRegression::update ( const edm::EventSetup es)

Member Data Documentation

◆ calogeom

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

Definition at line 39 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

◆ calotopo

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

Definition at line 38 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

◆ geom_record

const CaloGeometryRecord* BaselinePFSCRegression::geom_record
private

Definition at line 37 of file BaselinePFSCRegression.h.

Referenced by update().

◆ inputTagEBRecHits_

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

Definition at line 40 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ inputTagEERecHits_

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

Definition at line 41 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ inputTagVertices_

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

Definition at line 42 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ rechitsEB

EcalRecHitCollection const* BaselinePFSCRegression::rechitsEB = nullptr
private

Definition at line 44 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

◆ rechitsEE

EcalRecHitCollection const* BaselinePFSCRegression::rechitsEE = nullptr
private

Definition at line 45 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

◆ topo_record

const CaloTopologyRecord* BaselinePFSCRegression::topo_record
private

Definition at line 36 of file BaselinePFSCRegression.h.

Referenced by update().

◆ vertices

reco::VertexCollection const* BaselinePFSCRegression::vertices = nullptr
private

Definition at line 43 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
BaselinePFSCRegression::calotopo
edm::ESHandle< CaloTopology > calotopo
Definition: BaselinePFSCRegression.h:38
BaselinePFSCRegression::inputTagVertices_
edm::EDGetTokenT< reco::VertexCollection > inputTagVertices_
Definition: BaselinePFSCRegression.h:42
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
BaselinePFSCRegression::topo_record
const CaloTopologyRecord * topo_record
Definition: BaselinePFSCRegression.h:36
EcalRegressionData
Definition: EcalRegressionData.h:17
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
BaselinePFSCRegression::rechitsEE
EcalRecHitCollection const * rechitsEE
Definition: BaselinePFSCRegression.h:45
EcalBarrel
Definition: EcalSubdetector.h:10
BaselinePFSCRegression::calogeom
edm::ESHandle< CaloGeometry > calogeom
Definition: BaselinePFSCRegression.h:39
EcalRegressionData::fill
void fill(const reco::SuperCluster &superClus, const EcalRecHitCollection *ebRecHits, const EcalRecHitCollection *eeRecHits, const CaloGeometry *geom, const CaloTopology *topology, const reco::VertexCollection *vertices)
Definition: EcalRegressionData.h:82
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
vars
vars
Definition: DeepTauId.cc:164
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
BaselinePFSCRegression::geom_record
const CaloGeometryRecord * geom_record
Definition: BaselinePFSCRegression.h:37
EcalEndcap
Definition: EcalSubdetector.h:10
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
BaselinePFSCRegression::inputTagEERecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEERecHits_
Definition: BaselinePFSCRegression.h:41
BaselinePFSCRegression::rechitsEB
EcalRecHitCollection const * rechitsEB
Definition: BaselinePFSCRegression.h:44
EcalRegressionData::fillVec
void fillVec(std::vector< float > &inputVec) const
Definition: EcalRegressionData.cc:158
cc
BaselinePFSCRegression::inputTagEBRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEBRecHits_
Definition: BaselinePFSCRegression.h:40
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:245
BaselinePFSCRegression::vertices
reco::VertexCollection const * vertices
Definition: BaselinePFSCRegression.h:43
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:187
edm::InputTag
Definition: InputTag.h:15