69 const std::vector<std::string> flagnames =
70 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
72 const std::vector<int> flagsexcl=
73 StringToEnumValue<EcalRecHit::Flags>(flagnames);
75 const std::vector<std::string> severitynames =
76 ps.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcluded");
78 const std::vector<int> severitiesexcl=
79 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
101 hybrid_p->setDynamicPhiRoad(bremRecoveryPset);
124 desc.
add<
bool>(
"doIsolated",
true);
125 desc.
add<
double>(
"l1LowerThr", 0);
126 desc.
add<
double>(
"l1UpperThr", 9999.0);
127 desc.
add<
double>(
"l1LowerThrIgnoreIsolation", 999.0);
128 desc.
add<
double>(
"regionEtaMargin", 0.14);
129 desc.
add<
double>(
"regionPhiMargin", 0.4);
132 posCalcPSET.
add<
double>(
"T0_barl", 7.4);
133 posCalcPSET.
add<
double>(
"T0_endc", 3.1);
134 posCalcPSET.
add<
double>(
"T0_endcPresh", 1.2);
135 posCalcPSET.
add<
double>(
"W0", 4.2);
136 posCalcPSET.
add<
double>(
"X0", 0.89);
137 posCalcPSET.
add<
bool>(
"LogWeighted",
true);
140 desc.
add<std::vector<std::string>>(
"RecHitFlagToBeExcluded", std::vector<std::string>());
141 desc.
add<std::vector<std::string> >(
"RecHitSeverityToBeExcluded", std::vector<std::string>());
142 desc.
add<
double>(
"severityRecHitThreshold", 4.0);
143 desc.
add<
double>(
"HybridBarrelSeedThr", 1.0);
144 desc.
add<
int>(
"step", 10);
145 desc.
add<
double>(
"ethresh", 0.1);
146 desc.
add<
double>(
"eseed", 0.35);
147 desc.
add<
double>(
"xi", 0);
148 desc.
add<
bool>(
"useEtForXi",
true);
149 desc.
add<
double>(
"ewing", 1.0);
150 desc.
add<
bool>(
"dynamicEThresh",
false);
151 desc.
add<
double>(
"eThreshA", 0.003);
152 desc.
add<
double>(
"eThreshB", 0.1);
153 desc.
add<
bool>(
"excludeFlagged",
false);
154 desc.
add<
bool>(
"dynamicPhiRoad",
false);
157 descriptions.
add(
"hltEgammaHLTHybridClusterProducer", desc);
169 edm::LogError(
"ProductNotFound")<<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
179 std::unique_ptr<const CaloSubdetectorTopology>
topology;
198 }
else throw(std::runtime_error(
"\n\nHybrid Cluster Producer encountered invalied ecalhitcollection type.\n\n"));
214 std::vector<RectangularEtaPhiRegion>
regions;
217 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
222 int etaIndex = emItr->gctEmCand()->etaIndex() ;
223 int phiIndex = emItr->gctEmCand()->phiIndex() ;
233 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
234 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
242 if (etaHigh>1.479) etaHigh=1.479;
243 if (etaLow<-1.479) etaLow=-1.479;
252 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
259 int etaIndex = emItr->gctEmCand()->etaIndex() ;
260 int phiIndex = emItr->gctEmCand()->phiIndex() ;
270 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
271 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
279 if (etaHigh>1.479) etaHigh=1.479;
280 if (etaLow<-1.479) etaLow=-1.479;
293 auto basicclusters_p = std::make_unique<reco::BasicClusterCollection>();
294 basicclusters_p->assign(basicClusters.begin(), basicClusters.end());
303 for (
unsigned int i = 0;
i < clusterCollection.size();
i++){
309 auto superclusters_p = std::make_unique<reco::SuperClusterCollection>();
310 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
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< RectangularEtaPhiRegion > ®ions=std::vector< RectangularEtaPhiRegion >())
T const * product() const
EgammaHLTHybridClusterProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< EcalRecHitCollection > hittoken_
double emJetPhiBinHighEdge(unsigned int phiIndex) const