CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorDigiValidation.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("CastorTest")
4 
5 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
6 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
7 process.load("Configuration.StandardSequences.GeometryExtended_cff")
8 process.load("Configuration.EventContent.EventContent_cff")
9 
10 process.load("SimG4Core.Application.g4SimHits_cfi")
11 process.load("Configuration.StandardSequences.Generator_cff")
12 process.load("SimGeneral.MixingModule.mixNoPU_cfi")
13 process.load("Geometry.CaloEventSetup.CaloGeometry_cff")
14 
15 process.load("SimCalorimetry.CastorSim.castordigi_cfi")
16 
17 process.load("RecoLocalCalo.CastorReco.CastorSimpleReconstructor_cfi")
18 
19 
20 process.load("CondCore.DBCommon.CondDBSetup_cfi")
21 process.load("CondCore.DBCommon.CondDBCommon_cfi")
22 
23 process.load('RecoLocalCalo.Castor.Castor_cff')
24 process.castor_db_producer = cms.ESProducer("CastorDbProducer")
25 
26 process.MessageLogger = cms.Service("MessageLogger",
27  destinations = cms.untracked.vstring('cout')
28 )
29 
30 process.load("Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff")
31 
32 process.RandomNumberGeneratorService.theSource.initialSeed = 15875319
33 process.RandomNumberGeneratorService.generator.initialSeed = 9792301
34 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 2263014
35 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 124
36 process.RandomNumberGeneratorService.mix.initialSeed = 22159
37 process.RandomNumberGeneratorService.simCastorDigis.initialSeed = 210
38 
39 
40 process.maxEvents = cms.untracked.PSet(
41  input = cms.untracked.int32(10)
42 )
43 
44 process.source = cms.Source("EmptySource")
45 
46 process.generator = cms.EDProducer("FlatRandomEGunProducer",
47  PGunParameters = cms.PSet(
48  PartID = cms.vint32(13),
49  MinEta = cms.double(5.2),
50  MaxEta = cms.double(6.6),
51  MinPhi = cms.double(-3.14),
52  MaxPhi = cms.double(3.14),
53  MinE = cms.double(50.00),
54  MaxE = cms.double(50.00)
55  ),
56  AddAntiParticle = cms.bool(True),
57  Verbosity = cms.untracked.int32(0)
58 )
59 
60 
61 process.es_pool = cms.ESSource( "PoolDBESSource",
62  process.CondDBSetup,
63  timetype = cms.string('runnumber'),
64 # connect = cms.string('frontier://cmsfrontier.cern.ch:8000/FrontierPrep/CMS_COND_30X_HCAL'),
65  connect = cms.string('sqlite_file:testExample.db'),
66  authenticationMethod = cms.untracked.uint32(0),
67  toGet = cms.VPSet(
68  cms.PSet(
69  record = cms.string('CastorPedestalsRcd'),
70  tag = cms.string('castor_pedestals_v1.0_test')
71  ),
72  cms.PSet(
73  record = cms.string('CastorPedestalWidthsRcd'),
74  tag = cms.string('castor_widths_v1.0_test')
75  ),
76  cms.PSet(
77  record = cms.string('CastorGainsRcd'),
78  tag = cms.string('castor_gains_v1.0_test')
79  ),
80  cms.PSet(
81  record = cms.string('CastorQIEDataRcd'),
82  tag = cms.string('castor_qie_v1.0_test')
83  ),
84  cms.PSet(
85  record = cms.string('CastorElectronicsMapRcd'),
86  tag = cms.string('castor_emap_v1.0_test')
87  ),
88  cms.PSet(
89  record = cms.string('CastorChannelQualityRcd'),
90  tag = cms.string('castor_channelstatus_v1.0_test')
91 
92  )
93 
94  )
95 )
96 process.es_hardcode = cms.ESSource("CastorHardcodeCalibrations",
97  toGet = cms.untracked.vstring('GainWidths')
98  )
99 
100 process.common_maximum_timex = cms.PSet( # need to be localy redefined
101  MaxTrackTime = cms.double(500.0), # need to be localy redefined
102  MaxTimeNames = cms.vstring(), # need to be localy redefined
103  MaxTrackTimes = cms.vdouble() # need to be localy redefined
104 )
105 
106 
107 
108 process.CaloSD = cms.PSet(
109  DetailedTiming = cms.bool(False),
110  EminTrack = cms.double(1.0),
111  Verbosity = cms.int32(0),
112  UseMap = cms.bool(True),
113  CheckHits = cms.int32(25)
114 )
115 
116 
117 
118 
119 
120 process.o1 = cms.OutputModule("PoolOutputModule",
121  fileName = cms.untracked.string('gen-sim-digi-reco_muon.root')
122 )
123 
124 process.p1 = cms.Path(process.generator*process.pgen*process.VtxSmeared*process.g4SimHits*process.mix*process.simCastorDigis*process.castorreco)
125 #*process.CastorFullReco)
126 process.outpath=cms.EndPath(process.o1)
127 
128 process.g4SimHits.UseMagneticField = False
129 process.g4SimHits.Physics.DefaultCutValue = 10.
130 
131 process.g4SimHits.Generator.ApplyEtaCuts = False
132 process.g4SimHits.UseMagneticField = False
133 
134 process.g4SimHits.CaloTrkProcessing.TestBeam = True
135 
136 process.g4SimHits.StackingAction = cms.PSet(
137  process.common_heavy_suppression,
138  process.common_maximum_timex, # need to be localy redefined
139  TrackNeutrino = cms.bool(False),
140  KillHeavy = cms.bool(False),
141  SaveFirstLevelSecondary = cms.untracked.bool(True),
142  SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(True),
143  SavePrimaryDecayProductsAndConversionsInCalo = cms.untracked.bool(True),
144  SavePrimaryDecayProductsAndConversionsInMuon = cms.untracked.bool(True)
145 )
146 
147 process.g4SimHits.SteppingAction = cms.PSet(
148  process.common_maximum_timex, # need to be localy redefined
149  KillBeamPipe = cms.bool(True),
150  CriticalEnergyForVacuum = cms.double(2.0),
151  CriticalDensity = cms.double(1e-15),
152  EkinNames = cms.vstring(),
153  EkinThresholds = cms.vdouble(),
154  EkinParticles = cms.vstring(),
155  Verbosity = cms.untracked.int32(0)
156 )
157 
158 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
159  type = cms.string('CastorTestAnalysis'),
160  CastorTestAnalysis = cms.PSet(
161  EventNtupleFileName = cms.string('eventNtuple_muon.root'),
162  Verbosity = cms.int32(0),
163  StepNtupleFileName = cms.string('stepNtuple_electron.root'),
164  StepNtupleFlag = cms.int32(0),
165  EventNtupleFlag = cms.int32(1)
166  )
167 ))
168 
169