50 std::vector<edm::EDGetTokenT<DetIdCollection>>
64 : geometry_p(nullptr) {
70 caloGeometryToken_ = esConsumes<CaloGeometry, CaloGeometryRecord, edm::Transition::BeginRun>();
76 [
this](
edm::InputTag const&
tag) { return consumes<DetIdCollection>(tag); });
80 [
this](
edm::InputTag const&
tag) { return consumes<DetIdCollection>(tag); });
92 edm::LogError(
"WrongGeometry") <<
"could not cast the subdet geometry to preshower geometry";
96 topology_p = std::make_unique<EcalPreshowerTopology>();
103 auto output = std::make_unique<EcalRecHitCollection>();
110 for (reco::SuperClusterCollection::const_iterator isc = eeSuperClusters->begin(); isc != eeSuperClusters->end();
114 if (fabs(isc->eta()) < 1.65 || fabs(isc->eta()) > 2.6)
120 for (; ibc != isc->clustersEnd(); ++ibc) {
143 edm::LogError(
"MissingInput") <<
"no reason to skip detid from : (" <<
labels.module <<
", " 144 <<
labels.productInstance <<
", " <<
labels.process <<
")" << std::endl;
155 for (
const auto&
hit : *ESRecHits_) {
156 if (
hit.recoFlag() == 1 ||
hit.recoFlag() == 14 ||
157 (
hit.recoFlag() <= 10 &&
hit.recoFlag() >= 5)) {
165 e.getByToken(
token, detId);
169 edm::LogError(
"MissingInput") <<
"no reason to skip detid from : (" <<
labels.module <<
", " 170 <<
labels.productInstance <<
", " <<
labels.process <<
")" << std::endl;
178 for (it = ESRecHits_->begin(); it != ESRecHits_->end(); ++it) {
191 map<DetId, const EcalRecHit*>::iterator it;
192 map<DetId, int>::iterator itu;
208 strip1 = theESNav1.north();
210 strip2 = theESNav2.east();
211 }
else if (row == -1) {
213 strip1 = theESNav1.south();
215 strip2 = theESNav2.west();
224 for (
int i = 0;
i < 15; ++
i) {
225 next = theESNav1.east();
235 theESNav1.setHome(strip1);
237 for (
int i = 0;
i < 15; ++
i) {
238 next = theESNav1.west();
253 for (
int i = 0;
i < 15; ++
i) {
254 next = theESNav2.north();
264 theESNav2.setHome(strip2);
266 for (
int i = 0;
i < 15; ++
i) {
267 next = theESNav2.south();
T getParameter(std::string const &) const
void beginRun(edm::Run const &, const edm::EventSetup &) final
std::vector< edm::EDGetTokenT< DetIdCollection > > interestingDetIdCollectionsNotToClean_
std::vector< edm::EDGetTokenT< DetIdCollection > > interestingDetIdCollections_
std::vector< EcalRecHit >::const_iterator const_iterator
Log< level::Error, false > LogError
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
void collectIds(const ESDetId strip1, const ESDetId strip2, const int &row=0)
void setHome(const T &startingPoint)
set the starting position
std::unique_ptr< CaloSubdetectorTopology > topology_p
std::string OutputLabelES_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
#define DEFINE_FWK_MODULE(type)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const_iterator begin() const
edm::EDGetTokenT< ESRecHitCollection > InputRecHitES_
void produce(edm::Event &e, const edm::EventSetup &c) override
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
edm::EDGetTokenT< reco::SuperClusterCollection > InputSuperClusterEE_
virtual DetId getClosestCellInPlane(const GlobalPoint &r, int plane) const
std::set< DetId > collectedIds_
~ReducedESRecHitCollectionProducer() override
const EcalPreshowerGeometry * geometry_p
const_iterator end() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
ReducedESRecHitCollectionProducer(const edm::ParameterSet &pset)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point