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);
108 const int rawId = gemId.
rawId();
110 if ( tomask.rawId == rawId ) {
111 const int bit = tomask.strip;
116 if ( tomask.rawId == rawId ) {
117 const int bit = tomask.strip;
139 auto recHitCollection = std::make_unique<GEMRecHitCollection>();
142 for (
auto gemdgIt = digis->begin(); gemdgIt != digis->end(); ++gemdgIt ) {
144 const GEMDetId& gemId = (*gemdgIt).first;
148 if (roll ==
nullptr){
149 edm::LogError(
"BadDigiInput")<<
"Failed to find GEMEtaPartition for ID "<<gemId;
159 auto gemmaskIt =
gemMask_.find(gemId);
161 mask = gemmaskIt->second;
168 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
def setup(process, global_tag, zero_tesla=False)
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.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< GEMMaskedStrips > theGEMMaskedStripsObj
~GEMRecHitProducer() override
Destructor.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
enum GEMRecHitProducer::MaskSource maskSource_
std::map< GEMDetId, EtaPartitionMask > gemMask_
std::string fullPath() const
std::unique_ptr< GEMRecHitBaseAlgo > theAlgo
std::pair< const_iterator, const_iterator > Range
T const * product() const
T get(const Candidate &c)
edm::EDGetTokenT< GEMDigiCollection > theGEMDigiToken
void beginRun(const edm::Run &, const edm::EventSetup &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)