1 #ifndef CONDCORE_ALIGNMENTPLUGINS_ALIGNMENTPAYLOADINSPECTORHELPER_H
2 #define CONDCORE_ALIGNMENTPLUGINS_ALIGNMENTPAYLOADINSPECTORHELPER_H
11 #include "TPaveStats.h"
22 #define COUT std::cout << "MM "
24 #define COUT edm::LogVerbatim("")
306 bool isOuter =
false;
311 isOuter = !odd_ladder;
313 isOuter = odd_ladder;
316 isOuter = odd_ladder;
318 isOuter = !odd_ladder;
383 unsigned int subdetId = static_cast<unsigned int>(detId.
subdetId());
602 return "x-translation";
604 return "y-translation";
606 return "z-translation";
608 return "#alpha angle rotation";
610 return "#beta angle rotation";
612 return "#gamma angle rotation";
614 return "should never be here!";
636 return "should never be here!";
658 return "should never be here!";
668 return std::make_pair(0, 0);
670 return std::make_pair(0, 1);
672 return std::make_pair(0, 2);
674 return std::make_pair(1, 0);
676 return std::make_pair(1, 1);
678 return std::make_pair(2, 2);
680 return std::make_pair(-1, -1);
688 hist->SetStats(kFALSE);
690 hist->GetXaxis()->SetTitleColor(color);
691 hist->SetLineColor(color);
692 hist->SetTitleSize(0.08);
693 hist->SetLineWidth(2);
694 hist->GetXaxis()->CenterTitle(
true);
695 hist->GetYaxis()->CenterTitle(
true);
696 hist->GetXaxis()->SetTitleFont(42);
697 hist->GetYaxis()->SetTitleFont(42);
698 hist->GetXaxis()->SetNdivisions(505);
699 hist->GetXaxis()->SetTitleSize(0.06);
700 hist->GetYaxis()->SetTitleSize(0.06);
701 hist->GetXaxis()->SetTitleOffset(1.0);
702 hist->GetYaxis()->SetTitleOffset(1.3);
703 hist->GetXaxis()->SetLabelFont(42);
704 hist->GetYaxis()->SetLabelFont(42);
705 hist->GetYaxis()->SetLabelSize(.05);
706 hist->GetXaxis()->SetLabelSize(.05);
714 TPaveText*
stat =
new TPaveText(0.60, 0.75, 0.95, 0.95,
"NDC");
718 sprintf(
buffer,
"Entries : %i\n", (
int)
hist->GetEntries());
722 sprintf(
buffer,
"Mean : %6.2f\n",
hist->GetMean());
724 sprintf(
buffer,
"Mean : %6.2f e-2\n", 100 *
hist->GetMean());
729 sprintf(
buffer,
"RMS : %6.2f\n",
hist->GetRMS());
731 sprintf(
buffer,
"RMS : %6.2f e-2\n", 100 *
hist->GetRMS());
735 stat->SetLineColor(color);
736 stat->SetTextColor(color);
737 stat->SetFillColor(10);
738 stat->SetShadowColor(10);
746 float sum = std::accumulate(
755 accum += (
p.second -
m) * (
p.second -
m);
761 return std::make_pair(
m - nsigma *
stdev,
m + nsigma *
stdev);
763 return std::make_pair(
m > 0. ? 0.95 *
m : 1.05 *
m,
m > 0 ? 1.05 *
m : 0.95 *
m);
773 int iw = myPad->GetWw();
774 int ih = myPad->GetWh();
775 double x1p, y1p, x2p, y2p;
776 myPad->GetPadPar(x1p, y1p, x2p, y2p);
777 ix1 = (
int)(iw * x1p);
778 ix2 = (
int)(iw * x2p);
779 double wndc =
std::min(1., (
double)iw / (
double)ih);
780 double rw = wndc / (double)iw;
781 double x1ndc = (double)ix1 * rw;
782 double x2ndc = (double)ix2 * rw;
783 double rx1, ry1, rx2, ry2;
784 myPad->GetRange(rx1, ry1, rx2, ry2);
785 double rx = (x2ndc - x1ndc) / (rx2 - rx1);
787 _sx =
rx * (boundary - rx1) + x1ndc;
788 double _dx = _sx + 0.05;
790 return std::make_pair(_sx, _dx);
807 const std::map<AlignmentPI::coordinate, float>& GPR);
815 const std::array<double, 6>
getX()
827 const std::array<double, 6>
getY()
839 const std::array<double, 6>
getZ()
862 const std::map<AlignmentPI::coordinate, float>& GPR)
865 for (
const auto& ali :
input) {
868 <<
"Encountered invalid Tracker DetId:" << ali.rawId() <<
" " <<
DetId(ali.rawId()).det()
873 int subid =
DetId(ali.rawId()).subdetId();
940 edm::LogError(
"TrackerAlignment_PayloadInspector") <<
"Unrecognized partition " << subid << std::endl;
955 <<
" X: " << std::right << std::setw(12) <<
Xbarycenters[
p] <<
" Y: " << std::right << std::setw(12)