17 <<
" Constructing object...";
33 <<
" Destructing object...";
102 <<
" " <<
nstrips_ <<
" digis expected, but got " <<
nbins <<
". Skipping.";
107 static int32_t firstev =
summary.event();
111 if (static_cast<int32_t>(
summary.event()) - firstev <
nskip_) {
117 <<
" Done skipping events. Now starting pedestals.";
125 for (uint16_t istrip = 0; istrip <
nstrips_; ++istrip) {
134 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
135 for (uint16_t ibin = 0; ibin < 128; ++ibin) {
136 uint16_t istrip = (iapv * 128) + ibin;
146 <<
" Rough pedestals done. Now starting noise measurements.";
153 std::vector<int32_t> cm;
155 std::vector<uint16_t>
adc;
156 for (uint16_t iapv = 0; iapv < 2; iapv++) {
159 for (uint16_t ibin = 0; ibin < 128; ibin++) {
160 if ((iapv * 128) + ibin <
nbins) {
161 adc.push_back(digis.
data.at((iapv * 128) + ibin).adc());
166 uint16_t
index =
adc.size() % 2 ?
adc.size() / 2 :
adc.size() / 2 - 1;
167 cm[iapv] =
static_cast<int16_t
>(
adc[
index]);
170 for (uint16_t istrip = 0; istrip <
nstrips_; ++istrip) {
172 int16_t noiseval =
static_cast<int16_t
>(digis.
data.at(istrip).adc()) - cm[istrip / 128];
178 std::vector<int16_t> noisevals, noisevalssorted;
179 std::vector<float> noisevalsfl, noisevalssortedfl;
180 for (uint16_t iapv = 0; iapv < 2; ++iapv) {
184 noisevalssorted.clear();
185 noisevalssortedfl.clear();
186 for (uint16_t ibin = 0; ibin < 128; ++ibin) {
187 uint16_t istrip = (iapv * 128) + ibin;
190 noisevalsfl.push_back(static_cast<float>(digis.
data.at(istrip).adc()) -
pedsfl_.at(istrip));
193 totadc += noisevalsfl[ibin];
195 noisevalssortedfl.push_back(noisevalsfl[ibin]);
198 noisevals.push_back(static_cast<int16_t>(digis.
data.at(istrip).adc()) -
peds_.at(istrip));
201 totadc += noisevals[ibin];
203 noisevalssorted.push_back(noisevals[ibin]);
211 cmshift = totadc / 128;
213 cmshift =
static_cast<int16_t
>(totadc / 128);
218 sort(noisevalssortedfl.begin(), noisevalssortedfl.end());
219 uint16_t
index = noisevalssortedfl.size() % 2 ? noisevalssortedfl.size() / 2 : noisevalssortedfl.size() / 2 - 1;
220 cmshift = noisevalssortedfl[
index];
223 sort(noisevalssorted.begin(), noisevalssorted.end());
224 uint16_t
index = noisevalssorted.size() % 2 ? noisevalssorted.size() / 2 : noisevalssorted.size() / 2 - 1;
225 cmshift = noisevalssorted[
index];
229 for (uint16_t ibin = 0; ibin < 128; ++ibin) {
230 uint16_t istrip = (iapv * 128) + ibin;
232 float noiseval = (
usefloatpeds_ ? noisevalsfl[ibin] : noisevals[ibin]) - cmshift;
234 uint32_t binnr =
hist2d_->GetBin(static_cast<int>(noiseval +
nadcnoise_), istrip + 1);
std::vector< float > vNumOfEntries_
Utility class that holds histogram title.
static const char mlDqmSource_[]
std::vector< float > vSumOfContents_
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
Class containning control, module, detector and connection information, at the level of a FED channel...
static void setBinContent(TProfile *const profile, const uint32_t &bin, const double &entries, const double &mean, const double &spread)
const uint32_t & fedKey() const
void histo(MonitorElement *)
DQMStore *const dqm() const
int extract(std::vector< int > *output, const std::string &dati)
CompactHistoSet noisehist_
std::vector< int16_t > peds_
PedsFullNoiseTask(DQMStore *dqm, const FedChannelConnection &conn, const edm::ParameterSet &pset)
void histo(MonitorElement *)
~PedsFullNoiseTask() override
std::vector< double > vSumOfSquares_
const std::string & title() const
std::vector< short > vNumOfEntries_
const FedChannelConnection & connection() const
Log< level::Warning, false > LogWarning
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
uint16_t *__restrict__ uint16_t const *__restrict__ adc
std::vector< float > pedsfl_