Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /Alignment/OfflineValidation/README_JetHT.md is written in an unsupported language. File is not indexed.

0001 # JetHT validation
0002 
0003 ## Validation analysis - JetHT_cfg.py
0004 
0005 The vast majority of the time in the JetHT validation goes to running the actual validation analysis. This is done with cmsRun using the JetHT_cfg.py configuration file. To configure the analysis in the all-in-one framework, the following parameters can be set in the json/yaml configuration file:
0006 
0007 ```
0008 All-in-one:
0009 
0010 validations
0011     JetHT
0012         single
0013             myDataset
0014 ```
0015 
0016 Variable | Default value | Explanation
0017 -------- | ------------- | -----------
0018 dataset | Single test file | A file list containing all analysis files. For CRAB running, you can also specify a CMS dataset in the form: "/JetHT/Run2018A-TkAlMinBias-12Nov2019_UL2018-v2/ALCARECO". This will not work for condor jobs to encourage CRAB usage for large datasets.
0019 filesPerJob | 5 | Number of files per job when running via CRAB or condor
0020 alignments | None | An array of alignment sets for which the validation is run.
0021 trackCollection     | "ALCARECOTkAlMinBias" | Track collection used for the analysis.
0022 maxevents     | 1 | Maximum number of events before cmsRun terminates.
0023 iovListFile  | "nothing" | File containing a list of IOVs one run boundary each line.
0024 iovListList     | [0,500000] | If iovListFile is not defined, the IOV run boundaries are read from this array.
0025 triggerFilter    | "nothing" | HLT trigger filter used to filter the events selected for the analysis.
0026 printTriggers    | false | Print all available triggers to console. Set true only for local tests.
0027 mc | false | Flag for Monte Carlo. Use true for MC and false for data.
0028 profilePtBorders | [3,5,10,20,50,100] | List for pT borders used in wide pT bin profiles. Also the trend plots are calculated using these pT borders. If changed from default, the variable widePtBinBorders for the jetHtPlotter needs to be changed accordingly to get legends for trend plots correctly and avoid segmentation violations. This is done automatically by the all-in-one configuration.
0029 TrackerAlignmentRcdFile | "nothing" | Local database file from which the TrackerAlignmentRcd is read. Notice that usual method to set this is reading from the database for each alignment.
0030 TrackerAlignmentErrorFile | "nothing" | Local database file from which the TrackerAlignmentExtendedErrorRcd is read. Notice that usual method to set this is reading from the database for each alignment.
0031 
0032 ## File merging - addHistograms.sh
0033 
0034 The addHistograms.sh script is used to merge the root files for jetHT validation. Merging is fast and can easily be done locally in seconds, but the tool is fully integrated to the all-in-one configuration for automated processing.
0035 
0036 The instructions for standalone usage are:
0037 
0038 ```
0039 addHistograms.sh [doLocal] [inputFolderName] [outputFolderName] [baseName]
0040 doLocal = True: Merge local files. False: Merge files on CERN EOS
0041 inputFolderName = Name of the folder where the root files are
0042 outputFolderName = Name of the folder to which the output is transferred
0043 baseName = Name given for the output file without .root extension
0044 ```
0045 
0046 In use with all-in-one configuration, the following parameters can be set in the json/yaml configuration file:
0047 
0048 ```
0049 All-in-one:
0050 
0051 validations
0052     JetHT
0053         merge
0054             myDataset
0055 ```
0056 
0057 Any number of datasets can be defined.
0058 
0059 Variable | Default value | Explanation
0060 -------- | ------------- | -----------
0061 singles    | None | An array of single job names that must be finished before plotting can be run.
0062 alignments | None | An array of alignment names for which the files are merged within those alignments. Different alignments are kept separate.
0063 
0064 ## Plotting - jetHtPlotter
0065 
0066 The tool is originally designed to be used standalone, since the plotting the histograms locally does not take more that tens of second at maximum. But the plotter works also together with the all-in-one configuration. The only difference for user is the structure of the configuration file, that changes a bit between standalone and all-in-one usage.
0067 
0068 Below are listed all the variables that can be configured in the json file for the jetHtPlotter macro. If the value is not given in the configuration, the default value is used instead.
0069 
0070 ```
0071 Standalone:              All-in-one:
0072 
0073 jethtplot                alignments
0074     alignments               myAlignment
0075         myAlignment
0076 ```
0077 
0078 Up to four different alignments can be added for plotting. If more than four alignments are added, only first four are plotted.
0079 
0080 Variable | Default value | Explanation
0081 -------- | ------------- | -----------
0082 inputFile   |  None | File containing the jetHT validation histograms for myAlignment. All-in-one config automatically uses default file name for merge job. Must be given if using plotter standalone.
0083 legendText  | "AlignmentN" | Name with which the alignment is referred to in the legend of the drawn figures. For all-in-one configuration, this variable is called "title" instead of "legendText".
0084 color       | Varies | Marker color used with this alignment
0085 style       | 20 | Marker style used with this alignment
0086 markerSize  | 1  | Marker size used with this alignment
0087 copyErrorColor | false | true: Use marker color for statistical error bars. false: Draw statistical error bars black.
0088 
0089 ```
0090 Standalone:               All-in-one:
0091 
0092 jethtplot                 validations
0093     drawHistograms            JetHT
0094                                   plot
0095                                       myDataset
0096                                           jethtplot
0097                                               drawHistograms      
0098 ```
0099 
0100 Select histograms to be drawn for each alignment.
0101 
0102 Variable | Default value | Explanation
0103 -------- | ------------- | -----------
0104 drawDz       | false |  Draw probe track dz distributions
0105 drawDzError  | false |  Draw probe track dz error distributions
0106 drawDxy      | false |  Draw probe track dxy distributions
0107 drawDxyError | false |  Draw probe track dxy error distributions
0108 
0109 ```
0110 Standalone:               All-in-one:
0111 
0112 jethtplot                 validations
0113     drawProfiles              JetHT
0114                                   plot
0115                                       myDataset
0116                                           jethtplot
0117                                               drawProfiles      
0118 ```
0119 
0120 Select profile histograms to be drawn for each alignment.
0121 
0122 Variable | Default value | Explanation
0123 -------- | ------------- | -----------
0124 drawDzErrorVsPt      | false | Draw dz error profiles as a function of pT
0125 drawDzErrorVsPhi     | false | Draw dz error profiles as a function of phi
0126 drawDzErrorVsEta     | false | Draw dz error profiles as a function of eta
0127 drawDzErrorVsPtWide  | false | Draw dz error profiles as a function of pT in wide pT bins
0128 drawDxyErrorVsPt     | false | Draw dxy error profiles as a function of pT
0129 drawDxyErrorVsPhi    | false | Draw dxy error profiles as a function of phi
0130 drawDxyErrorVsEta    | false | Draw dxy error profiles as a function of eta
0131 drawDxyErrorVsPtWide | false | Draw dxy error profiles as a function of pT in wide pT bins
0132 drawReferenceProfile | false | Draw the profile from all runs as a reference to single IOV profile plots
0133 drawCentralEtaSummaryProfile | true | Draw the central eta curves to the all runs summary profile plots
0134 legendShiftTotalX    | 0 | Shift the legend from the default position in x-direction for profile plots. Units are in fractions of the canvas size.
0135 legendShiftTotalY    | 0 | Shift the legend from the default position in y-direction for profile plots. Units are in fractions of the canvas size.
0136 legendShiftX0    | 0 | Shift only the leftmost part of multicolumn legends in x-direction for profile plots. Units are in fractions of the canvas size.
0137 legendShiftX1    | 0 | Shift only the second column from the left in multicolumn legends in x-direction for profile plots. Units are in fractions of the canvas size.
0138 legendShiftX2    | 0 | Shift only the third column from the left in multicolumn legends in x-direction for profile plots. Units are in fractions of the canvas size.
0139 legendShiftY0    | 0 | Shift only the leftmost part of multicolumn legends in y-direction for profile plots. Units are in fractions of the canvas size.
0140 legendShiftY1    | 0 | Shift only the second column from the left in multicolumn legends in y-direction for profile plots. Units are in fractions of the canvas size.
0141 legendShiftY2    | 0 | Shift only the third column from the left in multicolumn legends in y-direction for profile plots. Units are in fractions of the canvas size.
0142 legendTextSize   | 0.05 | Text size used in the legend.
0143 legendTextFont   | 62 | Text font used in the legend.
0144 nIovInOnePlot          | 1 | Number of successive IOV:s drawn in a single plot if profile plots are drawn for each IOV. If there are more then one aligment that are plotted in single canvas, this is automatically set to 1 regardless of user input.
0145 
0146 ```
0147 Standalone:               All-in-one:
0148 
0149 jethtplot                 validations
0150     profileZoom               JetHT
0151                                   plot
0152                                       myDataset
0153                                           jethtplot
0154                                               profileZoom     
0155 ```
0156 
0157 Axis zooms for profile histograms.
0158 
0159 Variable | Default value | Explanation
0160 -------- | ------------- | -----------
0161 minZoomPtProfileDz       | 28 | Minimum y-axis zoom value for dz error profiles as a function of pT
0162 maxZoomPtProfileDz       | 60 | Maximum y-axis zoom value for dz error profiles as a function of pT
0163 minZoomPhiProfileDz      | 45 | Minimum y-axis zoom value for dz error profiles as a function of phi
0164 maxZoomPhiProfileDz      | 80 | Maximum y-axis zoom value for dz error profiles as a function of phi
0165 minZoomEtaProfileDz      | 30 | Minimum y-axis zoom value for dz error profiles as a function of eta
0166 maxZoomEtaProfileDz      | 95 | Maximum y-axis zoom value for dz error profiles as a function of eta
0167 minZoomPtWideProfileDz   | 25 | Minimum y-axis zoom value for dz error profiles as a function of pT in wide pT bins
0168 maxZoomPtWideProfileDz   | 90 | Maximum y-axis zoom value for dz error profiles as a function of pT in wide oT bins
0169 minZoomPtProfileDxy      | 7 | Minimum y-axis zoom value for dxy error profiles as a function of pT
0170 maxZoomPtProfileDxy      | 40 | Maximum y-axis zoom value for dxy error profiles as a function of pT
0171 minZoomPhiProfileDxy     | 40 | Minimum y-axis zoom value for dxy error profiles as a function of phi
0172 maxZoomPhiProfileDxy     | 70 | Maximum y-axis zoom value for dxy error profiles as a function of phi
0173 minZoomEtaProfileDxy     | 20 | Minimum y-axis zoom value for dxy error profiles as a function of eta
0174 maxZoomEtaProfileDxy     | 90 | Maximum y-axis zoom value for dxy error profiles as a function of eta
0175 minZoomPtWideProfileDxy  | 20 | Minimum y-axis zoom value for dxy error profiles as a function of pT in wide pT bins
0176 maxZoomPtWideProfileDxy  | 80 | Maximum y-axis zoom value for dxy error profiles as a function of pT in wide pT bins
0177 
0178 ```
0179 Standalone:               All-in-one:
0180 
0181 jethtplot                 validations
0182     drawTrends                JetHT
0183                                   plot
0184                                       myDataset
0185                                           jethtplot
0186                                               drawTrends     
0187 ```
0188 
0189 Select trend histograms to be drawn for each alignment.
0190 
0191 Variable | Default value | Explanation
0192 -------- | ------------- | -----------
0193 drawDzError  | false | Draw the trend plots for dz errors
0194 drawDxyError | false | Draw the trend plots for dxy errors
0195 legendShiftTotalX    | 0 | Shift the legend from the default position in x-direction for trend plots. Units are in fractions of the canvas size.
0196 legendShiftTotalY    | 0 | Shift the legend from the default position in y-direction for trend plots. Units are in fractions of the canvas size.
0197 legendTextSize   | 0.05 | Text size used in the legend.
0198 legendTextFont   | 62 | Text font used in the legend.
0199 drawYearLines    | false | Draw vertical lines to trend plot marking for example different years of data taking.
0200 runsForLines     | [290543,314881] | List of run numbers to which the vertical lines in the trend plots are drawn.
0201 yearLineColor | 1 | Color of the drawn vertical lines
0202 yearLineWidth | 1 | Width of the drawn vertical lines
0203 yearLineStyle | 1 | Style of the drawn vertical lines
0204 useLuminosityAxis | true | true: For trend plots, make the width of the x-axis bin for each IOV proportional to the integrated luminosity within that IOV. false: Each IOV has the same bin width in x-axis.
0205 skipRunsWithNoData | false | true: If an IOV defined in lumiPerIovFile does not have any data, do not draw empty space to the x-axis for this IOV. false: Draw empty space for IOV:s with no data.
0206 drawTags | false | Draw manually defined tags to trend plots.
0207 tagLabels | [["2016",0.105,0.855],["2017",0.305,0.855],["2018",0.563,0.855]] | Tags to draw to the trend plots. This is an array of arrays, where the inner arrays must be in format ["tagText", tagPositionX, tagPositionY].
0208 tagTextSize | 0.05 | Text size for the drawn tags
0209 tagTextFont | 42 | Text font for the drawn tags
0210 canvasHeight | 400 | Height of the canvas in trend plots
0211 canvasWidth | 1000 | Width of the canvas in trend plots
0212 marginLeft | 0.08 | Left margin for the trend canvas
0213 marginRight | 0.03 | Right margin for the trend canvas
0214 marginTop | 0.06 | Top margin for the trend canvas
0215 marginBottom | 0.15 | Bottom margin for the trend canvas
0216 titleOffsetX | 1.1 | Offset of the x-axis title in trend plots
0217 titleOffsetY | 0.55 | Offset of the y-axis title in trend plots
0218 titleSizeX | 0.06 | Size of the x-axis title in trend plots
0219 titleSizeY | 0.06 | Size of the y-axis title in trend plots
0220 labelOffsetX | 0.01 | Offset of the x-axis label in trend plots
0221 labelOffsetY | 0.007 | Offset of the y-axis label in trend plots
0222 labelSizeX | 0.05 | Size of the x-axis label in trend plots
0223 labelSizeY | 0.05 | Size of the y-axis label in trend plots
0224 
0225 ```
0226 Standalone:               All-in-one:
0227 
0228 jethtplot                 validations
0229     trendZoom                 JetHT
0230                                   plot
0231                                       myDataset
0232                                           jethtplot
0233                                               trendZoom     
0234 ```
0235 
0236 Axis zooms for trend histograms.
0237 
0238 Variable | Default value | Explanation
0239 -------- | ------------- | -----------
0240 minZoomDzTrend   | 20 | Minimum y-axis zoom value for dz error trends
0241 maxZoomDzTrend   | 95 | Maximum y-axis zoom value for dz error trends
0242 minZoomDxyTrend  | 10 | Minimum y-axis zoom value for dxy error trends
0243 maxZoomDxyTrend  | 90 | Maximum y-axis zoom value for dxy error trends
0244 
0245 ```
0246 Standalone:               All-in-one:
0247 
0248 jethtplot                 validations
0249                               JetHT
0250                                   plot
0251                                       myDataset
0252                                           jethtplot    
0253 ```
0254 
0255 All the remaining parameters
0256 
0257 Variable | Default value | Explanation
0258 -------- | ------------- | -----------
0259 drawTrackQA            | false | Draw the track QA plots (number of vertices, tracks per vertex, track pT, track phi, and track eta).
0260 lumiPerIovFile         | "lumiPerRun_Run2.txt" | File containing integrated luminosity for each IOV.
0261 iovListMode            | "run" | If "IOV", the plot legends are drawn as IOV NNN-NNN. Otherwise they are Run NNN.
0262 legendTextForAllRuns   | "All" | String referring to all runs included in the file. If you want better description than "all", you can set this to for example "Run2018A" or similar.
0263 drawPlotsForEachIOV    | false | true: Draw the dxy and dz histograms and profiles separately for each IOV defined in the lumiPerIovFile. false: Only draw plots integrated over all IOVs.
0264 widePtBinBorders       | [3,5,10,20,50,100] | List for pT borders used in wide pT bin profiles. Also the trend plots are calculated using these pT borders. This needs to be set to same value as the profilePtBorders variable used in the corresponding validation analysis. The all-in-one config does this automatically for you.
0265 normalizeQAplots       | true | true: For track QA plots, normalize each distribution with its integral. false: No normalization for QA plots, show directly the counts.
0266 makeIovlistForSlides   | false | true: Create a text file to be used as input for prepareSlides.sh script for making latex presentation template with profile plots from each IOV. false: Do not do this.
0267 iovListForSlides       | "iovListForSlides.txt" | Name given to the above list.
0268 saveComment            | "" | String of text added to all saved figures.
0269 
0270 ```
0271 All-in-one:
0272 
0273 validations
0274     JetHT
0275         plot
0276             myDataset
0277 ```
0278 
0279 Parameters only used in all-in-one tool. Any number of datasets can be defined.
0280 
0281 Variable | Default value | Explanation
0282 -------- | ------------- | -----------
0283 merges     | None | An array of merge job names that must be finished before plotting can be run.
0284 alignments | None | An array of alignment names that will be plotted.