LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 24 of file FlashHypothesisCalculator.h.

References tca::dEdx(), FillFlashHypothesis(), pt1, pt2, and SegmentMidpoint().

24 {}

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 19 of file FlashHypothesisCalculator.cxx.

References opdet::FlashHypothesis::GetVectorSize(), pt1, and opdet::FlashHypothesis::SetHypothesisAndError().

Referenced by opdet::FlashHypothesisCreator::CreateFlashHypothesesFromSegment(), and FlashHypothesisCalculator().

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

Definition at line 8 of file FlashHypothesisCalculator.cxx.

Referenced by opdet::FlashHypothesisCreator::CreateFlashHypothesesFromSegment(), and FlashHypothesisCalculator().

11 {
12  std::vector<double> xyz_segment(3);
13  xyz_segment[0] = 0.5 * (pt2.x() + pt1.x()) + XOffset;
14  xyz_segment[1] = 0.5 * (pt2.y() + pt1.y());
15  xyz_segment[2] = 0.5 * (pt2.z() + pt1.z());
16  return xyz_segment;
17 }
TText * pt2
Definition: plot.C:64
TText * pt1
Definition: plot.C:61

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