CMS 3D CMS Logo

HGCRecHitNavigator.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterProducer_HGCRecHitNavigator_h
2 #define RecoParticleFlow_PFClusterProducer_HGCRecHitNavigator_h
3 
7 
11 
12 template <ForwardSubdetector D1,
13  typename hgcee,
15  typename hgchef,
17  typename hgcheb>
19 public:
20  HGCRecHitNavigator() = default;
21 
22  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
24 
25  desc.add<std::string>("name", "PFRecHitHGCNavigator");
26 
28  descee.add<std::string>("name", "PFRecHitHGCEENavigator");
29  descee.add<std::string>("topologySource", "HGCalEESensitive");
30  desc.add<edm::ParameterSetDescription>("hgcee", descee);
31 
33  deschef.add<std::string>("name", "PFRecHitHGCHENavigator");
34  deschef.add<std::string>("topologySource", "HGCalHESiliconSensitive");
35  desc.add<edm::ParameterSetDescription>("hgchef", deschef);
36 
38  descheb.add<std::string>("name", "PFRecHitHGCHENavigator");
39  descheb.add<std::string>("topologySource", "HGCalHEScintillatorSensitive");
40  desc.add<edm::ParameterSetDescription>("hgcheb", descheb);
41 
42  descriptions.add("navigator", desc);
43  }
44 
46  if (iConfig.exists("hgcee")) {
47  eeNav_ = new hgcee(iConfig.getParameter<edm::ParameterSet>("hgcee"), cc);
48  } else {
49  eeNav_ = nullptr;
50  }
51  if (iConfig.exists("hgchef")) {
52  hefNav_ = new hgchef(iConfig.getParameter<edm::ParameterSet>("hgchef"), cc);
53  } else {
54  hefNav_ = nullptr;
55  }
56  if (iConfig.exists("hgcheb")) {
57  hebNav_ = new hgcheb(iConfig.getParameter<edm::ParameterSet>("hgcheb"), cc);
58  } else {
59  hebNav_ = nullptr;
60  }
61  }
62 
63  void init(const edm::EventSetup& iSetup) override {
64  if (nullptr != eeNav_)
65  eeNav_->init(iSetup);
66  if (nullptr != hefNav_)
67  hefNav_->init(iSetup);
68  if (nullptr != hebNav_)
69  hebNav_->init(iSetup);
70  }
71 
73  std::unique_ptr<reco::PFRecHitCollection>& hits,
74  edm::RefProd<reco::PFRecHitCollection>& refProd) override {
75  switch (DetId(hit.detId()).subdetId()) {
76  case D1:
77  if (nullptr != eeNav_)
78  eeNav_->associateNeighbours(hit, hits, refProd);
79  break;
80  case D2:
81  if (nullptr != hefNav_)
82  hefNav_->associateNeighbours(hit, hits, refProd);
83  break;
84  case D3:
85  if (nullptr != hebNav_)
86  hebNav_->associateNeighbours(hit, hits, refProd);
87  break;
88  default:
89  break;
90  }
91  }
92 
93 protected:
97 };
98 
99 #endif
ConfigurationDescriptions.h
edm::RefProd
Definition: EDProductfwd.h:25
funct::D1
Divides< A, C > D1
Definition: Factorize.h:136
HGCRecHitNavigator::hebNav_
hgcheb * hebNav_
Definition: HGCRecHitNavigator.h:96
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HGCRecHitNavigator
Definition: HGCRecHitNavigator.h:18
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
funct::D2
Divides< B, C > D2
Definition: Factorize.h:137
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
HLTEgPhaseIITestSequence_cff.hgchef
hgchef
Definition: HLTEgPhaseIITestSequence_cff.py:1786
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PFRecHitNavigatorBase.h
ForwardSubdetector.h
PFLayer.h
trklet::D3
Definition: Settings.h:50
DetId
Definition: DetId.h:17
HGCRecHitNavigator::eeNav_
hgcee * eeNav_
Definition: HGCRecHitNavigator.h:94
HGCRecHitNavigator::HGCRecHitNavigator
HGCRecHitNavigator()=default
HGCRecHitNavigator::HGCRecHitNavigator
HGCRecHitNavigator(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
Definition: HGCRecHitNavigator.h:45
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HGCRecHitNavigator::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HGCRecHitNavigator.h:22
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
HGCRecHitNavigator::init
void init(const edm::EventSetup &iSetup) override
Definition: HGCRecHitNavigator.h:63
edm::ParameterSet
Definition: ParameterSet.h:47
PFRecHitNavigatorBase
Definition: PFRecHitNavigatorBase.h:25
edm::EventSetup
Definition: EventSetup.h:58
cc
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HLTEgPhaseIITestSequence_cff.hgcheb
hgcheb
Definition: HLTEgPhaseIITestSequence_cff.py:1782
HLTEgPhaseIITestSequence_cff.hgcee
hgcee
Definition: HLTEgPhaseIITestSequence_cff.py:1778
HGCRecHitNavigator::associateNeighbours
void associateNeighbours(reco::PFRecHit &hit, std::unique_ptr< reco::PFRecHitCollection > &hits, edm::RefProd< reco::PFRecHitCollection > &refProd) override
Definition: HGCRecHitNavigator.h:72
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::PFRecHit
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
ConsumesCollector.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HGCRecHitNavigator::hefNav_
hgchef * hefNav_
Definition: HGCRecHitNavigator.h:95