Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:52

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("MULTITRACKVALIDATORGENPS")
0004 
0005 # message logger
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 
0008 process.MessageLogger.TwoTrackMinimumDistanceLineLine = cms.untracked.PSet(
0009     reportEvery = cms.untracked.int32(1),
0010     limit = cms.untracked.int32( 10 )
0011 )
0012 process.MessageLogger.suppressWarning = cms.untracked.vstring('multiTrackValidatorGenPs')
0013 
0014 # source
0015 readFiles = cms.untracked.vstring()
0016 secFiles = cms.untracked.vstring() 
0017 source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
0018 
0019 #readFiles.extend( [
0020 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A962BB7-7290-E111-ABF6-003048FFD720.root',
0021 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A8181A3-B890-E111-BEC7-003048FFCB84.root',
0022 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A7E802E-6E90-E111-B850-0018F3D0962E.root',
0023 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A756CC1-8E90-E111-AD35-002618943930.root',
0024 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A55D5A7-8290-E111-9779-002618943914.root',
0025 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A430829-B98F-E111-891F-0026189438AA.root',
0026 #    '/store/mc/Summer12/TTJets_TuneZ2star_8TeV-madgraph-tauola/AODSIM/PU_S7_START52_V9-v1/0000/0A0AB31B-A490-E111-A735-001A92810AD8.root'
0027 #    ] );
0028 
0029 #readFiles.extend( [
0030 #    '/store/relval/CMSSW_6_1_0_pre5-START61_V4/RelValTTbar/GEN-SIM-RECO/v1/00000/26FB671D-0D27-E211-96DC-002618943833.root',
0031 #    '/store/relval/CMSSW_6_1_0_pre5-START61_V4/RelValTTbar/GEN-SIM-RECO/v1/00000/1EBD597F-0927-E211-A03A-002618943849.root' ] );
0032 
0033 readFiles.extend( [
0034     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/FA718DED-4C29-E211-B337-002354EF3BDA.root',
0035     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/D6FA7621-7F29-E211-B8D1-00248C55CC97.root',
0036     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/D44FCB0B-3429-E211-8C07-003048FFCB6A.root',
0037     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/C6EC8844-3129-E211-840F-002618943849.root',
0038     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/6E4C6838-6029-E211-AF06-003048FFD756.root',
0039     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/60314571-3229-E211-841D-003048678BAC.root',
0040     '/store/relval/CMSSW_6_1_0_pre5-PU_START61_V4/RelValTTbar/GEN-SIM-RECO/v2/00000/309E8B5D-3629-E211-9FEF-0026189438E0.root'] );
0041 
0042 process.source = source
0043 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(250) )
0044 
0045 ### conditions
0046 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0047 process.GlobalTag.globaltag = 'START61_V4::All'
0048 
0049 ### standard includes
0050 process.load('Configuration/StandardSequences/Services_cff')
0051 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0052 process.load("Configuration.StandardSequences.RawToDigi_cff")
0053 process.load("Configuration.EventContent.EventContent_cff")
0054 process.load("Configuration.StandardSequences.Reconstruction_cff")
0055 process.load("Configuration.StandardSequences.MagneticField_cff")
0056 
0057 ### validation-specific includes
0058 process.load("SimTracker.TrackAssociatorProducers.quickTrackAssociatorByHits_cfi")
0059 process.load("SimTracker.TrackAssociation.trackingParticleRecoTrackAsssociation_cfi")
0060 process.load("Validation.RecoTrack.MultiTrackValidatorGenPs_cfi")
0061 process.load("DQMServices.Components.EDMtoMEConverter_cff")
0062 process.load("Validation.Configuration.postValidation_cff")
0063 process.quickTrackAssociatorByHits.SimToRecoDenominator = cms.string('reco')
0064 
0065 process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByChi2_cfi")
0066 process.trackAssociatorByChi2.chi2cut = cms.double(500.0)
0067 process.trackAssociatorByPull = process.trackAssociatorByChi2.clone(chi2cut = 50.0,onlyDiagonal = True)
0068 
0069 
0070 ########### configuration MultiTrackValidatorGenPs ########
0071 process.multiTrackValidatorGenPs.outputFile = 'multitrackvalidatorgenps.root'
0072 process.multiTrackValidatorGenPs.associators = ['trackAssociatorByChi2','trackAssociatorByPull']
0073 process.multiTrackValidatorGenPs.UseAssociators = cms.bool(True)
0074 process.MTVHistoProducerAlgoForTrackerBlock.maxPt = cms.double(1100)
0075 
0076 process.load("Validation.RecoTrack.cuts_cff")
0077 #process.cutsRecoTracks.ptMin    = cms.double(0.5)
0078 #process.cutsRecoTracks.minRapidity  = cms.int32(-1.0)
0079 #process.cutsRecoTracks.maxRapidity  = cms.int32(1.0)
0080 process.cutsRecoTracks.quality = cms.vstring('highPurity')
0081 #process.cutsRecoTracks.min3DHit = cms.int32(3)
0082 #process.cutsRecoTracks.minPixHit = cms.int32(0)
0083 #process.cutsRecoTracks.algorithm = cms.vstring('tobTecStep')
0084 #process.cutsRecoTracks.maxChi2 = 10
0085 #process.cutsRecoTracks.minHit   = cms.int32(10)
0086 #process.cutsRecoTracks.src = cms.InputTag("TrackRefitter")
0087 
0088 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
0089 
0090 process.selectedVertices = cms.EDFilter("VertexSelector",
0091     src = cms.InputTag('offlinePrimaryVertices'),
0092     cut = cms.string("isValid & ndof >= 4 & chi2 > 0 & tracksSize > 0 & abs(z) < 24 & abs(position.Rho) < 2."),
0093     filter = cms.bool(False)                                          
0094 )
0095 
0096 process.selectedFirstPrimaryVertex = cms.EDFilter("PATSingleVertexSelector",
0097     mode = cms.string('firstVertex'),
0098     vertices = cms.InputTag('selectedVertices'),
0099     filter = cms.bool(False)                                                    
0100 )
0101 
0102 process.trackWithVertexSelector = cms.EDProducer("TrackWithVertexSelector",
0103     # -- module configuration --
0104     src = cms.InputTag('generalTracks'),
0105     quality = cms.string("highPurity"),
0106     useVtx = cms.bool(True),
0107     vertexTag = cms.InputTag('selectedFirstPrimaryVertex'),
0108     nVertices = cms.uint32(1),
0109     vtxFallback = cms.bool(False),
0110     copyExtras = cms.untracked.bool(False),
0111     copyTrajectories = cms.untracked.bool(False),
0112     # --------------------------
0113     # -- these are the vertex compatibility cuts --
0114     zetaVtx = cms.double(0.2),
0115     rhoVtx = cms.double(0.1),
0116     # ---------------------------------------------
0117     # -- dummy selection on tracks --
0118     etaMin = cms.double(0.0),
0119     etaMax = cms.double(5.0),
0120     ptMin = cms.double(0.00001),
0121     ptMax = cms.double(999999.),
0122     d0Max = cms.double(999999.),
0123     dzMax = cms.double(999999.),
0124     normalizedChi2 = cms.double(999999.),
0125     numberOfValidHits = cms.uint32(0),
0126     numberOfLostHits = cms.uint32(999),
0127     numberOfValidPixelHits = cms.uint32(0),
0128     ptErrorCut = cms.double(999999.)
0129     # ------------------------------                                       
0130 )
0131 
0132 
0133 #process.multiTrackValidatorGenPs.label = ['cutsRecoTracks']
0134 #process.multiTrackValidatorGenPs.label = ['generalTracks']
0135 process.multiTrackValidatorGenPs.label = ['trackWithVertexSelector']
0136 
0137 process.tracking = cms.Sequence(
0138     process.siPixelRecHits
0139     * process.siStripMatchedRecHits
0140     * process.clusterSummaryProducer
0141     * process.trackingGlobalReco
0142 )
0143 
0144 process.refit = cms.Sequence(
0145     process.TrackRefitter
0146 )
0147 
0148 process.validation = cms.Sequence(
0149     #process.cutsRecoTracks *
0150     process.selectedVertices*process.selectedFirstPrimaryVertex*process.trackWithVertexSelector *
0151     process.trackAssociatorByChi2 *
0152     process.trackAssociatorByPull *
0153     process.multiTrackValidatorGenPs
0154 )
0155 
0156 # paths
0157 process.p = cms.Path(
0158     #process.tracking *
0159     #process.refit *
0160     process.validation
0161 )
0162 process.schedule = cms.Schedule(
0163       process.p
0164 )
0165 
0166