diff --git a/src/ctbkgcube/ctbkgcube.cpp b/src/ctbkgcube/ctbkgcube.cpp index 75d41f2..846fc40 100644 --- a/src/ctbkgcube/ctbkgcube.cpp +++ b/src/ctbkgcube/ctbkgcube.cpp @@ -256,16 +256,17 @@ void ctbkgcube::run(void) // container and put all removed components in the output // container int num = m_bkgmdl.size(); + for (int i = num-1; i >= 0; --i) { // Flag removal bool remove = true; // Do we have a CTA, HESS, MAGIC or VERITAS specific model? - if (m_bkgmdl[i]->is_valid("CTA", "") || - m_bkgmdl[i]->is_valid("HESS", "") || - m_bkgmdl[i]->is_valid("MAGIC", "") || - m_bkgmdl[i]->is_valid("VERITAS", "")) { + if (m_bkgmdl[i]->instruments() == "CTA" || + m_bkgmdl[i]->instruments() == "HESS" || + m_bkgmdl[i]->instruments() == "MAGIC" || + m_bkgmdl[i]->instruments() == "VERITAS") { // Do we have a background model? if (dynamic_cast(m_bkgmdl[i]) != NULL) { @@ -562,6 +563,14 @@ void ctbkgcube::get_parameters(void) // Load event cube from filename m_bkgcube.load(incube); + // Loop over all bins in background cube + for (int i = 0; i < m_bkgcube.size(); ++i) { + + // Get event bin + GCTAEventBin* bin = m_bkgcube[i]; + bin->counts(0.0); + + } } // endelse: cube was loaded from file @@ -589,6 +598,7 @@ void ctbkgcube::get_parameters(void) ***************************************************************************/ void ctbkgcube::fill_cube(GCTAObservation* obs) { + // Continue only if observation pointer is valid if (obs != NULL) { diff --git a/src/ctpsfcube/ctpsfcube.par b/src/ctpsfcube/ctpsfcube.par index 0914fd5..91a687a 100644 --- a/src/ctpsfcube/ctpsfcube.par +++ b/src/ctpsfcube/ctpsfcube.par @@ -18,8 +18,8 @@ # Observational parameters #=================== inobs, f, a, "NONE",,, "Event list or observation definition file" -incube, f, a, "NONE",,, "Counts map for exposure cube definition" -outcube, f, a, "psfcube.fits",,, "Output exposure cube file" +incube, f, a, "NONE",,, "Counts map for psf cube definition" +outcube, f, a, "psfcube.fits",,, "Output psf cube file" caldb, s, a, "dummy",,, "Calibration database" irf, s, a, "cta_dummy_irf",,, "Instrument response function" edisp, b, h, no,,, "Apply energy dispersion?"