|
|
Go to the documentation of this file. 3 TrackSplittingTemplate=
""" 4 import FWCore.ParameterSet.Config as cms 6 process = cms.Process("splitter") 11 process.load("FWCore.MessageLogger.MessageLogger_cfi") 12 MessageLogger = cms.Service("MessageLogger", 13 destinations = cms.untracked.vstring('LOGFILE_TrackSplitting_.oO[name]Oo.', 16 ## report only every 100th record 17 process.MessageLogger.cerr.FwkReport.reportEvery = 100 19 process.load('Configuration.StandardSequences.Services_cff') 20 process.load("Configuration.Geometry.GeometryDB_cff") 22 .oO[LoadGlobalTagTemplate]Oo. 24 # track selectors and refitting 25 process.load("Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi") 26 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff") 27 process.load("RecoTracker.TrackProducer.TrackRefitters_cff") 30 .oO[datasetDefinition]Oo. 32 ## for craft SP skim v5 33 #process.source.inputCommands = cms.untracked.vstring("keep *","drop *_*_*_FU","drop *_*_*_HLT","drop *_MEtoEDMConverter_*_*","drop *_lumiProducer_*_REPACKER") 34 #process.source.dropDescendantsOfDroppedBranches = cms.untracked.bool( False ) 38 process.load("Configuration.StandardSequences..oO[magneticField]Oo._cff") 41 from CondCore.CondDB.CondDB_cfi import * 45 ## track hit filter............................................................. 48 import RecoTracker.TrackProducer.TrackRefitters_cff 49 process.TrackRefitter1 = RecoTracker.TrackProducer.TrackRefitterP5_cfi.TrackRefitterP5.clone( 50 src = '.oO[TrackCollection]Oo.', 51 TrajectoryInEvent = True, 52 TTRHBuilder = "WithTrackAngle", 56 process.FittingSmootherRKP5.EstimateCut = -1 58 # module configuration 59 # alignment track selector 60 process.AlignmentTrackSelector.src = "TrackRefitter1" 61 process.AlignmentTrackSelector.filter = True 62 process.AlignmentTrackSelector.applyBasicCuts = True 63 process.AlignmentTrackSelector.ptMin = 0. 64 process.AlignmentTrackSelector.pMin = 4. 65 process.AlignmentTrackSelector.ptMax = 9999. 66 process.AlignmentTrackSelector.pMax = 9999. 67 process.AlignmentTrackSelector.etaMin = -9999. 68 process.AlignmentTrackSelector.etaMax = 9999. 69 process.AlignmentTrackSelector.nHitMin = 10 70 process.AlignmentTrackSelector.nHitMin2D = 2 71 process.AlignmentTrackSelector.chi2nMax = 9999. 72 process.AlignmentTrackSelector.applyMultiplicityFilter = True 73 process.AlignmentTrackSelector.maxMultiplicity = 1 74 process.AlignmentTrackSelector.applyNHighestPt = False 75 process.AlignmentTrackSelector.nHighestPt = 1 76 process.AlignmentTrackSelector.seedOnlyFrom = 0 77 process.AlignmentTrackSelector.applyIsolationCut = False 78 process.AlignmentTrackSelector.minHitIsolation = 0.8 79 process.AlignmentTrackSelector.applyChargeCheck = False 80 process.AlignmentTrackSelector.minHitChargeStrip = 50. 81 .oO[subdetselection]Oo. 82 #process.AlignmentTrackSelector.trackQualities = ["highPurity"] 83 #process.AlignmentTrackSelector.iterativeTrackingSteps = ["iter1","iter2"] 84 process.KFFittingSmootherWithOutliersRejectionAndRK.EstimateCut=30.0 85 process.KFFittingSmootherWithOutliersRejectionAndRK.MinNumberOfHits=4 86 #process.FittingSmootherRKP5.EstimateCut = 20.0 87 #process.FittingSmootherRKP5.MinNumberOfHits = 4 89 # configuration of the track spitting module 90 # new cuts allow for cutting on the impact parameter of the original track 91 process.load("RecoTracker.FinalTrackSelectors.cosmicTrackSplitter_cfi") 92 process.cosmicTrackSplitter.tracks = 'AlignmentTrackSelector' 93 process.cosmicTrackSplitter.tjTkAssociationMapTag = 'TrackRefitter1' 94 #process.cosmicTrackSplitter.excludePixelHits = False 96 #--------------------------------------------------------------------- 97 # the output of the track hit filter are track candidates 98 # give them to the TrackProducer 99 process.load("RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff") 100 process.HitFilteredTracks = RecoTracker.TrackProducer.CTFFinalFitWithMaterialP5_cff.ctfWithMaterialTracksCosmics.clone( 101 src = 'cosmicTrackSplitter', 102 TrajectoryInEvent = True, 103 TTRHBuilder = "WithTrackAngle", 104 NavigationSchool = "" 107 process.TrackRefitter2 = process.TrackRefitter1.clone( 108 src = 'HitFilteredTracks' 111 ### Now adding the construction of global Muons 113 # In 74X it no longer works if ReconstructionCosmics is imported 114 # Results in 73X are identical with or without it so it seems safe to remove 115 #process.load("Configuration.StandardSequences.ReconstructionCosmics_cff") 117 process.cosmicValidation = cms.EDAnalyzer("CosmicSplitterValidation", 118 ifSplitMuons = cms.bool(False), 119 ifTrackMCTruth = cms.bool(False), 120 checkIfGolden = cms.bool(False), 121 splitTracks = cms.InputTag("TrackRefitter2","","splitter"), 122 splitGlobalMuons = cms.InputTag("muons","","splitter"), 123 originalTracks = cms.InputTag("TrackRefitter1","","splitter"), 124 originalGlobalMuons = cms.InputTag("muons","","Rec") 127 process.TFileService = cms.Service("TFileService", 128 fileName = cms.string('.oO[outputFile]Oo.') 131 process.p = cms.Path(process.offlineBeamSpot*process.TrackRefitter1*process.AlignmentTrackSelector*process.cosmicTrackSplitter*process.HitFilteredTracks*process.TrackRefitter2*process.cosmicValidation) 138 trackSplitPlotExecution=
""" 139 #make track splitting plots 141 rfcp .oO[trackSplitPlotScriptPath]Oo. . 142 root -x -b -q TkAlTrackSplitPlot.C++ 149 trackSplitPlotTemplate=
""" 150 #include "Alignment/OfflineValidation/macros/trackSplitPlot.C" 152 /**************************************** 153 This can be run directly in root, or you 154 can run ./TkAlMerge.sh in this directory 155 It can be run as is, or adjusted to fit 156 for misalignments or to only make 158 ****************************************/ 160 /******************************** 161 To make ALL plots (247 in total): 162 leave this file as is 163 ********************************/ 165 /************************************************************************** 166 to make all plots involving a single x or y variable, or both: 167 Uncomment the line marked (B), and fill in for xvar and yvar 171 xvar = "dxy", yvar = "ptrel" - makes plots of dxy vs Delta_pT/pT 172 (4 total - profile and resolution, 173 of Delta_pT/pT and its pull 175 xvar = "all", yvar = "pt" - makes all plots involving Delta_pT 178 histogram and pull distribution, and 179 their mean and width as a function 180 of the 7 x variables) 181 xvar = "", yvar = "all" - makes all histograms of all y variables 182 (including Delta_pT/pT) 183 (16 plots total - 8 y variables, 184 regular and pull histograms) 185 **************************************************************************/ 187 /************************************************************************************** 188 To make a custom selection of plots: 189 Uncomment the lines marked (C) and this section, and fill in matrix however you want */ 192 Bool_t plotmatrix[xsize][ysize]; 195 for (int x = 0; x < xsize; x++) 196 for (int y = 0; y < ysize; y++) 197 plotmatrix[x][y] = (.............................); 202 The variables are defined in Alignment/OfflineValidation/macros/trackSplitPlot.h 204 TString xvariables[xsize] = {"", "pt", "eta", "phi", "dz", "dxy", "theta", 207 TString yvariables[ysize] = {"pt", "pt", "eta", "phi", "dz", "dxy", "theta", 209 Bool_t relativearray[ysize] = {true, false, false, false, false, false, false, 211 Use matrix[x][y] = true to make that plot, and false not to make it. 212 **************************************************************************************/ 214 /************************************************************************************* 215 To fit for a misalignment, which can be combined with any other option: 216 Uncomment the line marked (A) and this section, and choose your misalignment */ 219 TString misalignment = "choose one"; 223 // double values[number of files] = {...}; 224 // double phases[number of files] = {...}; 228 The options for misalignment are sagitta, elliptical, skew, telescope, or layerRot. 229 If the magnitude and phase of the misalignment are known (i.e. Monte Carlo data using 230 a geometry produced by the systematic misalignment tool), make values and phases into 231 arrays, with one entry for each file, to make a plot of the result of the fit vs. the 233 phases must be filled in for sagitta, elliptical, and skew if values is; 234 for the others it has no effect 235 *************************************************************************************/ 237 void TkAlTrackSplitPlot() 239 TkAlStyle::legendheader = ".oO[legendheader]Oo."; 240 TkAlStyle::legendoptions = ".oO[legendoptions]Oo."; 241 TkAlStyle::set(.oO[publicationstatus]Oo., .oO[era]Oo., ".oO[customtitle]Oo.", ".oO[customrighttitle]Oo."); 242 outliercut = .oO[outliercut]Oo.; 243 //fillmatrix(); //(C) 244 subdetector = ".oO[subdetector]Oo."; 246 ".oO[trackSplitPlotInstantiation]Oo.", 247 //misalignment,values,phases, //(A) 248 ".oO[datadir]Oo./TrackSplittingPlots" 249 //,"xvar","yvar" //(B)