|
|
Go to the documentation of this file.
19 const std::pair<std::string, std::string> &recordLabelPair,
44 const double &factor2) {
50 std::vector<uint32_t> detIds;
52 std::vector<uint32_t>::const_iterator it = detIds.begin();
53 for (; it != detIds.end(); ++it) {
54 auto detInfoIt = DetInfos.find(*it);
55 if (detInfoIt != DetInfos.end()) {
56 std::vector<float> theSiStripVector;
62 if (apvgain2 !=
nullptr) {
66 for (
int apv = 0; apv < detInfoIt->second.nApvs; ++apv) {
69 if ((apvgain2 !=
nullptr) && (factor2 != 0.)) {
70 apvGainValue *= apvgain2->
getApvGain(apv, range2) / factor2;
73 theSiStripVector.push_back(apvGainValue);
77 edm::LogError(
"SiStripGain") <<
"detid already exists" << std::endl;
90 edm::LogError(
"SiStripGain::getStripGain") <<
"ERROR: no gain available. Returning gain = 1." << std::endl;
98 edm::LogError(
"SiStripGain::getApvGain") <<
"ERROR: no gain available. Returning gain = 1." << std::endl;
112 std::vector<unsigned int> detIds;
114 std::vector<unsigned int>::const_iterator detid = detIds.begin();
115 ss <<
"Number of detids " << detIds.size() << std::endl;
117 for (; detid != detIds.end(); ++detid) {
120 for (
int it = 0; it <
range.second -
range.first; ++it) {
121 ss <<
"detid " << *detid <<
" \t"
122 <<
" apv " << apv++ <<
" \t" <<
getApvGain(it,
range) <<
" \t" << std::endl;
130 std::vector<unsigned int> detIds;
132 std::vector<uint32_t>::const_iterator detid = detIds.begin();
133 for (; detid != detIds.end(); ++detid) {
135 for (
int it = 0; it <
range.second -
range.first; ++it) {
139 ss <<
"Summary of gain values:" << std::endl;
140 summaryGain.print(
ss,
true);
std::vector< std::pair< std::string, std::string > > recordLabelPair_
std::vector< double > normVector_
std::unique_ptr< SiStripApvGain > apvgainAutoPtr_
const Range getRange(const uint32_t detID) const
void fillNewGain(const SiStripApvGain *apvgain, const double &factor, SiStripDetInfo const &detInfo, const SiStripApvGain *apvgain2=nullptr, const double &factor2=1.)
std::vector< const SiStripApvGain * > apvgainVector_
static float getStripGain(const uint16_t &strip, const SiStripApvGain::Range &range)
const SiStripApvGain * apvgain_
const SiStripApvGain::Range getRange(uint32_t detID) const
bool put(const uint32_t &detID, Range input)
const std::map< uint32_t, DetInfo > & getAllData() const noexcept
void getDetIds(std::vector< uint32_t > &DetIds_) const
ATTENTION: we assume the detIds are the same as those from the first gain.
static float getApvGain(const uint16_t &apv, const SiStripApvGain::Range &range)
void printDebug(std::stringstream &ss, const TrackerTopology *trackerTopo) const
void multiply(const SiStripApvGain &apvgain, const double &factor, const std::pair< std::string, std::string > &recordLabelPair, const SiStripDetInfo &detInfo)
Log< level::Error, false > LogError
std::pair< ContainerIterator, ContainerIterator > Range
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const
void getDetIds(std::vector< uint32_t > &DetIds_) const
static float getApvGain(uint16_t apv, const Range &range)