Note that in this coordinate frame the y-axis points upward such that the cosmics arrive from upward to downward in y.
The production vertex of cosmics is randomly distributed (flat) in the x-z plane with boundaries given below. The energy range is given as well.
The following settings are tuned to scintillators of dimensions 140 x 0.5 x 100 cm^3 placed at +-115.0 cm
150 result.addService(CompFactory.PartPropSvc(InputFile=
"PDGTABLE.MeV"))
153 from RngComps.RngCompsConfig
import AthRNGSvcCfg
154 kwargs.setdefault(
'RndmSvc', result.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
156 from CosmicGenerator.CosmicGeneratorConfig
import CavernPropertyCalculator
157 theCavern = CavernPropertyCalculator()
172 kwargs.setdefault(
'emin', theCavern.CosmicEmin(flags))
173 kwargs.setdefault(
'emax', theCavern.CosmicEmax(flags))
177 kwargs.setdefault(
'xvert_low', theCavern.CosmicLowVertex_X(flags) )
178 kwargs.setdefault(
'xvert_hig', theCavern.CosmicHighVertex_X(flags))
179 kwargs.setdefault(
'zvert_low', theCavern.CosmicLowVertex_Z(flags) )
180 kwargs.setdefault(
'zvert_hig', theCavern.CosmicHighVertex_Z(flags))
181 kwargs.setdefault(
'Radius', theCavern.CosmicRadius(flags))
182 kwargs.setdefault(
'yvert_val', 57300.+41000.)
183 kwargs.setdefault(
'ctcut', 0.)
184 kwargs.setdefault(
'OptimizeForCavern',
True)
185 kwargs.setdefault(
'IPx', 0.)
186 kwargs.setdefault(
'IPy', 0.)
187 kwargs.setdefault(
'IPz', 0.)
189 if len(flags.Sim.CosmicFilterVolumeNames)>0:
190 print (
'Using %s Volume setup of Cosmic Generator...' % flags.Sim.CosmicFilterVolumeNames[0])
192 if 'Pixel' in flags.Sim.CosmicFilterVolumeNames:
193 kwargs.setdefault(
'doPathLengthCut',
True)
194 kwargs.setdefault(
'energyCutThreshold', 100.)
195 kwargs.setdefault(
'doAimedAtPixelsCut',
True)
196 kwargs.setdefault(
'pixelplane_maxx', 1150.)
197 kwargs.setdefault(
'pixelplane_maxz', 1650.)
198 kwargs.setdefault(
'doReweighting',
True)
199 kwargs.setdefault(
'rvert_max', 300000.)
202 kwargs.setdefault(
"Dsid", flags.Input.RunNumbers[0])
205 result.addEventAlgo(CompFactory.CosmicGenerator(
'CosmicGenerator', **kwargs))