49 std::unique_ptr<ElectronSeedGenerator>
matcher_;
68 [
this](
edm::InputTag const&
tag) {
return consumes<TrajectorySeedCollection>(tag); })}
71 SCEtCut_ = conf.getParameter<
double>(
"SCEtCut");
81 hcalCfg.
hOverEConeSize = conf.getParameter<
double>(
"hOverEConeSize");
82 if (hcalCfg.hOverEConeSize > 0) {
83 hcalCfg.onlyBehindCluster =
false;
84 hcalCfg.checkHcalStatus =
false;
86 hcalCfg.hbheRecHits = consumes<HBHERecHitCollection>(conf.getParameter<
edm::InputTag>(
"hbheRecHits"));
89 hcalCfg.maxSeverityHB = conf.getParameter<
int>(
"maxHcalRecHitSeverity");
91 hcalCfg.maxSeverityHE = hcalCfg.maxSeverityHB;
93 hcalHelper_ = std::make_unique<ElectronHcalHelper>(hcalCfg, consumesCollector());
95 allowHGCal_ = conf.getParameter<
bool>(
"allowHGCal");
98 hgcClusterTools_ = std::make_unique<hgcal::ClusterTools>(hgcCfg,
theconsumes);
101 maxHOverEBarrel_ = conf.
getParameter<
double>(
"maxHOverEBarrel");
102 maxHOverEEndcaps_ = conf.getParameter<
double>(
"maxHOverEEndcaps");
119 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering ";
121 std::vector<TrajectorySeedCollection const*> initialSeedCollections;
122 std::unique_ptr<TrajectorySeedCollection> initialSeedCollectionPtr =
nullptr;
135 initialSeedCollections.clear();
137 initialSeedCollections.push_back(&e.
get(
seeds));
140 auto seeds = std::make_unique<ElectronSeedCollection>();
144 for (
unsigned int i = 0;
i < 2;
i++) {
146 matcher_->run(e, clusterRefs, initialSeedCollections, *
seeds);
153 LogDebug(
"ElectronSeedProducer") <<
"new seed with " <<
seed.nHits() <<
" hits"
154 <<
", charge " <<
seed.getCharge() <<
" and cluster energy "
155 << superCluster->energy() <<
" PID " << superCluster.
id();
171 for (
unsigned int i = 0;
i < superClusters->size(); ++
i) {
172 auto const& scl = (*superClusters)[
i];
173 double sclEta =
EleRelPoint(scl.position(), beamSpotPosition).
eta();
174 if (scl.energy() / cosh(sclEta) >
SCEtCut_) {
176 bool hoeVeto =
false;
178 double scle = scl.energy();
179 int det_group = scl.seed()->hitsAndFractions()[0].first.det();
180 int detector = scl.seed()->hitsAndFractions()[0].first.subdetId();
186 float had_fraction =
hgcClusterTools_->getClusterHadronFraction(*(scl.seed()));
197 LogDebug(
"ElectronSeedProducer") <<
"Filtered out " << sclRefs.
size() <<
" superclusters from "
198 << superClusters->size();
207 desc.
add<std::vector<edm::InputTag>>(
"initialSeedsVector", {});
208 desc.
add<
bool>(
"useRecoVertex",
false);
211 desc.
add<
bool>(
"dynamicPhiRoad",
true);
214 desc.
add<
double>(
"SCEtCut", 0.0);
217 desc.
add<
bool>(
"applyHOverECut",
true);
218 desc.
add<
double>(
"hOverEConeSize", 0.15);
219 desc.
add<
double>(
"maxHOverEBarrel", 0.15);
220 desc.
add<
double>(
"maxHOverEEndcaps", 0.15);
222 desc.
add<std::vector<double>>(
"recHitEThresholdHB", {0., 0., 0., 0.});
223 desc.
add<std::vector<double>>(
"recHitEThresholdHE", {0., 0., 0., 0., 0., 0., 0.});
224 desc.
add<
int>(
"maxHcalRecHitSeverity", 999999);
227 desc.
add<
bool>(
"allowHGCal",
false);
230 psd4.add<
edm::InputTag>(
"HGCFHInput", {
"HGCalRecHit",
"HGCHEFRecHits"});
231 psd4.add<
edm::InputTag>(
"HGCBHInput", {
"HGCalRecHit",
"HGCHEBRecHits"});
235 desc.
add<
double>(
"nSigmasDeltaZ1", 5.0);
236 desc.
add<
double>(
"deltaZ1WithVertex", 25.0);
237 desc.
add<
double>(
"z2MaxB", 0.09);
238 desc.
add<
double>(
"r2MaxF", 0.15);
239 desc.
add<
double>(
"rMaxI", 0.2);
242 desc.
add<
double>(
"LowPtThreshold", 5.0);
243 desc.
add<
double>(
"HighPtThreshold", 35.0);
244 desc.
add<
double>(
"SizeWindowENeg", 0.675);
245 desc.
add<
double>(
"DeltaPhi1Low", 0.23);
246 desc.
add<
double>(
"DeltaPhi1High", 0.08);
247 desc.
add<
double>(
"DeltaPhi2B", 0.008);
248 desc.
add<
double>(
"DeltaPhi2F", 0.012);
251 desc.
add<
double>(
"ePhiMin1", -0.125);
252 desc.
add<
double>(
"ePhiMax1", 0.075);
253 desc.
add<
double>(
"PhiMax2B", 0.002);
254 desc.
add<
double>(
"PhiMax2F", 0.003);
257 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALBarrel"});
259 {
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"});
261 descriptions.
add(
"ecalDrivenElectronSeedsDefault", desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::BeamSpot > token_bs
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< ElectronHcalHelper > hcalHelper_
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
ProductID id() const
Accessor for product ID.
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
ElectronSeedProducer(const edm::ParameterSet &)
bool get(ProductID const &oid, Handle< PROD > &result) const
reco::SuperClusterRefVector filterClusters(math::XYZPoint const &beamSpotPosition, const edm::Handle< reco::SuperClusterCollection > &superClusters) const
std::unique_ptr< ElectronSeedGenerator > matcher_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ElectronSeedGenerator::Tokens esg_tokens
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterSet const & getParameterSet(std::string const &) const
XYZPointD XYZPoint
point in space with cartesian internal representation
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
void produce(edm::Event &, const edm::EventSetup &) final
produces< ElectronSeedCollection >()
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
std::array< double, 4 > arrayHB
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > initialSeeds_
std::array< double, 7 > arrayHE