Description: EDProducer of ElectronSeed objects
Implementation: <Notes on="" implementation>="">
Definition at line 34 of file ElectronSeedProducer.cc.
Definition at line 69 of file ElectronSeedProducer.cc.
References allowHGCal_, applyHOverECut_, beamSpotTag_, edm::ParameterSet::empty(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), hcalHelper_, ElectronHcalHelper::Configuration::hcalTowers, hgcClusterTools_, ElectronHcalHelper::Configuration::hOverEConeSize, ElectronHcalHelper::Configuration::hOverEPtMin, initialSeeds_, matcher_, maxHBarrel_, maxHEndcaps_, maxHOverEBarrel_, maxHOverEEndcaps_, prefilteredSeeds_, SCEtCut_, seedFilter_, superClusters_, GlobalPosition_Frontier_DevDB_cff::tag, SeedFilter::Tokens::token_bs, ElectronSeedGenerator::Tokens::token_bs, SeedFilter::Tokens::token_vtx, ElectronHcalHelper::Configuration::useTowers, and edm::vector_transform().
73 if (legacyConfSeeds.label().
empty()) {
76 [
this](
edm::InputTag const&
tag) { return consumes<TrajectorySeedCollection>(tag); });
81 SCEtCut_ = conf.getParameter<
double>(
"SCEtCut");
84 auto theconsumes = consumesCollector();
93 hcalCfg.
hOverEConeSize = conf.getParameter<
double>(
"hOverEConeSize");
97 hcalCfg.
hOverEPtMin = conf.getParameter<
double>(
"hOverEPtMin");
99 hcalHelper_ = std::make_unique<ElectronHcalHelper>(hcalCfg);
101 allowHGCal_ = conf.getParameter<
bool>(
"allowHGCal");
104 hgcClusterTools_ = std::make_unique<hgcal::ClusterTools>(hgcCfg, theconsumes);
109 maxHBarrel_ = conf.getParameter<
double>(
"maxHBarrel");
110 maxHEndcaps_ = conf.getParameter<
double>(
"maxHEndcaps");
117 esg_tokens.token_vtx = mayConsume<reco::VertexCollection>(conf.getParameter<
edm::InputTag>(
"vertices"));
119 matcher_ = std::make_unique<ElectronSeedGenerator>(conf, esg_tokens);
135 sf_tokens.
token_vtx = consumes<std::vector<reco::Vertex>>(rpset.getParameter<
edm::InputTag>(
"VertexProducer"));
138 seedFilter_ = std::make_unique<SeedFilter>(conf, sf_tokens, iC);
142 produces<ElectronSeedCollection>();
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > token_bs
std::unique_ptr< ElectronHcalHelper > hcalHelper_
std::unique_ptr< ElectronSeedGenerator > matcher_
std::unique_ptr< SeedFilter > seedFilter_
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 >
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
edm::EDGetTokenT< reco::BeamSpot > token_bs
edm::EDGetTokenT< CaloTowerCollection > hcalTowers
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > initialSeeds_
Definition at line 207 of file ElectronSeedProducer.cc.
References allowHGCal_, applyHOverECut_, hgcalTestNeighbor_cfi::detector, EcalBarrel, EcalEndcap, PVValHelper::eta, hcalHelper_, hgcClusterTools_, mps_fire::i, EcalTools::isHGCalDet(), LogDebug, maxHBarrel_, maxHEndcaps_, maxHOverEBarrel_, maxHOverEEndcaps_, edm::RefVector< C, T, F >::push_back(), SCEtCut_, edm::RefVector< C, T, F >::size(), and HLT_2018_cff::superClusters.
Referenced by produce().
211 for (
unsigned int i = 0;
i < superClusters->size(); ++
i) {
212 auto const& scl = (*superClusters)[
i];
213 double sclEta =
EleRelPoint(scl.position(), beamSpotPosition).
eta();
214 if (scl.energy() / cosh(sclEta) >
SCEtCut_) {
216 bool hoeVeto =
false;
218 double scle = scl.energy();
219 int det_group = scl.seed()->hitsAndFractions()[0].first.det();
220 int detector = scl.seed()->hitsAndFractions()[0].first.subdetId();
226 float had_fraction =
hgcClusterTools_->getClusterHadronFraction(*(scl.seed()));
237 LogDebug(
"ElectronSeedProducer") <<
"Filtered out " << sclRefs.
size() <<
" superclusters from " 238 << superClusters->size();
std::unique_ptr< ElectronHcalHelper > hcalHelper_
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_
Definition at line 145 of file ElectronSeedProducer.cc.
References allowHGCal_, beamSpotTag_, filterClusters(), edm::EventSetup::get(), edm::Event::get(), edm::Event::getHandle(), hcalHelper_, hgcClusterTools_, mps_fire::i, edm::Ref< C, T, F >::id(), initialSeeds_, LogDebug, matcher_, eostools::move(), prefilteredSeeds_, edm::Event::put(), SurveyInfoScenario_cff::seed, seedFilter_, and superClusters_.
146 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering ";
148 std::vector<TrajectorySeedCollection const*> initialSeedCollections;
149 std::unique_ptr<TrajectorySeedCollection> initialSeedCollectionPtr =
nullptr;
164 initialSeedCollections.clear();
166 initialSeedCollections.push_back(&e.
get(seeds));
169 initialSeedCollections.clear();
170 initialSeedCollectionPtr = std::make_unique<TrajectorySeedCollection>();
173 auto seeds = std::make_unique<ElectronSeedCollection>();
177 for (
unsigned int i = 0;
i < 2;
i++) {
180 for (
auto const& sclRef : clusterRefs) {
181 seedFilter_->seeds(e, iSetup, sclRef, initialSeedCollectionPtr.
get());
182 initialSeedCollections.push_back(initialSeedCollectionPtr.get());
183 LogDebug(
"ElectronSeedProducer") <<
"Number of Seeds: " << initialSeedCollections.back()->size();
186 matcher_->run(e, iSetup, clusterRefs, initialSeedCollections, *seeds);
191 for (
auto const&
seed : *seeds) {
193 LogDebug(
"ElectronSeedProducer") <<
"new seed with " <<
seed.nHits() <<
" hits" 194 <<
", charge " <<
seed.getCharge() <<
" and cluster energy " 195 << superCluster->energy() <<
" PID " << superCluster.
id();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::unique_ptr< ElectronHcalHelper > hcalHelper_
ProductID id() const
Accessor for product ID.
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
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_
std::unique_ptr< SeedFilter > seedFilter_
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > initialSeeds_