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::BaselinePFSCRegression ( )
inline

Definition at line 31 of file BaselinePFSCRegression.h.

31 : 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;
24  regData.fill(
25  sc, rechitsEB.product(), rechitsEE.product(), calogeom.product(), calotopo.product(), vertices.product());
26  regData.fillVec(vars);
27 
28  //solely to reproduce old exception behaviour, unnessessary although it likely is
29  if (sc.seed()->hitsAndFractions().at(0).first.subdetId() != EcalBarrel &&
30  sc.seed()->hitsAndFractions().at(0).first.subdetId() != EcalEndcap) {
31  throw cms::Exception("PFECALSuperClusterProducer::calculateRegressedEnergy")
32  << "Supercluster seed is either EB nor EE!" << std::endl;
33  }
34 }

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

◆ setEvent()

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

Definition at line 45 of file BaselinePFSCRegression.cc.

45  {
46  ev.getByToken(inputTagEBRecHits_, rechitsEB);
47  ev.getByToken(inputTagEERecHits_, rechitsEE);
48  ev.getByToken(inputTagVertices_, vertices);
49 }

References ev, inputTagEBRecHits_, inputTagEERecHits_, inputTagVertices_, rechitsEB, rechitsEE, and vertices.

◆ setTokens()

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

Definition at line 36 of file BaselinePFSCRegression.cc.

36  {
37  const edm::InputTag rceb = ps.getParameter<edm::InputTag>("ecalRecHitsEB");
38  const edm::InputTag rcee = ps.getParameter<edm::InputTag>("ecalRecHitsEE");
39  const edm::InputTag vtx = ps.getParameter<edm::InputTag>("vertexCollection");
40  inputTagEBRecHits_ = cc.consumes<EcalRecHitCollection>(rceb);
41  inputTagEERecHits_ = cc.consumes<EcalRecHitCollection>(rcee);
43 }

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

◆ update()

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

Member Data Documentation

◆ calogeom

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

Definition at line 41 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

◆ calotopo

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

Definition at line 40 of file BaselinePFSCRegression.h.

Referenced by set(), and update().

◆ geom_record

const CaloGeometryRecord* BaselinePFSCRegression::geom_record
private

Definition at line 39 of file BaselinePFSCRegression.h.

Referenced by update().

◆ inputTagEBRecHits_

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

Definition at line 42 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ inputTagEERecHits_

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

Definition at line 43 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ inputTagVertices_

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

Definition at line 44 of file BaselinePFSCRegression.h.

Referenced by setEvent(), and setTokens().

◆ rechitsEB

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

Definition at line 46 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

◆ rechitsEE

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

Definition at line 46 of file BaselinePFSCRegression.h.

Referenced by set(), and setEvent().

◆ topo_record

const CaloTopologyRecord* BaselinePFSCRegression::topo_record
private

Definition at line 38 of file BaselinePFSCRegression.h.

Referenced by update().

◆ vertices

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

Definition at line 45 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:40
BaselinePFSCRegression::inputTagVertices_
edm::EDGetTokenT< reco::VertexCollection > inputTagVertices_
Definition: BaselinePFSCRegression.h:44
edm::Handle::product
T const * product() const
Definition: Handle.h:70
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
BaselinePFSCRegression::topo_record
const CaloTopologyRecord * topo_record
Definition: BaselinePFSCRegression.h:38
edm::SortedCollection< EcalRecHit >
EcalRegressionData
Definition: EcalRegressionData.h:17
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
EcalBarrel
Definition: EcalSubdetector.h:10
BaselinePFSCRegression::calogeom
edm::ESHandle< CaloGeometry > calogeom
Definition: BaselinePFSCRegression.h:41
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:73
vars
vars
Definition: DeepTauId.cc:158
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
BaselinePFSCRegression::rechitsEE
edm::Handle< EcalRecHitCollection > rechitsEE
Definition: BaselinePFSCRegression.h:46
BaselinePFSCRegression::geom_record
const CaloGeometryRecord * geom_record
Definition: BaselinePFSCRegression.h:39
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
EcalEndcap
Definition: EcalSubdetector.h:10
BaselinePFSCRegression::vertices
edm::Handle< reco::VertexCollection > vertices
Definition: BaselinePFSCRegression.h:45
reco::SuperCluster::seed
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:77
BaselinePFSCRegression::inputTagEERecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEERecHits_
Definition: BaselinePFSCRegression.h:43
BaselinePFSCRegression::rechitsEB
edm::Handle< EcalRecHitCollection > rechitsEB
Definition: BaselinePFSCRegression.h:46
EcalRegressionData::fillVec
void fillVec(std::vector< float > &inputVec) const
Definition: EcalRegressionData.cc:158
cc
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
BaselinePFSCRegression::inputTagEBRecHits_
edm::EDGetTokenT< EcalRecHitCollection > inputTagEBRecHits_
Definition: BaselinePFSCRegression.h:42
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception
Definition: hltDiff.cc:246
edm::eventsetup::EventSetupRecord::cacheIdentifier
unsigned long long cacheIdentifier() const
Definition: EventSetupRecord.h:185
edm::InputTag
Definition: InputTag.h:15