Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
import FWCore.ParameterSet.Config as cms

allTrackProducer   = {}
mainfolderName   = {}
vertexfolderName = {}
sequenceName = {}
trackPtN   = {}
trackPtMin = {}
trackPtMax = {}
pcaZtoPVMax = {}
pcaZtoPVMin = {}
doPlotsPCA = {}
numCutString = {}
denCutString = {}
doGoodTracksPlots                   = {}
doTrackerSpecific                   = {}
doHitPropertiesPlots                = {}
doGeneralPropertiesPlots            = {}
doBeamSpotPlots                     = {}
doSeedParameterHistos               = {}
doRecHitVsPhiVsEtaPerTrack          = {}
doRecHitVsPtVsEtaPerTrack           = {}
doGoodTrackRecHitVsPhiVsEtaPerTrack = {}
doLayersVsPhiVsEtaPerTrack          = {}
doGoodTrackLayersVsPhiVsEtaPerTrack = {}
doPUmonitoring                      = {}
doPlotsVsBXlumi                     = {}
doPlotsVsGoodPVtx                   = {}
doEffFromHitPatternVsPU             = {}
doEffFromHitPatternVsBX             = {}
doEffFromHitPatternVsLumi           = {}
doStopSource                        = {}

selectedTracks = []

allTrackProducer['generalTracks'] = 'generalTracks'
mainfolderName  ['generalTracks'] = 'Tracking/TrackParameters/generalTracks'
vertexfolderName['generalTracks'] = 'Tracking/PrimaryVertices/generalTracks'
trackPtN        ['generalTracks'] = cms.int32(100)
trackPtMin      ['generalTracks'] = cms.double(0.)
trackPtMax      ['generalTracks'] = cms.double(100.)
pcaZtoPVMax     ['generalTracks'] = cms.double(30.)
pcaZtoPVMin     ['generalTracks'] = cms.double(-30.)
doPlotsPCA      ['generalTracks'] = cms.bool(False)
numCutString    ['generalTracks'] = cms.string("quality('highPurity')") # num := den + quality('highPurity')
denCutString    ['generalTracks'] = cms.string("") # den := kinematics cuts
doGoodTracksPlots                   ['generalTracks'] = cms.bool(True)
doTrackerSpecific                   ['generalTracks'] = cms.bool(True)
doHitPropertiesPlots                ['generalTracks'] = cms.bool(True)
doGeneralPropertiesPlots            ['generalTracks'] = cms.bool(True)
doBeamSpotPlots                     ['generalTracks'] = cms.bool(True)
doSeedParameterHistos               ['generalTracks'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['generalTracks'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['generalTracks'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['generalTracks'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doPUmonitoring                      ['generalTracks'] = cms.bool(False)
doPlotsVsBXlumi                     ['generalTracks'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['generalTracks'] = cms.bool(True)
doEffFromHitPatternVsPU             ['generalTracks'] = cms.bool(True)
doEffFromHitPatternVsBX             ['generalTracks'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['generalTracks'] = cms.bool(False)
doStopSource                        ['generalTracks'] = cms.bool(True)

trackSelector = cms.EDFilter('TrackSelector',
    src = cms.InputTag('generalTracks'),
    cut = cms.string("")
)

### highpurity definition: https://cmssdt.cern.ch/SDT/lxr/source/RecoTracker/FinalTrackSelectors/python/selectHighPurity_cfi.py
highPurityPtRange0to1 = trackSelector.clone(
    cut = "quality('highPurity') & pt >= 0 & pt < 1 "
)

sequenceName    ['highPurityPtRange0to1'] = highPurityPtRange0to1
allTrackProducer['highPurityPtRange0to1'] = 'generalTracks'
mainfolderName  ['highPurityPtRange0to1'] = 'Tracking/TrackParameters/highPurityTracks/pt_0to1'
vertexfolderName['highPurityPtRange0to1'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_0to1'
trackPtN        ['highPurityPtRange0to1'] = cms.int32(10)
trackPtMin      ['highPurityPtRange0to1'] = cms.double(0.)
trackPtMax      ['highPurityPtRange0to1'] = cms.double(1.)
pcaZtoPVMax     ['highPurityPtRange0to1'] = cms.double(30.)
pcaZtoPVMin     ['highPurityPtRange0to1'] = cms.double(-30.)
numCutString    ['highPurityPtRange0to1'] = cms.string(" pt >= 0 & pt < 1 & quality('highPurity')") # num := den + quality('highPurity') [it is the same as the main selection, but just to be sure ...]
denCutString    ['highPurityPtRange0to1'] = cms.string(" pt >= 0 & pt < 1 ") # den := kinematics cut
doPlotsPCA      ['highPurityPtRange0to1'] = cms.bool(False)
doGoodTracksPlots                   ['highPurityPtRange0to1'] = cms.bool(False)
doTrackerSpecific                   ['highPurityPtRange0to1'] = cms.bool(False)
doHitPropertiesPlots                ['highPurityPtRange0to1'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPtRange0to1'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPtRange0to1'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPtRange0to1'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPtRange0to1'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPtRange0to1'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(False)
doLayersVsPhiVsEtaPerTrack          ['highPurityPtRange0to1'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(False)
doPUmonitoring                      ['highPurityPtRange0to1'] = cms.bool(True)
doPlotsVsBXlumi                     ['highPurityPtRange0to1'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPtRange0to1'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPtRange0to1'] = cms.bool(False)
doEffFromHitPatternVsBX             ['highPurityPtRange0to1'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['highPurityPtRange0to1'] = cms.bool(False)
doStopSource                        ['highPurityPtRange0to1'] = cms.bool(True)

highPurityPtRange1to10 = trackSelector.clone(
    cut = "quality('highPurity') & pt >= 1 & pt < 10 "
)

sequenceName    ['highPurityPtRange1to10'] = highPurityPtRange1to10 
allTrackProducer['highPurityPtRange1to10'] = 'generalTracks'
mainfolderName  ['highPurityPtRange1to10'] = 'Tracking/TrackParameters/highPurityTracks/pt_1to10'
vertexfolderName['highPurityPtRange1to10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1to10'
trackPtN        ['highPurityPtRange1to10'] = cms.int32(10)
trackPtMin      ['highPurityPtRange1to10'] = cms.double(1.)
trackPtMax      ['highPurityPtRange1to10'] = cms.double(10.)
pcaZtoPVMax     ['highPurityPtRange1to10'] = cms.double(30.)
pcaZtoPVMin     ['highPurityPtRange1to10'] = cms.double(-30.)
numCutString    ['highPurityPtRange1to10'] = cms.string(" pt >= 1 & pt < 10 & quality('highPurity')") # num := den + quality('highPurity') [it is the same as the main selection, but just to be sure ...]
denCutString    ['highPurityPtRange1to10'] = cms.string(" pt >= 1 & pt < 10 ") # den := kinematics cuts
doGoodTracksPlots                   ['highPurityPtRange1to10'] = cms.bool(True)
doTrackerSpecific                   ['highPurityPtRange1to10'] = cms.bool(True)
doHitPropertiesPlots                ['highPurityPtRange1to10'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPtRange1to10'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPtRange1to10'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPtRange1to10'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPtRange1to10'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPtRange1to10'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['highPurityPtRange1to10'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doPUmonitoring                      ['highPurityPtRange1to10'] = cms.bool(False)
doPlotsVsBXlumi                     ['highPurityPtRange1to10'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPtRange1to10'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPtRange1to10'] = cms.bool(False)
doEffFromHitPatternVsBX             ['highPurityPtRange1to10'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['highPurityPtRange1to10'] = cms.bool(False)
doStopSource                        ['highPurityPtRange1to10'] = cms.bool(True)

highPurityPt10 = trackSelector.clone(
    cut = "quality('highPurity') & pt >= 10"
)

sequenceName    ['highPurityPt10'] = highPurityPt10 
allTrackProducer['highPurityPt10'] = 'generalTracks'
mainfolderName  ['highPurityPt10'] = 'Tracking/TrackParameters/highPurityTracks/pt_10'
vertexfolderName['highPurityPt10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_10'
trackPtN        ['highPurityPt10'] = cms.int32(100)
trackPtMin      ['highPurityPt10'] = cms.double(10.)
trackPtMax      ['highPurityPt10'] = cms.double(110.)
pcaZtoPVMax     ['highPurityPt10'] = cms.double(30.)
pcaZtoPVMin     ['highPurityPt10'] = cms.double(-30.)
numCutString    ['highPurityPt10'] = cms.string(" pt >= 10 & quality('highPurity')") # num := den + quality('highPurity') [it is the same as the main selection, but just to be sure ...]
denCutString    ['highPurityPt10'] = cms.string(" pt >= 10 ") # den := kinematics cuts
doGoodTracksPlots                   ['highPurityPt10'] = cms.bool(True)
doTrackerSpecific                   ['highPurityPt10'] = cms.bool(True)
doHitPropertiesPlots                ['highPurityPt10'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPt10'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPt10'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPt10'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPt10'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPt10'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['highPurityPt10'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doPUmonitoring                      ['highPurityPt10'] = cms.bool(False)
doPlotsVsBXlumi                     ['highPurityPt10'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPt10'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPt10'] = cms.bool(False)
doEffFromHitPatternVsBX             ['highPurityPt10'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['highPurityPt10'] = cms.bool(False)
doStopSource                        ['highPurityPt10'] = cms.bool(True)

###### old monitored track collections
highPurityPt1 = trackSelector.clone(
    cut = "quality('highPurity') & pt >= 1"
)

sequenceName    ['highPurityPt1'] = highPurityPt1
allTrackProducer['highPurityPt1'] = 'generalTracks'
mainfolderName  ['highPurityPt1'] = 'Tracking/TrackParameters/highPurityTracks/pt_1'
vertexfolderName['highPurityPt1'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1'
trackPtN        ['highPurityPt1'] = cms.int32(100)
trackPtMin      ['highPurityPt1'] = cms.double(0.)
trackPtMax      ['highPurityPt1'] = cms.double(100.)
pcaZtoPVMax     ['highPurityPt1'] = cms.double(30.)
pcaZtoPVMin     ['highPurityPt1'] = cms.double(-30.)
doPlotsPCA      ['highPurityPt1'] = cms.bool(True)
numCutString    ['highPurityPt1'] = cms.string(" pt >= 1 & quality('highPurity')") # num := den + quality('highPurity') [it is the same as the main selection, but just to be sure ...]
denCutString    ['highPurityPt1'] = cms.string(" pt >= 1 ") # den := kinematics cut
doGoodTracksPlots                   ['highPurityPt1'] = cms.bool(True)
doTrackerSpecific                   ['highPurityPt1'] = cms.bool(True)
doHitPropertiesPlots                ['highPurityPt1'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPt1'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPt1'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPt1'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPt1'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPt1'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['highPurityPt1'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doPUmonitoring                      ['highPurityPt1'] = cms.bool(False)
doPlotsVsBXlumi                     ['highPurityPt1'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPt1'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPt1'] = cms.bool(True)
doEffFromHitPatternVsBX             ['highPurityPt1'] = cms.bool(True)
doEffFromHitPatternVsLumi           ['highPurityPt1'] = cms.bool(True)
doStopSource                        ['highPurityPt1'] = cms.bool(True)

###### forward-only monitored track collections
highPurityPt1Eta2p5to3p0 = trackSelector.clone(
    cut = "quality('highPurity') & pt >= 1 & abs(eta) > 2.5"
)

sequenceName    ['highPurityPt1Eta2p5to3p0'] = highPurityPt1Eta2p5to3p0
allTrackProducer['highPurityPt1Eta2p5to3p0'] = 'generalTracks'
mainfolderName  ['highPurityPt1Eta2p5to3p0'] = 'Tracking/TrackParameters/highPurityTracks/pt_1_Eta_2p5'
vertexfolderName['highPurityPt1Eta2p5to3p0'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1_Eta_2p5'
trackPtN        ['highPurityPt1Eta2p5to3p0'] = cms.int32(100)
trackPtMin	['highPurityPt1Eta2p5to3p0'] = cms.double(0.)
trackPtMax	['highPurityPt1Eta2p5to3p0'] = cms.double(100.)
pcaZtoPVMax     ['highPurityPt1Eta2p5to3p0'] = cms.double(30.)
pcaZtoPVMin     ['highPurityPt1Eta2p5to3p0'] = cms.double(-30.)
doPlotsPCA	['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
numCutString    ['highPurityPt1Eta2p5to3p0'] = cms.string(" pt >= 1 & abs(eta) > 2.5 & quality('highPurity')") # num := den + quality('highPurity') [it is the same as the main selection, but just to be sure ...]
denCutString    ['highPurityPt1Eta2p5to3p0'] = cms.string(" pt >= 1 & abs(eta) > 2.5") # den := kinematics cut
doGoodTracksPlots                   ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doTrackerSpecific                   ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doHitPropertiesPlots                ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPt1Eta2p5to3p0'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doPUmonitoring                      ['highPurityPt1Eta2p5to3p0'] = cms.bool(False)
doPlotsVsBXlumi                     ['highPurityPt1Eta2p5to3p0'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)
doEffFromHitPatternVsBX             ['highPurityPt1Eta2p5to3p0'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['highPurityPt1Eta2p5to3p0'] = cms.bool(False)
doStopSource                        ['highPurityPt1Eta2p5to3p0'] = cms.bool(True)




###### all tracks (no pt cut) associated to the PV
###### association is dz<1mm 
from CommonTools.RecoAlgos.TrackWithVertexSelector_cfi import *

trackAssociated2pvSelector = trackWithVertexSelector.clone(
    # the track collection
    src = 'generalTracks',
    # kinematic cuts  (pT in GeV)
    etaMin = 0.0,
    etaMax = 5.0,
    ptMin = 0.0,
    ptMax = 100000.0,
    # impact parameter cut (in cm)
    d0Max = 999.,
    dzMax = 999.,
    # quality cuts (valid hits, normalized chi2)
    normalizedChi2 = 999999.,
    numberOfValidHits = 0,
    numberOfLostHits = 999, ## at most 999 lost hits
    numberOfValidPixelHits = 0, ## at least <n> hits in the pixels
    ptErrorCut = 9999999., ## [pTError/pT]*max(1,normChi2) <= ptErrorCut
    quality = "highPurity", # quality cut as defined in reco::TrackBase
    # compatibility with a vertex ?
    useVtx = True,
    vertexTag = 'trackingDQMgoodOfflinePrimaryVertices',
    timesTag = '',
    timeResosTag = '',
    nVertices = 1, ## how many vertices to look at before dropping the track
    vtxFallback = True, ## falback to beam spot if there are no vertices
    # uses vtx=(0,0,0) with deltaZeta=15.9, deltaRho = 0.2
    zetaVtx = 999.,
    #rhoVtx = 0.2, ## tags used by b-tagging folks
    rhoVtx = 999., ## tags used by b-tagging folks
    nSigmaDtVertex = 0.
)

highPurityPV0p1 = trackAssociated2pvSelector.clone(
    zetaVtx = 0.1, # wrt PV
    #dzMax = 0.1 # wrt BS
)

PV0p1 = highPurityPV0p1.clone(
    quality = "" # quality cut as defined in reco::TrackBase
)

#sequenceName    ['highPurityPV0p1'] = highPurityPV0p1
sequenceName    ['highPurityPV0p1'] = highPurityPV0p1+PV0p1
allTrackProducer['highPurityPV0p1'] = 'PV0p1'
mainfolderName  ['highPurityPV0p1'] = 'Tracking/TrackParameters/highPurityTracks/dzPV0p1'
vertexfolderName['highPurityPV0p1'] = 'Tracking/PrimaryVertices/highPurityTracks/dzPV0p1'
trackPtN        ['highPurityPV0p1'] = cms.int32(100)
trackPtMin      ['highPurityPV0p1'] = cms.double(0.)
trackPtMax      ['highPurityPV0p1'] = cms.double(100.)
pcaZtoPVMax     ['highPurityPV0p1'] = cms.double(0.15)
pcaZtoPVMin     ['highPurityPV0p1'] = cms.double(-0.15)
doPlotsPCA      ['highPurityPV0p1'] = cms.bool(True)
numCutString    ['highPurityPV0p1'] = cms.string("quality('highPurity')") # num := den + quality('highPurity')
denCutString    ['highPurityPV0p1'] = cms.string("") # den := kinematic cuts
doGoodTracksPlots                   ['highPurityPV0p1'] = cms.bool(True)
doTrackerSpecific                   ['highPurityPV0p1'] = cms.bool(True)
doHitPropertiesPlots                ['highPurityPV0p1'] = cms.bool(True)
doGeneralPropertiesPlots            ['highPurityPV0p1'] = cms.bool(True)
doBeamSpotPlots                     ['highPurityPV0p1'] = cms.bool(True)
doSeedParameterHistos               ['highPurityPV0p1'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['highPurityPV0p1'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['highPurityPV0p1'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPV0p1'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack          ['highPurityPV0p1'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPV0p1'] = cms.bool(True)
doPUmonitoring                      ['highPurityPV0p1'] = cms.bool(False)
doPlotsVsBXlumi                     ['highPurityPV0p1'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['highPurityPV0p1'] = cms.bool(True)
doEffFromHitPatternVsPU             ['highPurityPV0p1'] = cms.bool(True)
doEffFromHitPatternVsBX             ['highPurityPV0p1'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['highPurityPV0p1'] = cms.bool(True)
doStopSource                        ['highPurityPV0p1'] = cms.bool(True)

#pixel tracks
hiConformalPixelTracksQA = trackSelector.clone(
    src = 'hiConformalPixelTracks',
    cut = "chi2/ndof/hitPattern.trackerLayersWithMeasurement < 200"
)

sequenceName    ['hiConformalPixelTracksQA'] = hiConformalPixelTracksQA
allTrackProducer['hiConformalPixelTracksQA'] = 'generalTracks'
mainfolderName  ['hiConformalPixelTracksQA'] = 'Tracking/TrackParameters/hiConformalPixelTracks'
vertexfolderName['hiConformalPixelTracksQA'] = 'Tracking/PrimaryVertices/hiConformalPixelTracks'
trackPtN        ['hiConformalPixelTracksQA'] = cms.int32(100)
trackPtMin      ['hiConformalPixelTracksQA'] = cms.double(0.)
trackPtMax      ['hiConformalPixelTracksQA'] = cms.double(10.)
pcaZtoPVMax     ['hiConformalPixelTracksQA'] = cms.double(30.)
pcaZtoPVMin     ['hiConformalPixelTracksQA'] = cms.double(-30.)
numCutString    ['hiConformalPixelTracksQA'] = cms.string(" pt >= 0 ") 
denCutString    ['hiConformalPixelTracksQA'] = cms.string(" pt >= 0 ") 
doPlotsPCA      ['hiConformalPixelTracksQA'] = cms.bool(False)
doGoodTracksPlots                   ['hiConformalPixelTracksQA'] = cms.bool(False)
doTrackerSpecific                   ['hiConformalPixelTracksQA'] = cms.bool(False)
doHitPropertiesPlots                ['hiConformalPixelTracksQA'] = cms.bool(True)
doGeneralPropertiesPlots            ['hiConformalPixelTracksQA'] = cms.bool(True)
doBeamSpotPlots                     ['hiConformalPixelTracksQA'] = cms.bool(True)
doSeedParameterHistos               ['hiConformalPixelTracksQA'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack          ['hiConformalPixelTracksQA'] = cms.bool(True)
doRecHitVsPtVsEtaPerTrack           ['hiConformalPixelTracksQA'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['hiConformalPixelTracksQA'] = cms.bool(False)
doLayersVsPhiVsEtaPerTrack          ['hiConformalPixelTracksQA'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['hiConformalPixelTracksQA'] = cms.bool(False)
doPUmonitoring                      ['hiConformalPixelTracksQA'] = cms.bool(True)
doPlotsVsBXlumi                     ['hiConformalPixelTracksQA'] = cms.bool(False)
doPlotsVsGoodPVtx                   ['hiConformalPixelTracksQA'] = cms.bool(True)
doEffFromHitPatternVsPU             ['hiConformalPixelTracksQA'] = cms.bool(False)
doEffFromHitPatternVsBX             ['hiConformalPixelTracksQA'] = cms.bool(False)
doEffFromHitPatternVsLumi           ['hiConformalPixelTracksQA'] = cms.bool(False)
doStopSource                        ['hiConformalPixelTracksQA'] = cms.bool(True)

selectedTracks.extend( ['generalTracks'] )
#selectedTracks.extend( ['highPurityPtRange0to1']  )
#selectedTracks.extend( ['highPurityPtRange1to10'] )
#selectedTracks.extend( ['highPurityPt10']         )

selectedTracks.extend( ['highPurityPt1'] )
selectedTracks.extend( ['highPurityPtRange0to1'] )
selectedTracks.extend( ['highPurityPV0p1'] )

# not by default
#selectedTracks.extend( ['highPurityPt1Eta2p5to3p0'] )


#selectedTracks2runSequence=cms.Sequence()
#for tracks in selectedTracks :
#    if tracks != 'generalTracks':
#        selectedTracks2runSequence+=sequenceName[tracks]

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
pp_on_AA.toModify(selectedTracks, func=lambda selectedTracks: selectedTracks.extend( ['hiConformalPixelTracksQA'] ))