178 std::unique_ptr<const CaloSubdetectorTopology> topology;
186 std::vector<RectangularEtaPhiRegion>
regions;
196 auto uhits = std::make_unique<EcalUncalibratedRecHitCollection>();
200 edm::LogError(
"ProductNotFound") <<
"could not get a handle on the EcalRecHitCollection! (" 206 if (!uncalibRecHits->
empty()) {
207 if ((*uncalibRecHits)[0].id().subdetId() ==
EcalBarrel) {
209 topology = std::make_unique<EcalBarrelTopology>(
geometry);
210 }
else if ((*uncalibRecHits)[0].id().subdetId() ==
EcalEndcap) {
212 topology = std::make_unique<EcalEndcapTopology>(
geometry);
213 }
else if ((*uncalibRecHits)[0].id().subdetId() ==
EcalPreshower) {
215 topology = std::make_unique<EcalPreshowerTopology>();
217 throw(std::runtime_error(
"\n\nProducer encountered invalied ecalhitcollection type.\n\n"));
222 for (it = uncalibRecHits->
begin(); it != uncalibRecHits->
end(); it++) {
223 auto this_cell = geometry_p->
getGeometry(it->id());
225 std::vector<RectangularEtaPhiRegion>::const_iterator
region;
227 if (
region->inRegion(this_cell->etaPos(), this_cell->phiPos())) {
228 uhits->push_back(*it);
241 auto hits = std::make_unique<EcalRecHitCollection>();
245 edm::LogError(
"ProductNotFound") <<
"could not get a handle on the EcalRecHitCollection! (" 254 topology = std::make_unique<EcalBarrelTopology>(
geometry);
257 topology = std::make_unique<EcalEndcapTopology>(
geometry);
260 topology = std::make_unique<EcalPreshowerTopology>();
262 throw(std::runtime_error(
"\n\nProducer encountered invalied ecalhitcollection type.\n\n"));
267 auto this_cell = geometry_p->
getGeometry(it->id());
269 std::vector<RectangularEtaPhiRegion>::const_iterator
region;
271 if (
region->inRegion(this_cell->etaPos(), this_cell->phiPos())) {
272 hits->push_back(*it);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool get(ProductID const &oid, Handle< PROD > &result) const
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
const std::vector< edm::InputTag > hitLabels
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
T const * product() const
const std::vector< std::string > productLabels
std::vector< T >::const_iterator const_iterator
const edm::EDGetTokenT< T1Collection > l1TokenIsolated_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Log< level::Error, false > LogError
std::vector< edm::EDGetTokenT< EcalRecHitCollection > > hitTokens
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const_iterator begin() const
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
const_iterator end() const
const edm::EDGetTokenT< T1Collection > l1TokenNonIsolated_
const double l1LowerThrIgnoreIsolation_
std::vector< edm::EDGetTokenT< EcalUncalibratedRecHitCollection > > uncalibHitTokens
void getEtaPhiRegions(std::vector< RectangularEtaPhiRegion > *, T1Collection const &, edm::EventSetup const &, bool const)