59 using namespace reco ;
63 caloGeom_(
nullptr), caloGeomCacheId_(0), caloTopo_(
nullptr), caloTopoCacheId_(0)
68 if (legacyConfSeeds.label().
empty())
71 [
this](
edm::InputTag const &
tag){return consumes<TrajectorySeedCollection >(tag);});
78 SCEtCut_ = conf.getParameter<
double>(
"SCEtCut");
82 auto theconsumes = consumesCollector();
92 hcalCfg.
hOverEConeSize = conf.getParameter<
double>(
"hOverEConeSize") ;
97 consumes<CaloTowerCollection>(conf.getParameter<
edm::InputTag>(
"hcalTowers")) ;
98 hcalCfg.
hOverEPtMin = conf.getParameter<
double>(
"hOverEPtMin") ;
102 allowHGCal_ = conf.getParameter<
bool>(
"allowHGCal");
110 maxHBarrel_=conf.getParameter<
double>(
"maxHBarrel") ;
117 if (applySigmaIEtaIEtaCut_ ==
true)
127 esg_tokens.token_vtx = mayConsume<reco::VertexCollection>(conf.getParameter<
edm::InputTag>(
"vertices"));
128 esg_tokens.token_measTrkEvt= consumes<MeasurementTrackerEvent>(conf.getParameter<
edm::InputTag>(
"measurementTrackerEvent"));
133 if (applySigmaIEtaIEtaCut_ ==
true) {
149 if (prefilteredSeeds_) {
152 sf_tokens.
token_vtx = consumes<std::vector<reco::Vertex> >(rpset.getParameter<
edm::InputTag> (
"VertexProducer"));
159 produces<ElectronSeedCollection>() ;
176 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
234 for (
unsigned int i=0;
i<2;
i++) {
238 std::vector<float> hoe1s, hoe2s ;
239 filterClusters(*theBeamSpot,clusters,clusterRefs,hoe1s,hoe2s,e, iSetup);
246 std::unique_ptr<ElectronSeedCollection> pSeeds(seeds);
247 ElectronSeedCollection::iterator is ;
248 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ ) {
253 << (*is).nHits() <<
" hits" 254 <<
", charge " << (*is).getCharge()
255 <<
" and cluster energy " << superCluster->energy()
256 <<
" PID "<<superCluster.
id() ;
273 std::vector<float> & hoe1s, std::vector<float> & hoe2s,
277 std::vector<float> sigmaIEtaIEtaEB_;
278 std::vector<float> sigmaIEtaIEtaEE_;
280 for (
unsigned int i=0;
i<superClusters->size();++
i)
289 double had1, had2, had, scle ;
291 bool HoeVeto =
false ;
311 hoe1s.push_back(had1/scle) ;
312 hoe2s.push_back(had2/scle) ;
332 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
339 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
350 desc.
add<
edm::InputTag>(
"endcapSuperClusters",
edm::InputTag(
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"));
353 psd1.
add<
unsigned int>(
"maxElement", 0);
359 psd2.
add<
double>(
"deltaPhiRegion", 0.4);
360 psd2.
add<
double>(
"originHalfLength", 15.0);
361 psd2.
add<
bool>(
"useZInVertex",
true);
362 psd2.
add<
double>(
"deltaEtaRegion", 0.1);
363 psd2.
add<
double>(
"ptMin", 1.5 );
364 psd2.
add<
double>(
"originRadius", 0.2);
368 psd0.
add<
double>(
"PhiMax2B",0.002);
369 psd0.
add<
double>(
"hOverEPtMin",0.0);
370 psd0.
add<
double>(
"PhiMax2F",0.003);
371 psd0.
add<
bool>(
"searchInTIDTEC",
true);
372 psd0.
add<
double>(
"pPhiMax1",0.125);
373 psd0.
add<
double>(
"HighPtThreshold",35.0);
374 psd0.
add<
double>(
"r2MinF",-0.15);
375 psd0.
add<
double>(
"maxHBarrel",0.0);
376 psd0.
add<
double>(
"DeltaPhi1Low",0.23);
377 psd0.
add<
double>(
"DeltaPhi1High",0.08);
378 psd0.
add<
double>(
"ePhiMin1",-0.125);
380 psd0.
add<
double>(
"LowPtThreshold",5.0);
381 psd0.
add<
double>(
"maxHOverEBarrel",0.15);
382 psd0.
add<
double>(
"maxSigmaIEtaIEtaBarrel", 0.5);
383 psd0.
add<
double>(
"maxSigmaIEtaIEtaEndcaps", 0.5);
384 psd0.
add<
bool>(
"dynamicPhiRoad",
true);
385 psd0.
add<
double>(
"ePhiMax1",0.075);
387 psd0.
add<
double>(
"SizeWindowENeg",0.675);
388 psd0.
add<
double>(
"nSigmasDeltaZ1",5.0);
389 psd0.
add<
double>(
"rMaxI",0.2);
390 psd0.
add<
double>(
"maxHEndcaps",0.0);
391 psd0.
add<
bool>(
"preFilteredSeeds",
false);
392 psd0.
add<
double>(
"r2MaxF",0.15);
393 psd0.
add<
double>(
"hOverEConeSize",0.15);
394 psd0.
add<
double>(
"pPhiMin1",-0.075);
396 psd0.
add<std::vector<edm::InputTag>>(
"initialSeedsVector",{{
"newCombinedSeeds"}});
397 psd0.
add<
double>(
"deltaZ1WithVertex",25.0);
398 psd0.
add<
double>(
"SCEtCut",0.0);
399 psd0.
add<
double>(
"z2MaxB",0.09);
400 psd0.
add<
bool>(
"fromTrackerSeeds",
true);
402 psd0.
add<
double>(
"z2MinB",-0.09);
403 psd0.
add<
double>(
"rMinI",-0.2);
404 psd0.
add<
double>(
"maxHOverEEndcaps",0.15);
405 psd0.
add<
double>(
"hOverEHBMinE",0.7);
406 psd0.
add<
bool>(
"useRecoVertex",
false);
410 psd0.
add<
bool>(
"applyHOverECut",
true);
413 psd0.
add<
bool>(
"applySigmaIEtaIEtaCut",
false);
414 psd0.
add<
double>(
"DeltaPhi2F",0.012);
415 psd0.
add<
double>(
"PhiMin2F",-0.003);
416 psd0.
add<
double>(
"hOverEHFMinE",0.8);
417 psd0.
add<
double>(
"DeltaPhi2B",0.008);
418 psd0.
add<
double>(
"PhiMin2B",-0.002);
419 psd0.
add<
bool>(
"allowHGCal",
false);
423 psd3.
add<
double>(
"SeedMomentumForBOFF",5.0);
424 psd3.
add<
double>(
"OriginTransverseErrorMultiplier",1.0);
425 psd3.
add<
double>(
"MinOneOverPtError",1.0);
428 psd3.
add<
bool>(
"forceKinematicWithRegionDirection",
false);
441 descriptions.
add(
"ecalDrivenElectronSeeds",desc);
void filterClusters(const reco::BeamSpot &bs, const edm::Handle< reco::SuperClusterCollection > &superClusters, reco::SuperClusterRefVector &sclRefs, std::vector< float > &hoe1s, std::vector< float > &hoe2s, edm::Event &e, const edm::EventSetup &setup)
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
const math::XYZPoint & position() const
cluster centroid position
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::BeamSpot > token_bs
void readEvent(const edm::Event &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setupES(const edm::EventSetup &setup)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool isNotFinite(T x)
void beginRun(edm::Run const &, edm::EventSetup const &) final
unsigned long long caloGeomCacheId_
double maxSigmaIEtaIEtaBarrel_
def setup(process, global_tag, zero_tesla=False)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
void checkSetup(const edm::EventSetup &)
double hcalESumDepth1(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0) const
ProductID id() const
Accessor for product ID.
edm::EDGetTokenT< EcalRecHitCollection > eeRecHitCollection_
edm::ESHandle< CaloTopology > caloTopo_
std::vector< TrajectorySeed > TrajectorySeedCollection
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitCollection_
double maxSigmaIEtaIEtaEndcaps_
ElectronSeedProducer(const edm::ParameterSet &)
double energy() const
cluster energy
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool applySigmaIEtaIEtaCut_
std::unique_ptr< SeedFilter > seedFilter_
~ElectronSeedProducer() override
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 >
edm::ESHandle< CaloGeometry > caloGeom_
double hcalESumDepth2(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0) const
T const * product() const
ElectronSeedGenerator * matcher_
ParameterSet const & getParameterSet(std::string const &) const
TrajectorySeedCollection * theInitialSeedColl
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
unsigned long long caloTopoCacheId_
edm::EDGetTokenT< reco::BeamSpot > token_bs
void filterSeeds(edm::Event &e, const edm::EventSetup &setup, reco::SuperClusterRefVector &sclRefs)
void produce(edm::Event &, const edm::EventSetup &) final
void endRun(edm::Run const &, edm::EventSetup const &) final
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< CaloTowerCollection > hcalTowers
const Point & position() const
position
const CaloClusterPtr & seed() const
seed BasicCluster
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
ElectronHcalHelper * hcalHelper_
void run(edm::Event &, const edm::EventSetup &setup, const reco::SuperClusterRefVector &, const std::vector< float > &hoe1s, const std::vector< float > &hoe2s, const std::vector< const TrajectorySeedCollection * > &seedsV, reco::ElectronSeedCollection &)
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > initialSeeds_
std::vector< const TrajectorySeedCollection * > theInitialSeedColls