gemc / source

gemc website:
gemc.jlab.org
14 stars 73 forks source link

particle color not consistent #220

Closed zhaozhiwen closed 1 year ago

zhaozhiwen commented 1 year ago

src/dmesg_init.cc gui/src/docs/particles_color.h utilities/graph.cc those files have different particle color definition and some color are used more than once

It's better to use consistent and unique color, for example as follows

gemcColorIDModel->SetDefault("gray");
gemcColorIDModel->Set("neutron", "black");
gemcColorIDModel->Set("gamma",   "blue");
gemcColorIDModel->Set("e-",      "red");
gemcColorIDModel->Set("pi+",     "magenta");
gemcColorIDModel->Set("pi-",     "yellow");
gemcColorIDModel->Set("proton",  G4Colour(0.95, 0.6, 0.3));  // orange
gemcColorIDModel->Set("opticalphoton", "white");

        if(charge > 0) {
            gemcColorIDModel->Set(pname,  "cyan");
        } else if(charge == 0) {
            gemcColorIDModel->Set(pname,  "gray");
        } else if(charge < 0) {
            gemcColorIDModel->Set(pname,  "green");
        }
maureeungaro commented 1 year ago

Done - thanks for this and also for listing the files and source code!