61 double barrelSeedThreshold = ps.
getParameter<
double>(
"IslandBarrelSeedThr");
62 double endcapSeedThreshold = ps.
getParameter<
double>(
"IslandEndcapSeedThr");
95 desc.
add<
bool>(
"doBarrel",
true);
96 desc.
add<
bool>(
"doEndcaps",
true);
97 desc.
add<
bool>(
"doIsolated",
true);
100 desc.
add<
std::string>(
"barrelClusterCollection",
"islandBarrelBasicClusters");
101 desc.
add<
std::string>(
"endcapClusterCollection",
"islandEndcapBasicClusters");
102 desc.
add<
double>(
"IslandBarrelSeedThr", 0.5);
103 desc.
add<
double>(
"IslandEndcapSeedThr", 0.18);
106 desc.
add<
double>(
"l1LowerThr", 0.0);
107 desc.
add<
double>(
"l1UpperThr", 9999.0);
108 desc.
add<
double>(
"l1LowerThrIgnoreIsolation", 9999.0);
109 desc.
add<
double>(
"regionEtaMargin", 0.3);
110 desc.
add<
double>(
"regionPhiMargin", 0.4);
112 descriptions.
add(
"hltEgammaHLTIslandClusterProducer", desc);
130 std::vector<EcalEtaPhiRegion> barrelRegions;
131 std::vector<EcalEtaPhiRegion> endcapRegions;
134 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
139 int etaIndex = emItr->gctEmCand()->etaIndex() ;
141 int phiIndex = emItr->gctEmCand()->phiIndex() ;
143 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
144 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
145 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
146 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
151 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
152 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
153 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
164 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
165 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
167 endcapRegions.push_back(region);
170 if (etaHigh>1.479) etaHigh=1.479;
171 if (etaLow<-1.479) etaLow=-1.479;
173 barrelRegions.push_back(region);
183 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
190 int etaIndex = emItr->gctEmCand()->etaIndex() ;
193 int phiIndex = emItr->gctEmCand()->phiIndex() ;
195 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
196 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
197 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
198 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
203 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
204 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
205 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
216 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
217 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
219 endcapRegions.push_back(region);
222 if (etaHigh>1.479) etaHigh=1.479;
223 if (etaLow<-1.479) etaLow=-1.479;
225 barrelRegions.push_back(region);
254 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
255 edm::LogError(
"EgammaHLTIslandClusterProducerError") <<
"Error! can't get the product ";
265 const std::vector<EcalEtaPhiRegion>& regions,
294 clusters =
island_p->
makeClusters(hitCollection_p, geometry_p, topology_p, geometryES_p, ecalPart,
true, regions);
298 clusters_p->assign(clusters.begin(), clusters.end());
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< EcalEtaPhiRegion > ®ions, const IslandClusterAlgo::EcalPart &ecalPart)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double l1LowerThrIgnoreIsolation_
IslandClusterAlgo::VerbosityLevel verbosity
std::string endcapClusterCollection_
IslandClusterAlgo * island_p
std::string barrelClusterCollection_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
EgammaHLTIslandClusterProducer(const edm::ParameterSet &ps)
edm::InputTag endcapHitCollection_
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, EcalPart ecalPart, bool regional=false, const std::vector< EcalEtaPhiRegion > ®ions=std::vector< EcalEtaPhiRegion >())
edm::InputTag barrelHitCollection_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
PositionCalc posCalculator_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_
T const * product() const
const EcalRecHitCollection * getCollection(edm::Event &evt, edm::EDGetTokenT< EcalRecHitCollection > &hitToken)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
~EgammaHLTIslandClusterProducer()
edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
virtual void produce(edm::Event &, const edm::EventSetup &)