Project

General

Profile

Bug #1405

Warning message when simulating protons

Added by Pidcott, Celeste over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Simulation
Target version:
-
Start date:
30 January 2014
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

When running simulate_mice.py for a proton beam, occasionally get the message "Warning: invalid value encountered in double_scalars". In attached log this is first seen at processing event 328 (line 365 in log file). Datacard and maus_output.root also attached as per Chris' request.


Files

maus_output.root (364 KB) maus_output.root Pidcott, Celeste, 30 January 2014 10:40
proton_check.py (2.38 KB) proton_check.py Datacard Pidcott, Celeste, 30 January 2014 10:40
proton_sim_log.txt (892 KB) proton_sim_log.txt updated verbose log Pidcott, Celeste, 30 January 2014 12:06
#1

Updated by Rogers, Chris over 9 years ago

Which MAUS version (what is the output of bzr info, bzr revision-info, what is the version number at the top of the readme file?)

I understand you are also struggling with no TOF hits?

#2

Updated by Pidcott, Celeste over 9 years ago

I'm running a version of MAUS that was my development branch, merged with changes from the merge branch.
The output of bzr info:
Standalone tree (format: 2a)
Location:
branch root: .

Related branches:
parent branch: /home/celeste/MICE/MAUS/devel
submit branch: bzr+ssh://bazaar.launchpad.net/%2Bbranch/maus/merge/

The output of bzr revision-info:
694

And the version number in the README file is 0.7.7

Also I've just realised that I forgot to set verbose level to 0 for the log, the new log is now attached. The warning now appears for the first time at line 5734 after 356 events have been processed.

#3

Updated by Pidcott, Celeste over 9 years ago

  • File deleted (proton_sim_log.txt)
#4

Updated by Pidcott, Celeste over 9 years ago

Sorry, completely overlooked the TOF question, I thought I was missing TOF hits but I do actually have them for TOF0, so I was mistaken on that point.

#5

Updated by Rogers, Chris over 9 years ago

  • Status changed from Open to Rejected

This is a sqrt of a negative numpy float type.

When generating a beam, MAUS will generate a new primary; and then check whether the new primary has (total) energy < mass. MAUS will keep throwing new primaries until it finds one with energy > mass. This process can produce the warning you have highlighted, but in fact nothing bad happened.

The relevant lines are src/map/MapPyBeamMaker/beam.py:321

    def make_one_primary(self):
        """ 
        Make a primary particle.

        Returns an dict formatted for insertion into the json tree as a primary.
        See json data tree documentation for further information

        Note that if the dice give us a particle that has "negative" total
        momentum we throw again.
        """ 
        hit = xboa.Hit.Hit.new_from_dict({'pid':-13, "energy":float('nan')})
        while math.isnan(hit["energy"]) or math.isnan(hit["pz"]) or \
              hit["energy"] < hit["mass"]:
            particle_array = self.__process_get_particle_array()
            hit = self.__process_array_to_hit(particle_array,
                                self.reference["pid"], self.momentum_defined_by)
        primary = self.__process_hit_to_primary(hit)
        return primary

Also available in: Atom PDF