CMS 3D CMS Logo

GenericClusterImporter.cc
Go to the documentation of this file.
4 
6 public:
8  : BlockElementImporterBase(conf, sumes),
9  _src(sumes.consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("source"))) {}
10 
11  void importToBlock(const edm::Event&, ElementList&) const override;
12 
13 private:
15 };
16 
18 
20  auto clusters = e.getHandle(_src);
21  auto cbegin = clusters->cbegin();
22  auto cend = clusters->cend();
23  for (auto clus = cbegin; clus != cend; ++clus) {
25  reco::PFClusterRef cref(clusters, std::distance(cbegin, clus));
26  switch (clus->layer()) {
27  case PFLayer::PS1:
29  break;
30  case PFLayer::PS2:
32  break;
36  break;
40  break;
43  break;
44  case PFLayer::HF_EM:
46  break;
47  case PFLayer::HF_HAD:
49  break;
50  case PFLayer::HGCAL:
52  break;
53  default:
54  throw cms::Exception("InvalidPFLayer") << "Layer given, " << clus->layer() << " is not a valid PFLayer!";
55  }
57  elems.emplace_back(cptr);
58  }
59 }
reco::PFBlockElement::HO
Definition: PFBlockElement.h:42
PFBlockElementCluster.h
edm::EDGetTokenT< reco::PFClusterCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
GenericClusterImporter
Definition: GenericClusterImporter.cc:5
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
PFLayer::HCAL_ENDCAP
Definition: PFLayer.h:37
reco::PFBlockElement::HCAL
Definition: PFBlockElement.h:36
reco::PFBlockElement::HGCAL
Definition: PFBlockElement.h:43
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
GenericClusterImporter::GenericClusterImporter
GenericClusterImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
Definition: GenericClusterImporter.cc:7
edm::Ref< PFClusterCollection >
PFLayer::ECAL_BARREL
Definition: PFLayer.h:33
reco::PFBlockElement::Type
Type
Definition: PFBlockElement.h:30
PFLayer::PS1
Definition: PFLayer.h:31
BlockElementImporterBase.h
PFLayer::HCAL_BARREL2
Definition: PFLayer.h:36
PFLayer::HF_EM
Definition: PFLayer.h:38
PFLayer::HCAL_BARREL1
Definition: PFLayer.h:35
PFCluster.h
PFLayer::HGCAL
Definition: PFLayer.h:40
reco::PFBlockElement::NONE
Definition: PFBlockElement.h:31
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
BlockElementImporterBase::ElementList
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
Definition: BlockElementImporterBase.h:16
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
PFLayer::HF_HAD
Definition: PFLayer.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
reco::PFBlockElement::HFEM
Definition: PFBlockElement.h:39
GenericClusterImporter::_src
edm::EDGetTokenT< reco::PFClusterCollection > _src
Definition: GenericClusterImporter.cc:14
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
edmplugin::PluginFactory
Definition: PluginFactory.h:34
reco::PFBlockElement::ECAL
Definition: PFBlockElement.h:35
reco::PFBlockElement::HFHAD
Definition: PFBlockElement.h:40
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition: PFBlockElement.h:26
GenericClusterImporter::importToBlock
void importToBlock(const edm::Event &, ElementList &) const override
Definition: GenericClusterImporter.cc:19
reco::PFBlockElementCluster
Cluster Element.
Definition: PFBlockElementCluster.h:16
Exception
Definition: hltDiff.cc:246
reco::PFBlockElement::PS1
Definition: PFBlockElement.h:33
PFLayer::ECAL_ENDCAP
Definition: PFLayer.h:32
edm::Event
Definition: Event.h:73
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733
PFLayer::PS2
Definition: PFLayer.h:30
l1t::PFClusterCollection
std::vector< l1t::PFCluster > PFClusterCollection
Definition: PFCluster.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
reco::PFBlockElement::PS2
Definition: PFBlockElement.h:34
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
BlockElementImporterBase
Definition: BlockElementImporterBase.h:14