#include <SiStripGain.h>
Public Member Functions | |
float | getApvGain (const uint16_t &apv, const SiStripApvGain::Range &range, const uint32_t index) const |
void | getDetIds (std::vector< uint32_t > &DetIds_) const |
ATTENTION: we assume the detIds are the same as those from the first gain. More... | |
std::string | getLabelName (const uint32_t index) const |
size_t | getNumberOfTags () const |
const SiStripApvGain::Range | getRange (uint32_t detID) const |
const SiStripApvGain::Range | getRange (const uint32_t &detID, const uint32_t index) const |
SiStripApvGain::Range | getRangeByPos (unsigned short pos) const |
std::string | getRcdName (const uint32_t index) const |
float | getStripGain (const uint16_t &strip, const SiStripApvGain::Range &range, const uint32_t index) const |
double | getTagNorm (const uint32_t index) const |
void | multiply (const SiStripApvGain &apvgain, const double &factor, const std::pair< std::string, std::string > &recordLabelPair) |
const SiStripGain & | operator= (const SiStripGain &)=delete |
void | printDebug (std::stringstream &ss, const TrackerTopology *trackerTopo) const |
void | printSummary (std::stringstream &ss, const TrackerTopology *trackerTopo) const |
SiStripGain () | |
SiStripGain (const SiStripGain &)=delete | |
SiStripGain (const SiStripApvGain &apvgain, const double &factor) | |
Kept for compatibility. More... | |
SiStripGain (const SiStripApvGain &apvgain, const double &factor, const std::pair< std::string, std::string > &recordLabelPair) | |
Static Public Member Functions | |
static float | getApvGain (const uint16_t &apv, const SiStripApvGain::Range &range) |
static float | getStripGain (const uint16_t &strip, const SiStripApvGain::Range &range) |
Private Member Functions | |
void | fillNewGain (const SiStripApvGain *apvgain, const double &factor, const SiStripApvGain *apvgain2=0, const double &factor2=1.) |
Private Attributes | |
const SiStripApvGain * | apvgain_ |
std::unique_ptr< SiStripApvGain > | apvgainAutoPtr_ |
std::vector< const SiStripApvGain * > | apvgainVector_ |
std::vector< double > | normVector_ |
std::vector< std::pair< std::string, std::string > > | recordLabelPair_ |
CalibFormats/SiStripObjects/interface/SiStripGain.h
Description: give detector view for the cabling classes
Usage: <usage>
Original Author: gbruno Created: Wed Mar 22 12:24:20 CET 2006
Modifications by M. De Mattia (demat) on 11/11/2009: It now holds a std::vector of pointers to ApvGain and a std::vector of corresponding normalization factors. tia@ pd.in fn.i t
It returns the product of all the Gain/norm ratios.
The multiply method allows to input additional gain records.
ATTENTION: the code assumes that the second tag has at least the same DetIds that the first tag and only the DetIds present in the first tag will be used.
There are two set of methods to access the gain value. The first one returns the products of all ApvGain/norm. The second set of methods take an additional integer paramter and return the corresponding ApvGain (without normalization). Note that no check is done inside these methods to see if the ApvGain really exists. It is responsibility of the user to not pass an index value that exceeds the number of ApvGains.
The normalization factors for each of the stored ApvGains are also accessible passing the corresponding index.
Additional method are provided to get the number of ApvGains used to build this object, the names of the records that stored those ApvGains and the labels (they can be used to go back to the tags looking in the cfg).
Definition at line 44 of file SiStripGain.h.
|
inline |
|
delete |
|
inline |
Kept for compatibility.
Definition at line 51 of file SiStripGain.h.
References multiply().
|
inline |
Definition at line 55 of file SiStripGain.h.
References multiply().
|
private |
Definition at line 39 of file SiStripGain.cc.
References apvgain_, apvgainAutoPtr_, edm::FileInPath::fullPath(), SiStripApvGain::getApvGain(), SiStripApvGain::getDetIds(), SiStripApvGain::getRange(), estimatePileup::inputRange, SiStripApvGain::put(), and matplotRender::reader.
Referenced by getTagNorm(), and multiply().
|
inlinestatic |
Definition at line 76 of file SiStripGain.h.
References SiStripApvGain::getApvGain(), getDetIds(), getRange(), getStripGain(), and digitizers_cfi::strip.
Referenced by SiStripGainFromCalibTree::algoBeginRun(), SiStripApvGainReader::analyze(), SiStripApvGainRescaler::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripGainsPCLHarvester::beginRun(), SiStripGainsPCLWorker::dqmBeginRun(), getApvGain(), printDebug(), printSummary(), and ShallowGainCalibration::produce().
float SiStripGain::getApvGain | ( | const uint16_t & | apv, |
const SiStripApvGain::Range & | range, | ||
const uint32_t | index | ||
) | const |
Definition at line 94 of file SiStripGain.cc.
References apvgainVector_, getApvGain(), and normVector_.
void SiStripGain::getDetIds | ( | std::vector< uint32_t > & | DetIds_ | ) | const |
ATTENTION: we assume the detIds are the same as those from the first gain.
Definition at line 102 of file SiStripGain.cc.
References apvgain_, and SiStripApvGain::getDetIds().
Referenced by SiStripApvGainReader::analyze(), SiStripApvGainRescaler::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), getApvGain(), StripClusterizerAlgorithm::initialize(), printDebug(), and printSummary().
|
inline |
Definition at line 97 of file SiStripGain.h.
References recordLabelPair_.
|
inline |
Definition at line 95 of file SiStripGain.h.
References apvgainVector_.
Referenced by SiStripGainFromCalibTree::algoBeginRun(), SiStripGainsPCLHarvester::beginRun(), and SiStripGainsPCLWorker::dqmBeginRun().
|
inline |
Definition at line 71 of file SiStripGain.h.
References apvgain_, and SiStripApvGain::getRange().
Referenced by SiStripGainFromData::algoBeginRun(), SiStripGainFromCalibTree::algoBeginRun(), SiStripApvGainReader::analyze(), SiStripMonitorCluster::analyze(), SiStripApvGainRescaler::analyze(), SiStripChannelGainFromDBMiscalibrator::analyze(), SiStripGainsPCLHarvester::beginRun(), SiStripMonitorTrack::clusterInfos(), SiStripProcessedRawDigiProducer::common_process(), SiTrivialDigitalConverter::convert(), SiTrivialDigitalConverter::convertRaw(), SiStripDigitizerAlgorithm::digitize(), SiStripGainsPCLWorker::dqmBeginRun(), StripClusterizerAlgorithm::findDetId(), getApvGain(), printDebug(), printSummary(), ShallowGainCalibration::produce(), PreMixingSiStripWorker::put(), DigiSimLinkAlgorithm::run(), SiStripClusterToDigiProducer::setDetId(), SiStripClusterInfo::stripGains(), and SiStripClusterInfo::stripNoisesRescaledByGain().
const SiStripApvGain::Range SiStripGain::getRange | ( | const uint32_t & | detID, |
const uint32_t | index | ||
) | const |
The second parameter allows to specify which gain to retrieve, considering that they are in input order. NOTE that no protection is inside the method (because we want to keep it very light) therefore it is the caller duty to check that the index is in the correct range.
Definition at line 107 of file SiStripGain.cc.
References apvgainVector_.
|
inline |
Definition at line 72 of file SiStripGain.h.
References apvgain_, and SiStripApvGain::getRangeByPos().
Referenced by StripClusterizerAlgorithm::findDetId().
|
inline |
Definition at line 96 of file SiStripGain.h.
References recordLabelPair_.
|
inlinestatic |
Definition at line 73 of file SiStripGain.h.
References SiStripApvGain::getStripGain().
Referenced by SiStripMonitorCluster::analyze(), SiStripMonitorTrack::clusterInfos(), SiStripProcessedRawDigiProducer::common_process(), SiTrivialDigitalConverter::convert(), SiTrivialDigitalConverter::convertRaw(), SiStripDigitizerAlgorithm::digitize(), StripClusterizerAlgorithm::Det::gain(), SiStripClusterToDigiProducer::gain(), getApvGain(), getStripGain(), PreMixingSiStripWorker::put(), DigiSimLinkAlgorithm::run(), SiStripClusterInfo::stripGains(), and SiStripClusterInfo::stripNoisesRescaledByGain().
float SiStripGain::getStripGain | ( | const uint16_t & | strip, |
const SiStripApvGain::Range & | range, | ||
const uint32_t | index | ||
) | const |
Definition at line 86 of file SiStripGain.cc.
References apvgainVector_, and getStripGain().
|
inline |
Definition at line 98 of file SiStripGain.h.
References fillNewGain(), normVector_, printDebug(), and printSummary().
void SiStripGain::multiply | ( | const SiStripApvGain & | apvgain, |
const double & | factor, | ||
const std::pair< std::string, std::string > & | recordLabelPair | ||
) |
Used to input additional gain values that will be multiplied to the first one
Definition at line 17 of file SiStripGain.cc.
References apvgain_, apvgainVector_, fillNewGain(), normVector_, and recordLabelPair_.
Referenced by SiStripGain(), and SiStripGainESProducerTemplate< TDependentRecord, TInputRecord >::SiStripGainNormalizationFunction().
|
delete |
Referenced by SiStripGain().
void SiStripGain::printDebug | ( | std::stringstream & | ss, |
const TrackerTopology * | trackerTopo | ||
) | const |
Definition at line 111 of file SiStripGain.cc.
References getApvGain(), getDetIds(), and getRange().
Referenced by getTagNorm().
void SiStripGain::printSummary | ( | std::stringstream & | ss, |
const TrackerTopology * | trackerTopo | ||
) | const |
Definition at line 127 of file SiStripGain.cc.
References getApvGain(), getDetIds(), and getRange().
Referenced by getTagNorm().
|
private |
Definition at line 113 of file SiStripGain.h.
Referenced by fillNewGain(), getDetIds(), getRange(), getRangeByPos(), and multiply().
|
private |
Definition at line 114 of file SiStripGain.h.
Referenced by fillNewGain().
|
private |
Definition at line 111 of file SiStripGain.h.
Referenced by getApvGain(), getNumberOfTags(), getRange(), getStripGain(), and multiply().
|
private |
Definition at line 112 of file SiStripGain.h.
Referenced by getApvGain(), getTagNorm(), and multiply().
|
private |
Definition at line 115 of file SiStripGain.h.
Referenced by getLabelName(), getRcdName(), and multiply().