All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
opdet::FlashHypothesisCalculator Class Reference

#include <FlashHypothesisCalculator.h>

Public Member Functions

 FlashHypothesisCalculator ()
 
std::vector< double > SegmentMidpoint (const TVector3 &pt1, const TVector3 &pt2, float XOffset=0)
 
void FillFlashHypothesis (const float &yield, const float &dEdx, const TVector3 &pt1, const TVector3 &pt2, const std::vector< float > &qe_vector, phot::MappedCounts_t const &vis_vector, FlashHypothesis &hyp)
 

Detailed Description

Definition at line 21 of file FlashHypothesisCalculator.h.

Constructor & Destructor Documentation

opdet::FlashHypothesisCalculator::FlashHypothesisCalculator ( )
inline

Definition at line 25 of file FlashHypothesisCalculator.h.

25 {}

Member Function Documentation

void opdet::FlashHypothesisCalculator::FillFlashHypothesis ( const float &  yield,
const float &  dEdx,
const TVector3 &  pt1,
const TVector3 &  pt2,
const std::vector< float > &  qe_vector,
phot::MappedCounts_t const &  vis_vector,
FlashHypothesis hyp 
)

Definition at line 17 of file FlashHypothesisCalculator.cxx.

24 {
25 
26  if(qe_vector.size()!=hyp.GetVectorSize() || !vis_vector)
27  throw std::runtime_error("ERROR in FlashHypothesisCalculator: vector sizes not equal!");
28 
29  const float total_yield = yield*dEdx*(pt2-pt1).Mag();
30 
31  for(size_t i_chan=0; i_chan<hyp.GetVectorSize(); i_chan++)
32  hyp.SetHypothesisAndError(i_chan,total_yield*vis_vector[i_chan]*qe_vector[i_chan]);
33 
34 }
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2687
std::vector< double > opdet::FlashHypothesisCalculator::SegmentMidpoint ( const TVector3 &  pt1,
const TVector3 &  pt2,
float  XOffset = 0 
)

Definition at line 8 of file FlashHypothesisCalculator.cxx.

9 {
10  std::vector<double> xyz_segment(3);
11  xyz_segment[0] = 0.5*(pt2.x()+pt1.x()) + XOffset;
12  xyz_segment[1] = 0.5*(pt2.y()+pt1.y());
13  xyz_segment[2] = 0.5*(pt2.z()+pt1.z());
14  return xyz_segment;
15 }

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