31 #include "GammaLib.hpp"
32 #include "GCTALib.hpp"
36 #define CTOBSSIM_NAME "ctobssim"
67 void publish(
const std::string& name =
"");
69 void max_rate(
const double& max_rate);
79 const GModels& models,
83 const GCTAResponseIrf* rsp,
84 GCTAEventList* events,
85 const GModels& models,
88 const GEnergy& etrue_min,
89 const GEnergy& etrue_max,
90 const GEnergy& ereco_min,
91 const GEnergy& ereco_max,
98 std::vector<int>& nphotons,
99 std::vector<int>& nevents);
101 const GCTAResponseIrf* rsp,
102 GCTAEventList* events,
103 const GModelSky* model,
107 const GEnergy& etrue_min,
108 const GEnergy& etrue_max,
109 const GEnergy& ereco_min,
110 const GEnergy& ereco_max,
119 GEbounds
get_ebounds(
const GEbounds& ebounds)
const;
120 double get_area(GCTAObservation* obs,
122 const GEnergy& emax)
const;
126 const GSkyDir& centre,
127 const double& radius,
131 const GModels& models,
133 GLog* wrklog = NULL);
135 const GModels& models,
136 GLog* wrklog = NULL);
139 std::string
outfile(
const int& index);
std::string m_outevents
Output events file.
void save(void)
Save the selected event list(s)
int m_startindex
Start index for multiple event lists.
bool m_apply_edisp
Apply energy dispersion?
virtual ~ctobssim(void)
Destructor.
void process(void)
Process the ctobssim tool.
const GObservations & obs(void) const
Return observation container.
std::string m_prefix
Prefix for multiple event lists.
void clear(void)
Clear ctobssim tool.
std::vector< GRan > m_rans
Random number generators.
double get_model_flux(const GModelSky *model, const GEnergy &emin, const GEnergy &emax, const GSkyDir ¢re, const double &radius, const int &indent, GLog *wrklog)
Determine sky model flux.
void save_fits(void)
Save event list in FITS format.
double get_area(GCTAObservation *obs, const GEnergy &emin, const GEnergy &emax) const
Get simulation area (cm^2)
std::string outfile(const int &index)
Return output filename.
GModels m_models
Optionally provided models.
Observation simulator tool.
bool m_save_and_dispose
Save and dispose immediately.
void get_parameters(void)
Get application parameters.
Observation tool base class interface definition.
int m_event_id
Event identifier.
Base class for observation tools.
void publish(const std::string &name="")
Publish event lists.
void simulate_source(GCTAObservation *obs, const GModels &models, GRan &ran, GLog *wrklog=NULL)
Simulate source events from photon list.
void simulate_interval(GCTAObservation *obs, const GCTAResponseIrf *rsp, GCTAEventList *events, const GModels &models, const GTime &tmin, const GTime &tmax, const GEnergy &etrue_min, const GEnergy &etrue_max, const GEnergy &ereco_min, const GEnergy &ereco_max, const GSkyDir &dir, const double &rad, const double &area, GRan &ran, GLog *wrklog, int &indent, std::vector< int > &nphotons, std::vector< int > &nevents)
Simulate source events for a time and energy interval.
int m_seed
Random number generator seed.
ctobssim & operator=(const ctobssim &app)
Assignment operator.
double m_max_rate
Maximum photon rate.
void copy_members(const ctobssim &app)
Copy class members.
ctobssim(void)
Void constructor.
void simulate_time_slice(GCTAObservation *obs, const GCTAResponseIrf *rsp, GCTAEventList *events, const GModelSky *model, const int &mc_id, const GTime &tstart, const GTime &tstop, const GEnergy &etrue_min, const GEnergy &etrue_max, const GEnergy &ereco_min, const GEnergy &ereco_max, const GSkyDir &dir, const double &rad, const double &area, GRan &ran, GLog *wrklog, int &indent, int &nphotons, int &nevents)
Simulate source events for a time slice.
void models(const GModels &models)
Set models for simulation.
int m_eslices
Number of energy slices.
const double & max_rate(void) const
Return maximum photon rate.
void simulate_background(GCTAObservation *obs, const GModels &models, GRan &ran, GLog *wrklog=NULL)
Simulate background events from model.
void save_xml(void)
Save event list(s) in XML format.
int m_max_photons
Maximum number of photons/slice.
void free_members(void)
Delete class members.
void set_mc_id_names(GCTAObservation *obs, const GModels &models, GLog *wrklog=NULL)
Set correspondance between Monte Carlo identifier and model names.
void init_members(void)
Initialise class members.