CMS 3D CMS Logo

testHGCalCellHitSum_cfg.py
Go to the documentation of this file.
1 
8 import FWCore.ParameterSet.Config as cms
9 import os, sys, imp, re
10 import FWCore.ParameterSet.VarParsing as VarParsing
11 
12 
14 options = VarParsing.VarParsing('standard')
15 options.register('geometry',
16  "D92",
17  VarParsing.VarParsing.multiplicity.singleton,
18  VarParsing.VarParsing.varType.string,
19  "geometry of operations: D88, D92, D93")
20 
21 
22 options.parseArguments()
23 
24 import FWCore.ParameterSet.Config as cms
25 from Configuration.Eras.Era_Phase2C11I13M9_cff import Phase2C11I13M9
26 process = cms.Process('HGCalCellHit',Phase2C11I13M9)
27 
28 print(options)
29 
30 
32 
33 if (options.geometry == "D88"):
34  process.load('Configuration.Geometry.GeometryExtended2026D88Reco_cff')
35  geomFile = 'Validation/HGCalValidation/data/wafer_v16.csv'
36  outputFile = 'file:geantoutputD88.root'
37 elif (options.geometry == "D93"):
38  process.load('Configuration.Geometry.GeometryExtended2026D93Reco_cff')
39  geomFile = 'Validation/HGCalValidation/data/wafer_v17.csv'
40  outputFile = 'file:geantoutputD93.root'
41 else:
42  process.load('Configuration.Geometry.GeometryExtended2026D92Reco_cff')
43  geomFile = 'Validation/HGCalValidation/data/wafer_v17.csv'
44  outputFile = 'file:geantoutputD92.root'
45 
46 print("Geometry file: ", geomFile)
47 print("Output file: ", outputFile)
48 
49 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
50 process.load('FWCore.MessageService.MessageLogger_cfi')
51 process.MessageLogger.cerr.FwkReport.reportEvery = 100
52 if hasattr(process,'MessageLogger'):
53  process.MessageLogger.ValidHGCal=dict()
54 
55 process.load("IOMC.RandomEngine.IOMC_cff")
56 process.RandomNumberGeneratorService.generator.initialSeed = 456789
57 
58 process.source = cms.Source("PoolSource",
59  fileNames = cms.untracked.vstring('file:step1.root')
60 )
61 
62 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1))
63 
64 process.load('Validation.HGCalValidation.hgcalCellHitSum_cfi')
65 
66 process.hgcalCellHitSumEE = process.hgcalCellHitSum.clone(
67  geometryFileName = geomFile
68 )
69 
70 process.hgcalCellHitSumHEF = process.hgcalCellHitSum.clone(
71  simhits = ('g4SimHits', 'HGCHitsHEfront'),
72  detector = 'HGCalHESiliconSensitive',
73  geometryFileName = geomFile
74 )
75 
76 process.TFileService = cms.Service("TFileService",
77  fileName = cms.string(outputFile) )
78 
79 process.p = cms.Path(process.hgcalCellHitSumEE*process.hgcalCellHitSumHEF)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47