50 using namespace reco ;
54 applyHOverECut_(
true), hcalHelper_(0),
55 caloGeom_(0), caloGeomCacheId_(0), caloTopo_(0), caloTopoCacheId_(0)
110 mayConsume<reco::VertexCollection>(
edm::InputTag(
"offlinePrimaryVerticesWithBS"));
130 if (prefilteredSeeds_) {
139 produces<ElectronSeedCollection>() ;
158 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
199 for (
unsigned int i=0;
i<2;
i++) {
203 std::vector<float> hoe1s, hoe2s ;
211 std::auto_ptr<ElectronSeedCollection> pSeeds(seeds) ;
212 ElectronSeedCollection::iterator is ;
213 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ ) {
218 << (*is).nHits() <<
" hits"
219 <<
", charge " << (*is).getCharge()
220 <<
" and cluster energy " << superCluster->energy()
221 <<
" PID "<<superCluster.
id() ;
238 std::vector<float> & hoe1s, std::vector<float> & hoe2s )
240 for (
unsigned int i=0;
i<superClusters->size();++
i)
244 if (scl.
energy()/cosh(sclEta)>SCEtCut_)
249 double had1, had2, had, scle ;
250 bool HoeVeto =
false ;
251 if (applyHOverECut_==
true)
253 had1 = hcalHelper_->hcalESumDepth1(scl);
254 had2 = hcalHelper_->hcalESumDepth2(scl);
257 int detector = scl.
seed()->hitsAndFractions()[0].first.subdetId() ;
258 if (detector==
EcalBarrel && (had<maxHBarrel_ || had/scle<maxHOverEBarrel_)) HoeVeto=
true;
259 else if (detector==
EcalEndcap && (had<maxHEndcaps_ || had/scle<maxHOverEEndcaps_)) HoeVeto=
true;
263 hoe1s.push_back(had1/scle) ;
264 hoe2s.push_back(had2/scle) ;
275 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
282 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
284 seedFilter_->seeds(event,setup,sclRefs[
i],theInitialSeedColl) ;
285 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
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
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::EDGetTokenT< MeasurementTrackerEvent > token_measTrkEvt
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