Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:01

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("Demo")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.cerr.FwkReport.reportEvery = 50
0007 
0008 ### Configure alignment track selector
0009 process.load( "Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi" )
0010 process.AlignmentTrackSelector.src = cms.InputTag( "generalTracks" ) # for RelValZMM
0011 #process.AlignmentTrackSelector.src = cms.InputTag( "ALCARECOTkAlZMuMu" ) # for ALCARECO
0012 process.AlignmentTrackSelector.filter = cms.bool( True )
0013 process.AlignmentTrackSelector.applyBasicCuts = cms.bool( True )
0014 process.AlignmentTrackSelector.applyNHighestPt = cms.bool( True )
0015 process.AlignmentTrackSelector.TwoBodyDecaySelector.applyMassrangeFilter = cms.bool( True )
0016 process.AlignmentTrackSelector.TwoBodyDecaySelector.minXMass = cms.double( 80. )
0017 process.AlignmentTrackSelector.TwoBodyDecaySelector.maxXMass = cms.double( 100. )
0018 
0019 ### Producer for TwoBodyDecay momentum constraint
0020 process.load("RecoTracker.TrackProducer.TwoBodyDecayMomConstraintProducer_cff")
0021 #process.TwoBodyDecayMomConstraint.chi2Cut = 100
0022 
0023 ### Producer for full TwoBodyDecay constraint
0024 process.load("RecoTracker.TrackProducer.TwoBodyDecayConstraintProducer_cff")
0025 #process.TwoBodyDecayConstraint.chi2Cut = 100
0026 
0027 ### KFFittingSmoother without outlier rejection - to be used for constrained fit
0028 from TrackingTools.TrackFitters.KFFittingSmoother_cfi import KFFittingSmoother
0029 process.TwoBodyDecayTrackFitter = KFFittingSmoother.clone(
0030     ComponentName = cms.string( "TwoBodyDecayTrackFitter" ),
0031     Fitter = cms.string('RKFitter'),
0032     Smoother = cms.string('RKSmoother'),
0033     LogPixelProbabilityCut = cms.double(-15.0),
0034     EstimateCut = cms.double(-1.0),
0035 )
0036 
0037 from RecoTracker.TrackProducer.TrackRefitter_cfi import TrackRefitter
0038 
0039 ### First refitter - constructs transient tracks and trajectories from persistent tracks
0040 process.Refitter = TrackRefitter.clone(
0041     src = "AlignmentTrackSelector",
0042     TrajectoryInEvent = True
0043 )
0044 
0045 ### Refitter using the TwoBodyDecay momentum constraint
0046 process.TrackRefitterTBDMomConstraint = TrackRefitter.clone(
0047     src = "AlignmentTrackSelector",
0048     srcConstr = "TwoBodyDecayMomConstraint",
0049     Fitter = cms.string('TwoBodyDecayTrackFitter'),
0050     constraint = "momentum",
0051     TrajectoryInEvent = True
0052 )
0053 
0054 ### Refitter using the full TwoBodyDecay constraint
0055 process.TrackRefitterTBDConstraint = TrackRefitter.clone(
0056     src = "AlignmentTrackSelector",
0057     srcConstr = "TwoBodyDecayConstraint",
0058     Fitter = cms.string('TwoBodyDecayTrackFitter'),
0059     constraint = "trackParameters",
0060     TrajectoryInEvent = True
0061 )
0062 
0063 process.p = cms.Path( process.AlignmentTrackSelector * process.Refitter * 
0064                       process.TwoBodyDecayConstraint * process.TrackRefitterTBDConstraint *
0065                       process.TwoBodyDecayMomConstraint * process.TrackRefitterTBDMomConstraint )
0066 
0067 process.load( "RecoTracker.Configuration.RecoTracker_cff" )
0068 process.load( "Configuration.StandardSequences.Services_cff" )
0069 process.load( "Configuration.StandardSequences.GeometryPilot2_cff" )
0070 process.load( "Configuration.StandardSequences.MagneticField_38T_cff" )
0071 process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_cff" )
0072 process.GlobalTag.globaltag = "START44_V1::All"
0073 
0074 # process.GlobalTag.toGet = cms.VPSet(
0075 #     cms.PSet( record = cms.string( "TrackerAlignmentRcd" ),
0076 #               tag = cms.string( "TrackerIdealGeometry210_mc" ),
0077 #               connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) ),
0078 #     cms.PSet( record = cms.string( "TrackerAlignmentErrorRcd" ),
0079 #               tag = cms.string( "TrackerIdealGeometryErrors210_mc" ),
0080 #               connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) )
0081 # )
0082 
0083 process.source = cms.Source( "PoolSource",
0084     fileNames = cms.untracked.vstring(
0085         #"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0001/805E5772-15A6-E011-9596-002618943800.root",
0086         "rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/E6064D98-01A4-E011-AAA0-002618943956.root",
0087         #"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/7C358E88-10A4-E011-BCDA-00304866C398.root",
0088         #"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/5AF156B6-FDA3-E011-BDB7-0026189438C1.root"
0089     )
0090 )
0091 
0092 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0093 
0094 process.out = cms.OutputModule( "PoolOutputModule",
0095     fileName = cms.untracked.string( "output.root" ),
0096     outputCommands = cms.untracked.vstring("keep *Track*_*_*_*")
0097 )
0098 #process.outpath = cms.EndPath(process.out)