55 double barrelSeedThreshold = ps.
getParameter<
double>(
"Multi5x5BarrelSeedThr");
56 double endcapSeedThreshold = ps.
getParameter<
double>(
"Multi5x5EndcapSeedThr");
71 const std::vector<std::string> flagnames =
72 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
75 std::vector<int> v_chstatus = StringToEnumValue<EcalRecHit::Flags>(flagnames);
92 desc.
add<
bool>((
"doBarrel"),
false);
93 desc.
add<
bool>((
"doEndcaps"),
true);
94 desc.
add<
bool>((
"doIsolated"),
true);
98 posCalcPSET.
add<
double>(
"T0_barl", 7.4);
99 posCalcPSET.add<
double>(
"T0_endc", 3.1);
100 posCalcPSET.add<
double>(
"T0_endcPresh", 1.2);
101 posCalcPSET.add<
double>(
"W0", 4.2);
102 posCalcPSET.add<
double>(
"X0", 0.89);
103 posCalcPSET.add<
bool>(
"LogWeighted",
true);
109 desc.
add<
std::string>((
"endcapClusterCollection"),
"multi5x5EndcapBasicClusters");
110 desc.
add<
double>((
"Multi5x5BarrelSeedThr"), 0.5);
111 desc.
add<
double>((
"Multi5x5EndcapSeedThr"), 0.5);
114 desc.
add<
double>((
"l1LowerThr"), 5.0);
115 desc.
add<
double>((
"l1UpperThr"), 9999.);
116 desc.
add<
double>((
"l1LowerThrIgnoreIsolation"), 999.0);
117 desc.
add<
double>((
"regionEtaMargin"), 0.3);
118 desc.
add<
double>((
"regionPhiMargin"), 0.4);
120 desc.
add<std::vector<std::string> >((
"RecHitFlagToBeExcluded"), std::vector<std::string>());
121 descriptions.
add((
"hltEgammaHLTMulti5x5ClusterProducer"), desc);
139 std::vector<EcalEtaPhiRegion> barrelRegions;
140 std::vector<EcalEtaPhiRegion> endcapRegions;
143 for( l1extra::L1EmParticleCollection::const_iterator emItr = emIsolColl->begin(); emItr != emIsolColl->end() ;++emItr ){
148 int etaIndex = emItr->gctEmCand()->etaIndex() ;
151 int phiIndex = emItr->gctEmCand()->phiIndex() ;
153 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
154 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
155 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
156 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
161 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
162 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
163 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
174 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
175 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
177 endcapRegions.push_back(region);
180 if (etaHigh>1.479) etaHigh=1.479;
181 if (etaLow<-1.479) etaLow=-1.479;
183 barrelRegions.push_back(region);
193 for( l1extra::L1EmParticleCollection::const_iterator emItr = emNonIsolColl->begin(); emItr != emNonIsolColl->end() ;++emItr ){
200 int etaIndex = emItr->gctEmCand()->etaIndex() ;
203 int phiIndex = emItr->gctEmCand()->phiIndex() ;
205 double etaLow = l1CaloGeom->etaBinLowEdge( etaIndex ) ;
206 double etaHigh = l1CaloGeom->etaBinHighEdge( etaIndex ) ;
207 double phiLow = l1CaloGeom->emJetPhiBinLowEdge( phiIndex ) ;
208 double phiHigh = l1CaloGeom->emJetPhiBinHighEdge( phiIndex ) ;
213 if((
float)(etaHigh)>1.479 || (
float)(etaLow)<-1.479) isforw=1;
214 if(((
float)(etaLow)>-1.479 && (
float)(etaLow)<1.479) ||
215 ((
float)(etaHigh)>-1.479 && (
float)(etaHigh)<1.479)) isbarl=1;
226 if (etaHigh>-1.479 && etaHigh<1.479) etaHigh=-1.479;
227 if ( etaLow>-1.479 && etaLow<1.479) etaLow=1.479;
229 endcapRegions.push_back(region);
232 if (etaHigh>1.479) etaHigh=1.479;
233 if (etaLow<-1.479) etaLow=-1.479;
235 barrelRegions.push_back(region);
261 std::cout <<
"could not get a handle on the EcalRecHitCollection!" << std::endl;
262 edm::LogError(
"EgammaHLTMulti5x5ClusterProducerError") <<
"Error! can't get the product ";
272 const std::vector<EcalEtaPhiRegion>& regions,
288 topology_p =
new EcalBarrelTopology(geoHandle);
293 topology_p =
new EcalEndcapTopology(geoHandle);
302 clusters =
Multi5x5_p->
makeClusters(hitCollection_p, geometry_p, topology_p, geometryES_p, detector,
true, regions);
306 clusters_p->assign(clusters.begin(), clusters.end());
T getParameter(std::string const &) const
Multi5x5ClusterAlgo * Multi5x5_p
void clusterizeECALPart(edm::Event &evt, const edm::EventSetup &es, edm::EDGetTokenT< EcalRecHitCollection > &hitToken, const std::string &clusterCollection, const std::vector< EcalEtaPhiRegion > ®ions, const reco::CaloID::Detectors detector)
std::vector< reco::BasicCluster > makeClusters(const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology_p, const CaloSubdetectorGeometry *geometryES_p, reco::CaloID::Detectors detector, bool regional=false, const std::vector< EcalEtaPhiRegion > ®ions=std::vector< EcalEtaPhiRegion >())
~EgammaHLTMulti5x5ClusterProducer()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double l1LowerThrIgnoreIsolation_
std::string barrelClusterCollection_
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagNonIsolated_
std::string endcapClusterCollection_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::InputTag barrelHitCollection_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< EcalRecHitCollection > barrelHitToken_
edm::EDGetTokenT< EcalRecHitCollection > endcapHitToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const EcalRecHitCollection * getCollection(edm::Event &evt, edm::EDGetTokenT< EcalRecHitCollection > &hitToken)
PositionCalc posCalculator_
edm::InputTag endcapHitCollection_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
EgammaHLTMulti5x5ClusterProducer(const edm::ParameterSet &ps)
edm::EDGetTokenT< l1extra::L1EmParticleCollection > l1TagIsolated_