Public Member Functions | Private Attributes | List of all members
novaddt::utils::DetectorUtils Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-04-10/DDTUtilities/DetectorUtils.h"

Inheritance diagram for novaddt::utils::DetectorUtils:
novaddt::utils::_detail::VirtualDetUtil

Public Member Functions

 DetectorUtils (std::string detector)
 
void SetAttenuationParameters (std::vector< Atten > attens)
 
double DistTimeOffset (double dist) const
 
double CellTimeOffset (const DAQHit &hit) const
 
double PigTimeOffset (const DAQHit &hit) const
 
double TimeOffsetFull (const DAQHit &hit, double dist) const
 
double AttenuationInFiber (double dist) const
 
double AttenFactor (const DAQHit &hit, double dist) const
 
double GetReadoutDistance (const DAQHit &hit, const novaddt::Cell &cell) const
 
const double TDC_to_ns ()
 
const double ns_to_TDC ()
 
double GetCellLength (const novaddt::View &v) const
 
double GetPigtail (const DAQHit &hit) const
 
double GetDCMoffset (const DAQHit &hit) const
 

Private Attributes

std::unique_ptr< _detail::VirtualDetUtilfInner
 
std::vector< AttenfAttens
 

Detailed Description

Definition at line 61 of file DetectorUtils.h.

Constructor & Destructor Documentation

DetectorUtils::DetectorUtils ( std::string  detector)

methods for DetectorUtils

Definition at line 68 of file DetectorUtils.cxx.

References runNovaSAM::detector, and fInner.

68  :
69  fAttens({{0.3137,289.5},{0.1669,852.3}})
70 {
71  //create an inner object based on the detector name
72  if(detector == "fd" || detector == "FD")
73  fInner.reset(new _detail::FDUtil());
74  else if(detector == "ndos" || detector == "NDOS")
75  fInner.reset(new _detail::NDOSUtil());
76  else
77  throw std::logic_error("Unknown detector name:"+detector);
78 }
std::unique_ptr< _detail::VirtualDetUtil > fInner
Definition: DetectorUtils.h:92
std::vector< Atten > fAttens
Definition: DetectorUtils.h:93

Member Function Documentation

double DetectorUtils::AttenFactor ( const DAQHit hit,
double  dist 
) const

Definition at line 110 of file DetectorUtils.cxx.

References AttenuationInFiber(), GetCellLength(), and GetPigtail().

Referenced by supernova::sliceAna::CalculatePCorr().

111 {
112  // Adopted from PhotonTransport/ImprovedTransport::FiberTransmission
113  double pig = GetPigtail(hit);
115 
116 }
double AttenuationInFiber(double dist) const
double dist
Definition: runWimpSim.h:113
Definition: structs.h:12
double GetPigtail(const DAQHit &hit) const
Definition: DetectorUtils.h:84
double GetCellLength(const novaddt::View &v) const
Definition: DetectorUtils.h:81
double DetectorUtils::AttenuationInFiber ( double  dist) const

Definition at line 101 of file DetectorUtils.cxx.

References a, and fAttens.

Referenced by AttenFactor().

102 {
103  //attenuation in *dist* cm of fiber length
104  double res = 0;
105  for (auto& a: fAttens)
106  res+=a.Eval(dist);
107  return res;
108 }
double dist
Definition: runWimpSim.h:113
const double a
std::vector< Atten > fAttens
Definition: DetectorUtils.h:93
double DetectorUtils::CellTimeOffset ( const DAQHit hit) const

Definition at line 90 of file DetectorUtils.cxx.

References GetDCMoffset().

Referenced by novaddt::Multiplet::HitCorrection(), and TimeOffsetFull().

91 {
92  return GetDCMoffset(hit); // + DistTimeOffset(GetPigtail(hit));
93 }
double GetDCMoffset(const DAQHit &hit) const
Definition: DetectorUtils.h:87
Definition: structs.h:12
double DetectorUtils::DistTimeOffset ( double  dist) const

Definition at line 85 of file DetectorUtils.cxx.

References novaddt::utils::kSpeedOfFiberTransport.

Referenced by supernova::sliceAna::CalcDTC(), novaddt::Multiplet::deltaTCorr(), and TimeOffsetFull().

86 {
88 }
double dist
Definition: runWimpSim.h:113
const double kSpeedOfFiberTransport
Definition: DetectorUtils.h:11
double novaddt::utils::DetectorUtils::GetCellLength ( const novaddt::View v) const
inlinevirtual

Implements novaddt::utils::_detail::VirtualDetUtil.

Definition at line 81 of file DetectorUtils.h.

Referenced by AttenFactor(), and GetReadoutDistance().

81  {
82  return fInner->GetCellLength(v);
83  }
std::unique_ptr< _detail::VirtualDetUtil > fInner
Definition: DetectorUtils.h:92
double novaddt::utils::DetectorUtils::GetDCMoffset ( const DAQHit hit) const
inlinevirtual

Implements novaddt::utils::_detail::VirtualDetUtil.

Definition at line 87 of file DetectorUtils.h.

Referenced by CellTimeOffset().

87  {
88  return fInner->GetDCMoffset(hit);
89  }
std::unique_ptr< _detail::VirtualDetUtil > fInner
Definition: DetectorUtils.h:92
Definition: structs.h:12
double novaddt::utils::DetectorUtils::GetPigtail ( const DAQHit hit) const
inlinevirtual

Implements novaddt::utils::_detail::VirtualDetUtil.

Definition at line 84 of file DetectorUtils.h.

Referenced by AttenFactor().

84  {
85  return fInner->GetPigtail(hit);
86  }
std::unique_ptr< _detail::VirtualDetUtil > fInner
Definition: DetectorUtils.h:92
Definition: structs.h:12
double DetectorUtils::GetReadoutDistance ( const DAQHit hit,
const novaddt::Cell cell 
) const

Definition at line 80 of file DetectorUtils.cxx.

References GetCellLength(), novaddt::utils::kCellWidth, and novaddt::Cell::val.

Referenced by supernova::sliceAna::CalcDTC(), supernova::sliceAna::CalculatePCorr(), and novaddt::Multiplet::deltaTCorr().

81 {
82  return GetCellLength(hit) - kCellWidth*cell.val;
83 }
value_type val
Definition: BaseProducts.h:109
Definition: structs.h:12
const double kCellWidth
Definition: DetectorUtils.h:9
double GetCellLength(const novaddt::View &v) const
Definition: DetectorUtils.h:81
const double novaddt::utils::DetectorUtils::ns_to_TDC ( )
inline

Definition at line 79 of file DetectorUtils.h.

References novaddt::utils::kTDC_to_ns.

Referenced by novaddt::Multiplet::deltaTCorr(), and novaddt::Multiplet::HitCorrection().

79 {return 1./kTDC_to_ns;}
const double kTDC_to_ns
Definition: DetectorUtils.h:12
double novaddt::utils::DetectorUtils::PigTimeOffset ( const DAQHit hit) const
inline

Definition at line 69 of file DetectorUtils.h.

References getBrightness::cell, and novaddt::utils::_detail::VirtualDetUtil::GetPigtail().

Referenced by supernova::sliceAna::CalcDTC(), and novaddt::Multiplet::deltaTCorr().

69  {
70  return DistTimeOffset(GetPigtail(hit));
71  }
double DistTimeOffset(double dist) const
Definition: structs.h:12
double GetPigtail(const DAQHit &hit) const
Definition: DetectorUtils.h:84
void novaddt::utils::DetectorUtils::SetAttenuationParameters ( std::vector< Atten attens)
inline

Definition at line 65 of file DetectorUtils.h.

References dist.

65 {fAttens=attens;}
std::vector< Atten > fAttens
Definition: DetectorUtils.h:93
const double novaddt::utils::DetectorUtils::TDC_to_ns ( )
inline

Definition at line 78 of file DetectorUtils.h.

References novaddt::utils::kTDC_to_ns.

Referenced by supernova::sliceAna::CalcDT0(), and supernova::sliceAna::CalcDTC().

78 {return kTDC_to_ns;}
const double kTDC_to_ns
Definition: DetectorUtils.h:12
double DetectorUtils::TimeOffsetFull ( const DAQHit hit,
double  dist 
) const

Definition at line 95 of file DetectorUtils.cxx.

References CellTimeOffset(), and DistTimeOffset().

96 {
98 }
double DistTimeOffset(double dist) const
double CellTimeOffset(const DAQHit &hit) const
double dist
Definition: runWimpSim.h:113
Definition: structs.h:12

Member Data Documentation

std::vector<Atten> novaddt::utils::DetectorUtils::fAttens
private

Definition at line 93 of file DetectorUtils.h.

Referenced by AttenuationInFiber().

std::unique_ptr<_detail::VirtualDetUtil> novaddt::utils::DetectorUtils::fInner
private

Definition at line 92 of file DetectorUtils.h.

Referenced by DetectorUtils().


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