Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:11:20

0001 #include <algorithm>
0002 #include <cmath>
0003 #include <iomanip>
0004 #include <iostream>
0005 #include <limits>
0006 #include <utility>
0007 #include <vector>
0008 
0009 using namespace std;
0010 
0011 int GetMbinNum(const std::string &fstr)
0012 {
0013     if (fstr.find("Centrality0to3") != std::string::npos)
0014         return 0;
0015     if (fstr.find("Centrality3to6") != std::string::npos)
0016         return 1;
0017     if (fstr.find("Centrality6to10") != std::string::npos)
0018         return 2;
0019     if (fstr.find("Centrality10to15") != std::string::npos)
0020         return 3;
0021     if (fstr.find("Centrality15to20") != std::string::npos)
0022         return 4;
0023     if (fstr.find("Centrality20to25") != std::string::npos)
0024         return 5;
0025     if (fstr.find("Centrality25to30") != std::string::npos)
0026         return 6;
0027     if (fstr.find("Centrality30to35") != std::string::npos)
0028         return 7;
0029     if (fstr.find("Centrality35to40") != std::string::npos)
0030         return 8;
0031     if (fstr.find("Centrality40to45") != std::string::npos)
0032         return 9;
0033     if (fstr.find("Centrality45to50") != std::string::npos)
0034         return 10;
0035     if (fstr.find("Centrality50to55") != std::string::npos)
0036         return 11;
0037     if (fstr.find("Centrality55to60") != std::string::npos)
0038         return 12;
0039     if (fstr.find("Centrality60to65") != std::string::npos)
0040         return 13;
0041     if (fstr.find("Centrality65to70") != std::string::npos)
0042         return 14;
0043     if (fstr.find("Centrality0to70") != std::string::npos)
0044         return 70;
0045 
0046     return -1; // Default case if no match is found
0047 }