32 produces<GEMRecHitCollection>();
41 throw cms::Exception(
"GEMRecHitProducer") <<
"Masked Strips File cannot not be opened";
57 throw cms::Exception(
"GEMRecHitProducer") <<
"Dead Strips File cannot not be opened";
79 desc.
add<
bool>(
"applyMasking",
false);
82 descriptions.
add(
"gemRecHitsDef", desc);
107 const int rawId = gemId.
rawId();
109 if (tomask.rawId == rawId) {
110 const int bit = tomask.strip;
115 if (tomask.rawId == rawId) {
116 const int bit = tomask.strip;
137 auto recHitCollection = std::make_unique<GEMRecHitCollection>();
140 for (
auto gemdgIt = digis->begin(); gemdgIt != digis->end(); ++gemdgIt) {
142 const GEMDetId& gemId = (*gemdgIt).first;
146 if (roll ==
nullptr) {
147 edm::LogError(
"BadDigiInput") <<
"Failed to find GEMEtaPartition for ID " << gemId;
157 auto gemmaskIt =
gemMask_.find(gemId);
159 mask = gemmaskIt->second;
165 if (!recHits.
empty())
166 recHitCollection->put(gemId, recHits.
begin(), recHits.
end());
T getParameter(std::string const &) const
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the rechits.
GEMRecHitProducer(const edm::ParameterSet &config)
Constructor.
enum GEMRecHitProducer::MaskSource deadSource_
constexpr uint32_t rawId() const
get the raw id
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
edm::ESHandle< GEMGeometry > gemGeom_
std::unique_ptr< GEMDeadStrips > theGEMDeadStripsObj
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
std::map< GEMDetId, EtaPartitionMask > gemMask_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< GEMMaskedStrips > theGEMMaskedStripsObj
~GEMRecHitProducer() override
Destructor.
std::pair< const_iterator, const_iterator > Range
void add(std::string const &label, ParameterSetDescription const &psetDescription)
enum GEMRecHitProducer::MaskSource maskSource_
std::string fullPath() const
std::unique_ptr< GEMRecHitBaseAlgo > theAlgo
T const * product() const
edm::EDGetTokenT< GEMDigiCollection > theGEMDigiToken
void beginRun(const edm::Run &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)