49 std::unique_ptr<ElectronSeedGenerator>
matcher_;
68 [
this](
edm::InputTag const&
tag) { return consumes<TrajectorySeedCollection>(tag); })}
71 SCEtCut_ = conf.getParameter<
double>(
"SCEtCut");
72 auto theconsumes = consumesCollector();
75 beamSpotTag_ = consumes<reco::BeamSpot>(conf.getParameter<
edm::InputTag>(
"beamSpot"));
78 applyHOverECut_ = conf.getParameter<
bool>(
"applyHOverECut");
79 if (applyHOverECut_) {
81 hcalCfg.
hOverEConeSize = conf.getParameter<
double>(
"hOverEConeSize");
85 hcalCfg.
hOverEPtMin = conf.getParameter<
double>(
"hOverEPtMin");
87 hcalHelper_ = std::make_unique<ElectronHcalHelper>(hcalCfg);
89 allowHGCal_ = conf.getParameter<
bool>(
"allowHGCal");
92 hgcClusterTools_ = std::make_unique<hgcal::ClusterTools>(hgcCfg, theconsumes);
95 maxHOverEBarrel_ = conf.getParameter<
double>(
"maxHOverEBarrel");
96 maxHOverEEndcaps_ = conf.getParameter<
double>(
"maxHOverEEndcaps");
103 matcher_ = std::make_unique<ElectronSeedGenerator>(conf, esg_tokens);
105 superClusters_[0] = consumes<reco::SuperClusterCollection>(conf.getParameter<
edm::InputTag>(
"barrelSuperClusters"));
106 superClusters_[1] = consumes<reco::SuperClusterCollection>(conf.getParameter<
edm::InputTag>(
"endcapSuperClusters"));
109 produces<ElectronSeedCollection>();
113 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering ";
115 std::vector<TrajectorySeedCollection const*> initialSeedCollections;
116 std::unique_ptr<TrajectorySeedCollection> initialSeedCollectionPtr =
nullptr;
130 initialSeedCollections.clear();
132 initialSeedCollections.push_back(&
e.get(
seeds));
135 auto seeds = std::make_unique<ElectronSeedCollection>();
136 auto const& beamSportPosition =
e.get(
beamSpotTag_).position();
139 for (
unsigned int i = 0;
i < 2;
i++) {
141 matcher_->run(
e, iSetup, clusterRefs, initialSeedCollections, *
seeds);
148 LogDebug(
"ElectronSeedProducer") <<
"new seed with " <<
seed.nHits() <<
" hits"
149 <<
", charge " <<
seed.getCharge() <<
" and cluster energy "
150 << superCluster->energy() <<
" PID " << superCluster.
id();
167 auto const& scl = (*superClusters)[
i];
168 double sclEta =
EleRelPoint(scl.position(), beamSpotPosition).
eta();
169 if (scl.energy() / cosh(sclEta) >
SCEtCut_) {
171 bool hoeVeto =
false;
173 double scle = scl.energy();
174 int det_group = scl.seed()->hitsAndFractions()[0].first.det();
175 int detector = scl.seed()->hitsAndFractions()[0].first.subdetId();
181 float had_fraction =
hgcClusterTools_->getClusterHadronFraction(*(scl.seed()));
192 LogDebug(
"ElectronSeedProducer") <<
"Filtered out " << sclRefs.
size() <<
" superclusters from "
202 desc.
add<std::vector<edm::InputTag>>(
"initialSeedsVector", {});
203 desc.
add<
bool>(
"useRecoVertex",
false);
206 desc.
add<
bool>(
"dynamicPhiRoad",
true);
209 desc.
add<
double>(
"SCEtCut", 0.0);
212 desc.
add<
bool>(
"applyHOverECut",
true);
213 desc.
add<
double>(
"hOverEConeSize", 0.15);
214 desc.
add<
double>(
"maxHOverEBarrel", 0.15);
215 desc.
add<
double>(
"maxHOverEEndcaps", 0.15);
219 desc.
add<
double>(
"hOverEPtMin", 0.0);
222 desc.
add<
bool>(
"allowHGCal",
false);
225 psd4.add<
edm::InputTag>(
"HGCFHInput", {
"HGCalRecHit",
"HGCHEFRecHits"});
226 psd4.add<
edm::InputTag>(
"HGCBHInput", {
"HGCalRecHit",
"HGCHEBRecHits"});
230 desc.
add<
double>(
"nSigmasDeltaZ1", 5.0);
231 desc.
add<
double>(
"deltaZ1WithVertex", 25.0);
232 desc.
add<
double>(
"z2MaxB", 0.09);
233 desc.
add<
double>(
"r2MaxF", 0.15);
234 desc.
add<
double>(
"rMaxI", 0.2);
237 desc.
add<
double>(
"LowPtThreshold", 5.0);
238 desc.
add<
double>(
"HighPtThreshold", 35.0);
239 desc.
add<
double>(
"SizeWindowENeg", 0.675);
240 desc.
add<
double>(
"DeltaPhi1Low", 0.23);
241 desc.
add<
double>(
"DeltaPhi1High", 0.08);
242 desc.
add<
double>(
"DeltaPhi2B", 0.008);
243 desc.
add<
double>(
"DeltaPhi2F", 0.012);
246 desc.
add<
double>(
"ePhiMin1", -0.125);
247 desc.
add<
double>(
"ePhiMax1", 0.075);
248 desc.
add<
double>(
"pPhiMin1", -0.075);
249 desc.
add<
double>(
"pPhiMax1", 0.125);
250 desc.
add<
double>(
"PhiMax2B", 0.002);
251 desc.
add<
double>(
"PhiMax2F", 0.003);
254 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALBarrel"});
256 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"});
258 descriptions.
add(
"ecalDrivenElectronSeeds", desc);