802 vector<TString> structures{
"BPIX",
"BPIX_y",
"FPIX",
"FPIX_y",
"TIB",
"TID",
"TOB",
"TEC"};
806 vector<pair<int, double>> lumiIOVpairs;
810 TString
filename = myValidation +
"DMRtrends";
818 for (TString &structure : structures) {
819 TString structname = structure;
820 structname.ReplaceAll(
"_y",
"");
821 int layersnumber =
nlayers.at(structname);
822 for (
int layer = 0; layer <= layersnumber; layer++) {
834 "deltamusigmadeltamu"};
835 vector<string> YaxisNames{
837 "#sigma_{#mu} [#mum]",
838 "#mu outward [#mum]",
839 "#sigma_{#mu outward} [#mum]",
841 "#sigma_{#mu inward} [#mum]",
843 "#sigma_{#Delta#mu} [#mum]",
845 "#mu outward [#mum]",
849 if (Variable ==
"DrmsNR")
851 "RMS(x'_{pred}-x'_{hit} /#sigma)",
852 "#sigma_{RMS(x'_{pred}-x'_{hit} /#sigma)}",
853 "RMS(x'_{pred}-x'_{hit} /#sigma) outward",
854 "#sigma_{#mu outward}",
855 "RMS(x'_{pred}-x'_{hit} /#sigma) inward",
856 "#sigma_{RMS(x'_{pred}-x'_{hit} /#sigma) inward}",
857 "#DeltaRMS(x'_{pred}-x'_{hit} /#sigma)",
858 "#sigma_{#DeltaRMS(x'_{pred}-x'_{hit} /#sigma)}",
859 "RMS(x'_{pred}-x'_{hit} /#sigma)",
860 "RMS(x'_{pred}-x'_{hit} /#sigma) outward",
861 "RMS(x'_{pred}-x'_{hit} /#sigma) inward",
862 "#DeltaRMS(x'_{pred}-x'_{hit} /#sigma)",
868 if (structname ==
"TEC" || structname ==
"TID")
871 TCanvas *
c =
new TCanvas(
"dummy",
"", 2000, 800);
873 vector<Color_t>::iterator colour = colours.begin();
875 TMultiGraph *mg =
new TMultiGraph(structure, structure);
876 THStack *mh =
new THStack(structure, structure);
878 for (
string geometry : geometries) {
880 TGraphErrors *
g = dynamic_cast<TGraphErrors *>(
in->Get(
name +
"_" +
variables.at(
i)));
884 g->SetLineColor(*colour);
885 g->SetFillColorAlpha(*colour, 0.2);
887 vector<vector<double>> vectors;
891 g->SetLineColor(*colour);
892 g->SetMarkerColor(*colour);
894 h->SetLineColor(*colour);
895 h->SetMarkerColor(*colour);
910 gStyle->SetOptTitle(0);
911 gStyle->SetPadLeftMargin(0.08);
912 gStyle->SetPadRightMargin(0.05);
915 gStyle->SetLegendTextSize(0.025);
919 if (Variable ==
"DrmsNR") {
946 char *Ytitle = (
char *)YaxisNames.at(
i).c_str();
947 mg->GetYaxis()->SetTitle(Ytitle);
948 mg->GetXaxis()->SetTitle(showlumi ?
"Integrated lumi [1/fb]" :
"IOV number");
949 mg->GetXaxis()->CenterTitle(
true);
950 mg->GetYaxis()->CenterTitle(
true);
951 mg->GetYaxis()->SetTitleOffset(.5);
952 mg->GetYaxis()->SetTitleSize(.05);
953 mg->GetXaxis()->SetTitleSize(.04);
955 mg->GetXaxis()->SetLimits(0., mg->GetXaxis()->GetXmax());
959 TLegend *
legend =
c->BuildLegend();
961 int Ngeom = geometries.size();
968 TString structtitle =
"#bf{";
969 if (structure.Contains(
"PIX") && !(structure.Contains(
"_y")))
970 structtitle += structure +
" (x)";
971 else if (structure.Contains(
"_y")) {
972 TString substring(structure(0, 4));
973 structtitle += substring +
" (y)";
975 structtitle += structure;
977 if (structure ==
"TID" || structure ==
"TEC" || structure ==
"FPIX" || structure ==
"FPIX_y")
978 structtitle +=
" disc ";
980 structtitle +=
" layer ";
981 structtitle += layer;
986 TPaveText *CMSworkInProgress =
new TPaveText(
987 0, mg->GetYaxis()->GetXmax() +
range * 0.02, 2.5, mg->GetYaxis()->GetXmax() +
range * 0.12,
"nb");
988 CMSworkInProgress->AddText(
"#scale[1.1]{CMS} #bf{Internal}");
989 CMSworkInProgress->SetTextAlign(12);
990 CMSworkInProgress->SetTextSize(0.04);
991 CMSworkInProgress->SetFillColor(10);
992 CMSworkInProgress->Draw();
993 TPaveText *TopRightCorner =
new TPaveText(0.95 * (mg->GetXaxis()->GetXmax()),
994 mg->GetYaxis()->GetXmax() +
range * 0.02,
995 (mg->GetXaxis()->GetXmax()),
996 mg->GetYaxis()->GetXmax() +
range * 0.12,
998 TopRightCorner->AddText(Year +
" pp collisions");
999 TopRightCorner->SetTextAlign(32);
1000 TopRightCorner->SetTextSize(0.04);
1001 TopRightCorner->SetFillColor(10);
1002 TopRightCorner->Draw();
1003 TPaveText *structlabel =
new TPaveText(0.95 * (mg->GetXaxis()->GetXmax()),
1004 mg->GetYaxis()->GetXmin() +
range * 0.02,
1005 0.99 * (mg->GetXaxis()->GetXmax()),
1006 mg->GetYaxis()->GetXmin() +
range * 0.12,
1008 structlabel->AddText(structtitle.Data());
1009 structlabel->SetTextAlign(32);
1010 structlabel->SetTextSize(0.04);
1011 structlabel->SetFillColor(10);
1012 structlabel->Draw();
1015 mh->Draw(
"nostack same");
1017 TString structandlayer =
getName(structure, layer,
"");
1025 printfile += Variable;
1027 printfile +=
variable + structandlayer;
1028 c->SaveAs(printfile +
".pdf");
1029 c->SaveAs(printfile +
".eps");
1030 c->SaveAs(printfile +
".png");