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 
10 
11 template <ForwardSubdetector D1,
12  typename hgcee,
14  typename hgchef,
16  typename hgcheb>
18 public:
19  HGCRecHitNavigator() = default;
20 
21  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
23 
24  desc.add<std::string>("name", "PFRecHitHGCNavigator");
25 
27  descee.add<std::string>("name", "PFRecHitHGCEENavigator");
28  descee.add<std::string>("topologySource", "HGCalEESensitive");
29  desc.add<edm::ParameterSetDescription>("hgcee", descee);
30 
32  deschef.add<std::string>("name", "PFRecHitHGCHENavigator");
33  deschef.add<std::string>("topologySource", "HGCalHESiliconSensitive");
34  desc.add<edm::ParameterSetDescription>("hgchef", deschef);
35 
37  deschef.add<std::string>("name", "PFRecHitHGCHENavigator");
38  deschef.add<std::string>("topologySource", "HGCalHEScintillatorSensitive");
39  desc.add<edm::ParameterSetDescription>("hgcheb", descheb);
40 
41  descriptions.add("navigator", desc);
42  }
43 
45  if (iConfig.exists("hgcee")) {
46  eeNav_ = new hgcee(iConfig.getParameter<edm::ParameterSet>("hgcee"));
47  } else {
48  eeNav_ = nullptr;
49  }
50  if (iConfig.exists("hgchef")) {
51  hefNav_ = new hgchef(iConfig.getParameter<edm::ParameterSet>("hgchef"));
52  } else {
53  hefNav_ = nullptr;
54  }
55  if (iConfig.exists("hgcheb")) {
56  hebNav_ = new hgcheb(iConfig.getParameter<edm::ParameterSet>("hgcheb"));
57  } else {
58  hebNav_ = nullptr;
59  }
60  }
61 
62  void init(const edm::EventSetup& iSetup) override {
63  if (nullptr != eeNav_)
64  eeNav_->init(iSetup);
65  if (nullptr != hefNav_)
66  hefNav_->init(iSetup);
67  if (nullptr != hebNav_)
68  hebNav_->init(iSetup);
69  }
70 
72  std::unique_ptr<reco::PFRecHitCollection>& hits,
73  edm::RefProd<reco::PFRecHitCollection>& refProd) override {
74  switch (DetId(hit.detId()).subdetId()) {
75  case D1:
76  if (nullptr != eeNav_)
77  eeNav_->associateNeighbours(hit, hits, refProd);
78  break;
79  case D2:
80  if (nullptr != hefNav_)
81  hefNav_->associateNeighbours(hit, hits, refProd);
82  break;
83  case D3:
84  if (nullptr != hebNav_)
85  hebNav_->associateNeighbours(hit, hits, refProd);
86  break;
87  default:
88  break;
89  }
90  }
91 
92 protected:
96 };
97 
98 #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:95
HGCRecHitNavigator::HGCRecHitNavigator
HGCRecHitNavigator(const edm::ParameterSet &iConfig)
Definition: HGCRecHitNavigator.h:44
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HGCRecHitNavigator
Definition: HGCRecHitNavigator.h:17
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
DetId
Definition: DetId.h:17
HGCRecHitNavigator::eeNav_
hgcee * eeNav_
Definition: HGCRecHitNavigator.h:93
HGCRecHitNavigator::HGCRecHitNavigator
HGCRecHitNavigator()=default
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:21
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:62
edm::ParameterSet
Definition: ParameterSet.h:47
PFRecHitNavigatorBase
Definition: PFRecHitNavigatorBase.h:26
edm::EventSetup
Definition: EventSetup.h:57
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:71
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
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HGCRecHitNavigator::hefNav_
hgchef * hefNav_
Definition: HGCRecHitNavigator.h:94