Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:32:13

0001 // Plot IOV-dependent parameters
0002 //
0003 //
0004 // Execute as (in an interactive ROOT session):
0005 //
0006 //  > .L createPedeParamIOVPlots.C
0007 //  > compile()
0008 //  > .L createPedeParamIOVPlots.C
0009 
0010 
0011 #include "TString.h"
0012 #include "TROOT.h"
0013 
0014 #include "GFUtils/GFHistManager.h"
0015 #include "PlotMillePedeIOV.h"
0016 
0017 
0018 void compile() {
0019   gROOT->ProcessLine(".L allMillePede.C");
0020   gROOT->ProcessLine("allMillePede()");
0021   gROOT->ProcessLine(".L setGStyle.C");
0022   gROOT->ProcessLine("setGStyle()");
0023 }
0024 
0025 void createPedeParamIOVPlots(const TString& treeFile1, const TString& title1, const TString& treeFile2="", const TString& title2="") {
0026   const int subDetIds[6]       = { 1,      2,      3,     4,     5,     6     };
0027   const TString subDetNames[6] = { "BPIX", "FPIX", "TIB", "TID", "TOB", "TEC" };
0028   const TString coords[6]      = { "x",    "xz",   "z",   "z",   "z",   "z"   }; // printed in legend
0029 
0030   const bool has2 = treeFile2.Length()>0;
0031 
0032   TString outNamePrefix1(title1);
0033   outNamePrefix1.ReplaceAll(" ","_");
0034   TString outNamePrefix2(title2);
0035   outNamePrefix2.ReplaceAll(" ","_");
0036 
0037   PlotMillePedeIOV iov(treeFile1,-1,1); // large-scale hierarchy level
0038   iov.SetTitle(title1);
0039   for(int i = 0; i < 6; ++i) {
0040     iov.SetSubDetId(subDetIds[i]);
0041     iov.GetHistManager()->SetCanvasName(outNamePrefix1+"_PedeParamIOV_"+subDetNames[i]+"_");
0042     iov.DrawPedeParam(coords[i]);
0043   }
0044   if( has2 ) {
0045     PlotMillePedeIOV iov2(treeFile2,-1,1); // large-scale hierarchy level
0046     iov2.SetTitle(title2);
0047     for(int i = 0; i < 6; ++i) {
0048       iov2.SetSubDetId(subDetIds[i]);
0049       iov2.GetHistManager()->SetCanvasName(outNamePrefix2+"_PedeParamIOV_"+subDetNames[i]+"_");
0050       iov2.DrawPedeParam(coords[i]);
0051     }
0052   }
0053 }