def run(self): '''Run the simulation''' if self._nevents > 0: print "Provided events ", self._nevents sleep(2) gRunManager.BeamOn(self._nevents) else: nFile = TFile(self._source, 'READ') t = nFile.Get("gRooTracker") print "Got entries from tree ", t.GetEntries() sleep(2) gRunManager.BeamOn(t.GetEntries()) self._nevents = t.GetEntries() return
def run(self): '''Run the simulation''' gRunManager.BeamOn(self._nevents) return
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) gRunManager.SetUserAction(myEA) myTA = TrackingAction.LengthTrackingAction() gRunManager.SetUserAction(myTA) gRunManager.Initialize() # This is a trick that, if enabled, lets the event action notify the # detector when the event is over. This allows the sensitive detector # to perform a bulk commit of 'mchit's to the event store. It's meant # to be an optimization since writing tons of small 'mchit's individually # to the database is slow. sd = detector.get_sensitive_detector() myEA.setSD(sd) gRunManager.BeamOn(config['events']) myEA.shutdown()
pid = 13 pga = GeneratorAction.ParticleGenerator(pos, mom, pid) pga = GeneratorAction.VlenfGeneratorAction(pga) gRunManager.SetUserAction(pga) processors = [] processors.append("AppendTruth") processors.append("CouchManager") myEA = EventAction.VlenfEventAction(processors) gRunManager.SetUserAction(myEA) myTA = TrackingAction.LengthTrackingAction() gRunManager.SetUserAction(myTA) # This is a trick that, if enabled, lets the event action notify the # detector when the event is over. This allows the sensitive detector # to perform a bulk commit of 'mchit's to the event store. It's meant # to be an optimization since writing tons of small 'mchit's individually # to the database is slow. sd = EmitNothingSD() myEA.setSD(sd) gRunManager.Initialize() gRunManager.BeamOn(int(1e6)) myEA.shutdown()