49#define G_RESPONSE_KERNEL_LIMITS
51#define G_COMPUTE_IAQ_BIN_NO_WARNINGS
52#define G_LOCATION_SMEARING_NO_WARNINGS
118 const double& phibar_max,
const double& phibar_bin_size)
124 int nphigeo = int(phigeo_max / phigeo_bin_size + 0.5);
125 int nphibar = int(phibar_max / phibar_bin_size + 0.5);
138 m_iaq.
card(
"CTYPE1",
"Phigeo",
"Geometrical scatter angle");
141 m_iaq.
card(
"CRPIX1", 1.0,
"Reference bin of geometrical scatter angle");
142 m_iaq.
card(
"CTYPE2",
"Phibar",
"Compton scatter angle");
145 m_iaq.
card(
"CRPIX2", 1.0,
"Reference bin of Compton scatter angle");
146 m_iaq.
card(
"BUNIT",
"Probability per bin",
"Unit of bins");
147 m_iaq.
card(
"TELESCOP",
"GRO",
"Name of telescope");
148 m_iaq.
card(
"INSTRUME",
"COMPTEL",
"Name of instrument");
149 m_iaq.
card(
"ORIGIN",
"GammaLib",
"Origin of FITS file");
150 m_iaq.
card(
"OBSERVER",
"Unknown",
"Observer that created FITS file");
278 m_iaq.
card(
"ENERGY", energy.
MeV(),
"[MeV] Source photon energy");
318 #if defined(G_DEBUG_SET_CONTINUUM)
319 std::cout <<
"Minimum energy=" << energy_min << std::endl;
320 std::cout <<
"Maximum energy=" << energy_max << std::endl;
332 for (
int k = 0; k < iaq.
npix(); ++k) {
337 for (
int i = 0; i < ebds.
size(); ++i) {
343 double weight = spectrum.
flux(ebds.
emin(i), ebds.
emax(i)) /
347 #if defined(G_DEBUG_SET_CONTINUUM)
364 for (
int k = 0; k < iaq.
npix(); ++k) {
365 double value =
m_iaq(k) * weight;
367 #if defined(G_DEBUG_SET_CONTINUUM)
375 #if defined(G_DEBUG_SET_CONTINUUM)
376 std::cout <<
"Energy=" << energy;
377 std::cout <<
" weight=" << weight;
378 std::cout <<
" sum=" <<
sum << std::endl;
400 else if (pplaw != NULL) {
401 m_iaq.
card(
"PLAWINX", pplaw->
index(),
"Power law spectral index");
403 else if (eplaw != NULL) {
404 m_iaq.
card(
"PLAWINX", eplaw->
index(),
"Power law spectral index");
407 m_iaq.
card(
"EIMIN", energy_min,
"[MeV] Minimum incident energy");
408 m_iaq.
card(
"EIMAX", energy_max,
"[MeV] Maximum incident energy");
439 iaq.
card(
"E1MIN",
m_e1min,
"[MeV] Minimum D1 energy deposit");
440 iaq.
card(
"E1MAX",
m_e1max,
"[MeV] Maximum D1 energy deposit");
441 iaq.
card(
"E2MIN",
m_e1min,
"[MeV] Minimum D2 energy deposit");
442 iaq.
card(
"E2MAX",
m_e1max,
"[MeV] Maximum D2 energy deposit");
443 iaq.
card(
"ZENITH",
m_zenith,
"[deg] Zenith angle for location smearing");
478 result.append(
"=== GCOMIaq ===");
520 result.append(
"yes");
629 GCaldb caldb(
"cgro",
"comptel");
703 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
711 double etrue1 = energy - etrue2;
714 #if defined(G_DEBUG_COMPTON_KINEMATICS)
715 std::cout <<
"phigeo=" << phigeo;
716 std::cout <<
" etrue1=" << etrue1;
717 std::cout <<
" etrue2=" << etrue2;
721 #if defined(G_DEBUG_COMPTON_KINEMATICS)
726 for (
int i_phibar = 0; i_phibar < n_phibar; ++i_phibar) {
732 double response = 0.0;
735 for (
int i = 0; i < n_fine; ++i, phibar += dphibar) {
743 response *= dphibar_rad;
746 m_iaq(i_phigeo, i_phibar) = response;
749 #if defined(G_DEBUG_COMPTON_KINEMATICS)
756 #if defined(G_DEBUG_COMPTON_KINEMATICS)
757 std::cout <<
" Prob=" <<
sum << std::endl;
812 const double& etrue2,
813 const double& phibar)
816 double response = 0.0;
826 double e_low = position - 3.0 * sigma;
827 double e_high = position + 3.0 * sigma;
828 double e_min = (e1min < e_low) ? e_low : e1min;
829 double e_max = (e1max > e_high) ? e_high : e1max;
851 integral.
eps(1.0e-6);
854 #if defined(G_COMPUTE_IAQ_BIN_NO_WARNINGS)
859 response = integral.
romberg(e_min, e_max);
864 #if defined(G_DEBUG_COMPUTE_IAQ_BIN)
865 std::cout <<
" phibar=" << phibar;
866 std::cout <<
" e1min=" << e1min;
867 std::cout <<
" e1max=" << e1max;
868 std::cout <<
" e_min=" << e_min;
869 std::cout <<
" e_max=" << e_max;
870 std::cout <<
" response=" << response << std::endl;
893 #if defined(G_DEBUG_KLEIN_NISHINA)
898 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
907 #if defined(G_DEBUG_KLEIN_NISHINA)
908 std::cout <<
"phigeo=" << phigeo <<
" prob_kn=" << prob_kn << std::endl;
913 for (
int i_phibar = 0; i_phibar < n_phibar; ++i_phibar) {
916 m_iaq(i_phigeo, i_phibar) *= prob_kn;
923 #if defined(G_DEBUG_KLEIN_NISHINA)
924 std::cout <<
"Sum of probabilities = " <<
sum << std::endl;
961 if (phigeo_lo < 0.0) {
964 if (phigeo_hi < 0.0) {
967 if (phigeo_lo > 180.0) {
970 if (phigeo_hi > 180.0) {
980 double v_low = 1.0 - 1.0 / (1.0 + (1.0 - std::cos(phigeo_lo)) * alpha);
981 double v_high = 1.0 - 1.0 / (1.0 + (1.0 - std::cos(phigeo_hi)) * alpha);
984 double prob_bin = (r_high - r_low);
987 const double v_zero = 0.0;
988 const double v_pi = 1.0 - 1.0 / (1.0 + 2.0 * alpha);
991 const double prob_tot = (r_pi - r_zero);
994 double prob_phigeo = prob_bin / prob_tot;
1026 double w = v * (1.0/a + 1.0) * (1.0/a + 1.0) +
1027 (2.0/(a*a) + 2.0/a - 1.0) * std::log(1.0 - v) -
1029 1.0/(a*a) * 1.0/(1.0 - v);
1032 #if defined(G_DEBUG_KLEIN_NISHINA_INTEGRAL)
1034 w_test = v*( 1.0/a + 1.0 )*( 1.0/a + 1.0 );
1035 w_test = w_test + ( 2.0/(a*a) + 2.0/a - 1.0 )* std::log(1.0 - v);
1036 w_test = w_test - (v*v)/2.0;
1037 w_test = w_test + 1.0/(a*a) * 1.0/(1.0 - v);
1039 std::cout <<
"w=" << w <<
" w_test=" << w_test << std::endl;
1063 double cfract = 1.0;
1064 if (energy >= 2.0) {
1065 cfract = 1.067 - 0.0295 * energy + 3.4e-4 * energy * energy;
1070 else if (cfract < 0.0) {
1088 double oalltr = ad1trans * v1trans * d1prob * cfract * mlhit * sveto;
1091 #if defined(G_DEBUG_WEIGHT_IAQ)
1092 std::cout <<
"Transmission coefficients:" << std::endl;
1093 std::cout <<
"==========================" << std::endl;
1094 std::cout <<
" Above D1 transmission ..........: " << ad1trans << std::endl;
1095 std::cout <<
" V1 veto dome transmission ......: " << v1trans << std::endl;
1096 std::cout <<
" D1 interaction probability .....: " << d1prob << std::endl;
1097 std::cout <<
" Compton scatter fraction .......: " << cfract << std::endl;
1098 std::cout <<
" Compton interaction probability : " << d1prob*cfract << std::endl;
1099 std::cout <<
" Multihit transmission ..........: " << mlhit << std::endl;
1100 std::cout <<
" Self-vetoing transmission ......: " << sveto << std::endl;
1101 std::cout <<
" Overall shape-independent trans.: " << oalltr << std::endl;
1109 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1128 #if defined(G_APPLY_PSD_CORRECTION_IN_RESPONSE_KERNEL)
1129 double psdtrn = 1.0;
1135 double oallpg = ad2trans * v23trans * d2prob * mscatt * psdtrn;
1138 double weight = oalltr * oallpg;
1141 #if defined(G_DEBUG_WEIGHT_IAQ)
1142 std::cout <<
" Phigeo .........................: " << phigeo << std::endl;
1143 std::cout <<
" Between D1 & D2 transmission ..: " << ad2trans << std::endl;
1144 std::cout <<
" V2+V3 veto dome transmission ..: " << v23trans << std::endl;
1145 std::cout <<
" D2 interaction probability ....: " << d2prob << std::endl;
1146 std::cout <<
" D1 multi-scatter transmission .: " << mscatt << std::endl;
1147 std::cout <<
" PSD correction ................: " << psdtrn << std::endl;
1148 std::cout <<
" Overall shape-dependent trans. : " << oallpg << std::endl;
1149 std::cout <<
" Overall transmission ..........: " << weight << std::endl;
1153 for (
int i_phibar = 0; i_phibar < n_phibar; ++i_phibar) {
1154 m_iaq(i_phigeo, i_phibar) *= weight;
1164#if defined(G_COMPASS_LOCPSR)
1176 const double ZDIST = 158.0;
1177 const double SIGHD1 = 2.30;
1178 const double SIGHD2 = 1.96;
1179 const double SIGVD1 = 2.45;
1180 const double SIGVD2 = 2.17;
1181 const double CONCRI = 5.0;
1182 const int NFINE = 10;
1183 const int NFINEH = NFINE/2;
1190 std::vector<double> phigeo(n_phigeo, 0.0);
1191 std::vector<double> siggeo(n_phigeo, 0.0);
1192 std::vector<double> cnorms(n_phigeo, 0.0);
1196 double A1SQ = A1*A1;
1198 double A2SQ = A2*A2;
1199 double ZDIST2 = ZDIST * ZDIST;
1200 double SIGHT2 = SIGHD1*SIGHD1 + SIGHD2*SIGHD2;
1201 double SIGVT2 = SIGVD1*SIGVD1 + SIGVD2*SIGVD2;
1202 double ROOT2 = std::sqrt(2.0);
1207 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1215 double SPHIG2 = SPHIG*SPHIG;
1216 double CPHIG2 = CPHIG*CPHIG;
1217 double SIGXY2 = A2SQ * CPHIG2 * (4.0 * A1SQ * SPHIG2 + CPHIG2 - A1SQ) +
1218 0.5 * A1SQ * (A2SQ*CPHIG2 +A1SQ*SPHIG2*(1.-0.75*CPHIG2));
1219 SIGXY2 = SIGXY2*SIGHT2/ZDIST2;
1220 double SIGZ2 = A2SQ*A2SQ*SPHIG2*CPHIG2 + A2SQ*A1SQ*(0.5-3.*CPHIG2*SPHIG2) +
1221 3.*A1SQ*A1SQ*SPHIG2*CPHIG2/8.;
1222 SIGZ2 = SIGZ2*SIGVT2/ZDIST2;
1228 double X0 = double(phigeo[i_phigeo] / (ROOT2*siggeo[i_phigeo]));
1229 cnorms[i_phigeo] = RT2PI*siggeo[i_phigeo]*(1.000 +
gammalib::erf(X0))/2.0;
1230 cnorms[i_phigeo] = 1./cnorms[i_phigeo];
1235 for (
int iphib = 0; iphib < n_phibar; ++iphib) {
1238 std::vector<double> values;
1239 #if defined(G_DEBUG_LOCATION_SMEARING)
1240 double sum_before = 0.0;
1242 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1243 values.push_back(
m_iaq(i_phigeo, iphib));
1244 #if defined(G_DEBUG_LOCATION_SMEARING)
1245 sum_before +=
m_iaq(i_phigeo, iphib);
1250 for (
int ibase = 0; ibase < n_phigeo; ++ibase) {
1253 double PHBASE = phigeo[ibase];
1256 double SUMBAS = 0.0;
1259 for (
int iconv = 0; iconv < n_phigeo; ++iconv) {
1263 double DELTA = std::abs(PHBASE-phigeo[iconv]);
1264 if (DELTA < CONCRI * siggeo[iconv]) {
1267 double PHICEN = phigeo[iconv];
1268 double VALMED = values[iconv];
1269 double SIGMED = siggeo[iconv];
1270 double CNOMED = cnorms[iconv];
1271 double DERPSL = 0.0;
1272 double DERSIL = 0.0;
1273 double DERCNL = 0.0;
1274 double DERPSU = 0.0;
1275 double DERSIU = 0.0;
1276 double DERCNU = 0.0;
1278 double VALLOW = values[iconv-1];
1279 double SIGLOW = siggeo[iconv-1];
1280 double CNOLOW = cnorms[iconv-1];
1285 if (iconv < (n_phigeo-1)) {
1286 double VALUPP = values[iconv+1];
1287 double SIGUPP = siggeo[iconv+1];
1288 double CNOUPP = cnorms[iconv+1];
1298 if (iconv == (n_phigeo-1)) {
1305 for (
int ifine = 1; ifine <= NFINE; ++ifine) {
1313 double PHIFIN = PHICEN + (ifine-NFINEH-0.5)*DINTPO;
1314 double DELTAF = (ifine-NFINEH-0.5)*DINTPO;
1315 if (ifine <= NFINEH) {
1316 SIGMAF = SIGMED + DERSIL*DELTAF;
1317 VALUEF = VALMED + DERPSL*DELTAF;
1318 CNORMF = CNOMED + DERCNL*DELTAF;
1321 SIGMAF = SIGMED + DERSIU*DELTAF;
1322 VALUEF = VALMED + DERPSU*DELTAF;
1323 CNORMF = CNOMED + DERCNU*DELTAF;
1330 double arg = (PHIFIN-PHBASE)/SIGMAF;
1331 double VALUE = VALUEF * CNORMF * std::exp(-0.5*arg*arg);
1332 SUMBAS = SUMBAS+VALUE;
1341 m_iaq(ibase, iphib) = SUMBAS * DINTPO;
1346 #if defined(G_DEBUG_LOCATION_SMEARING)
1347 double sum_after = 0.0;
1348 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1349 sum_after += convolved_values[i_phigeo];
1354 std::cout <<
" before=" << sum_before;
1355 std::cout <<
" after=" << sum_after;
1356 if (sum_before > 0.0) {
1357 std::cout <<
" (" << sum_after/sum_before <<
")";
1359 std::cout << std::endl;
1387 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1392 for (
int i_phibar = 0; i_phibar < n_phibar; ++i_phibar) {
1395 std::vector<double> values;
1396 #if defined(G_DEBUG_LOCATION_SMEARING)
1397 double sum_before = 0.0;
1399 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1400 values.push_back(
m_iaq(i_phigeo, i_phibar));
1401 #if defined(G_DEBUG_LOCATION_SMEARING)
1402 sum_before +=
m_iaq(i_phigeo, i_phibar);
1407 std::vector<double> convolved_values;
1408 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1420 integral.
eps(1.0e-4);
1423 #if defined(G_LOCATION_SMEARING_NO_WARNINGS)
1428 double phigeo_min = phigeos[i_phigeo] - 5.0 * sigmas[i_phigeo];
1429 double phigeo_max = phigeos[i_phigeo] + 5.0 * sigmas[i_phigeo];
1432 double value = integral.
romberg(phigeo_min, phigeo_max);
1435 convolved_values.push_back(value);
1440 #if defined(G_DEBUG_LOCATION_SMEARING)
1441 double sum_after = 0.0;
1443 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1444 m_iaq(i_phigeo, i_phibar) = convolved_values[i_phigeo];
1445 #if defined(G_DEBUG_LOCATION_SMEARING)
1446 sum_after += convolved_values[i_phigeo];
1451 #if defined(G_DEBUG_LOCATION_SMEARING)
1453 std::cout <<
" before=" << sum_before;
1454 std::cout <<
" after=" << sum_after;
1455 if (sum_before > 0.0) {
1456 std::cout <<
" (" << sum_after/sum_before <<
")";
1458 std::cout << std::endl;
1490 const double zdist = 158.0;
1493 const double sighd1 = 2.30;
1494 const double sighd2 = 1.96;
1498 const double sigvd1 = 2.45;
1499 const double sigvd2 = 2.17;
1502 const double zdist2 = zdist * zdist;
1503 const double sight2 = sighd1*sighd1 + sighd2*sighd2;
1504 const double sigvt2 = sigvd1*sigvd1 + sigvd2*sigvd2;
1507 std::vector<double> sigmas;
1511 double a1sq = a1 * a1;
1513 double a2sq = a2 * a2;
1519 for (
int i_phigeo = 0; i_phigeo < n_phigeo; ++i_phigeo) {
1527 double cphig2 = cphig*cphig;
1528 double sphig2 = sphig*sphig;
1529 double sigxy2 = (a2sq * cphig2 *
1530 (4.0 * a1sq * sphig2 + cphig2 - a1sq) +
1532 (a2sq * cphig2 + a1sq * sphig2 * (1.0 - 0.75 * cphig2))) *
1536 double sigz2 = (a2sq * a2sq * sphig2 * cphig2 +
1537 a2sq * a1sq * (0.5 - 3.0 * cphig2 * sphig2) +
1538 3.0 * a1sq * a1sq * sphig2 * cphig2 / 8.0) *
1545 sigmas.push_back(siggeo);
1548 #if defined(G_DEBUG_LOCATION_SPREAD)
1549 std::cout <<
"phigeo=" << phigeo <<
" sigma=" << siggeo << std::endl;
1612 #if defined(G_RESPONSE_KERNEL_LIMITS)
1613 double e1 = (energy1 < 1.0e-20) ? 1.0e-20 : energy1;
1615 if (std::abs(cp) < 1.0e-20) {
1619 double e1 = energy1;
1625 double e2 = 0.5 * (std::sqrt(term1 * e1 + e1*e1) - e1);
1627 (cp * cp * std::sqrt(term1 + e1));
1630 #if defined(G_DEBUG_RESPONSE_KERNEL)
1631 std::cout <<
" e1=" << e1;
1632 std::cout <<
" e2=" << e2;
1633 std::cout <<
" jc=" << jc << std::endl;
1650 double etot = e1 + e2;
1656 #if defined(G_RESPONSE_KERNEL_LIMITS)
1664 #if defined(G_RESPONSE_KERNEL_LIMITS)
1671 #if defined(G_APPLY_PSD_CORRECTION_IN_RESPONSE_KERNEL)
1672 const double a1 = 1727.9;
1673 const double a2 = 2.530;
1674 d1 *= 1.0 - (1.0 / (a1 * std::pow(e1, a2) + 1.0));
1679 #if defined(G_RESPONSE_KERNEL_LIMITS)
1686 value = jc * d1 * d2;
1706 double value = m_phigeos.interpolate(phigeo, m_values);
1712 double arg = (m_phigeo - phigeo) * m_wgt;
1713 value *= m_norm * std::exp(-0.5 * arg * arg);
COMPTEL instrument response representation class interface definition.
Implementation of support function used by COMPTEL classes.
Energy boundaries class interface definition.
Filename class interface definition.
FITS file class interface definition.
Integration class interface definition.
Energy flux normalized power law spectral model class interface definition.
Flux normalized power law spectral model class interface definition.
Power law spectral model class interface definition.
Abstract spectral model base class interface definition.
double sum(const GVector &vector)
Computes vector sum.
Interface for the COMPTEL D1 module response class.
double ewidth(const double &etrue) const
Return energy threshold width.
double sigma(const double &etrue) const
Return photo peak standard deviation.
double emin(const double &etrue) const
Return minimum energy.
double emax(const double &etrue) const
Return maximum energy.
double position(const double &etrue) const
Return photo peak position.
void clear(void)
Clear instance.
Interface for the COMPTEL D2 module response class.
double emax(const double &etrue) const
Return maximum energy.
void clear(void)
Clear instance.
const GCOMD1Response & m_response_d1
Reference to D1 module response.
double m_etrue1
True D1 energy (MeV)
double m_cos_phibar
cos(phibar)
double eval(const double &energy1)
Computes product of D1 and D2 responses at energy E1 and phibar.
double m_e1min
Minimum D1 energy (MeV)
double m_e1max
Maximum D1 energy (MeV)
double m_etrue2
True D2 energy (MeV)
double m_e2max
Maximum D2 energy (MeV)
const GCOMD2Response & m_response_d2
Reference to D2 module response.
double m_sin_phibar
sin(phibar)
double m_etmin
Minimum total energy (MeV)
double m_etmax
Maximum total energy (MeV)
double m_e2min
Minimum D2 energy (MeV)
double eval(const double &phigeo)
Convolves response with Gaussian kernel.
Interface for the COMPTEL instrument response representation class.
double klein_nishina_integral(const double &v, const double &a)
Computes Klein-Nishina integral.
void free_members(void)
Delete class members.
int m_num_energies
Number of energies for continuum IAQ.
double m_phigeo_bin_size
Bin size in geometrical scatter angle (deg)
double m_e2max
Maximum D2 energy (MeV)
void copy_members(const GCOMIaq &iaq)
Copy class members.
double m_zenith
Zenith angle for location smearing (deg)
GCOMIaq * clone(void) const
Clone instance.
GCOMD2Response m_response_d2
D2 module response.
GEbounds m_ebounds
Energy boundaries.
~GCOMIaq(void)
Destructor.
double m_e2min
Minimum D2 energy (MeV)
double m_phibar_max
Maximum Compton scatter angle (deg)
double m_phigeo_max
Maximum geometrical scatter angle (deg)
void klein_nishina(const double &energy)
Multiply IAQ matrix by the Klein-Nishina formula.
GCOMD1Response m_response_d1
D1 module response.
GCOMIaq & operator=(const GCOMIaq &iaq)
Assignment operator.
GCOMInstChars m_ict
Instrument characteristics.
double klein_nishina_bin(const double &energy, const double &phigeo)
Computes Klein-Nishina probability for one bin.
void init_response(void)
Initialise COMPTEL response function and instrument characteristics.
double m_phibar_resolution
Bin size for oversampling (deg)
void weight_iaq(const double &energy)
Weight IAQ matrix.
GFitsImageFloat m_iaq
Response.
std::vector< double > location_spread(const double &zenith) const
Compute location spread vector.
void location_smearing(const double &zenith)
Perform location smearing.
void compton_kinematics(const double &energy)
Generate IAQ matrix based on Compton kinematics.
std::string print(const GChatter &chatter=NORMAL) const
Print COMPTEL instrument response representation information.
void remove_cards(void)
Remove any extra header cards.
void save(const GFilename &filename, const bool &clobber=false) const
Save COMPTEL instrument response representation into FITS file.
void set(const GEnergy &energy, const GEbounds &ebounds)
Set mono-energetic IAQ.
GCOMIaq(void)
Void constructor.
void clear(void)
Clear instance.
void init_members(void)
Initialise class members.
double m_e1min
Minimum D1 energy (MeV)
double m_phibar_bin_size
Bin size in Compton scatter angle (deg)
double compute_iaq_bin(const double &etrue1, const double &etrue2, const double &phibar)
Computes the IAQ for one bin.
double m_e1max
Maximum D1 energy (MeV)
bool m_psd_correct
PSD correction usage flag.
Interface for the COMPTEL Instrument Characteristics class.
double trans_V1(const double &energy) const
Return V1 veto dome transmission.
double trans_V23(const double &energy, const double &phigeo) const
Return V2+V3 veto dome transmission.
double trans_D1(const double &energy) const
Return transmission above D1.
double multi_scatter(const double &energy, const double &phigeo) const
Return multi-scatter correction.
double prob_no_multihit(const double &energy) const
Return probability that no multihit occured.
double prob_no_selfveto(const double &energy, const double &zenith) const
Return probability that photon was not self vetoed.
double trans_D2(const double &energy, const double &phigeo) const
Return transmission of material between D1 and D2.
double psd_correction(const double &energy, const double &phigeo) const
Return PSD correction.
void clear(void)
Clear instance.
double prob_D1inter(const double &energy) const
Return D1 interaction probability.
double prob_D2inter(const double &energy, const double &phigeo) const
Return D2 interaction probability.
Calibration database class.
Energy boundaries container class.
const GEnergy & emax(void) const
Return maximum energy of all intervals.
int size(void) const
Return number of energy boundaries.
void clear(void)
Clear energy boundaries.
GEnergy elogmean(const int &index) const
Returns logarithmic mean energy for a given energy interval.
const GEnergy & emin(void) const
Return minimum energy of all intervals.
Class that handles energies in a unit independent way.
double MeV(void) const
Return energy in MeV.
std::string print(const GChatter &chatter=NORMAL) const
Print energy.
bool has_extname(void) const
Signal if filename has an extension name.
std::string url(void) const
Return Uniform Resource Locator (URL)
std::string extname(const std::string &defaultname="") const
Return extension name.
const GFitsHeader & header(void) const
Return extension header.
bool has_card(const int &cardno) const
Check existence of header card.
const std::string & extname(void) const
Return extension name.
GFitsHeaderCard & card(const int &cardno)
Return header card.
Single precision FITS image class.
void clear(void)
Clear instance.
int naxes(const int &axis) const
Return dimension of an image axis.
const int & npix(void) const
Return size of pixel array.
const int & naxis(void) const
Return dimension of image.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
GIntegral class interface definition.
void eps(const double &eps)
Set relative precision.
double romberg(std::vector< double > bounds, const int &order=5)
Perform Romberg integration.
void silent(const bool &silent)
Set silence flag.
Energy flux normalized power law spectral model class.
double index(void) const
Return power law index.
Photon flux normalized power law spectral model class.
double index(void) const
Return power law index.
Power law spectral model class.
double index(void) const
Return power law index.
Abstract spectral model base class.
virtual double flux(const GEnergy &emin, const GEnergy &emax) const =0
virtual std::string classname(void) const =0
Return class name.
void append(const double &node)
Append one node to array.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
double erf(const double &arg)
Computes error function.
double com_energy2(const double &energy, const double &phigeo)
Return D2 energy deposit.