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
151 from AthenaServices.PartPropSvcConfig
import PartPropSvcCfg
152 kwargs.setdefault(
'PartPropSvc', result.getPrimaryAndMerge(
PartPropSvcCfg(flags)).name)
155 from RngComps.RngCompsConfig
import AthRNGSvcCfg
156 kwargs.setdefault(
'RndmSvc', result.getPrimaryAndMerge(
AthRNGSvcCfg(flags)).name)
158 from CosmicGenerator.CosmicGeneratorConfig
import CavernPropertyCalculator
159 theCavern = CavernPropertyCalculator()
174 kwargs.setdefault(
'emin', theCavern.CosmicEmin(flags))
175 kwargs.setdefault(
'emax', theCavern.CosmicEmax(flags))
179 kwargs.setdefault(
'xvert_low', theCavern.CosmicLowVertex_X(flags) )
180 kwargs.setdefault(
'xvert_hig', theCavern.CosmicHighVertex_X(flags))
181 kwargs.setdefault(
'zvert_low', theCavern.CosmicLowVertex_Z(flags) )
182 kwargs.setdefault(
'zvert_hig', theCavern.CosmicHighVertex_Z(flags))
183 kwargs.setdefault(
'Radius', theCavern.CosmicRadius(flags))
184 kwargs.setdefault(
'yvert_val', 57300.+41000.)
185 kwargs.setdefault(
'ctcut', 0.)
186 kwargs.setdefault(
'OptimizeForCavern',
True)
187 kwargs.setdefault(
'IPx', 0.)
188 kwargs.setdefault(
'IPy', 0.)
189 kwargs.setdefault(
'IPz', 0.)
191 if len(flags.Sim.CosmicFilterVolumeNames)>0:
192 print (
'Using %s Volume setup of Cosmic Generator...' % flags.Sim.CosmicFilterVolumeNames[0])
194 if 'Pixel' in flags.Sim.CosmicFilterVolumeNames:
195 kwargs.setdefault(
'doPathLengthCut',
True)
196 kwargs.setdefault(
'energyCutThreshold', 100.)
197 kwargs.setdefault(
'doAimedAtPixelsCut',
True)
198 kwargs.setdefault(
'pixelplane_maxx', 1150.)
199 kwargs.setdefault(
'pixelplane_maxz', 1650.)
200 kwargs.setdefault(
'doReweighting',
True)
201 kwargs.setdefault(
'rvert_max', 300000.)
204 kwargs.setdefault(
"Dsid", flags.Input.RunNumbers[0])
207 result.addEventAlgo(CompFactory.CosmicGenerator(
'CosmicGenerator', **kwargs))