Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:59

0001 ######################################################################
0002 ######################################################################
0003 TrackSplittingTemplate="""
0004 
0005 #adding this ~doubles the efficiency of selection
0006 process.FittingSmootherRKP5.EstimateCut = -1
0007 
0008 .oO[subdetselection]Oo.
0009 
0010 # Use compressions settings of TFile
0011 # see https://root.cern.ch/root/html534/TFile.html#TFile:SetCompressionSettings
0012 # settings = 100 * algorithm + level
0013 # level is from 1 (small) to 9 (large compression)
0014 # algo: 1 (ZLIB), 2 (LMZA)
0015 # see more about compression & performance: https://root.cern.ch/root/html534/guides/users-guide/InputOutput.html#compression-and-performance
0016 compressionSettings = 207
0017 process.cosmicValidation = cms.EDAnalyzer("CosmicSplitterValidation",
0018     compressionSettings = cms.untracked.int32(compressionSettings),
0019     ifSplitMuons = cms.bool(False),
0020     ifTrackMCTruth = cms.bool(False),   
0021     checkIfGolden = cms.bool(False),    
0022     splitTracks = cms.InputTag("FinalTrackRefitter","","splitter"),
0023     splitGlobalMuons = cms.InputTag("muons","","splitter"),
0024     originalTracks = cms.InputTag("FirstTrackRefitter","","splitter"),
0025     originalGlobalMuons = cms.InputTag("muons","","Rec")
0026 )
0027 """
0028 
0029 ######################################################################
0030 ######################################################################
0031 TrackSplittingSequence = "process.cosmicValidation"
0032 
0033 
0034 ######################################################################
0035 ######################################################################
0036 trackSplitPlotExecution="""
0037 #make track splitting plots
0038 
0039 cp .oO[trackSplitPlotScriptPath]Oo. .
0040 root -x -b -q TkAlTrackSplitPlot.C++
0041 
0042 """
0043 
0044 ######################################################################
0045 ######################################################################
0046 
0047 trackSplitPlotTemplate="""
0048 #include "Alignment/OfflineValidation/macros/trackSplitPlot.C"
0049 
0050 /****************************************
0051 This can be run directly in root, or you
0052  can run ./TkAlMerge.sh in this directory
0053 It can be run as is, or adjusted to fit
0054  for misalignments or to only make
0055  certain plots
0056 ****************************************/
0057 
0058 /********************************
0059 To make ALL plots (247 in total):
0060   leave this file as is
0061 ********************************/
0062 
0063 /**************************************************************************
0064 to make all plots involving a single x or y variable, or both:
0065 Uncomment the line marked (B), and fill in for xvar and yvar
0066 
0067 Examples:
0068 
0069    xvar = "dxy", yvar = "ptrel" - makes plots of dxy vs Delta_pT/pT
0070                                   (4 total - profile and resolution,
0071                                    of Delta_pT/pT and its pull
0072                                    distribution)
0073    xvar = "all",   yvar = "pt"  - makes all plots involving Delta_pT
0074                                   (not Delta_pT/pT)
0075                                   (30 plots total:
0076                                    histogram and pull distribution, and
0077                                    their mean and width as a function
0078                                    of the 7 x variables)
0079    xvar = "",      yvar = "all" - makes all histograms of all y variables
0080                                   (including Delta_pT/pT)
0081                                   (16 plots total - 8 y variables,
0082                                    regular and pull histograms)
0083 **************************************************************************/
0084 
0085 /**************************************************************************************
0086 To make a custom selection of plots:
0087 Uncomment the lines marked (C) and this section, and fill in matrix however you want */
0088 
0089 /*
0090 Bool_t plotmatrix[xsize][ysize];
0091 void fillmatrix()
0092 {
0093     for (int x = 0; x < xsize; x++)
0094         for (int y = 0; y < ysize; y++)
0095             plotmatrix[x][y] = (.............................);
0096 }
0097 */
0098 
0099 /*
0100 The variables are defined in Alignment/OfflineValidation/macros/trackSplitPlot.h
0101  as follows:
0102 TString xvariables[xsize]      = {"", "pt", "eta", "phi", "dz",  "dxy", "theta",
0103                                   "qoverpt"};
0104 
0105 TString yvariables[ysize]      = {"pt", "pt",  "eta", "phi", "dz",  "dxy", "theta",
0106                                   "qoverpt", ""};
0107 Bool_t relativearray[ysize]    = {true, false, false, false, false, false, false,
0108                                   false,     false};
0109 Use matrix[x][y] = true to make that plot, and false not to make it.
0110 **************************************************************************************/
0111 
0112 /*************************************************************************************
0113 To fit for a misalignment, which can be combined with any other option:
0114 Uncomment the line marked (A) and this section, and choose your misalignment        */
0115 
0116 /*
0117 TString misalignment = "choose one";
0118 double *values = 0;
0119 double *phases = 0;
0120 //or:
0121 //    double values[number of files] = {...};
0122 //    double phases[number of files] = {...};
0123 */
0124 
0125 /*
0126 The options for misalignment are sagitta, elliptical, skew, telescope, or layerRot.
0127 If the magnitude and phase of the misalignment are known (i.e. Monte Carlo data using
0128  a geometry produced by the systematic misalignment tool), make values and phases into
0129  arrays, with one entry for each file, to make a plot of the result of the fit vs. the
0130  misalignment value.
0131 phases must be filled in for sagitta, elliptical, and skew if values is;
0132  for the others it has no effect
0133 *************************************************************************************/
0134 
0135 void TkAlTrackSplitPlot()
0136 {
0137     TkAlStyle::legendheader = ".oO[legendheader]Oo.";
0138     TkAlStyle::legendoptions = ".oO[legendoptions]Oo.";
0139     TkAlStyle::set(.oO[publicationstatus]Oo., .oO[era]Oo., ".oO[customtitle]Oo.", ".oO[customrighttitle]Oo.");
0140     outliercut = .oO[outliercut]Oo.;
0141     //fillmatrix();                                                         //(C)
0142     subdetector = ".oO[subdetector]Oo.";
0143     makePlots(
0144 .oO[PlottingInstantiation]Oo.
0145               ,
0146               //misalignment,values,phases,                                 //(A)
0147               ".oO[datadir]Oo./.oO[PlotsDirName]Oo."
0148               //,"xvar","yvar"                                              //(B)
0149               //,plotmatrix                                                 //(C)
0150              );
0151 }
0152 """