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
import FWCore.ParameterSet.Config as cms

from CondCore.DBCommon.CondDBSetup_cfi import *

import CalibTracker.Configuration.Common.PoolDBESSource_cfi

process = cms.Process("analyze")

process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")

process.load("Configuration.StandardSequences.GeometryIdeal_cff")

process.load("Configuration.StandardSequences.Services_cff")

process.load("Configuration.StandardSequences.MagneticField_cff")

process.load("Configuration.StandardSequences.Reconstruction_cff")

process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag.globaltag = 'GLOBAL_TAG::All'

process.Timing = cms.Service("Timing")

process.load("CondCore.DBCommon.CondDBCommon_cfi")
    
#process.SiStripLorentzAngle = cms.ESSource("PoolDBESSource",
#    BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
#    DBParameters = cms.PSet(messageLevel = cms.untracked.int32(2),
#                            authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
#                            ),
#    toGet = cms.VPSet(cms.PSet(record = cms.string('SiStripLorentzAngleRcd'),
#                               tag = cms.string('SiStripLA_TEST_Layers')
#    )),
#    connect = cms.string('sqlite_file:DB_LA_TEST_Layers.db')
#)
#                                      
#process.es_prefer_SiStripLorentzAngle   = cms.ESPrefer("PoolDBESSource","SiStripLorentzAngle")

process.load("RecoTracker.TrackProducer.TrackRefitters_cff")

process.load("DQMServices.Core.DQM_cfg")
process.DQM.collectorHost = ''

process.load("CalibTracker.SiStripLorentzAngle.SiStripLAProfileBooker_cfi")

process.load("Alignment.CommonAlignmentProducer.ALCARECOTkAlCosmics0T_cff")
process.ALCARECOTkAlCosmicsCTF0T.src='ALCARECOTkAlCosmicsCTF0T'
process.ALCARECOTkAlCosmicsCTF0T.ptMin=5.

process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi")

process.load("DQMServices.Components.MEtoEDMConverter_cfi")
 

process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.debugModules = cms.untracked.vstring('sistripLAProfile')
process.MessageLogger.cerr.enable = False

process.MessageLogger.files.MY_DEBUG_NUMBER =  cms.untracked.PSet(
      threshold = cms.untracked.string('DEBUG'),
      noLineBreaks = cms.untracked.bool(False),
      DEBUG = cms.untracked.PSet(limit = cms.untracked.int32(0))
 )

import FWCore.Python.FileUtils as FileUtils
readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('JLIST') )

process.source = cms.Source("PoolSource",fileNames = readFiles)

process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(NEVENT))

process.trackrefitter = cms.EDFilter("TrackRefitter",
    src = cms.InputTag("ALCARECOTkAlCosmicsCTF0T"),
    beamSpot = cms.InputTag("offlineBeamSpot"),
    constraint = cms.string(''),
    srcConstr  = cms.InputTag(''),
    Fitter = cms.string('RKFittingSmoother'),
    useHitsSplitting = cms.bool(False),
    TrajectoryInEvent = cms.bool(True),
    TTRHBuilder = cms.string('WithTrackAngle'),
    AlgorithmName = cms.string('ctf'),
    Propagator = cms.string('RungeKuttaTrackerPropagator')
)

process.LA_analysis = cms.Sequence(process.offlineBeamSpot*process.trackrefitter*process.sistripLAProfile*process.MEtoEDMConverter)

process.myOut = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string('file:MY_TMP/MY_HISTOS_HARV_NUMBER.root'),
outputCommands = cms.untracked.vstring('drop *','keep *_MEtoEDMConverter_*_*')
)

process.Schedule = cms.Path(process.seqALCARECOTkAlCosmicsCTF0T*process.LA_analysis)

process.outpath = cms.EndPath(process.myOut)

process.sistripLAProfile.UseStripCablingDB = cms.bool(False)
process.sistripLAProfile.Tracks = 'trackrefitter'
process.sistripLAProfile.TIB_bin = 120
process.sistripLAProfile.TOB_bin = 120
process.sistripLAProfile.SUM_bin = 120
process.sistripLAProfile.fileName = "file:MY_TMP/MY_HISTOS_NUMBER.root"
process.sistripLAProfile.treeName = "file:MY_TMP/MY_TREE_NUMBER.root"