77 const std::vector<std::string> flagnames =
78 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
80 const std::vector<int> flagsexcl=
81 StringToEnumValue<EcalRecHit::Flags>(flagnames);
83 const std::vector<std::string> severitynames =
84 ps.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcluded");
86 const std::vector<int> severitiesexcl=
87 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
106 bool dynamicPhiRoad = ps.
getParameter<
bool>(
"dynamicPhiRoad");
107 if (dynamicPhiRoad) {
109 hybrid_p->setDynamicPhiRoad(bremRecoveryPset);
133 edm::LogError(
"ProductNotFound")<<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
143 std::auto_ptr<const CaloSubdetectorTopology> topology;
162 }
else throw(std::runtime_error(
"\n\nHybrid Cluster Producer encountered invalied ecalhitcollection type.\n\n"));
177 std::vector<EcalEtaPhiRegion> regions;
180 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
191 int etaIndex = emItr->gctEmCand()->etaIndex() ;
192 int phiIndex = emItr->gctEmCand()->phiIndex() ;
194 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
195 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
196 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
197 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
202 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
203 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
211 if (etaHigh>1.479) etaHigh=1.479;
212 if (etaLow<-1.479) etaLow=-1.479;
214 if(isbarl) regions.push_back(
EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
221 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
234 int etaIndex = emItr->gctEmCand()->etaIndex() ;
235 int phiIndex = emItr->gctEmCand()->phiIndex() ;
237 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
238 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
239 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
240 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
245 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
246 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
254 if (etaHigh>1.479) etaHigh=1.479;
255 if (etaLow<-1.479) etaLow=-1.479;
257 if(isbarl) regions.push_back(
EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
269 basicclusters_p->assign(basicClusters.begin(), basicClusters.end());
284 for (
unsigned int i = 0;
i < clusterCollection.size();
i++){
291 superclusters_p->assign(superClusters.begin(), superClusters.end());
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::string basicclusterCollection_
void push_back(Ptr< T > const &iPtr)
virtual void produce(edm::Event &, const edm::EventSetup &)
PositionCalc posCalculator_
std::string superclusterCollection_
~EgammaHLTHybridClusterProducer()
double l1LowerThrIgnoreIsolation_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
std::string hitcollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag l1TagNonIsolated_
edm::InputTag l1TagIsolated_
T const * product() const
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
ESHandle< TrackerGeometry > geometry
edm::InputTag hitproducer_
HybridClusterAlgo * hybrid_p
EgammaHLTHybridClusterProducer(const edm::ParameterSet &ps)
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< EcalEtaPhiRegion > ®ions=std::vector< EcalEtaPhiRegion >())