33 #include <boost/tokenizer.hpp> 38 #include "TGraphErrors.h" 45 #include "TPaveStats.h" 54 SiStripNoiseContainer(
const std::shared_ptr<SiStripNoises>&
payload,
58 payloadType_ =
"SiStripNoises";
62 void storeAllValues()
override {
63 std::vector<uint32_t> detid;
64 payload_->getDetIds(detid);
66 for (
const auto&
d : detid) {
70 SiStripCondData_.fillByPushBack(
d, payload_->getNoise(
it,
range));
76 class SiStripNoiseCompareByPartition :
public PlotImage<SiStripNoises, MULTI_IOV, 2> {
80 bool fill()
override {
82 auto theIOVs = PlotBase::getTag<0>().iovs;
83 auto tagname1 = PlotBase::getTag<0>().
name;
84 auto tag2iovs = PlotBase::getTag<1>().iovs;
85 auto tagname2 = PlotBase::getTag<1>().
name;
89 std::shared_ptr<SiStripNoises> last_payload = fetchPayload(std::get<1>(lastiov));
90 std::shared_ptr<SiStripNoises> first_payload = fetchPayload(std::get<1>(firstiov));
92 SiStripNoiseContainer* l_objContainer =
new SiStripNoiseContainer(last_payload, lastiov, tagname1);
93 SiStripNoiseContainer* f_objContainer =
new SiStripNoiseContainer(first_payload, firstiov, tagname2);
95 l_objContainer->compare(f_objContainer);
99 TCanvas
canvas(
"Partition summary",
"partition summary", 1400, 1000);
100 l_objContainer->fillByPartition(
canvas, 100, 0.1, 10.);
109 class SiStripNoiseDiffByPartition :
public PlotImage<SiStripNoises, MULTI_IOV, 2> {
113 bool fill()
override {
115 auto theIOVs = PlotBase::getTag<0>().iovs;
116 auto tagname1 = PlotBase::getTag<0>().
name;
117 auto tag2iovs = PlotBase::getTag<1>().iovs;
118 auto tagname2 = PlotBase::getTag<1>().
name;
122 std::shared_ptr<SiStripNoises> last_payload = fetchPayload(std::get<1>(lastiov));
123 std::shared_ptr<SiStripNoises> first_payload = fetchPayload(std::get<1>(firstiov));
125 SiStripNoiseContainer* l_objContainer =
new SiStripNoiseContainer(last_payload, lastiov, tagname1);
126 SiStripNoiseContainer* f_objContainer =
new SiStripNoiseContainer(first_payload, firstiov, tagname2);
128 l_objContainer->subtract(f_objContainer);
132 TCanvas
canvas(
"Partition summary",
"partition summary", 1400, 1000);
133 l_objContainer->fillByPartition(
canvas, 100, -1., 1.);
142 class SiStripNoiseCorrelationByPartition :
public PlotImage<SiStripNoises> {
144 SiStripNoiseCorrelationByPartition() :
PlotImage<
SiStripNoises>(
"SiStrip Noises Correlation By Partition") {
148 bool fill(
const std::vector<SiStripPI::MetaData>& iovs)
override {
149 std::vector<SiStripPI::MetaData> sorted_iovs = iovs;
153 return std::get<0>(
t1) < std::get<0>(
t2);
156 auto firstiov = sorted_iovs.front();
157 auto lastiov = sorted_iovs.back();
159 std::shared_ptr<SiStripNoises> last_payload = fetchPayload(std::get<1>(lastiov));
160 std::shared_ptr<SiStripNoises> first_payload = fetchPayload(std::get<1>(firstiov));
162 SiStripNoiseContainer* l_objContainer =
new SiStripNoiseContainer(last_payload, lastiov,
"");
163 SiStripNoiseContainer* f_objContainer =
new SiStripNoiseContainer(first_payload, firstiov,
"");
165 l_objContainer->compare(f_objContainer);
167 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1200);
168 l_objContainer->fillCorrelationByPartition(
canvas, 100, 0.1, 10.);
177 class SiStripNoiseConsistencyCheck :
public PlotImage<SiStripNoises> {
183 bool fill(
const std::vector<SiStripPI::MetaData>& iovs)
override {
184 std::vector<SiStripPI::MetaData> sorted_iovs = iovs;
188 return std::get<0>(
t1) < std::get<0>(
t2);
191 auto firstiov = sorted_iovs.front();
192 auto lastiov = sorted_iovs.back();
194 std::shared_ptr<SiStripNoises> last_payload = fetchPayload(std::get<1>(lastiov));
195 std::shared_ptr<SiStripNoises> first_payload = fetchPayload(std::get<1>(firstiov));
197 SiStripNoiseContainer* f_objContainer =
new SiStripNoiseContainer(first_payload, firstiov,
"");
198 SiStripNoiseContainer* l_objContainer =
new SiStripNoiseContainer(last_payload, lastiov,
"");
200 f_objContainer->compare(l_objContainer);
204 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
220 class SiStripNoisesTest :
public Histogram1D<SiStripNoises, SINGLE_IOV> {
227 bool fill()
override {
228 auto tag = PlotBase::getTag<0>();
229 for (
auto const& iov :
tag.iovs) {
230 std::shared_ptr<SiStripNoises>
payload = Base::fetchPayload(std::get<1>(iov));
234 std::stringstream
ss;
235 ss <<
"Summary of strips noises:" << std::endl;
238 payload->printSummary(
ss, &m_trackerTopo);
240 std::vector<uint32_t> detid;
267 class SiStripNoisePerDetId :
public PlotImage<SiStripNoises, SINGLE_IOV> {
273 bool fill()
override {
274 auto tag = PlotBase::getTag<0>();
275 auto iov =
tag.iovs.front();
277 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
279 std::vector<uint32_t> the_detids = {};
282 auto ip = paramValues.find(
"DetIds");
283 if (ip != paramValues.end()) {
284 auto input = ip->second;
285 typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
286 boost::char_separator<char> sep{
","};
287 tokenizer tok{
input, sep};
288 for (
const auto&
t : tok) {
289 the_detids.push_back(atoi(
t.c_str()));
293 <<
"\n WARNING!!!! \n The needed parameter DetIds has not been passed. Will use all Strip DetIds! \n\n";
294 the_detids.push_back(0xFFFFFFFF);
297 size_t ndets = the_detids.size();
298 std::vector<std::shared_ptr<TH1F>> hnoise;
299 std::vector<std::shared_ptr<TLegend>>
legends;
300 std::vector<unsigned int> v_nAPVs;
301 std::vector<std::vector<std::shared_ptr<TLine>>>
lines;
302 hnoise.reserve(ndets);
306 auto sides = getClosestFactors(the_detids.size());
307 edm::LogPrint(
"SiStripNoisePerDetId") <<
"Aspect ratio: " << sides.first <<
":" << sides.second << std::endl;
311 TCanvas
canvas(
"ByDetId",
"ByDetId", sides.second * 800, sides.first * 600);
312 canvas.Divide(sides.second, sides.first);
315 for (
const auto& the_detid : the_detids) {
316 edm::LogPrint(
"SiStripNoisePerDetId") <<
"DetId:" << the_detid << std::endl;
318 unsigned int nAPVs = detInfo.getNumberOfApvsAndStripLength(the_detid).first;
321 v_nAPVs.push_back(nAPVs);
324 std::make_shared<TH1F>(Form(
"Noise profile_%s",
std::to_string(the_detid).c_str()),
325 Form(
"SiStrip Noise profile for DetId: %s;Strip number;SiStrip Noise [ADC counts]",
331 histo->SetStats(
false);
334 if (the_detid != 0xFFFFFFFF) {
337 auto allDetIds = detInfo.getAllDetIds();
338 for (
const auto&
id : allDetIds) {
344 histo->GetYaxis()->SetTitleOffset(1.0);
345 hnoise.push_back(
histo);
354 hnoise.at(
index)->Draw();
355 hnoise.at(
index)->GetYaxis()->SetRangeUser(0, hnoise.at(
index)->GetMaximum() * 1.2);
358 std::vector<int> boundaries;
359 for (
size_t b = 0;
b < v_nAPVs.at(
index);
b++) {
363 std::vector<std::shared_ptr<TLine>> linesVec;
364 for (
const auto& bound : boundaries) {
365 auto line = std::make_shared<TLine>(hnoise.at(
index)->GetBinLowEdge(bound),
367 hnoise.at(
index)->GetBinLowEdge(bound),
369 line->SetLineWidth(1);
370 line->SetLineStyle(9);
371 line->SetLineColor(2);
372 linesVec.push_back(
line);
374 lines.push_back(linesVec);
384 ltx.SetTextSize(0.05);
385 ltx.SetTextAlign(11);
386 ltx.DrawLatexNDC(gPad->GetLeftMargin(),
387 1 - gPad->GetTopMargin() + 0.01,
390 legends.push_back(std::make_shared<TLegend>(0.55, 0.83, 0.95, 0.93));
405 int nextPerfectSquare(
int N) {
return std::floor(
sqrt(
N)) + 1; }
407 std::pair<int, int> getClosestFactors(
int input) {
413 while (
input % testNum != 0) {
416 return std::make_pair(testNum,
input / testNum);
419 void fillHisto(
const std::shared_ptr<SiStripNoises>
payload, std::shared_ptr<TH1F>&
histo, uint32_t the_detid) {
435 class SiStripNoiseValue :
public Histogram1D<SiStripNoises, SINGLE_IOV> {
440 bool fill()
override {
441 auto tag = PlotBase::getTag<0>();
442 for (
auto const& iov :
tag.iovs) {
443 std::shared_ptr<SiStripNoises>
payload = Base::fetchPayload(std::get<1>(iov));
445 std::vector<uint32_t> detid;
448 for (
const auto&
d : detid) {
453 fillWithValue(
noise);
467 class SiStripNoiseValuePerDetId :
public Histogram1D<SiStripNoises, SINGLE_IOV> {
469 SiStripNoiseValuePerDetId()
471 "SiStrip Noise values per DetId",
"SiStrip Noise values per DetId", 100, 0.0, 10.0) {
475 bool fill()
override {
476 auto tag = PlotBase::getTag<0>();
477 for (
auto const& iov :
tag.iovs) {
478 std::shared_ptr<SiStripNoises>
payload = Base::fetchPayload(std::get<1>(iov));
479 unsigned int the_detid(0xFFFFFFFF);
481 auto ip = paramValues.find(
"DetId");
482 if (ip != paramValues.end()) {
483 the_detid = std::stoul(ip->second);
491 fillWithValue(
noise);
504 template <SiStripPI::OpMode op_mode_>
505 class SiStripNoiseDistribution :
public PlotImage<SiStripNoises, SINGLE_IOV> {
509 bool fill()
override {
510 auto tag = PlotBase::getTag<0>();
511 auto iov =
tag.iovs.front();
513 TGaxis::SetMaxDigits(3);
514 gStyle->SetOptStat(
"emr");
516 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
521 Form(
"#LT Strip Noise #GT per %s for IOV [%s];#LTStrip Noise per %s#GT [ADC counts];n. %ss",
522 opType(op_mode_).c_str(),
524 opType(op_mode_).c_str(),
525 opType(op_mode_).c_str()),
530 unsigned int prev_det = 0, prev_apv = 0;
533 std::vector<uint32_t> detids;
538 for (
const auto&
d : detids) {
541 unsigned int istrip = 0;
551 flush = (prev_det != 0 && prev_det !=
d);
554 flush = (istrip != 0);
559 mon1D->Fill(prev_apv, prev_det, enoise.
mean());
563 enoise.
add(std::min<float>(
noise, 30.5));
571 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
573 canvas.SetBottomMargin(0.11);
574 canvas.SetTopMargin(0.07);
575 canvas.SetLeftMargin(0.13);
576 canvas.SetRightMargin(0.05);
579 auto hist = mon1D->getHist();
581 hist.SetStats(kTRUE);
582 hist.SetFillColorAlpha(kRed, 0.35);
587 TPaveStats* st = (TPaveStats*)
hist.GetListOfFunctions()->FindObject(
"stats");
588 st->SetLineColor(kRed);
589 st->SetTextColor(kRed);
595 TLegend
legend = TLegend(0.13, 0.83, 0.43, 0.93);
596 legend.SetHeader(Form(
"SiStrip Noise values per %s", opType(op_mode_).c_str()),
599 legend.SetTextSize(0.025);
614 typedef SiStripNoiseDistribution<SiStripPI::STRIP_BASED> SiStripNoiseValuePerStrip;
615 typedef SiStripNoiseDistribution<SiStripPI::APV_BASED> SiStripNoiseValuePerAPV;
616 typedef SiStripNoiseDistribution<SiStripPI::MODULE_BASED> SiStripNoiseValuePerModule;
623 template <SiStripPI::OpMode op_mode_,
int ntags, IOVMultiplicity nIOVs>
624 class SiStripNoiseDistributionComparisonBase :
public PlotImage<SiStripNoises, nIOVs, ntags> {
626 SiStripNoiseDistributionComparisonBase()
629 bool fill()
override {
630 TGaxis::SetExponentOffset(-0.1, 0.01,
"y");
633 auto theIOVs = PlotBase::getTag<0>().iovs;
634 auto tagname1 = PlotBase::getTag<0>().
name;
636 auto firstiov = theIOVs.front();
640 assert(this->m_plotAnnotations.ntags < 3);
642 if (this->m_plotAnnotations.ntags == 2) {
643 auto tag2iovs = PlotBase::getTag<1>().iovs;
644 tagname2 = PlotBase::getTag<1>().
name;
645 lastiov = tag2iovs.front();
647 lastiov = theIOVs.back();
650 std::shared_ptr<SiStripNoises> f_payload = this->fetchPayload(std::get<1>(firstiov));
651 std::shared_ptr<SiStripNoises> l_payload = this->fetchPayload(std::get<1>(lastiov));
656 Form(
";#LTStrip Noise per %s#GT [ADC counts];n. %ss", opType(op_mode_).c_str(), opType(op_mode_).c_str()),
664 Form(
";#LTStrip Noise per %s#GT [ADC counts];n. %ss", opType(op_mode_).c_str(), opType(op_mode_).c_str()),
669 unsigned int prev_det = 0, prev_apv = 0;
672 std::vector<uint32_t> f_detid;
673 f_payload->getDetIds(f_detid);
676 for (
const auto&
d : f_detid) {
679 unsigned int istrip = 0;
690 flush = (prev_det != 0 && prev_det !=
d);
693 flush = (istrip != 0);
698 f_mon->Fill(prev_apv, prev_det, enoise.
mean());
701 enoise.
add(std::min<float>(
noise, 30.5));
708 prev_det = 0, prev_apv = 0;
711 std::vector<uint32_t> l_detid;
712 l_payload->getDetIds(l_detid);
716 for (
const auto&
d : l_detid) {
719 unsigned int istrip = 0;
729 flush = (prev_det != 0 && prev_det !=
d);
732 flush = (istrip != 0);
737 l_mon->Fill(prev_apv, prev_det, enoise.
mean());
741 enoise.
add(std::min<float>(
noise, 30.5));
748 auto h_first = f_mon->getHist();
749 h_first.SetStats(kFALSE);
750 auto h_last = l_mon->getHist();
751 h_last.SetStats(kFALSE);
756 h_first.GetYaxis()->CenterTitle(
true);
757 h_last.GetYaxis()->CenterTitle(
true);
759 h_first.GetXaxis()->CenterTitle(
true);
760 h_last.GetXaxis()->CenterTitle(
true);
762 h_first.SetLineWidth(2);
763 h_last.SetLineWidth(2);
765 h_first.SetLineColor(kBlack);
766 h_last.SetLineColor(kBlue);
769 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
771 canvas.SetTopMargin(0.06);
772 canvas.SetBottomMargin(0.10);
773 canvas.SetLeftMargin(0.13);
774 canvas.SetRightMargin(0.05);
777 float theMax = (h_first.GetMaximum() > h_last.GetMaximum()) ? h_first.GetMaximum() : h_last.GetMaximum();
779 h_first.SetMaximum(theMax * 1.20);
780 h_last.SetMaximum(theMax * 1.20);
783 h_last.SetFillColorAlpha(kBlue, 0.15);
786 TLegend
legend = TLegend(0.13, 0.83, 0.95, 0.94);
787 if (this->m_plotAnnotations.ntags == 2) {
788 legend.SetHeader(
"#bf{Two Tags Comparison}",
"C");
789 legend.AddEntry(&h_first, (tagname1 +
" : " +
std::to_string(std::get<0>(firstiov))).c_str(),
"F");
790 legend.AddEntry(&h_last, (tagname2 +
" : " +
std::to_string(std::get<0>(lastiov))).c_str(),
"F");
792 legend.SetHeader((
"tag: #bf{" + tagname1 +
"}").c_str(),
"C");
793 legend.AddEntry(&h_first, (
"IOV since: " +
std::to_string(std::get<0>(firstiov))).c_str(),
"F");
796 legend.SetTextSize(0.025);
801 ltx.SetTextSize(0.05);
802 ltx.SetTextAlign(11);
803 ltx.DrawLatexNDC(gPad->GetLeftMargin(),
804 1 - gPad->GetTopMargin() + 0.01,
805 Form(
"#LTSiStrip Noise#GT Comparison per %s", opType(op_mode_).c_str()));
819 template <SiStripPI::OpMode op_mode_>
820 using SiStripNoiseDistributionComparisonSingleTag = SiStripNoiseDistributionComparisonBase<op_mode_, 1, MULTI_IOV>;
822 template <SiStripPI::OpMode op_mode_>
823 using SiStripNoiseDistributionComparisonTwoTags = SiStripNoiseDistributionComparisonBase<op_mode_, 2, SINGLE_IOV>;
825 typedef SiStripNoiseDistributionComparisonSingleTag<SiStripPI::STRIP_BASED>
826 SiStripNoiseValueComparisonPerStripSingleTag;
827 typedef SiStripNoiseDistributionComparisonSingleTag<SiStripPI::APV_BASED> SiStripNoiseValueComparisonPerAPVSingleTag;
828 typedef SiStripNoiseDistributionComparisonSingleTag<SiStripPI::MODULE_BASED>
829 SiStripNoiseValueComparisonPerModuleSingleTag;
831 typedef SiStripNoiseDistributionComparisonTwoTags<SiStripPI::STRIP_BASED> SiStripNoiseValueComparisonPerStripTwoTags;
832 typedef SiStripNoiseDistributionComparisonTwoTags<SiStripPI::APV_BASED> SiStripNoiseValueComparisonPerAPVTwoTags;
833 typedef SiStripNoiseDistributionComparisonTwoTags<SiStripPI::MODULE_BASED> SiStripNoiseValueComparisonPerModuleTwoTags;
841 template <
int ntags, IOVMultiplicity nIOVs>
842 class SiStripNoiseValueComparisonBase :
public PlotImage<SiStripNoises, nIOVs, ntags> {
844 SiStripNoiseValueComparisonBase() :
PlotImage<
SiStripNoises, nIOVs, ntags>(
"SiStrip Noise values comparison") {}
846 bool fill()
override {
847 TGaxis::SetExponentOffset(-0.1, 0.01,
"y");
850 auto theIOVs = PlotBase::getTag<0>().iovs;
851 auto tagname1 = PlotBase::getTag<0>().
name;
853 auto firstiov = theIOVs.front();
857 assert(this->m_plotAnnotations.ntags < 3);
859 if (this->m_plotAnnotations.ntags == 2) {
860 auto tag2iovs = PlotBase::getTag<1>().iovs;
861 tagname2 = PlotBase::getTag<1>().
name;
862 lastiov = tag2iovs.front();
864 lastiov = theIOVs.back();
867 std::shared_ptr<SiStripNoises> f_payload = this->fetchPayload(std::get<1>(firstiov));
868 std::shared_ptr<SiStripNoises> l_payload = this->fetchPayload(std::get<1>(lastiov));
870 auto h_first = std::make_unique<TH1F>(
"f_Noise",
";Strip Noise [ADC counts];n. strips", 100, 0.1, 10.);
871 h_first->SetStats(
false);
873 auto h_last = std::make_unique<TH1F>(
"l_Noise",
";Strip Noise [ADC counts];n. strips", 100, 0.1, 10.);
874 h_last->SetStats(
false);
876 std::vector<uint32_t> f_detid;
877 f_payload->getDetIds(f_detid);
880 for (
const auto&
d : f_detid) {
885 h_first->Fill(
noise);
889 std::vector<uint32_t> l_detid;
890 l_payload->getDetIds(l_detid);
893 for (
const auto&
d : l_detid) {
905 h_first->GetYaxis()->CenterTitle(
true);
906 h_last->GetYaxis()->CenterTitle(
true);
908 h_first->GetXaxis()->CenterTitle(
true);
909 h_last->GetXaxis()->CenterTitle(
true);
911 h_first->SetLineWidth(2);
912 h_last->SetLineWidth(2);
914 h_first->SetLineColor(kBlack);
915 h_last->SetLineColor(kBlue);
918 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
920 canvas.SetTopMargin(0.06);
921 canvas.SetBottomMargin(0.10);
922 canvas.SetLeftMargin(0.13);
923 canvas.SetRightMargin(0.05);
926 float theMax = (h_first->GetMaximum() > h_last->GetMaximum()) ? h_first->GetMaximum() : h_last->GetMaximum();
928 h_first->SetMaximum(theMax * 1.20);
929 h_last->SetMaximum(theMax * 1.20);
932 h_last->SetFillColorAlpha(kBlue, 0.15);
933 h_last->Draw(
"same");
935 TLegend
legend = TLegend(0.13, 0.83, 0.95, 0.94);
936 if (this->m_plotAnnotations.ntags == 2) {
937 legend.SetHeader(
"#bf{Two Tags Comparison}",
"C");
938 legend.AddEntry(h_first.get(), (tagname1 +
" : " +
std::to_string(std::get<0>(firstiov))).c_str(),
"F");
939 legend.AddEntry(h_last.get(), (tagname2 +
" : " +
std::to_string(std::get<0>(lastiov))).c_str(),
"F");
941 legend.SetHeader((
"tag: #bf{" + tagname1 +
"}").c_str(),
"C");
942 legend.AddEntry(h_first.get(), (
"IOV since: " +
std::to_string(std::get<0>(firstiov))).c_str(),
"F");
943 legend.AddEntry(h_last.get(), (
"IOV since: " +
std::to_string(std::get<0>(lastiov))).c_str(),
"F");
945 legend.SetTextSize(0.025);
950 ltx.SetTextSize(0.05);
951 ltx.SetTextAlign(11);
952 ltx.DrawLatexNDC(gPad->GetLeftMargin(), 1 - gPad->GetTopMargin() + 0.01,
"SiStrip Noise Values Comparison");
961 using SiStripNoiseValueComparisonSingleTag = SiStripNoiseValueComparisonBase<1, MULTI_IOV>;
962 using SiStripNoiseValueComparisonTwoTags = SiStripNoiseValueComparisonBase<2, SINGLE_IOV>;
968 template <SiStripPI::estimator est>
969 class SiStripNoiseTrackerMap :
public PlotImage<SiStripNoises, SINGLE_IOV> {
971 SiStripNoiseTrackerMap()
974 bool fill()
override {
975 auto tag = PlotBase::getTag<0>();
976 auto iov =
tag.iovs.front();
977 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
980 "Tracker Map of Noise " +
estimatorType(est) +
" per module (payload : " + std::get<1>(iov) +
")";
982 std::unique_ptr<TrackerMap> tmap = std::make_unique<TrackerMap>(
"SiStripNoises");
983 tmap->setTitle(titleMap);
987 std::map<unsigned int, float> info_per_detid;
991 std::vector<float> vstripnoise;
993 for (; rit != erit; ++rit) {
995 (rit->iend - rit->ibegin) * 8 / 9;
996 vstripnoise.resize(Nstrips);
999 make_pair(
payload->getDataVectorBegin() + rit->ibegin,
payload->getDataVectorBegin() + rit->iend));
1007 for (
size_t i = 0;
i < Nstrips; ++
i) {
1008 mean += vstripnoise[
i];
1009 rms += vstripnoise[
i] * vstripnoise[
i];
1010 if (vstripnoise[
i] <
min)
1011 min = vstripnoise[
i];
1012 if (vstripnoise[
i] >
max)
1013 max = vstripnoise[
i];
1025 info_per_detid[rit->detid] =
min;
1028 info_per_detid[rit->detid] =
max;
1031 info_per_detid[rit->detid] =
mean;
1034 info_per_detid[rit->detid] =
rms;
1043 for (
const auto&
item : info_per_detid) {
1044 tmap->fill(
item.first,
item.second);
1062 typedef SiStripNoiseTrackerMap<SiStripPI::min> SiStripNoiseMin_TrackerMap;
1063 typedef SiStripNoiseTrackerMap<SiStripPI::max> SiStripNoiseMax_TrackerMap;
1064 typedef SiStripNoiseTrackerMap<SiStripPI::mean> SiStripNoiseMean_TrackerMap;
1065 typedef SiStripNoiseTrackerMap<SiStripPI::rms> SiStripNoiseRMS_TrackerMap;
1071 template <SiStripPI::estimator est,
int ntags, IOVMultiplicity nIOVs>
1072 class SiStripNoiseRatioWithPreviousIOVTrackerMapBase :
public PlotImage<SiStripNoises, nIOVs, ntags> {
1074 SiStripNoiseRatioWithPreviousIOVTrackerMapBase()
1076 "with previous IOV") {
1080 std::map<unsigned int, float> computeEstimator(std::shared_ptr<SiStripNoises>
payload) {
1081 std::map<unsigned int, float> info_per_detid;
1084 std::vector<float> vstripnoise;
1086 for (; rit != erit; ++rit) {
1088 (rit->iend - rit->ibegin) * 8 / 9;
1089 vstripnoise.resize(Nstrips);
1092 make_pair(
payload->getDataVectorBegin() + rit->ibegin,
payload->getDataVectorBegin() + rit->iend));
1100 for (
size_t i = 0;
i < Nstrips; ++
i) {
1101 mean += vstripnoise[
i];
1102 rms += vstripnoise[
i] * vstripnoise[
i];
1103 if (vstripnoise[
i] <
min)
1104 min = vstripnoise[
i];
1105 if (vstripnoise[
i] >
max)
1106 max = vstripnoise[
i];
1117 info_per_detid[rit->detid] =
min;
1120 info_per_detid[rit->detid] =
max;
1123 info_per_detid[rit->detid] =
mean;
1126 info_per_detid[rit->detid] =
rms;
1133 return info_per_detid;
1136 bool fill()
override {
1137 unsigned int nsigma(1);
1140 auto ip = paramValues.find(
"nsigma");
1141 if (ip != paramValues.end()) {
1142 nsigma = std::stoul(ip->second);
1146 auto theIOVs = PlotBase::getTag<0>().iovs;
1147 auto tagname1 = PlotBase::getTag<0>().
name;
1149 auto firstiov = theIOVs.front();
1153 assert(this->m_plotAnnotations.ntags < 3);
1155 if (this->m_plotAnnotations.ntags == 2) {
1156 auto tag2iovs = PlotBase::getTag<1>().iovs;
1157 tagname2 = PlotBase::getTag<1>().
name;
1158 lastiov = tag2iovs.front();
1160 lastiov = theIOVs.back();
1163 std::shared_ptr<SiStripNoises> last_payload = this->fetchPayload(std::get<1>(lastiov));
1164 std::shared_ptr<SiStripNoises> first_payload = this->fetchPayload(std::get<1>(firstiov));
1169 titleMap +=
"/ IOV:";
1172 titleMap += +
" " +
std::to_string(nsigma) +
" std. dev. saturation";
1174 std::unique_ptr<TrackerMap> tmap = std::make_unique<TrackerMap>(
"SiStripNoises");
1175 tmap->setTitle(titleMap);
1176 tmap->setPalette(1);
1178 std::map<unsigned int, float> map_first, map_second;
1180 map_first = computeEstimator(first_payload);
1181 map_second = computeEstimator(last_payload);
1182 std::map<unsigned int, float> cachedRatio;
1184 for (
auto entry : map_first) {
1185 auto it2 = map_second.find(
entry.first);
1186 if (it2 == map_second.end() || it2->second == 0)
1188 tmap->fill(
entry.first,
entry.second / it2->second);
1189 cachedRatio[
entry.first] = (
entry.second / it2->second);
1204 template <SiStripPI::estimator est>
1205 using SiStripNoiseRatioWithPreviousIOVTrackerMapSingleTag =
1206 SiStripNoiseRatioWithPreviousIOVTrackerMapBase<est, 1, MULTI_IOV>;
1208 template <SiStripPI::estimator est>
1209 using SiStripNoiseRatioWithPreviousIOVTrackerMapTwoTags =
1210 SiStripNoiseRatioWithPreviousIOVTrackerMapBase<est, 2, SINGLE_IOV>;
1212 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapSingleTag<SiStripPI::min>
1213 SiStripNoiseMin_RatioWithPreviousIOVTrackerMapSingleTag;
1214 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapSingleTag<SiStripPI::max>
1215 SiStripNoiseMax_RatioWithPreviousIOVTrackerMapSingleTag;
1216 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapSingleTag<SiStripPI::mean>
1217 SiStripNoiseMean_RatioWithPreviousIOVTrackerMapSingleTag;
1218 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapSingleTag<SiStripPI::rms>
1219 SiStripNoiseRms_RatioWithPreviousIOVTrackerMapSingleTag;
1221 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapTwoTags<SiStripPI::min>
1222 SiStripNoiseMin_RatioWithPreviousIOVTrackerMapTwoTags;
1223 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapTwoTags<SiStripPI::max>
1224 SiStripNoiseMax_RatioWithPreviousIOVTrackerMapTwoTags;
1225 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapTwoTags<SiStripPI::mean>
1226 SiStripNoiseMean_RatioWithPreviousIOVTrackerMapTwoTags;
1227 typedef SiStripNoiseRatioWithPreviousIOVTrackerMapTwoTags<SiStripPI::rms>
1228 SiStripNoiseRms_RatioWithPreviousIOVTrackerMapTwoTags;
1234 template <SiStripPI::estimator est>
1235 class SiStripNoiseByRegion :
public PlotImage<SiStripNoises, SINGLE_IOV> {
1237 SiStripNoiseByRegion()
1242 bool fill()
override {
1243 auto tag = PlotBase::getTag<0>();
1244 auto iov =
tag.iovs.front();
1245 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
1251 std::map<unsigned int, SiStripDetSummary::Values>
map = summaryNoise.getCounts();
1254 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
1256 auto h1 = std::unique_ptr<TH1F>(
1257 new TH1F(
"byRegion",
1258 Form(
"Average by partition of %s SiStrip Noise per module;;average SiStrip Noise %s [ADC counts]",
1264 h1->SetStats(
false);
1265 canvas.SetBottomMargin(0.18);
1266 canvas.SetLeftMargin(0.17);
1267 canvas.SetRightMargin(0.05);
1270 std::vector<int> boundaries;
1271 unsigned int iBin = 0;
1276 for (
const auto& element :
map) {
1278 int count = element.second.count;
1279 double mean = (element.second.mean) /
count;
1287 if (currentDetector.empty())
1288 currentDetector =
"TIB";
1290 switch ((element.first) / 1000) {
1305 h1->SetBinContent(iBin,
mean);
1307 h1->GetXaxis()->LabelsOption(
"v");
1310 boundaries.push_back(iBin);
1315 h1->SetMarkerStyle(20);
1316 h1->SetMarkerSize(1);
1317 h1->SetMaximum(h1->GetMaximum() * 1.1);
1323 TLine
l[boundaries.size()];
1326 for (
const auto&
line : boundaries) {
1328 l[
i].SetLineWidth(1);
1329 l[
i].SetLineStyle(9);
1330 l[
i].SetLineColor(2);
1335 TLegend
legend = TLegend(0.52, 0.82, 0.95, 0.9);
1336 legend.SetHeader((std::get<1>(iov)).c_str(),
"C");
1338 legend.SetTextSize(0.025);
1351 typedef SiStripNoiseByRegion<SiStripPI::mean> SiStripNoiseMeanByRegion;
1352 typedef SiStripNoiseByRegion<SiStripPI::min> SiStripNoiseMinByRegion;
1353 typedef SiStripNoiseByRegion<SiStripPI::max> SiStripNoiseMaxByRegion;
1354 typedef SiStripNoiseByRegion<SiStripPI::rms> SiStripNoiseRMSByRegion;
1360 template <SiStripPI::estimator est,
int ntags, IOVMultiplicity nIOVs>
1361 class SiStripNoiseComparatorByRegionBase :
public PlotImage<SiStripNoises, nIOVs, ntags> {
1363 SiStripNoiseComparatorByRegionBase()
1368 bool fill()
override {
1370 auto theIOVs = PlotBase::getTag<0>().iovs;
1371 auto tagname1 = PlotBase::getTag<0>().
name;
1373 auto firstiov = theIOVs.front();
1377 assert(this->m_plotAnnotations.ntags < 3);
1379 if (this->m_plotAnnotations.ntags == 2) {
1380 auto tag2iovs = PlotBase::getTag<1>().iovs;
1381 tagname2 = PlotBase::getTag<1>().
name;
1382 lastiov = tag2iovs.front();
1384 lastiov = theIOVs.back();
1387 std::shared_ptr<SiStripNoises> f_payload = this->fetchPayload(std::get<1>(firstiov));
1388 std::shared_ptr<SiStripNoises> l_payload = this->fetchPayload(std::get<1>(lastiov));
1396 std::map<unsigned int, SiStripDetSummary::Values> f_map = f_summaryNoise.getCounts();
1397 std::map<unsigned int, SiStripDetSummary::Values> l_map = l_summaryNoise.getCounts();
1400 TCanvas
canvas(
"Partition summary",
"partition summary", 1200, 1000);
1403 auto hfirst = std::unique_ptr<TH1F>(
1404 new TH1F(
"f_byRegion",
1405 Form(
"Average by partition of %s SiStrip Noise per module;;average SiStrip Noise %s [ADC counts]",
1411 hfirst->SetStats(
false);
1413 auto hlast = std::unique_ptr<TH1F>(
1414 new TH1F(
"l_byRegion",
1415 Form(
"Average by partition of %s SiStrip Noise per module;;average SiStrip Noise %s [ADC counts]",
1421 hlast->SetStats(
false);
1423 canvas.SetBottomMargin(0.18);
1424 canvas.SetLeftMargin(0.17);
1425 canvas.SetRightMargin(0.05);
1428 std::vector<int> boundaries;
1429 unsigned int iBin = 0;
1434 for (
const auto& element : f_map) {
1436 int count = element.second.count;
1437 double mean = (element.second.mean) /
count;
1445 if (currentDetector.empty())
1446 currentDetector =
"TIB";
1448 switch ((element.first) / 1000) {
1463 hfirst->SetBinContent(iBin,
mean);
1466 hfirst->GetXaxis()->LabelsOption(
"v");
1469 boundaries.push_back(iBin);
1478 for (
const auto& element : l_map) {
1480 int count = element.second.count;
1481 double mean = (element.second.mean) /
count;
1489 hlast->SetBinContent(iBin,
mean);
1492 hlast->GetXaxis()->LabelsOption(
"v");
1495 float theMax = (hfirst->GetMaximum() > hlast->GetMaximum()) ? hfirst->GetMaximum() : hlast->GetMaximum();
1496 float theMin = (hfirst->GetMinimum() < hlast->GetMinimum()) ? hfirst->GetMinimum() : hlast->GetMinimum();
1498 hfirst->SetMarkerStyle(20);
1499 hfirst->SetMarkerSize(1);
1500 hfirst->GetYaxis()->SetTitleOffset(1.3);
1501 hfirst->GetYaxis()->SetRangeUser(theMin * 0.9, theMax * 1.1);
1502 hfirst->Draw(
"HIST");
1503 hfirst->Draw(
"Psame");
1505 hlast->SetMarkerStyle(21);
1506 hlast->SetMarkerSize(1);
1507 hlast->SetMarkerColor(kBlue);
1508 hlast->SetLineColor(kBlue);
1509 hlast->GetYaxis()->SetTitleOffset(1.3);
1510 hlast->GetYaxis()->SetRangeUser(theMin * 0.9, theMax * 1.1);
1511 hlast->Draw(
"HISTsame");
1512 hlast->Draw(
"Psame");
1516 TLine
l[boundaries.size()];
1519 for (
const auto&
line : boundaries) {
1520 l[
i] = TLine(hfirst->GetBinLowEdge(
line),
canvas.GetUymin(), hfirst->GetBinLowEdge(
line),
canvas.GetUymax());
1521 l[
i].SetLineWidth(1);
1522 l[
i].SetLineStyle(9);
1523 l[
i].SetLineColor(2);
1528 TLegend
legend = TLegend(0.52, 0.82, 0.95, 0.9);
1531 legend.AddEntry(hfirst.get(), (
"IOV: " +
std::to_string(std::get<0>(firstiov))).c_str(),
"PL");
1533 legend.SetTextSize(0.025);
1546 template <SiStripPI::estimator est>
1547 using SiStripNoiseComparatorByRegionSingleTag = SiStripNoiseComparatorByRegionBase<est, 1, MULTI_IOV>;
1549 template <SiStripPI::estimator est>
1550 using SiStripNoiseComparatorByRegionTwoTags = SiStripNoiseComparatorByRegionBase<est, 2, SINGLE_IOV>;
1552 typedef SiStripNoiseComparatorByRegionSingleTag<SiStripPI::mean> SiStripNoiseComparatorMeanByRegionSingleTag;
1553 typedef SiStripNoiseComparatorByRegionSingleTag<SiStripPI::min> SiStripNoiseComparatorMinByRegionSingleTag;
1554 typedef SiStripNoiseComparatorByRegionSingleTag<SiStripPI::max> SiStripNoiseComparatorMaxByRegionSingleTag;
1555 typedef SiStripNoiseComparatorByRegionSingleTag<SiStripPI::rms> SiStripNoiseComparatorRMSByRegionSingleTag;
1557 typedef SiStripNoiseComparatorByRegionTwoTags<SiStripPI::mean> SiStripNoiseComparatorMeanByRegionTwoTags;
1558 typedef SiStripNoiseComparatorByRegionTwoTags<SiStripPI::min> SiStripNoiseComparatorMinByRegionTwoTags;
1559 typedef SiStripNoiseComparatorByRegionTwoTags<SiStripPI::max> SiStripNoiseComparatorMaxByRegionTwoTags;
1560 typedef SiStripNoiseComparatorByRegionTwoTags<SiStripPI::rms> SiStripNoiseComparatorRMSByRegionTwoTags;
1565 class SiStripNoiseLinearity :
public PlotImage<SiStripNoises, SINGLE_IOV> {
1567 SiStripNoiseLinearity()
1570 bool fill()
override {
1571 auto tag = PlotBase::getTag<0>();
1572 auto iov =
tag.iovs.front();
1573 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
1575 const auto detInfo =
1578 std::vector<uint32_t> detid;
1581 std::map<float, std::tuple<int, float, float>> noisePerStripLength;
1583 for (
const auto&
d : detid) {
1588 float stripL = detInfo.getNumberOfApvsAndStripLength(
d).second;
1589 std::get<0>(noisePerStripLength[stripL]) += 1;
1590 std::get<1>(noisePerStripLength[stripL]) +=
noise;
1591 std::get<2>(noisePerStripLength[stripL]) += (
noise *
noise);
1595 TCanvas
canvas(
"Noise linearity",
"noise linearity", 1200, 1000);
1598 std::vector<float>
x;
1599 x.reserve(noisePerStripLength.size());
1600 std::vector<float>
y;
1601 y.reserve(noisePerStripLength.size());
1602 std::vector<float> ex;
1603 ex.reserve(noisePerStripLength.size());
1604 std::vector<float> ey;
1605 ey.reserve(noisePerStripLength.size());
1607 for (
const auto& element : noisePerStripLength) {
1608 x.push_back(element.first);
1610 float sum = std::get<1>(element.second);
1611 float sum2 = std::get<2>(element.second);
1612 float nstrips = std::get<0>(element.second);
1613 float mean = sum / nstrips;
1620 auto graph = std::make_unique<TGraphErrors>(noisePerStripLength.size(), &
x[0], &
y[0], &ex[0], &ey[0]);
1621 graph->SetTitle(
"SiStrip Noise Linearity");
1622 graph->GetXaxis()->SetTitle(
"Strip length [cm]");
1623 graph->GetYaxis()->SetTitle(
"Average Strip Noise [ADC counts]");
1624 graph->SetMarkerColor(kBlue);
1625 graph->SetMarkerStyle(20);
1626 graph->SetMarkerSize(1.5);
1627 canvas.SetBottomMargin(0.13);
1628 canvas.SetLeftMargin(0.17);
1629 canvas.SetTopMargin(0.08);
1630 canvas.SetRightMargin(0.05);
1634 graph->GetXaxis()->CenterTitle(
true);
1635 graph->GetYaxis()->CenterTitle(
true);
1636 graph->GetXaxis()->SetTitleFont(42);
1637 graph->GetYaxis()->SetTitleFont(42);
1638 graph->GetXaxis()->SetTitleSize(0.05);
1639 graph->GetYaxis()->SetTitleSize(0.05);
1640 graph->GetXaxis()->SetTitleOffset(1.1);
1641 graph->GetYaxis()->SetTitleOffset(1.3);
1642 graph->GetXaxis()->SetLabelFont(42);
1643 graph->GetYaxis()->SetLabelFont(42);
1644 graph->GetYaxis()->SetLabelSize(.05);
1645 graph->GetXaxis()->SetLabelSize(.05);
1650 TF1*
f1 = graph->GetFunction(
"pol1");
1651 f1->SetLineWidth(2);
1652 f1->SetLineColor(kBlue);
1655 auto fits = std::make_unique<TPaveText>(0.2, 0.72, 0.6, 0.9,
"NDC");
1657 sprintf(
buffer,
"fit function: p_{0} + p_{1} * l_{strip}");
1659 sprintf(
buffer,
"p_{0} : %5.2f [ADC counts]",
f1->GetParameter(0));
1661 sprintf(
buffer,
"p_{1} : %5.2f [ADC counts/cm]",
f1->GetParameter(1));
1663 sprintf(
buffer,
"#chi^{2}/ndf = %5.2f / %i ",
f1->GetChisquare(),
f1->GetNDF());
1665 fits->SetTextFont(42);
1666 fits->SetTextColor(kBlue);
1667 fits->SetFillColor(0);
1668 fits->SetTextSize(0.03);
1669 fits->SetBorderSize(1);
1670 fits->SetLineColor(kBlue);
1671 fits->SetMargin(0.05);
1672 fits->SetTextAlign(12);
1687 template <StripSubdetector::SubDetector sub>
1688 class NoiseHistory :
public HistoryPlot<SiStripNoises, std::pair<double, double>> {
1696 std::vector<uint32_t> detid;
1700 float sum = 0., sum2 = 0.;
1702 for (
const auto&
d : detid) {
1718 return std::make_pair(
mean,
rms);
1723 typedef NoiseHistory<StripSubdetector::TIB> TIBNoiseHistory;
1724 typedef NoiseHistory<StripSubdetector::TOB> TOBNoiseHistory;
1725 typedef NoiseHistory<StripSubdetector::TID> TIDNoiseHistory;
1726 typedef NoiseHistory<StripSubdetector::TEC> TECNoiseHistory;
1732 template <StripSubdetector::SubDetector sub>
1733 class NoiseRunHistory :
public RunHistoryPlot<SiStripNoises, std::pair<double, double>> {
1741 std::vector<uint32_t> detid;
1745 float sum = 0., sum2 = 0.;
1747 for (
const auto&
d : detid) {
1763 return std::make_pair(
mean,
rms);
1768 typedef NoiseRunHistory<StripSubdetector::TIB> TIBNoiseRunHistory;
1769 typedef NoiseRunHistory<StripSubdetector::TOB> TOBNoiseRunHistory;
1770 typedef NoiseRunHistory<StripSubdetector::TID> TIDNoiseRunHistory;
1771 typedef NoiseRunHistory<StripSubdetector::TEC> TECNoiseRunHistory;
1777 template <StripSubdetector::SubDetector sub>
1778 class NoiseTimeHistory :
public TimeHistoryPlot<SiStripNoises, std::pair<double, double>> {
1786 std::vector<uint32_t> detid;
1790 float sum = 0., sum2 = 0.;
1792 for (
const auto&
d : detid) {
1808 return std::make_pair(
mean,
rms);
1813 typedef NoiseTimeHistory<StripSubdetector::TIB> TIBNoiseTimeHistory;
1814 typedef NoiseTimeHistory<StripSubdetector::TOB> TOBNoiseTimeHistory;
1815 typedef NoiseTimeHistory<StripSubdetector::TID> TIDNoiseTimeHistory;
1816 typedef NoiseTimeHistory<StripSubdetector::TEC> TECNoiseTimeHistory;
1821 template <StripSubdetector::SubDetector sub>
1822 class NoiseLayerRunHistory :
public PlotImage<SiStripNoises, MULTI_IOV> {
1824 NoiseLayerRunHistory()
1829 bool fill()
override {
1830 auto tag = PlotBase::getTag<0>();
1831 auto sorted_iovs =
tag.iovs;
1835 return std::get<0>(
t1) < std::get<0>(
t2);
1838 std::unordered_map<int, std::vector<float>> noises_avg;
1839 std::unordered_map<int, std::vector<float>> noises_err;
1840 std::vector<float>
runs;
1841 std::vector<float> runs_err;
1843 for (
auto const& iov : sorted_iovs) {
1844 std::unordered_map<int, std::vector<float>>
noises;
1846 std::shared_ptr<SiStripNoises>
payload = fetchPayload(std::get<1>(iov));
1847 unsigned int run = std::get<0>(iov);
1849 runs_err.push_back(0);
1852 std::vector<uint32_t> detid;
1855 for (
const auto&
d : detid) {
1861 layer = m_trackerTopo.tibLayer(
d);
1863 layer = m_trackerTopo.tobLayer(
d);
1865 layer = m_trackerTopo.tidWheel(
d);
1867 layer = m_trackerTopo.tecWheel(
d);
1874 noises.emplace(layer, std::vector<float>{});
1880 double sum = std::accumulate(
entry.second.begin(),
entry.second.end(), 0.0);
1881 double mean = sum /
entry.second.size();
1886 if (noises_avg.find(
entry.first) == noises_avg.end())
1887 noises_avg.emplace(
entry.first, std::vector<float>{});
1888 noises_avg[
entry.first].push_back(
mean);
1890 if (noises_err.find(
entry.first) == noises_err.end())
1891 noises_err.emplace(
entry.first, std::vector<float>{});
1892 noises_err[
entry.first].push_back(0);
1896 TCanvas
canvas(
"Partition summary",
"partition summary", 2000, 1000);
1898 canvas.SetBottomMargin(0.11);
1899 canvas.SetLeftMargin(0.13);
1900 canvas.SetRightMargin(0.05);
1903 TLegend
legend = TLegend(0.73, 0.13, 0.89, 0.43);
1905 legend.SetTextSize(0.03);
1907 std::unique_ptr<TGraphErrors> graph[noises_avg.size()];
1909 int colors[18] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 30, 40, 42, 46, 48, 32, 36, 38};
1913 for (
auto&
entry : noises_avg) {
1914 graph[el] = std::make_unique<TGraphErrors>(
1915 runs.size(), &
runs[0], &(
entry.second[0]), &runs_err[0], &(noises_err[
entry.first][0]));
1919 graph[el]->SetName(
name);
1922 snprintf(
title,
sizeof(
title),
"SiStrip avg noise per layer -- TIB");
1923 graph[el]->GetYaxis()->SetTitle(
"Average Noise per Layer [ADC counts]");
1925 snprintf(
title,
sizeof(
title),
"SiStrip avg noise per layer -- TOB");
1926 graph[el]->GetYaxis()->SetTitle(
"Average Noise per Layer [ADC counts]");
1928 snprintf(
title,
sizeof(
title),
"SiStrip avg noise per disk -- TID");
1929 graph[el]->GetYaxis()->SetTitle(
"Average Noise per Disk [ADC counts]");
1931 snprintf(
title,
sizeof(
title),
"SiStrip avg noise per disk -- TEC");
1932 graph[el]->GetYaxis()->SetTitle(
"Average Noise per Disk [ADC counts]");
1935 graph[el]->SetTitle(
title);
1936 graph[el]->GetXaxis()->SetTitle(
"run");
1937 graph[el]->SetMarkerColor(
colors[el]);
1938 graph[el]->SetMarkerStyle(20);
1939 graph[el]->SetMarkerSize(1.5);
1940 graph[el]->GetXaxis()->CenterTitle(
true);
1941 graph[el]->GetYaxis()->CenterTitle(
true);
1942 graph[el]->GetXaxis()->SetTitleFont(42);
1943 graph[el]->GetYaxis()->SetTitleFont(42);
1944 graph[el]->GetXaxis()->SetTitleSize(0.05);
1945 graph[el]->GetYaxis()->SetTitleSize(0.05);
1946 graph[el]->GetXaxis()->SetTitleOffset(1.1);
1947 graph[el]->GetYaxis()->SetTitleOffset(1.3);
1948 graph[el]->GetXaxis()->SetLabelFont(42);
1949 graph[el]->GetYaxis()->SetLabelFont(42);
1950 graph[el]->GetYaxis()->SetLabelSize(.05);
1951 graph[el]->GetXaxis()->SetLabelSize(.05);
1952 graph[el]->SetMinimum(3);
1953 graph[el]->SetMaximum(7.5);
1956 graph[el]->Draw(
"AP");
1958 graph[el]->Draw(
"P");
1986 typedef NoiseLayerRunHistory<StripSubdetector::TIB> TIBNoiseLayerRunHistory;
1987 typedef NoiseLayerRunHistory<StripSubdetector::TOB> TOBNoiseLayerRunHistory;
1988 typedef NoiseLayerRunHistory<StripSubdetector::TID> TIDNoiseLayerRunHistory;
1989 typedef NoiseLayerRunHistory<StripSubdetector::TEC> TECNoiseLayerRunHistory;
static constexpr auto TEC
std::pair< int, const char * > regionType(int index)
static std::string to_string(const XMLCh *ch)
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
static std::string const input
std::tuple< cond::Time_t, cond::Hash > MetaData
std::pair< float, float > getTheRange(std::map< uint32_t, float > values, const float nsigma)
void fillNoiseDetSummary(SiStripDetSummary &summaryNoise, std::shared_ptr< SiStripNoises > payload, SiStripPI::estimator est)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
Registry::const_iterator RegistryIterator
void makeNicePlotStyle(TH1 *hist)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
SiStripDetInfo read(std::string filePath)
std::string getStringFromSubdet(StripSubdetector::SubDetector sub)
static constexpr auto TOB
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
std::string estimatorType(SiStripPI::estimator e)
Log< level::Warning, true > LogPrint
const std::map< std::string, std::string > & inputParamValues() const
void addInputParam(const std::string ¶mName)
static constexpr auto TIB
static const uint16_t STRIPS_PER_APV
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
static constexpr char const *const kDefaultFile
Log< level::Warning, false > LogWarning
std::pair< ContainerIterator, ContainerIterator > Range
static constexpr auto TID