15 #include "CLHEP/Random/RandGauss.h" 22 edm::LogInfo(
"SiStripGainRandomCalculator::SiStripGainRandomCalculator");
40 edm::LogInfo(
"SiStripGainRandomCalculator::~SiStripGainRandomCalculator");
46 edm::LogInfo(
"SiStripGainRandomCalculator::algoAnalyze - got new geometry ") << std::endl;
50 edm::LogInfo(
"SiStripGainCalculator") <<
" There are " <<
dd.detUnits().size() <<
" detectors" << std::endl;
52 for (
const auto& it :
dd.detUnits()) {
53 if (dynamic_cast<const StripGeomDetUnit*>(it) !=
nullptr) {
54 uint32_t detid = (it->geographicalId()).rawId();
56 unsigned short NAPVs =
p.nstrips() / 128;
57 if (NAPVs < 1 || NAPVs > 6) {
59 <<
" Problem with Number of strips in detector.. " <<
p.nstrips() <<
" Exiting program" << endl;
62 detid_apvs_.push_back(pair<uint32_t, unsigned short>(detid, NAPVs));
64 edm::LogInfo(
"SiStripGainCalculator") <<
"detid " << detid <<
" apvs " << NAPVs;
71 std::cout <<
"SiStripGainRandomCalculator::getNewObject called" << std::endl;
73 auto obj = std::make_unique<SiStripApvGain>();
78 std::vector<float> theSiStripVector;
79 for (
unsigned short j = 0;
j < it->second;
j++) {
90 edm::LogInfo(
"SiStripGainCalculator") <<
"detid " << it->first <<
" \t" 91 <<
" apv " <<
j <<
" \t" <<
gain <<
" \t" << std::endl;
92 theSiStripVector.push_back(
gain);
97 edm::LogError(
"SiStripGainCalculator") <<
"[SiStripGainCalculator::beginJob] detid already exists" << std::endl;
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::unique_ptr< SiStripApvGain > getNewObject() override
Log< level::Error, false > LogError
void algoAnalyze(const edm::Event &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
edm::ESWatcher< TrackerDigiGeometryRecord > tkDigiGeomRcdWatcher_
std::pair< ContainerIterator, ContainerIterator > Range
~SiStripGainRandomCalculator() override
SiStripGainRandomCalculator(const edm::ParameterSet &)
Namespace of DDCMS conversion namespace.
Log< level::Info, false > LogInfo
bool check(const edm::EventSetup &iSetup)
std::vector< std::pair< uint32_t, unsigned short > > detid_apvs_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_