def _init_user_actions(self): '''Initialize user actions''' self._run_action = MyRunAction() self._event_action = MyEventAction(treebuffer=self._treebuffer, outputtree=self._otree) self._step_action = MySteppingAction(treebuffer=self._treebuffer, geometry=self._geom, materials=self._materials, edepsim=self._include_edepsim, edepstep=self._edep_step) gRunManager.SetUserAction(self._run_action) gRunManager.SetUserAction(self._event_action) gRunManager.SetUserAction(self._step_action) return
def _init_generator(self): '''Initialize particle generator''' self._generator = MyGenieEvtGeneratorAction( genieEvtFilename=self._source, treebuffer=self._treebuffer, ofile=self._ofile) gRunManager.SetUserAction(self._generator) return
def _init_generator(self): '''Initialize particle generator''' if self._source.endswith('hepevt'): self._generator = MyHepEvtGeneratorAction( hepEvtFilename=self._source, treebuffer=self._treebuffer) else: self._source_pos = G4ThreeVector(0, 0, 0) self._generator = MyParticleGeneratorAction( particleName=self._source, energies=self._energies, position=self._source_pos, treebuffer=self._treebuffer) gRunManager.SetUserAction(self._generator) return
assert config['distribution'] == 'electron' or\ config['distribution'] == 'muon' or\ config['distribution'] == 'flat' log.warning('Energy argument ignored... assuming 3.8 GeV muons') pga = GeneratorAction.GenieGenerator(pos, mom, pid) else: if config['distribution'] != 'point': raise NotImplementedError pga = GeneratorAction.ParticleGenerator(pos, mom, pid) pga = GeneratorAction.VlenfGeneratorAction(pga) gRunManager.SetUserAction(pga) processors = [] processors.append("VlenfSimpleDigitizer") processors.append("EmptyTrackFromDigits") processors.append("FiducialCuts") processors.append("ExtractTracks") processors.append("CombineViews") processors.append("VlenfPolynomialFitter") processors.append("ClassifyVariables") processors.append("AppendTruth") processors.append("AppearanceCuts") processors.append("SaveInteresting") processors.append("CouchManager") myEA = EventAction.VlenfEventAction(processors)