print particles through detector

parent 0fbe2cbc
......@@ -145,10 +145,11 @@ void B1EventAction::PrintParticles(std::map<const G4String, int>& container, std
std::ofstream& nu_e, std::ofstream& nu_mu, std::ofstream& anti_nu_e, std::ofstream& anti_nu_mu, G4double position) {
std::map<const G4String, int>::iterator it;
// G4cout << "Número de párticulas identificadas no detetor: " << G4endl;
G4bool isGamma, ismu_minus, ismu_plus, isnu_e, isnu_mu, isanti_nu_e, isanti_nu_mu = false;
for(it = container.begin() ;it != container.end(); it ++)
{
G4bool isGamma, ismu_minus, ismu_plus, isnu_e, isnu_mu, isanti_nu_e, isanti_nu_mu = false;
G4cout << "N " << it->first << " : " << it->second << G4endl;
//FUTURO -> substituir por switch;
if(it->first == "gamma") {
......@@ -174,29 +175,30 @@ void B1EventAction::PrintParticles(std::map<const G4String, int>& container, std
anti_nu_mu << it->second << " " << position << "\n";
isanti_nu_mu = true;
}
}
if (!isGamma) {
gamma << "0 " << position << "\n";
}
if (!ismu_plus) {
mu_plus << "0 " << position << "\n";
}
if (!ismu_minus) {
mu_minus << "0 " << position << "\n";
}
if (!isnu_e) {
nu_e << "0 " << position << "\n";
}
if (!isnu_mu) {
nu_mu << "0 " << position << "\n";
}
if (!isanti_nu_e) {
anti_nu_e << "0 " << position << "\n";
}
if (!isanti_nu_mu) {
anti_nu_mu << "0 " << position << "\n";
}
if (!isGamma) {
gamma << "0 " << position << "\n";
}
if (!ismu_plus) {
mu_plus << "0 " << position << "\n";
}
if (!ismu_minus) {
mu_minus << "0 " << position << "\n";
}
if (!isnu_e) {
nu_e << "0 " << position << "\n";
}
if (!isnu_mu) {
nu_mu << "0 " << position << "\n";
}
if (!isanti_nu_e) {
anti_nu_e << "0 " << position << "\n";
}
if (!isanti_nu_mu) {
anti_nu_mu << "0 " << position << "\n";
}
}
}
void B1EventAction::WriteHistogram(const G4String name, G4int Detec) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment