I want to set the fraction mass of material via detector messenger. fraction mass is mostly specified in perCent which is not available in units table so it gives me error at run time. So I want to declare this UI command without any unit and I want use that value in my detector construction file. How can I?
// create ui directory
nbDir = new G4UIdirectory("/nb/");
nbDir->SetGuidance("UI commands for this detector");
detDir = new G4UIdirectory("/nb/det/");
detDir->SetGuidance("detector control");
detDir = new G4UIdirectory("/nb/det/H/");
detDir->SetGuidance("H control");
// set H fractionmass for pH
HSetterCmdForH = new G4UIcmdWithADoubleAndUnit("/nb/det/H/setH",this);
HSetterCmdForH->SetGuidance("define H fractionmass for H");
HSetterCmdForH->SetParameterName("H",false);
// HSetterCmdForH->SetDefaultUnit("perCent"); gives error
HSetterCmdForH->AvailableForStates(G4State_PreInit,G4State_Idle);