|
|
Go to the documentation of this file.
30 maskSource_(MaskSource::EventSetup),
31 deadSource_(MaskSource::EventSetup) {
32 produces<GEMRecHitCollection>();
35 applyMasking_ =
config.getParameter<
bool>(
"applyMasking");
41 throw cms::Exception(
"GEMRecHitProducer") <<
"Masked Strips File cannot not be opened";
43 theGEMMaskedStripsObj = std::make_unique<GEMMaskedStrips>();
48 theGEMMaskedStripsObj->fillMaskVec(Item);
57 throw cms::Exception(
"GEMRecHitProducer") <<
"Dead Strips File cannot not be opened";
59 theGEMDeadStripsObj = std::make_unique<GEMDeadStrips>();
64 theGEMDeadStripsObj->fillDeadVec(Item);
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;
T const * product() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
enum GEMRecHitProducer::MaskSource deadSource_
void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the rechits.
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::ESHandle< GEMGeometry > gemGeom_
enum GEMRecHitProducer::MaskSource maskSource_
std::unique_ptr< GEMDeadStrips > theGEMDeadStripsObj
std::unique_ptr< GEMMaskedStrips > theGEMMaskedStripsObj
~GEMRecHitProducer() override
Destructor.
std::map< GEMDetId, EtaPartitionMask > gemMask_
constexpr uint32_t rawId() const
get the raw id
void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< GEMDigiCollection > theGEMDigiToken
std::pair< const_iterator, const_iterator > Range
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
GEMRecHitProducer(const edm::ParameterSet &config)
Constructor.
std::string fullPath() const
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
std::unique_ptr< GEMRecHitBaseAlgo > theAlgo