48 using namespace reco ;
52 seedFilter_(0), applyHOverECut_(
true), hcalHelper_(0),
53 caloGeom_(0), caloGeomCacheId_(0), caloTopo_(0), caloTopoCacheId_(0)
108 mayConsume<reco::VertexCollection>(
edm::InputTag(
"offlinePrimaryVerticesWithBS"));
119 produces<ElectronSeedCollection>() ;
149 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
190 for (
unsigned int i=0;
i<2;
i++) {
194 std::vector<float> hoe1s, hoe2s ;
202 std::auto_ptr<ElectronSeedCollection> pSeeds(seeds) ;
203 ElectronSeedCollection::iterator is ;
204 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ ) {
209 << (*is).nHits() <<
" hits"
210 <<
", charge " << (*is).getCharge()
211 <<
" and cluster energy " << superCluster->energy()
212 <<
" PID "<<superCluster.
id() ;
229 std::vector<float> & hoe1s, std::vector<float> & hoe2s )
231 for (
unsigned int i=0;
i<superClusters->size();++
i)
235 if (scl.
energy()/cosh(sclEta)>SCEtCut_)
240 double had1, had2, had, scle ;
241 bool HoeVeto =
false ;
242 if (applyHOverECut_==
true)
244 had1 = hcalHelper_->hcalESumDepth1(scl);
245 had2 = hcalHelper_->hcalESumDepth2(scl);
248 int detector = scl.
seed()->hitsAndFractions()[0].first.subdetId() ;
249 if (detector==
EcalBarrel && (had<maxHBarrel_ || had/scle<maxHOverEBarrel_)) HoeVeto=
true;
250 else if (detector==
EcalEndcap && (had<maxHEndcaps_ || had/scle<maxHOverEEndcaps_)) HoeVeto=
true;
254 hoe1s.push_back(had1/scle) ;
255 hoe2s.push_back(had2/scle) ;
266 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
273 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
275 seedFilter_->seeds(event,setup,sclRefs[
i],theInitialSeedColl) ;
276 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.
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
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