Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:01

0001 #include <string>
0002 #include <sstream>
0003 
0004 #include "TFile.h"
0005 #include "TList.h"
0006 #include "TNtuple.h"
0007 #include "TTree.h"
0008 #include "TH1.h"
0009 #include "TH2.h"
0010 #include "TStyle.h"
0011 #include "TCut.h"
0012 
0013 void comparisonScriptCSA08(){
0014 
0015     
0016     gStyle->SetOptStat("emr");
0017     gSystem->Load("comparisonPlots_cc.so");
0018     
0019     // create plots object for given input
0020     // arg1 = input ROOT comparison, arg2 = output directory, arg3 = name of output ROOT file
0021     comparisonPlots c1("../test/myComparison_commonTracker.root","outputDirTracker/");
0022     comparisonPlots c2("../test/myComparison_commonSubdets.root","outputDirSubdets/");
0023     
0024     // ------------ COMMON CUTS -----------
0025     // LEVEL CUT - which hierarchy to plot
0026     // for convention, see: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/Alignment/CommonAlignment/interface/StructureType.h?view=log
0027     TCut levelCut = "(level == 1)"; // plotting DetUnits
0028     // SUBLEVEL CUT - plot only alignables belongnig to this subdetector
0029     TCut PXBCut = "(sublevel == 1)"; // PXB
0030     TCut PXFCut = "(sublevel == 2)"; // PXF
0031     TCut TIBCut = "(sublevel == 3)"; // TIB
0032     TCut TIDCut = "(sublevel == 4)"; // TID
0033     TCut TOBCut = "(sublevel == 5)"; // TOB
0034     TCut TECCut = "(sublevel == 6)"; // TEC
0035         
0036     // for plot3x5:
0037     // arg1 = cuts, arg2 = bool to save the 3x5 plot, arg3 = name of saved plot
0038     // for plot3x5Profile:
0039     // arg1 = cuts, arg2 = nBins for profile, arg3 = bool to save 3x5 profile plot, arg4 = name of saved plot
0040     
0041     // plots the normal 3x3 plus dx/dy vs. r/z/phi
0042     // stores each histogram to output file (including dr/dz/r*dphi 1D plots)
0043     c1.plot3x5( levelCut, "Tracker", true, "Tracker.eps");
0044     c1.plot3x5( levelCut+PXBCut, "PXB", true, "PXB.eps" );
0045     c1.plot3x5( levelCut+PXFCut, "PXF", true, "PXF.eps" );
0046     c1.plot3x5( levelCut+TIBCut, "TIB", true, "TIB.eps" );
0047     c1.plot3x5( levelCut+TIDCut, "TID", true, "TID.eps" );
0048     c1.plot3x5( levelCut+TOBCut, "TOB", true, "TOB.eps" );
0049     c1.plot3x5( levelCut+TECCut, "TEC", true, "TEC.eps" );
0050     
0051     // plots the normal 3x3 plus dx/dy vs. r/z/phi 2D profile plots
0052     // second argument is the nBinsX for profile plot
0053     // all arguments are stored to output file
0054     c1.plot3x5Profile( levelCut, "Tracker", 30, true, "Tracker.eps" );
0055     c1.plot3x5Profile( levelCut+PXBCut, "PXB", 30, true, "PXB.eps" );
0056     c1.plot3x5Profile( levelCut+PXFCut, "PXF", 30, true, "PXF.eps" );
0057     c1.plot3x5Profile( levelCut+TIBCut, "TIB", 30, true, "TIB.eps" );
0058     c1.plot3x5Profile( levelCut+TIDCut, "TID", 30, true, "TID.eps" ) ;
0059     c1.plot3x5Profile( levelCut+TOBCut, "TOB", 30, true, "TOB.eps" );
0060     c1.plot3x5Profile( levelCut+TECCut, "TEC", 30, true, "TEC.eps" );
0061     
0062     // plots the normal 3x3 plus dx/dy vs. r/z/phi
0063     // stores each histogram to output file (including dr/dz/r*dphi 1D plots)
0064     c2.plot3x5( levelCut, "Tracker", true, "Tracker.eps");
0065     c2.plot3x5( levelCut+PXBCut, "PXB", true, "PXB.eps" );
0066     c2.plot3x5( levelCut+PXFCut, "PXF", true, "PXF.eps" );
0067     c2.plot3x5( levelCut+TIBCut, "TIB", true, "TIB.eps" );
0068     c2.plot3x5( levelCut+TIDCut, "TID", true, "TID.eps" );
0069     c2.plot3x5( levelCut+TOBCut, "TOB", true, "TOB.eps" );
0070     c2.plot3x5( levelCut+TECCut, "TEC", true, "TEC.eps" );
0071     
0072     // plots the normal 3x3 plus dx/dy vs. r/z/phi 2D profile plots
0073     // second argument is the nBinsX for profile plot
0074     // all arguments are stored to output file
0075     c2.plot3x5Profile( levelCut, "Tracker", 30, true, "Tracker.eps" );
0076     c2.plot3x5Profile( levelCut+PXBCut, "PXB", 30, true, "PXB.eps" );
0077     c2.plot3x5Profile( levelCut+PXFCut, "PXF", 30, true, "PXF.eps" );
0078     c2.plot3x5Profile( levelCut+TIBCut, "TIB", 30, true, "TIB.eps" );
0079     c2.plot3x5Profile( levelCut+TIDCut, "TID", 30, true, "TID.eps" ) ;
0080     c2.plot3x5Profile( levelCut+TOBCut, "TOB", 30, true, "TOB.eps" );
0081     c2.plot3x5Profile( levelCut+TECCut, "TEC", 30, true, "TEC.eps" );
0082     
0083     
0084 }