60 double barrelSeedThreshold = ps.
getParameter<
double>(
"IslandBarrelSeedThr");
61 double endcapSeedThreshold = ps.
getParameter<
double>(
"IslandEndcapSeedThr");
94 desc.
add<
bool>(
"doBarrel",
true);
95 desc.
add<
bool>(
"doEndcaps",
true);
96 desc.
add<
bool>(
"doIsolated",
true);
99 desc.
add<
std::string>(
"barrelClusterCollection",
"islandBarrelBasicClusters");
100 desc.
add<
std::string>(
"endcapClusterCollection",
"islandEndcapBasicClusters");
101 desc.
add<
double>(
"IslandBarrelSeedThr", 0.5);
102 desc.
add<
double>(
"IslandEndcapSeedThr", 0.18);
105 desc.
add<
double>(
"l1LowerThr", 0.0);
106 desc.
add<
double>(
"l1UpperThr", 9999.0);
107 desc.
add<
double>(
"l1LowerThrIgnoreIsolation", 9999.0);
108 desc.
add<
double>(
"regionEtaMargin", 0.3);
109 desc.
add<
double>(
"regionPhiMargin", 0.4);
111 descriptions.
add(
"hltEgammaHLTIslandClusterProducer", desc);
129 std::vector<RectangularEtaPhiRegion> barrelRegions;
130 std::vector<RectangularEtaPhiRegion> endcapRegions;
133 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
138 int etaIndex = emItr->gctEmCand()->etaIndex() ;
140 int phiIndex = emItr->gctEmCand()->phiIndex() ;
150 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
151 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
152 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
163 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
164 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
166 endcapRegions.push_back(region);
169 if (etaHigh>1.479) etaHigh=1.479;
170 if (etaLow<-1.479) etaLow=-1.479;
172 barrelRegions.push_back(region);
182 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
189 int etaIndex = emItr->gctEmCand()->etaIndex() ;
192 int phiIndex = emItr->gctEmCand()->phiIndex() ;
202 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
203 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
204 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
215 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
216 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
218 endcapRegions.push_back(region);
221 if (etaHigh>1.479) etaHigh=1.479;
222 if (etaLow<-1.479) etaLow=-1.479;
224 barrelRegions.push_back(region);
253 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
254 edm::LogError(
"EgammaHLTIslandClusterProducerError") <<
"Error! can't get the product ";
264 const std::vector<RectangularEtaPhiRegion>&
regions,
293 clusters =
island_p->
makeClusters(hitCollection_p, geometry_p, topology_p, geometryES_p, ecalPart,
true, regions);
296 auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
297 clusters_p->assign(clusters.begin(), clusters.end());
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &) override
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
~EgammaHLTIslandClusterProducer() override
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
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_
EgammaHLTIslandClusterProducer(const edm::ParameterSet &ps)
edm::InputTag endcapHitCollection_
edm::InputTag barrelHitCollection_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
PositionCalc posCalculator_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_
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< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
T const * product() const
const EcalRecHitCollection * getCollection(edm::Event &evt, edm::EDGetTokenT< EcalRecHitCollection > &hitToken)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< RectangularEtaPhiRegion > ®ions, const IslandClusterAlgo::EcalPart &ecalPart)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
double emJetPhiBinLowEdge(unsigned int phiIndex) const
edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
double emJetPhiBinHighEdge(unsigned int phiIndex) const