Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/Utils/TargetUtils.cxx b/src/Utils/TargetUtils.cxx
index 6f040ab..5734977 100644
--- a/src/Utils/TargetUtils.cxx
+++ b/src/Utils/TargetUtils.cxx
@@ -1,39 +1,39 @@
#include "TargetUtils.h"
std::vector<int> TargetUtils::ParseTargetsToIntVect(std::string targets) {
std::vector<std::string> splittgt = GeneralUtils::ParseToStr(targets, ",");
std::vector<int> convtgt;
for (size_t i = 0; i < splittgt.size(); i++) {
std::string type = splittgt[i];
convtgt.push_back( GetTargetPDGFromString( type ) );
}
return convtgt;
}
int TargetUtils::GetTargetPDGFromString(std::string target){
if (!target.compare("H")) return 1000010010;
else if (!target.compare("C")) return 1000060120;
else if (!target.compare("O")) return 1000080160;
else {
int conv = GeneralUtils::StrToInt(target);
if (abs(conv) > 1) return conv;
}
return 0;
}
int TargetUtils::GetTargetPDGFromZA(int Z, int A){
return 1000000000 + A*10 + Z*10000;
}
int TargetUtils::GetTargetAFromPDG(int PDG){
- return ((PDG%1000000000) - (PDG%10000))/10;
+ return ((PDG%10000))/10;
}
int TargetUtils::GetTargetZFromPDG(int PDG){
- return ((PDG%1000000000) - (GetTargetAFromPDG(PDG)))/10000;
-}
\ No newline at end of file
+ return (PDG%1000000000 - PDG%10000)/10000;
+}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 6:02 PM (6 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023732
Default Alt Text
(1 KB)

Event Timeline