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;
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;
126 pedSubtrDetSetData.push_back(
SiStripRawDigi(static_cast<uint16_t>(lVal)));
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;
const Range getRange(const uint32_t &detID) const
void push_back(const T &t)
void allNoises(std::vector< float > &noises, const Range &range) const
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)
void printPeds(std::ostream &aOs)
A signed Digi for the silicon strip detector, containing only adc information, and suitable for stori...
static const char *const messageLabel_
void fillPeds(const edm::DetSetVector< SiStripRawDigi >::const_iterator &peds)
void allPeds(std::vector< int > &pefs, const Range &range) const
std::pair< ContainerIterator, ContainerIterator > Range
Log< level::Error, false > LogError
void retrieveNoises(const edm::ESHandle< SiStripNoises > &aHandle)
std::vector< float > noises_
void fillMedians(const std::map< uint32_t, std::vector< uint32_t > >::const_iterator &meds)
void initialiseModule(const uint32_t aDetId, const uint32_t aNPairs, const uint32_t aPair)
std::vector< int > pedestals_
void subtractCM(const std::vector< SiStripRawDigi > &pedSubtrDetSetData, std::vector< SiStripRawDigi > &cmSubtrDetSetData)
iterator end()
Return the off-the-end iterator.
Log< level::Info, false > LogInfo
static const uint16_t STRIPS_PER_FEDCH
void initialise(const bool byModule)
void zeroSuppress(const std::vector< SiStripRawDigi > &cmSubtrDetSetData, edm::DetSet< SiStripDigi > &zsDetSetData, const std::unique_ptr< SiStripRawProcessingAlgorithms > &algorithms)
void printNoises(std::ostream &aOs)
void print(std::ostream &aOs)
void printMeds(std::ostream &aOs)
const Range getRange(const uint32_t detID) const
std::vector< uint32_t > medians_
static const uint16_t STRIPS_PER_APV
iterator begin()
Return an iterator to the first DetSet.
void retrievePedestals(const edm::ESHandle< SiStripPedestals > &aHandle)
Log< level::Warning, false > LogWarning
std::pair< ContainerIterator, ContainerIterator > Range
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
void fillNoises(const edm::DetSetVector< SiStripProcessedRawDigi >::const_iterator &noise)