Open yacubus-bishcus opened 4 years ago
This block of code in grasshopper does not work. The trajectory color is blue regardless of particle type.
// visualization manager G4VisManager* visManager = new VisManager; visManager->Initialize();
G4TrajectoryDrawByParticleID* model = new G4TrajectoryDrawByParticleID;
model->SetDefault("cyan"); model->Set("neutron","green"); model->Set("gamma", "red"); model->Set("e+", "magenta"); model->Set("e-", "blue");
visManager->RegisterModel(model); visManager->SelectTrajectoryModel(model->Name());
This is probably because the #ifdef G4VIS_USE preprocessor...
#ifdef G4VIS_USE
This block of code in grasshopper does not work. The trajectory color is blue regardless of particle type.
ifdef G4VIS_USE
// visualization manager G4VisManager* visManager = new VisManager; visManager->Initialize();
G4TrajectoryDrawByParticleID* model = new G4TrajectoryDrawByParticleID;
model->SetDefault("cyan"); model->Set("neutron","green"); model->Set("gamma", "red"); model->Set("e+", "magenta"); model->Set("e-", "blue");
visManager->RegisterModel(model); visManager->SelectTrajectoryModel(model->Name());
endif