Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:40

0001 import FWCore.ParameterSet.Config as cms
0002 from FWCore.ParameterSet.VarParsing import VarParsing
0003 
0004 options = VarParsing()
0005 options.register ("pixels"      , 27370,  VarParsing.multiplicity.singleton, VarParsing.varType.int)
0006 options.register ("npeMin"      , 1000,   VarParsing.multiplicity.singleton, VarParsing.varType.int)
0007 options.register ("npeMax"      , 57000,  VarParsing.multiplicity.singleton, VarParsing.varType.int)
0008 options.register ("npeStep"     , 50,     VarParsing.multiplicity.singleton, VarParsing.varType.int)
0009 options.register ("nReps"       , 5,      VarParsing.multiplicity.singleton, VarParsing.varType.int)
0010 options.register ("nBins"       , 1200,   VarParsing.multiplicity.singleton, VarParsing.varType.int)
0011 options.register ("binMin"      , 0,      VarParsing.multiplicity.singleton, VarParsing.varType.int)
0012 options.register ("binMax"      , 60000,  VarParsing.multiplicity.singleton, VarParsing.varType.int)
0013 options.register ("tau"         , 10.,    VarParsing.multiplicity.singleton, VarParsing.varType.float)
0014 options.register ("dt"          , 0.5,    VarParsing.multiplicity.singleton, VarParsing.varType.float)
0015 options.register ("nPreciseBins", 500,    VarParsing.multiplicity.singleton, VarParsing.varType.int)
0016 options.register ("fitname"     , "pol2", VarParsing.multiplicity.singleton, VarParsing.varType.string)
0017 options.register ("signalShape" , 206,    VarParsing.multiplicity.singleton, VarParsing.varType.int)
0018 options.parseArguments()
0019 
0020 process = cms.Process("demo")
0021 
0022 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0023 process.source = cms.Source("EmptySource")
0024 
0025 process.load("Configuration.StandardSequences.Services_cff")
0026 process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
0027     ana = cms.PSet(
0028         initialSeed = cms.untracked.uint32(12345),
0029         engineName = cms.untracked.string('HepJamesRandom')
0030     )
0031 )
0032 
0033 process.ana = cms.EDAnalyzer("SiPMNonlinearityAnalyzer",
0034     pixels       = cms.uint32(options.pixels      ),
0035     npeMin       = cms.uint32(options.npeMin      ),
0036     npeMax       = cms.uint32(options.npeMax      ),
0037     npeStep      = cms.uint32(options.npeStep     ),
0038     nReps        = cms.uint32(options.nReps       ),
0039     nBins        = cms.uint32(options.nBins       ),
0040     binMin       = cms.uint32(options.binMin      ),
0041     binMax       = cms.uint32(options.binMax      ),
0042     tau          = cms.double(options.tau         ),
0043     dt           = cms.double(options.dt          ),
0044     nPreciseBins = cms.uint32(options.nPreciseBins),
0045     fitname      = cms.string(options.fitname     ),
0046     signalShape  = cms.uint32(options.signalShape ),
0047 )
0048 
0049 process.TFileService = cms.Service("TFileService",
0050     fileName = cms.string("nonlin_pixels"+str(options.pixels)+"_npeMin"+str(options.npeMin)+"_npeMax"+str(options.npeMax)+"_npeStep"+str(options.npeStep)+"_nReps"+str(options.nReps)+"_tau"+str(options.tau)+"_"+options.fitname+"_shape"+str(options.signalShape)+".root")
0051 )
0052 
0053 process.p1 = cms.Path(process.ana)