61 double barrelSeedThreshold = ps.
getParameter<
double>(
"Multi5x5BarrelSeedThr");
62 double endcapSeedThreshold = ps.
getParameter<
double>(
"Multi5x5EndcapSeedThr");
77 const std::vector<std::string> flagnames =
78 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
81 std::vector<int> v_chstatus = StringToEnumValue<EcalRecHit::Flags>(flagnames);
136 std::vector<EcalEtaPhiRegion> barrelRegions;
137 std::vector<EcalEtaPhiRegion> endcapRegions;
140 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
145 int etaIndex = emItr->gctEmCand()->etaIndex() ;
148 int phiIndex = emItr->gctEmCand()->phiIndex() ;
150 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
151 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
152 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
153 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
158 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
159 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
160 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
171 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
172 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
174 endcapRegions.push_back(region);
177 if (etaHigh>1.479) etaHigh=1.479;
178 if (etaLow<-1.479) etaLow=-1.479;
180 barrelRegions.push_back(region);
190 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
197 int etaIndex = emItr->gctEmCand()->etaIndex() ;
200 int phiIndex = emItr->gctEmCand()->phiIndex() ;
202 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
203 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
204 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
205 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
210 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
211 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
212 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
223 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
224 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
226 endcapRegions.push_back(region);
229 if (etaHigh>1.479) etaHigh=1.479;
230 if (etaLow<-1.479) etaLow=-1.479;
232 barrelRegions.push_back(region);
262 evt.
getByLabel(hitProducer_, hitCollection_, rhcHandle);
265 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
266 edm::LogError(
"EgammaHLTMulti5x5ClusterProducerError") <<
"Error! can't get the product " << hitCollection_.c_str() ;
277 const std::vector<EcalEtaPhiRegion>& regions,
294 topology_p =
new EcalBarrelTopology(geoHandle);
299 topology_p =
new EcalEndcapTopology(geoHandle);
308 clusters =
Multi5x5_p->
makeClusters(hitCollection_p, geometry_p, topology_p, geometryES_p, detector,
true, regions);
312 clusters_p->assign(clusters.begin(), clusters.end());
T getParameter(std::string const &) const
Multi5x5ClusterAlgo * Multi5x5_p
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, reco::CaloID::Detectors detector, bool regional=false, const std::vector< EcalEtaPhiRegion > ®ions=std::vector< EcalEtaPhiRegion >())
~EgammaHLTMulti5x5ClusterProducer()
double l1LowerThrIgnoreIsolation_
std::string barrelClusterCollection_
edm::InputTag l1TagNonIsolated_
const EcalRecHitCollection * getCollection(edm::Event &evt, const std::string &hitProducer_, const std::string &hitCollection_)
std::string endcapClusterCollection_
edm::InputTag l1TagIsolated_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
std::string endcapHitCollection_
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, const std::string &hitProducer, const std::string &hitCollection, const std::string &clusterCollection, const std::vector< EcalEtaPhiRegion > ®ions, const reco::CaloID::Detectors detector)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
PositionCalc posCalculator_
edm::InputTag barrelHitProducer_
edm::InputTag endcapHitProducer_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
std::string barrelHitCollection_
EgammaHLTMulti5x5ClusterProducer(const edm::ParameterSet &ps)