39 : doBarrel_ (ps.getParameter<
bool>(
"doBarrel"))
40 , doEndcaps_ (ps.getParameter<
bool>(
"doEndcaps"))
41 , doIsolated_ (ps.getParameter<
bool>(
"doIsolated"))
44 , barrelHitCollection_ (ps.getParameter<
edm::InputTag>(
"barrelHitProducer"))
45 , endcapHitCollection_ (ps.getParameter<
edm::InputTag>(
"endcapHitProducer"))
50 , barrelClusterCollection_ (ps.getParameter<
std::
string>(
"barrelClusterCollection"))
51 , endcapClusterCollection_ (ps.getParameter<
std::
string>(
"endcapClusterCollection"))
56 , l1LowerThr_ (ps.getParameter<double> (
"l1LowerThr"))
57 , l1UpperThr_ (ps.getParameter<double> (
"l1UpperThr"))
58 , l1LowerThrIgnoreIsolation_ (ps.getParameter<double> (
"l1LowerThrIgnoreIsolation"))
60 , regionEtaMargin_ (ps.getParameter<double>(
"regionEtaMargin"))
61 , regionPhiMargin_ (ps.getParameter<double>(
"regionPhiMargin"))
66 , verb_ (ps.getParameter<
std::
string>(
"VerbosityLevel"))
68 ps.getParameter<double>(
"IslandEndcapSeedThr"),
93 desc.
add<
bool>(
"doBarrel",
true);
94 desc.
add<
bool>(
"doEndcaps",
true);
95 desc.
add<
bool>(
"doIsolated",
true);
98 desc.
add<
std::string>(
"barrelClusterCollection",
"islandBarrelBasicClusters");
99 desc.
add<
std::string>(
"endcapClusterCollection",
"islandEndcapBasicClusters");
100 desc.
add<
double>(
"IslandBarrelSeedThr", 0.5);
101 desc.
add<
double>(
"IslandEndcapSeedThr", 0.18);
104 desc.
add<
double>(
"l1LowerThr", 0.0);
105 desc.
add<
double>(
"l1UpperThr", 9999.0);
106 desc.
add<
double>(
"l1LowerThrIgnoreIsolation", 9999.0);
107 desc.
add<
double>(
"regionEtaMargin", 0.3);
108 desc.
add<
double>(
"regionPhiMargin", 0.4);
110 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEB", {});
111 desc.
add<std::vector<std::string>>(
"SeedRecHitFlagToBeExcludedEE", {});
112 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEB", {});
113 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcludedEE", {});
114 descriptions.
add(
"hltEgammaHLTIslandClusterProducer", desc);
132 std::vector<RectangularEtaPhiRegion> barrelRegions;
133 std::vector<RectangularEtaPhiRegion> endcapRegions;
136 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
141 int etaIndex = emItr->gctEmCand()->etaIndex() ;
143 int phiIndex = emItr->gctEmCand()->phiIndex() ;
153 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
154 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
155 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
166 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
167 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
169 endcapRegions.push_back(region);
172 if (etaHigh>1.479) etaHigh=1.479;
173 if (etaLow<-1.479) etaLow=-1.479;
175 barrelRegions.push_back(region);
185 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
192 int etaIndex = emItr->gctEmCand()->etaIndex() ;
195 int phiIndex = emItr->gctEmCand()->phiIndex() ;
205 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
206 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
207 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
218 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
219 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
221 endcapRegions.push_back(region);
224 if (etaHigh>1.479) etaHigh=1.479;
225 if (etaLow<-1.479) etaLow=-1.479;
227 barrelRegions.push_back(region);
255 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
256 edm::LogError(
"EgammaHLTIslandClusterProducerError") <<
"Error! can't get the product ";
266 const std::vector<RectangularEtaPhiRegion>&
regions,
277 std::unique_ptr<CaloSubdetectorTopology> topology_p;
282 topology_p = std::make_unique<EcalBarrelTopology>(*geoHandle);
287 topology_p = std::make_unique<EcalEndcapTopology>(*geoHandle);
298 auto clusters_p = std::make_unique<reco::BasicClusterCollection>();
299 clusters_p->assign(clusters.begin(), clusters.end());
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
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
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, const edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< RectangularEtaPhiRegion > ®ions, const IslandClusterAlgo::EcalPart &ecalPart) const
~EgammaHLTIslandClusterProducer() override
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string barrelClusterCollection_
const EcalRecHitCollection * getCollection(edm::Event &evt, const edm::EDGetTokenT< EcalRecHitCollection > &hitToken) const
const edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_
EgammaHLTIslandClusterProducer(const edm::ParameterSet &ps)
const double regionPhiMargin_
const double regionEtaMargin_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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
IslandClusterAlgo *const island_p
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
const edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
const std::string endcapClusterCollection_
int StringToEnumValue(std::string const &enumConstName)
const double l1LowerThrIgnoreIsolation_
const edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
double emJetPhiBinLowEdge(unsigned int phiIndex) const
const edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
double emJetPhiBinHighEdge(unsigned int phiIndex) const