|
using | EventSetupRecordKey = eventsetup::EventSetupRecordKey |
|
using | KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> |
|
ESConsumesInfo * | consumesInfoPushBackNew () |
|
unsigned int | consumesInfoSize () const |
|
template<typename CallbackT , typename TList , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel) |
|
template<typename CallbackT , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const es::Label &iLabel={}) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const char *iLabel) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const std::string &iLabel) |
|
template<typename T , typename TDecorator > |
auto | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord > |
auto | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord , typename TDecorator > |
auto | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename TFunc > |
auto | setWhatProduced (TFunc &&func, const es::Label &iLabel={}) |
|
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator > |
ESConsumesCollectorT< TRecord > | setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={}) |
|
void | usesResources (std::vector< std::string > const &) |
|
template<class TFactory > |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
|
virtual void | registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string()) |
|
KeyedResolversVector | registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override |
|
template<class T > |
void | usingRecord () |
|
void | usingRecordWithKey (const EventSetupRecordKey &key) |
|
template<class T > |
void | findingRecord () |
|
void | findingRecordWithKey (const eventsetup::EventSetupRecordKey &) |
|
Definition at line 97 of file SiPhase2BadStripConfigurableFakeESSource.cc.
References cms::cuda::assert(), badComponentsFraction_, clusterizeBadChannels(), TauDecayModes::dec, DetId::det(), TrackerGeometry::detUnits(), engine_, f, spr::find(), dqmdumpme::first, geomToken_, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), TrackerGeometry::getDetectorType(), LogDebug, hgcalPlots::ncols, PixelTopology::nrows(), TrackerGeometry::Ph2PSS, TrackerGeometry::Ph2SS, Phase2TrackerDigi::pixelToChannel(), printDebug_, FastTimerService_cff::range, DetId::rawId(), nano_mu_digi_cff::rawId, PixelGeomDetUnit::specificTopology(), DetId::subdetId(), StripSubdetector::TID, StripSubdetector::TOB, and align::Tracker.
105 auto badStrips = std::make_unique<SiStripBadStrip>();
112 LogDebug(
"SiPhase2BadStripConfigurableFakeESSource")
113 <<
" There are " << tGeom.
detUnits().size() <<
" modules in this geometry.";
116 for (
auto const& det_u : tGeom.
detUnits()) {
117 const DetId detid = det_u->geographicalId();
128 const int nrows = topol.
nrows();
129 const int ncols = topol.ncolumns();
131 LogDebug(
"SiPhase2BadStripConfigurableFakeESSource")
132 <<
"DetId: " <<
rawId <<
" subdet: " << subid <<
" nrows: " << nrows <<
" ncols: " <<
ncols;
135 std::vector<Phase2TrackerDigi::PackedDigiType> usedChannels;
139 while (usedChannels.size() < nmaxBadStrips) {
140 unsigned short badStripRow = std::floor(CLHEP::RandFlat::shoot(
engine_.get(), 0, nrows));
141 unsigned short badStripCol = std::floor(CLHEP::RandFlat::shoot(
engine_.get(), 0,
ncols));
143 if (
std::find(usedChannels.begin(), usedChannels.end(), badChannel) == usedChannels.end()) {
144 usedChannels.push_back(badChannel);
152 LogDebug(
"SiPhase2BadStripConfigurableFakeESSource")
154 <<
" masking " << nmaxBadStrips <<
" strips, used channels size: " << usedChannels.size()
155 <<
", clusters size: " << badChannelsGroups.size();
157 std::vector<unsigned int> theSiStripVector;
160 for (
const auto& [
first, consec] : badChannelsGroups) {
161 unsigned int theBadChannelsRange;
162 theBadChannelsRange = badStrips->encodePhase2(
first, consec);
165 edm::LogInfo(
"SiPhase2BadStripConfigurableFakeESSource")
166 <<
"detid " <<
rawId <<
" \t" 167 <<
" firstBadStrip " <<
first <<
"\t " 168 <<
" NconsecutiveBadStrips " << consec <<
"\t " 169 <<
" packed integer " << std::hex << theBadChannelsRange <<
std::dec;
171 theSiStripVector.push_back(theBadChannelsRange);
177 <<
"[SiPhase2BadStripConfigurableFakeESSource::produce] detid already exists";
186 LogDebug(
"SiPhase2BadStripConfigurableFakeESSource") <<
"end of the detId loops";
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
virtual int nrows() const =0
std::unique_ptr< CLHEP::HepRandomEngine > engine_
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
constexpr Detector det() const
get the detector field from this detid
std::map< unsigned short, unsigned short > clusterizeBadChannels(const std::vector< Phase2TrackerDigi::PackedDigiType > &maskedChannels)
ModuleType getDetectorType(DetId) const
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
Log< level::Info, false > LogInfo
constexpr uint32_t rawId() const
get the raw id
float badComponentsFraction_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::pair< ContainerIterator, ContainerIterator > Range
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static constexpr auto TID