Changeset 19900 for trunk/FACT++/src
- Timestamp:
- 12/15/19 00:34:27 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/spectrum.cc
r19899 r19900 1895 1895 const mysqlpp::Row &row = *ir; 1896 1896 1897 const size_t bin = row[*ib=="Theta" ? ".theta" : ".sparse_est"]; 1898 const double flux = row["Flux"]; 1899 const double error = row["ErrFlux"]; 1897 const size_t bin = row[*ib=="Theta" ? ".theta" : ".sparse_est"]; 1900 1898 1901 1899 #ifdef HAVE_ROOT … … 1903 1901 const double dat_bg = row["Background"]; 1904 1902 1905 const double dat_isig = row[" IntegralSignal"];1906 const double dat_ibg = row[" IntegralBackground"];1903 const double dat_isig = row["SignalI"]; 1904 const double dat_ibg = row["BackgroundI"]; 1907 1905 1908 1906 const double eff = row["Efficiency"]; 1909 const double ieff = row[" IntegralEfficiency"];1907 const double ieff = row["EfficiencyI"]; 1910 1908 1911 1909 const double areatime = row["AreaTime"]; … … 1926 1924 if (verbose>0) 1927 1925 { 1928 cout << setw(5) << row["center"] << ": ";1929 cout << setw(10) << row["Excess"] << " ";1930 cout << setw(10) << flux<< " ";1931 cout << setw(10) << error<< " ";1926 cout << setw(5) << row["center"] << ": "; 1927 cout << setw(10) << row["Excess"] << " "; 1928 cout << setw(10) << row["Flux"] << " "; 1929 cout << setw(10) << row["ErrFlux"] << " "; 1932 1930 cout << setw(10) << row["Significance"] << '\n'; 1933 1931 } … … 1935 1933 1936 1934 Histogram hist; 1937 hist.dir = "Data/"+*ib;1938 1935 hist.table = table; 1939 1936 hist.binningx = *ib=="Theta" ? binning_theta : binning_sparse; … … 1942 1939 hist.stats = false; 1943 1940 1944 const vector<string> types = *ib=="Theta" ? vector<string>{ "" } : vector<string>{ "", "I ntegral" };1941 const vector<string> types = *ib=="Theta" ? vector<string>{ "" } : vector<string>{ "", "I" }; 1945 1942 for (auto it=types.cbegin(); it!=types.cend(); it++) 1946 1943 { 1944 hist.dir = *ib=="Theta" ? "Data/Theta" : (it->empty() ? "Data/Energy/Differential" : "Data/Energy/Integral"); 1945 1947 1946 hist.axisy = "Counts"; 1948 1947 if (*ib=="Energy") … … 1950 1949 1951 1950 hist.title = ""; 1952 hist.v = *it+"Signal";1953 hist.err = "Err "+*it+"Signal";1951 hist.v = "Signal"+*it; 1952 hist.err = "ErrSignal"+*it; 1954 1953 WriteHistogram(connection, hist); 1955 1954 1956 1955 hist.title = ""; 1957 hist.v = *it+"Background";1958 hist.err = "Err "+*it+"Background";1956 hist.v = "Background"+*it; 1957 hist.err = "ErrBackground"+*it; 1959 1958 WriteHistogram(connection, hist); 1960 1959 1961 1960 hist.title = ""; 1962 hist.v = *it+"Excess";1963 hist.err = "Err "+*it+"Excess";1961 hist.v = "Excess"+*it; 1962 hist.err = "ErrExcess"+*it; 1964 1963 WriteHistogram(connection, hist); 1965 1964 1966 1965 hist.title = ""; 1967 hist.v = *it+"Significance";1966 hist.v = "Significance"+*it; 1968 1967 hist.err = ""; 1969 1968 hist.axisy = "#sigma"; … … 1973 1972 1974 1973 hist.title = ""; 1975 hist.v = *it+"AvgEnergyEst";1974 hist.v = "AvgEnergyEst"+*it; 1976 1975 hist.err = ""; 1977 1976 hist.axisy = "<E_{est}>/GeV"; … … 1981 1980 1982 1981 hist.title = ""; 1983 hist.v = *it+"ExcessRatio";1984 hist.err = "Err "+*it+"ExcessRatio";1982 hist.v = "ExcessRatio"+*it; 1983 hist.err = "ErrExcessRatio"+*it; 1985 1984 hist.axisy = "Ratio"; 1986 1985 if (*ib=="Energy") … … 1989 1988 } 1990 1989 1990 hist.dir = *ib=="Theta" ? "Data/Theta" : "Data/Energy/Differential"; 1991 1991 hist.axisy = "dN/dE "; 1992 1992 if (*ib=="Energy") … … 2003 2003 hist.axisy = "dN/dE (E>E_{lo}) [cm^{-2} s^{-1}]"; 2004 2004 2005 hist.name = "IntegralSpectrum"; 2006 hist.v = "IntegralFlux"; 2007 hist.err = "ErrIntegralFlux"; 2005 hist.dir = "Data/Energy/Integral"; 2006 hist.name = "Spectrum"; 2007 hist.v = "FluxI"; 2008 hist.err = "ErrFluxI"; 2008 2009 WriteHistogram(connection, hist); 2009 2010 2011 hist.dir = "Data/Energy/Differential"; 2010 2012 hist.name = "IntegratedSpectrum"; 2011 2013 hist.v = "IntegratedFlux"; … … 2015 2017 2016 2018 #ifdef HAVE_ROOT 2019 hist.dir = *ib=="Theta" ? "Data/Theta" : "Data/Energy/Differential"; 2017 2020 hist.axisy = *ib=="Theta" ? "UL [cm^{-2} s^{-1}]" : "UL [cm^{-2} s^{-1} TeV^{-1}]"; 2018 2021 … … 2031 2034 if (*ib=="Energy") 2032 2035 { 2033 hist.name = "IntegralRolkeUL"; 2036 hist.dir = "Data/Energy/Integral"; 2037 hist.name = "RolkeUL"; 2034 2038 WriteHistogram(connection, hist, rolke_int); 2035 2039 }
Note:
See TracChangeset
for help on using the changeset viewer.