Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LightCollectionModel.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LightCollectionModel.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4DETECTORS_LIGHTCOLLECTIONMODEL_H
4 #define G4DETECTORS_LIGHTCOLLECTIONMODEL_H
5 #include <string>
6 
7 class TH2;
8 class TH1;
9 
11 {
12  public:
13  LightCollectionModel() = default;
14 
16  explicit LightCollectionModel(const LightCollectionModel &) = delete;
18 
19  virtual ~LightCollectionModel();
20 
22  void load_data_file(const std::string &input_file, const std::string &histogram_light_guide_model, const std::string &histogram_fiber_model);
23 
25  void load_data_from_CDB(const std::string &domain, const std::string &histogram_light_guide_model, const std::string &histogram_fiber_model);
26 
28  bool use_light_guide_model() const { return data_grid_light_guide_efficiency != nullptr; }
29 
31  bool use_fiber_model() const { return data_grid_fiber_trans != nullptr; }
32 
34  double get_light_guide_efficiency(const double x_fraction, const double y_fraction);
35 
37  double get_fiber_transmission(const double z_distance);
38 
39  private:
41  TH2 *data_grid_light_guide_efficiency{nullptr};
42 
44  TH1 *data_grid_fiber_trans{nullptr};
45 
46  // These two histograms are handed off to Fun4All and will be deleted there
47  // this suppresses the cppcheck warning
48  // cppcheck-suppress unsafeClassCanLeak
50  // cppcheck-suppress unsafeClassCanLeak
52 };
53 
54 #endif