|
|
Go to the documentation of this file.
66 <<
" detId = " <<
detId_ << std::endl
78 <<
" detId = " <<
detId_ << std::endl
85 std::vector<SiStripRawDigi>& pedsDetSetData,
86 std::vector<SiStripProcessedRawDigi>& noiseDetSetData,
87 std::vector<SiStripRawDigi>& pedSubtrDetSetData,
88 std::vector<uint32_t>& medsDetSetData,
89 const bool fillApvsForCM) {
93 std::vector<std::vector<uint16_t> > apvs;
102 std::vector<uint16_t> apvVec;
107 uint16_t ped = static_cast<uint16_t>(
pedestals_[st]);
113 if (digi_it == inputChannel->
end()) {
115 << lCount <<
" strips." << std::endl;
119 int lVal = digi_it->adc() - ped;
121 if (digi_it->adc() > 0)
123 << st <<
", digi = " << digi_it->adc() <<
", ped = " << ped << std::endl;
129 apvVec.push_back(static_cast<uint16_t>(lVal));
145 if (apvs.size() !=
nPairs_ * 2) {
147 <<
"! Processed " << apvs.size() <<
" APVs." << std::endl;
151 for (uint32_t iapv(0); iapv < apvs.size(); iapv++) {
152 std::vector<uint16_t> lVec = apvs[iapv];
154 std::vector<uint16_t>::iterator mid = lVec.begin() + (lVec.size() / 2 - 1);
155 std::nth_element(lVec.begin(), mid, lVec.end());
163 medsDetSetData.push_back(*mid);
170 std::vector<SiStripRawDigi>& cmSubtrDetSetData) {
172 std::vector<SiStripRawDigi>::const_iterator lDigi = pedSubtrDetSetData.begin();
192 const std::unique_ptr<SiStripRawProcessingAlgorithms>&
algorithms) {
194 std::vector<int16_t> cmSubtrRawDigis;
196 cmSubtrDetSetData.end(),
197 back_inserter(cmSubtrRawDigis),
199 algorithms->suppressor->suppress(cmSubtrRawDigis, 0, zsDetSetData);
211 noises_.push_back(iApv->adc());
216 std::vector<uint32_t>::const_iterator iApv = (meds->second).begin();
217 for (; iApv != (meds->second).
end(); ++iApv) {
223 aOs <<
"===============================" << std::endl
224 <<
" ===== FEDEmulator::print =====" << std::endl
225 <<
" === byModule = " <<
byModule_ << std::endl
226 <<
" === minStrip = " <<
minStrip_ << std::endl
227 <<
" === maxStrip = " <<
maxStrip_ << std::endl
228 <<
" === size of pedestals = " <<
pedestals_.size() << std::endl
229 <<
" === size of noises = " <<
noises_.size() << std::endl
230 <<
" === size of medians = " <<
medians_.size() << std::endl
231 <<
" === detId = " <<
detId_ << std::endl
232 <<
" === nPairs = " <<
nPairs_ << std::endl
233 <<
" === pair = " <<
pair_ << std::endl
234 <<
"===============================" << std::endl;
238 aOs <<
"=========================================" << std::endl
239 <<
" ===== FEDEmulator::printPedestals =====" << std::endl;
245 aOs <<
"=========================================" << std::endl;
249 aOs <<
"=========================================" << std::endl
250 <<
" ===== FEDEmulator::printNoises =====" << std::endl;
251 for (
unsigned int i(0);
i <
noises_.size();
i++) {
256 aOs <<
"=========================================" << std::endl;
260 aOs <<
"=========================================" << std::endl
261 <<
" ===== FEDEmulator::printMedians =====" << std::endl;
262 for (
unsigned int i(0);
i <
medians_.size();
i++) {
267 aOs <<
"=========================================" << std::endl;
void push_back(const T &t)
void retrievePedestals(const edm::ESHandle< SiStripPedestals > &aHandle)
void subtractPedestals(const edm::DetSetVector< SiStripRawDigi >::const_iterator &inputChannel, std::vector< SiStripRawDigi > &pedsDetSetData, std::vector< SiStripProcessedRawDigi > &noiseDetSetData, std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< uint32_t > &medsDetSetData, const bool fillApvsForCM)
iterator end()
Return the off-the-end iterator.
void fillPeds(const edm::DetSetVector< SiStripRawDigi >::const_iterator &peds)
std::pair< ContainerIterator, ContainerIterator > Range
iterator begin()
Return an iterator to the first DetSet.
void printNoises(std::ostream &aOs)
Log< level::Info, false > LogInfo
const Range getRange(const uint32_t detID) const
Log< level::Warning, false > LogWarning
void initialiseModule(const uint32_t aDetId, const uint32_t aNPairs, const uint32_t aPair)
void subtractCM(const std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< SiStripRawDigi > &cmSubtrDetSetData)
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
void printMeds(std::ostream &aOs)
std::pair< ContainerIterator, ContainerIterator > Range
void print(std::ostream &aOs)
void zeroSuppress(const std::vector< SiStripRawDigi > &cmSubtrDetSetData, edm::DetSet< SiStripDigi > &zsDetSetData, const std::unique_ptr< SiStripRawProcessingAlgorithms > &algorithms)
std::vector< float > noises_
static const char * messageLabel_
void allPeds(std::vector< int > &pefs, const Range &range) const
const Range getRange(const uint32_t &detID) const
void initialise(const bool byModule)
std::vector< int > pedestals_
collection_type::const_iterator const_iterator
static const uint16_t STRIPS_PER_FEDCH
void retrieveNoises(const edm::ESHandle< SiStripNoises > &aHandle)
Log< level::Error, false > LogError
void fillNoises(const edm::DetSetVector< SiStripProcessedRawDigi >::const_iterator &noise)
static const uint16_t STRIPS_PER_APV
void allNoises(std::vector< float > &noises, const Range &range) const
void printPeds(std::ostream &aOs)
void fillMedians(const std::map< uint32_t, std::vector< uint32_t > >::const_iterator &meds)
A signed Digi for the silicon strip detector, containing only adc information, and suitable for stori...
std::vector< uint32_t > medians_
collection_type::const_iterator const_iterator