55 const std::vector<std::string> flagnames =
56 ps.
getParameter<std::vector<std::string> >(
"RecHitFlagToBeExcluded");
58 const std::vector<int> flagsexcl=
59 StringToEnumValue<EcalRecHit::Flags>(flagnames);
61 const std::vector<std::string> severitynames =
62 ps.
getParameter<std::vector<std::string> >(
"RecHitSeverityToBeExcluded");
64 const std::vector<int> severitiesexcl=
65 StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
85 bool dynamicPhiRoad = ps.
getParameter<
bool>(
"dynamicPhiRoad");
88 hybrid_p->setDynamicPhiRoad(bremRecoveryPset);
110 edm::LogError(
"MissingProduct") <<
"could not get a handle on the EcalRecHitCollection!";
121 std::auto_ptr<const CaloSubdetectorTopology> topology;
130 topology.reset(
new EcalBarrelTopology(geoHandle));
133 topology.reset(
new EcalEndcapTopology(geoHandle));
136 topology.reset(
new EcalPreshowerTopology (geoHandle));
137 }
else throw(std::runtime_error(
"\n\nHybrid Cluster Producer encountered invalied ecalhitcollection type.\n\n"));
142 std::vector<EcalEtaPhiRegion>());
144 LogTrace(
"EcalClusters") <<
"Finished clustering - BasicClusterCollection returned to producer..." ;
148 basicclusters_p->assign(basicClusters.begin(), basicClusters.end());
152 LogTrace(
"EcalClusters") <<
"Basic Clusters now put into event." ;
160 edm::LogError(
"Missing Product") <<
"could not get a handle on the BasicClusterCollection!" ;
166 LogTrace(
"EcalClusters")<<
"Got the BasicClusterCollection" << std::endl;
169 for (
unsigned int i = 0;
i < clusterCollection.size();
i++){
174 LogTrace(
"EcalClusters") <<
"Found: " << superClusters.size() <<
" superclusters." ;
177 superclusters_p->assign(superClusters.begin(), superClusters.end());
180 LogTrace(
"EcalClusters") <<
"Hybrid Clusters (Basic/Super) added to the Event! :-)" ;
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
HybridClusterProducer(const edm::ParameterSet &ps)
std::string superclusterCollection_
virtual void produce(edm::Event &, const edm::EventSetup &)
void push_back(Ptr< T > const &iPtr)
std::string basicclusterCollection_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::SuperClusterCollection makeSuperClusters(const reco::CaloClusterPtrVector &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::string hitcollection_
PositionCalc posCalculator_
T const * product() const
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
T const * product() const
ESHandle< TrackerGeometry > geometry
HybridClusterAlgo * hybrid_p
void makeClusters(const EcalRecHitCollection *, const CaloSubdetectorGeometry *geometry, reco::BasicClusterCollection &basicClusters, const EcalSeverityLevelAlgo *sevLv, bool regional=false, const std::vector< EcalEtaPhiRegion > ®ions=std::vector< EcalEtaPhiRegion >())