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(conf.getParameter<
edm::InputTag>(
"beamSpot"));
78 applyHOverECut_ = conf.getParameter<
bool>(
"applyHOverECut");
79 if (applyHOverECut_) {
81 hcalCfg.
hOverEConeSize = conf.getParameter<
double>(
"hOverEConeSize");
82 if (hcalCfg.hOverEConeSize > 0) {
83 hcalCfg.useTowers =
true;
84 hcalCfg.hcalTowers = consumes(conf.getParameter<
edm::InputTag>(
"hcalTowers"));
85 hcalCfg.hOverEPtMin = conf.getParameter<
double>(
"hOverEPtMin");
87 hcalHelper_ = std::make_unique<ElectronHcalHelper>(hcalCfg, consumesCollector());
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, consumesCollector());
105 superClusters_[0] = consumes(conf.getParameter<
edm::InputTag>(
"barrelSuperClusters"));
106 superClusters_[1] = consumes(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;
129 initialSeedCollections.clear();
131 initialSeedCollections.push_back(&
e.get(
seeds));
134 auto seeds = std::make_unique<ElectronSeedCollection>();
135 auto const& beamSportPosition =
e.get(
beamSpotTag_).position();
138 for (
unsigned int i = 0;
i < 2;
i++) {
147 LogDebug(
"ElectronSeedProducer") <<
"new seed with " <<
seed.nHits() <<
" hits"
148 <<
", charge " <<
seed.getCharge() <<
" and cluster energy "
149 << superCluster->energy() <<
" PID " << superCluster.
id();
166 auto const& scl = (*superClusters)[
i];
167 double sclEta =
EleRelPoint(scl.position(), beamSpotPosition).
eta();
168 if (scl.energy() / cosh(sclEta) >
SCEtCut_) {
170 bool hoeVeto =
false;
172 double scle = scl.energy();
173 int det_group = scl.seed()->hitsAndFractions()[0].first.det();
174 int detector = scl.seed()->hitsAndFractions()[0].first.subdetId();
180 float had_fraction =
hgcClusterTools_->getClusterHadronFraction(*(scl.seed()));
191 LogDebug(
"ElectronSeedProducer") <<
"Filtered out " << sclRefs.
size() <<
" superclusters from "
201 desc.add<std::vector<edm::InputTag>>(
"initialSeedsVector", {});
202 desc.add<
bool>(
"useRecoVertex",
false);
205 desc.add<
bool>(
"dynamicPhiRoad",
true);
208 desc.add<
double>(
"SCEtCut", 0.0);
211 desc.add<
bool>(
"applyHOverECut",
true);
212 desc.add<
double>(
"hOverEConeSize", 0.15);
213 desc.add<
double>(
"maxHOverEBarrel", 0.15);
214 desc.add<
double>(
"maxHOverEEndcaps", 0.15);
218 desc.add<
double>(
"hOverEPtMin", 0.0);
221 desc.add<
bool>(
"allowHGCal",
false);
224 psd4.add<
edm::InputTag>(
"HGCFHInput", {
"HGCalRecHit",
"HGCHEFRecHits"});
225 psd4.add<
edm::InputTag>(
"HGCBHInput", {
"HGCalRecHit",
"HGCHEBRecHits"});
229 desc.add<
double>(
"nSigmasDeltaZ1", 5.0);
230 desc.add<
double>(
"deltaZ1WithVertex", 25.0);
231 desc.add<
double>(
"z2MaxB", 0.09);
232 desc.add<
double>(
"r2MaxF", 0.15);
233 desc.add<
double>(
"rMaxI", 0.2);
236 desc.add<
double>(
"LowPtThreshold", 5.0);
237 desc.add<
double>(
"HighPtThreshold", 35.0);
238 desc.add<
double>(
"SizeWindowENeg", 0.675);
239 desc.add<
double>(
"DeltaPhi1Low", 0.23);
240 desc.add<
double>(
"DeltaPhi1High", 0.08);
241 desc.add<
double>(
"DeltaPhi2B", 0.008);
242 desc.add<
double>(
"DeltaPhi2F", 0.012);
245 desc.add<
double>(
"ePhiMin1", -0.125);
246 desc.add<
double>(
"ePhiMax1", 0.075);
247 desc.add<
double>(
"PhiMax2B", 0.002);
248 desc.add<
double>(
"PhiMax2F", 0.003);
251 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALBarrel"});
253 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"});
255 descriptions.
add(
"ecalDrivenElectronSeeds",
desc);