All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
flashmatch::ChargeAnalytical Class Reference

#include <ChargeAnalytical.h>

Inheritance diagram for flashmatch::ChargeAnalytical:
flashmatch::BaseFlashHypothesis flashmatch::BaseAlgorithm flashmatch::LoggerFeature

Public Member Functions

 ChargeAnalytical (const std::string name="ChargeAnalytical")
 Default constructor. More...
 
 ~ChargeAnalytical ()
 Default destructor. More...
 
void FillEstimate (const QCluster_t &, Flash_t &) const
 Method to simply fill provided reference of flashmatch::Flash_t. More...
 
- Public Member Functions inherited from flashmatch::BaseFlashHypothesis
 BaseFlashHypothesis (const std::string name="noname")
 Default constructor. More...
 
 ~BaseFlashHypothesis ()
 Default destructor. More...
 
Flash_t GetEstimate (const QCluster_t &) const
 Method to create flashmatch::Flash_t object and return. More...
 
void SetChannelMask (std::vector< int > ch_mask)
 Sets the channels to use. More...
 
void SetUncoatedPMTs (std::vector< int > ch_uncoated)
 Sets the channels sensitive to visible light. More...
 
void SetSemiAnalyticalModel (std::unique_ptr< SemiAnalyticalModel > model)
 Sets the semi analytical model. More...
 
- Public Member Functions inherited from flashmatch::BaseAlgorithm
 BaseAlgorithm (const Algorithm_t type, const std::string name)
 Default constructor. More...
 
 ~BaseAlgorithm ()
 Default destructor. More...
 
void Configure (const Config_t &pset)
 Function to accept configuration. More...
 
Algorithm_t AlgorithmType () const
 Algorithm type. More...
 
const std::string & AlgorithmName () const
 Algorithm name. More...
 
- Public Member Functions inherited from flashmatch::LoggerFeature
 LoggerFeature (const std::string logger_name="LoggerFeature")
 Default constructor. More...
 
 LoggerFeature (const LoggerFeature &original)
 Default copy constructor. More...
 
virtual ~LoggerFeature ()
 Default destructor. More...
 
const flashmatch::loggerlogger () const
 Logger getter. More...
 
void set_verbosity (::flashmatch::msg::Level_t level)
 Verbosity level. More...
 
const std::string & name () const
 Name getter, defined in a logger instance attribute. More...
 

Protected Member Functions

void _Configure_ (const Config_t &pset)
 

Protected Attributes

double _global_qe
 Global QE. More...
 
std::vector< double > _qe_v
 PMT-wise relative QE. More...
 
- Protected Attributes inherited from flashmatch::BaseFlashHypothesis
std::vector< int > _channel_mask
 The list of channels to use. More...
 
std::vector< int > _uncoated_pmt_list
 A list of opdet sensitive to visible (reflected) light. More...
 
std::unique_ptr
< SemiAnalyticalModel
_semi_model
 

Detailed Description

User defined class ChargeAnalytical ... these comments are used to generate doxygen documentation!

Definition at line 43 of file ChargeAnalytical.h.

Constructor & Destructor Documentation

flashmatch::ChargeAnalytical::ChargeAnalytical ( const std::string  name = "ChargeAnalytical")

Default constructor.

Definition at line 10 of file ChargeAnalytical.cxx.

12  {}
BaseFlashHypothesis(const std::string name="noname")
Default constructor.
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
flashmatch::ChargeAnalytical::~ChargeAnalytical ( )
inline

Default destructor.

Definition at line 51 of file ChargeAnalytical.h.

51 { }

Member Function Documentation

void flashmatch::ChargeAnalytical::_Configure_ ( const Config_t pset)
protectedvirtual

Implements flashmatch::BaseAlgorithm.

Definition at line 14 of file ChargeAnalytical.cxx.

15  {
16  _global_qe = pset.get<double>("GlobalQE");
17  _qe_v = pset.get<std::vector<double> >("CCVCorrection");
18  if(_qe_v.size() != DetectorSpecs::GetME().NOpDets()) {
19  FLASH_CRITICAL() << "CCVCorrection factor array has size " << _qe_v.size()
20  << " != number of opdet (" << DetectorSpecs::GetME().NOpDets() << ")!" << std::endl;
21  throw OpT0FinderException();
22  }
23  }
size_t NOpDets() const
of PMTs
Definition: FMWKInterface.h:60
static DetectorSpecs & GetME(std::string filename="detector_specs.cfg")
Definition: FMWKInterface.h:44
#define FLASH_CRITICAL()
Compiler macro for CRITICAL message.
std::vector< double > _qe_v
PMT-wise relative QE.
void flashmatch::ChargeAnalytical::FillEstimate ( const QCluster_t ,
Flash_t  
) const
virtual

Method to simply fill provided reference of flashmatch::Flash_t.

Implements flashmatch::BaseFlashHypothesis.

Definition at line 25 of file ChargeAnalytical.cxx.

27  {
28 
29  size_t n_pmt = DetectorSpecs::GetME().NOpDets();
30 
31  for (size_t i = 0; i < n_pmt; ++i) {
32  flash.pe_v[i] = 0;
33  }
34 
35  for (size_t pmt_index = 0; pmt_index < n_pmt; ++pmt_index) {
36 
37  for (size_t pt_index = 0; pt_index < track.size(); ++pt_index) {
38 
39  auto const &pt = track[pt_index];
40 
41  auto const& pmt_pos = DetectorSpecs::GetME().PMTPosition(pmt_index);
42  double dx = pmt_pos[0] - pt.x;
43  double dy = pmt_pos[1] - pt.y;
44  double dz = pmt_pos[2] - pt.z;
45 
46  double r2 = (pow(dx, 2) + pow(dy, 2) + pow(dz, 2));
47 
48  double angle = dx / sqrt(r2);
49 
50  if (angle < 0) angle *= -1;
51 
52  flash.pe_v[pmt_index] += pt.q * angle / r2 * _global_qe / _qe_v[pmt_index];
53 
54  }
55  }
56  }
size_t NOpDets() const
of PMTs
Definition: FMWKInterface.h:60
process_name use argoneut_mc_hitfinder track
static DetectorSpecs & GetME(std::string filename="detector_specs.cfg")
Definition: FMWKInterface.h:44
std::vector< double > _qe_v
PMT-wise relative QE.
const geoalgo::Point_t & PMTPosition(size_t opch)
PMT XYZ position filler.
Definition: FMWKInterface.h:51
finds tracks best matching by angle

Member Data Documentation

double flashmatch::ChargeAnalytical::_global_qe
protected

Global QE.

Definition at line 59 of file ChargeAnalytical.h.

std::vector<double> flashmatch::ChargeAnalytical::_qe_v
protected

PMT-wise relative QE.

Definition at line 60 of file ChargeAnalytical.h.


The documentation for this class was generated from the following files: