70 const std::vector<std::string> flagnames =
71 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
73 const std::vector<int> flagsexcl=
74 StringToEnumValue<EcalRecHit::Flags>(flagnames);
76 const std::vector<std::string> severitynames =
77 ps.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcluded");
79 const std::vector<int> severitiesexcl=
80 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
100 if (dynamicPhiRoad) {
102 hybrid_p->setDynamicPhiRoad(bremRecoveryPset);
125 desc.
add<
bool>(
"doIsolated",
true);
126 desc.
add<
double>(
"l1LowerThr", 0);
127 desc.
add<
double>(
"l1UpperThr", 9999.0);
128 desc.
add<
double>(
"l1LowerThrIgnoreIsolation", 999.0);
129 desc.
add<
double>(
"regionEtaMargin", 0.14);
130 desc.
add<
double>(
"regionPhiMargin", 0.4);
133 posCalcPSET.
add<
double>(
"T0_barl", 7.4);
134 posCalcPSET.
add<
double>(
"T0_endc", 3.1);
135 posCalcPSET.
add<
double>(
"T0_endcPresh", 1.2);
136 posCalcPSET.
add<
double>(
"W0", 4.2);
137 posCalcPSET.
add<
double>(
"X0", 0.89);
138 posCalcPSET.
add<
bool>(
"LogWeighted",
true);
141 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcluded", std::vector<std::string>());
142 desc.
add<std::vector<std::string> >(
"RecHitSeverityToBeExcluded", std::vector<std::string>());
143 desc.
add<
double>(
"severityRecHitThreshold", 4.0);
144 desc.
add<
double>(
"HybridBarrelSeedThr", 1.0);
145 desc.
add<
int>(
"step", 10);
146 desc.
add<
double>(
"ethresh", 0.1);
147 desc.
add<
double>(
"eseed", 0.35);
148 desc.
add<
double>(
"xi", 0);
149 desc.
add<
bool>(
"useEtForXi",
true);
150 desc.
add<
double>(
"ewing", 1.0);
151 desc.
add<
bool>(
"dynamicEThresh",
false);
152 desc.
add<
double>(
"eThreshA", 0.003);
153 desc.
add<
double>(
"eThreshB", 0.1);
154 desc.
add<
bool>(
"excludeFlagged",
false);
155 desc.
add<
bool>(
"dynamicPhiRoad",
false);
158 descriptions.
add(
"hltEgammaHLTHybridClusterProducer", desc);
170 edm::LogError(
"ProductNotFound")<<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
180 std::unique_ptr<const CaloSubdetectorTopology>
topology;
199 }
else throw(std::runtime_error(
"\n\nHybrid Cluster Producer encountered invalied ecalhitcollection type.\n\n"));
215 std::vector<EcalEtaPhiRegion> regions;
218 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
223 int etaIndex = emItr->gctEmCand()->etaIndex() ;
224 int phiIndex = emItr->gctEmCand()->phiIndex() ;
234 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
235 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
243 if (etaHigh>1.479) etaHigh=1.479;
244 if (etaLow<-1.479) etaLow=-1.479;
246 if(isbarl) regions.push_back(
EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
253 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
260 int etaIndex = emItr->gctEmCand()->etaIndex() ;
261 int phiIndex = emItr->gctEmCand()->phiIndex() ;
271 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
272 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
280 if (etaHigh>1.479) etaHigh=1.479;
281 if (etaLow<-1.479) etaLow=-1.479;
283 if(isbarl) regions.push_back(
EcalEtaPhiRegion(etaLow,etaHigh,phiLow,phiHigh));
294 auto basicclusters_p = std::make_unique<reco::BasicClusterCollection>();
295 basicclusters_p->assign(basicClusters.begin(), basicClusters.end());
304 for (
unsigned int i = 0;
i < clusterCollection.size();
i++){
310 auto superclusters_p = std::make_unique<reco::SuperClusterCollection>();
311 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
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::string basicclusterCollection_
~EgammaHLTHybridClusterProducer() override
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_
double etaBinHighEdge(unsigned int etaIndex, bool central=true) const
CaloTopology const * topology(0)
double etaBinLowEdge(unsigned int etaIndex, bool central=true) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void push_back(Ptr< T > const &iPtr)
PositionCalc posCalculator_
edm::InputTag hitcollection_
std::string superclusterCollection_
void produce(edm::Event &, const edm::EventSetup &) override
double l1LowerThrIgnoreIsolation_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
double emJetPhiBinLowEdge(unsigned int phiIndex) const
HybridClusterAlgo * hybrid_p
T const * product() const
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 >())
edm::EDGetTokenT< EcalRecHitCollection > hittoken_
double emJetPhiBinHighEdge(unsigned int phiIndex) const