49 using namespace reco ;
52 : beamSpotTag_(
"offlineBeamSpot"),
54 seedFilter_(0), applyHOverECut_(
true), hcalHelper_(0),
55 caloGeom_(0), caloGeomCacheId_(0), caloTopo_(0), caloTopoCacheId_(0)
99 produces<ElectronSeedCollection>() ;
125 LogDebug(
"ElectronSeedProducer") <<
"[ElectronSeedProducer::produce] entering " ;
166 for (
unsigned int i=0;
i<2;
i++)
172 std::vector<float> hoe1s, hoe2s ;
181 std::auto_ptr<ElectronSeedCollection> pSeeds(seeds) ;
182 ElectronSeedCollection::iterator is ;
183 for ( is=pSeeds->begin() ; is!=pSeeds->end() ; is++ )
187 LogDebug(
"ElectronSeedProducer")<<
"new seed with "
188 << (*is).nHits() <<
" hits"
189 <<
", charge " << (*is).getCharge()
190 <<
" and cluster energy " << superCluster->energy()
191 <<
" PID "<<superCluster.
id() ;
208 std::vector<float> & hoe1s, std::vector<float> & hoe2s )
210 for (
unsigned int i=0;
i<superClusters->size();++
i)
214 if (scl.
energy()/cosh(sclEta)>SCEtCut_)
219 double had1, had2, had, scle ;
220 bool HoeVeto =
false ;
221 if (applyHOverECut_==
true)
223 had1 = hcalHelper_->hcalESumDepth1(scl);
224 had2 = hcalHelper_->hcalESumDepth2(scl);
227 int detector = scl.
seed()->hitsAndFractions()[0].first.subdetId() ;
228 if (detector==
EcalBarrel && (had<maxHBarrel_ || had/scle<maxHOverEBarrel_)) HoeVeto=
true;
229 else if (detector==
EcalEndcap && (had<maxHEndcaps_ || had/scle<maxHOverEEndcaps_)) HoeVeto=
true;
233 hoe1s.push_back(had1/scle) ;
234 hoe2s.push_back(had2/scle) ;
245 LogDebug(
"ElectronSeedProducer")<<
"Filtered out "<<sclRefs.
size()<<
" superclusters from "<<superClusters->size() ;
252 for (
unsigned int i=0 ;
i<sclRefs.
size() ; ++
i )
254 seedFilter_->seeds(event,setup,sclRefs[
i],theInitialSeedColl) ;
255 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 beginRun(edm::Run &, edm::EventSetup const &)
void readEvent(const edm::Event &)
void setupES(const edm::EventSetup &setup)
unsigned long long caloGeomCacheId_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void checkSetup(const edm::EventSetup &)
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.
edm::InputTag beamSpotTag_
ElectronSeedProducer(const edm::ParameterSet &)
double energy() const
cluster energy
std::vector< ElectronSeed > ElectronSeedCollection
collection of ElectronSeed objects
virtual void produce(edm::Event &, const edm::EventSetup &)
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag initialSeeds_
edm::InputTag superClusters_[2]
edm::ESHandle< CaloGeometry > caloGeom_
ElectronSeedGenerator * matcher_
TrajectorySeedCollection * theInitialSeedColl
REF castTo() const
cast to a concrete type
T const * product() const
unsigned long long caloTopoCacheId_
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.
const Point & position() const
position
const CaloClusterPtr & seed() const
seed BasicCluster
ProductID id() const
Accessor for product ID.
ElectronHcalHelper * hcalHelper_
virtual void endRun(edm::Run &, edm::EventSetup const &)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")