49 using namespace reco ;
53 applyHOverECut_(
true), hcalHelper_(0),
54 caloGeom_(0), caloGeomCacheId_(0), caloTopo_(0), caloTopoCacheId_(0)
109 mayConsume<reco::VertexCollection>(
edm::InputTag(
"offlinePrimaryVerticesWithBS"));
125 if (prefilteredSeeds_) {
134 produces<ElectronSeedCollection>() ;
153 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
194 for (
unsigned int i=0;
i<2;
i++) {
198 std::vector<float> hoe1s, hoe2s ;
206 std::auto_ptr<ElectronSeedCollection> pSeeds(seeds) ;
207 ElectronSeedCollection::iterator is ;
208 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ ) {
213 << (*is).nHits() <<
" hits"
214 <<
", charge " << (*is).getCharge()
215 <<
" and cluster energy " << superCluster->energy()
216 <<
" PID "<<superCluster.
id() ;
233 std::vector<float> & hoe1s, std::vector<float> & hoe2s )
235 for (
unsigned int i=0;
i<superClusters->size();++
i)
239 if (scl.
energy()/cosh(sclEta)>SCEtCut_)
244 double had1, had2, had, scle ;
245 bool HoeVeto =
false ;
246 if (applyHOverECut_==
true)
248 had1 = hcalHelper_->hcalESumDepth1(scl);
249 had2 = hcalHelper_->hcalESumDepth2(scl);
252 int detector = scl.
seed()->hitsAndFractions()[0].first.subdetId() ;
253 if (detector==
EcalBarrel && (had<maxHBarrel_ || had/scle<maxHOverEBarrel_)) HoeVeto=
true;
254 else if (detector==
EcalEndcap && (had<maxHEndcaps_ || had/scle<maxHOverEEndcaps_)) HoeVeto=
true;
258 hoe1s.push_back(had1/scle) ;
259 hoe2s.push_back(had2/scle) ;
270 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
277 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
279 seedFilter_->seeds(event,setup,sclRefs[
i],theInitialSeedColl) ;
280 LogDebug(
"ElectronSeedProducer")<<
"Number of Seeds: "<<theInitialSeedColl->size() ;
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
const math::XYZPoint & position() const
cluster centroid position
virtual void endRun(edm::Run const &, edm::EventSetup const &) overridefinal
edm::EDGetTokenT< reco::BeamSpot > token_bs
void readEvent(const edm::Event &)
void setupES(const edm::EventSetup &setup)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void beginRun(edm::Run const &, edm::EventSetup const &) overridefinal
unsigned long long caloGeomCacheId_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< std::vector< reco::Vertex > > filterVtxTag_
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 &)
edm::ESHandle< CaloTopology > caloTopo_
void filterClusters(const reco::BeamSpot &bs, const edm::Handle< reco::SuperClusterCollection > &superClusters, reco::SuperClusterRefVector &sclRefs, std::vector< float > &hoe1s, std::vector< float > &hoe2s)
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
ElectronSeedProducer(const edm::ParameterSet &)
double energy() const
cluster energy
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< SeedFilter > seedFilter_
edm::ESHandle< CaloGeometry > caloGeom_
ElectronSeedGenerator * matcher_
TrajectorySeedCollection * theInitialSeedColl
REF castTo() const
cast to a concrete type
edm::EDGetTokenT< reco::SuperClusterCollection > superClusters_[2]
T const * product() const
unsigned long long caloTopoCacheId_
edm::EDGetTokenT< reco::BeamSpot > token_bs
void filterSeeds(edm::Event &e, const edm::EventSetup &setup, reco::SuperClusterRefVector &sclRefs)
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
ProductID id() const
Accessor for product ID.
volatile std::atomic< bool > shutdown_flag false
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
ElectronHcalHelper * hcalHelper_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::EDGetTokenT< std::vector< reco::Vertex > > token_vtx
virtual void produce(edm::Event &, const edm::EventSetup &) overridefinal