57 using namespace reco ;
62 caloGeom_(
nullptr), caloGeomCacheId_(0), caloTopo_(
nullptr), caloTopoCacheId_(0)
106 if (applySigmaIEtaIEtaCut_ ==
true)
123 if (applySigmaIEtaIEtaCut_ ==
true) {
139 if (prefilteredSeeds_) {
148 produces<ElectronSeedCollection>() ;
165 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
210 for (
unsigned int i=0;
i<2;
i++) {
214 std::vector<float> hoe1s, hoe2s ;
215 filterClusters(*theBeamSpot,clusters,clusterRefs,hoe1s,hoe2s,e, iSetup);
222 std::unique_ptr<ElectronSeedCollection> pSeeds(seeds);
223 ElectronSeedCollection::iterator is ;
224 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ ) {
229 << (*is).nHits() <<
" hits" 230 <<
", charge " << (*is).getCharge()
231 <<
" and cluster energy " << superCluster->energy()
232 <<
" PID "<<superCluster.
id() ;
249 std::vector<float> & hoe1s, std::vector<float> & hoe2s,
253 std::vector<float> sigmaIEtaIEtaEB_;
254 std::vector<float> sigmaIEtaIEtaEE_;
256 for (
unsigned int i=0;
i<superClusters->size();++
i)
265 double had1, had2, had, scle ;
267 bool HoeVeto =
false ;
287 hoe1s.push_back(had1/scle) ;
288 hoe2s.push_back(had2/scle) ;
308 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
315 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
325 desc.
add<
edm::InputTag>(
"endcapSuperClusters",
edm::InputTag(
"particleFlowSuperClusterECAL",
"particleFlowSuperClusterECALEndcapWithPreshower"));
328 psd1.
add<
unsigned int>(
"maxElement", 0);
334 psd2.
add<
double>(
"deltaPhiRegion", 0.4);
335 psd2.
add<
double>(
"originHalfLength", 15.0);
336 psd2.
add<
bool>(
"useZInVertex",
true);
337 psd2.
add<
double>(
"deltaEtaRegion", 0.1);
338 psd2.
add<
double>(
"ptMin", 1.5 );
339 psd2.
add<
double>(
"originRadius", 0.2);
343 psd0.
add<
double>(
"PhiMax2B",0.002);
344 psd0.
add<
double>(
"hOverEPtMin",0.0);
345 psd0.
add<
double>(
"PhiMax2F",0.003);
346 psd0.
add<
bool>(
"searchInTIDTEC",
true);
347 psd0.
add<
double>(
"pPhiMax1",0.125);
348 psd0.
add<
double>(
"HighPtThreshold",35.0);
349 psd0.
add<
double>(
"r2MinF",-0.15);
350 psd0.
add<
double>(
"maxHBarrel",0.0);
351 psd0.
add<
double>(
"DeltaPhi1Low",0.23);
352 psd0.
add<
double>(
"DeltaPhi1High",0.08);
353 psd0.
add<
double>(
"ePhiMin1",-0.125);
355 psd0.
add<
double>(
"LowPtThreshold",5.0);
356 psd0.
add<
double>(
"maxHOverEBarrel",0.15);
357 psd0.
add<
double>(
"maxSigmaIEtaIEtaBarrel", 0.5);
358 psd0.
add<
double>(
"maxSigmaIEtaIEtaEndcaps", 0.5);
359 psd0.
add<
bool>(
"dynamicPhiRoad",
true);
360 psd0.
add<
double>(
"ePhiMax1",0.075);
362 psd0.
add<
double>(
"SizeWindowENeg",0.675);
363 psd0.
add<
double>(
"nSigmasDeltaZ1",5.0);
364 psd0.
add<
double>(
"rMaxI",0.2);
365 psd0.
add<
double>(
"maxHEndcaps",0.0);
366 psd0.
add<
bool>(
"preFilteredSeeds",
false);
367 psd0.
add<
double>(
"r2MaxF",0.15);
368 psd0.
add<
double>(
"hOverEConeSize",0.15);
369 psd0.
add<
double>(
"pPhiMin1",-0.075);
371 psd0.
add<
double>(
"deltaZ1WithVertex",25.0);
372 psd0.
add<
double>(
"SCEtCut",0.0);
373 psd0.
add<
double>(
"z2MaxB",0.09);
374 psd0.
add<
bool>(
"fromTrackerSeeds",
true);
376 psd0.
add<
double>(
"z2MinB",-0.09);
377 psd0.
add<
double>(
"rMinI",-0.2);
378 psd0.
add<
double>(
"maxHOverEEndcaps",0.15);
379 psd0.
add<
double>(
"hOverEHBMinE",0.7);
380 psd0.
add<
bool>(
"useRecoVertex",
false);
384 psd0.
add<
bool>(
"applyHOverECut",
true);
387 psd0.
add<
bool>(
"applySigmaIEtaIEtaCut",
false);
388 psd0.
add<
double>(
"DeltaPhi2F",0.012);
389 psd0.
add<
double>(
"PhiMin2F",-0.003);
390 psd0.
add<
double>(
"hOverEHFMinE",0.8);
391 psd0.
add<
double>(
"DeltaPhi2B",0.008);
392 psd0.
add<
double>(
"PhiMin2B",-0.002);
393 psd0.
add<
bool>(
"allowHGCal",
false);
397 psd3.
add<
double>(
"SeedMomentumForBOFF",5.0);
398 psd3.
add<
double>(
"OriginTransverseErrorMultiplier",1.0);
399 psd3.
add<
double>(
"MinOneOverPtError",1.0);
402 psd3.
add<
bool>(
"forceKinematicWithRegionDirection",
false);
415 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
virtual void produce(edm::Event &, const edm::EventSetup &) override final
unsigned long long caloGeomCacheId_
double maxSigmaIEtaIEtaBarrel_
edm::EDGetTokenT< std::vector< reco::Vertex > > filterVtxTag_
def setup(process, global_tag, zero_tesla=False)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
void checkSetup(const edm::EventSetup &)
edm::EDGetTokenT< TrajectorySeedCollection > initialSeeds_
void run(edm::Event &, const edm::EventSetup &setup, const reco::SuperClusterRefVector &, const std::vector< float > &hoe1s, const std::vector< float > &hoe2s, TrajectorySeedCollection *seeds, reco::ElectronSeedCollection &)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override final
ProductID id() const
Accessor for product ID.
edm::EDGetTokenT< MeasurementTrackerEvent > token_measTrkEvt
edm::EDGetTokenT< EcalRecHitCollection > eeRecHitCollection_
edm::ESHandle< CaloTopology > caloTopo_
std::vector< TrajectorySeed > TrajectorySeedCollection
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override final
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitCollection_
double maxSigmaIEtaIEtaEndcaps_
ElectronSeedProducer(const edm::ParameterSet &)
double hcalESumDepth2(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0)
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_
edm::ESHandle< CaloGeometry > caloGeom_
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)
double hcalESumDepth1(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
virtual ~ElectronSeedProducer()
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_
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
ElectronHcalHelper * hcalHelper_
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
std::unique_ptr< hgcal::ClusterTools > hgcClusterTools_