LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "PhotonLibrary.h"
Public Member Functions | |
PhotonLibrary ()=default | |
TTree * | ProduceTTree () const |
virtual float | GetCount (size_t Voxel, size_t OpChannel) const override |
void | SetCount (size_t Voxel, size_t OpChannel, float Count) |
float | GetTimingPar (size_t Voxel, size_t OpChannel, size_t parnum) const |
void | SetTimingPar (size_t Voxel, size_t OpChannel, float Count, size_t parnum) |
void | SetTimingTF1 (size_t Voxel, size_t OpChannel, TF1 func) |
virtual float | GetReflCount (size_t Voxel, size_t OpChannel) const override |
void | SetReflCount (size_t Voxel, size_t OpChannel, float Count) |
virtual float | GetReflT0 (size_t Voxel, size_t OpChannel) const override |
void | SetReflT0 (size_t Voxel, size_t OpChannel, float reflT0) |
virtual float const * | GetCounts (size_t Voxel) const override |
Returns a pointer to NOpChannels() visibility values, one per channel. More... | |
const std::vector< float > * | GetTimingPars (size_t Voxel) const |
TF1 * | GetTimingTF1s (size_t Voxel) const |
virtual float const * | GetReflCounts (size_t Voxel) const override |
virtual float const * | GetReflT0s (size_t Voxel) const override |
bool | hasTiming () const |
Returns whether the current library deals with time propagation distributions. More... | |
virtual bool | hasReflected () const override |
Returns whether the current library deals with reflected light count. More... | |
virtual bool | hasReflectedT0 () const override |
Returns whether the current library deals with reflected light timing. More... | |
void | StoreLibraryToFile (std::string LibraryFile, bool storeReflected=false, bool storeReflT0=false, size_t storeTiming=0) const |
void | LoadLibraryFromFile (std::string LibraryFile, size_t NVoxels, bool storeReflected=false, bool storeReflT0=false, size_t storeTiming=0, int maxrange=200) |
void | CreateEmptyLibrary (size_t NVoxels, size_t NChannels, bool storeReflected=false, bool storeReflT0=false, size_t storeTiming=0) |
virtual int | NOpChannels () const override |
virtual int | NVoxels () const override |
size_t | LibrarySize () const |
Returns the number of elements in the library. More... | |
Private Member Functions | |
size_t | uncheckedIndex (size_t Voxel, size_t OpChannel) const |
Returns the index of visibility of specified voxel and cell. More... | |
float | uncheckedAccess (size_t Voxel, size_t OpChannel) const |
Unchecked access to a visibility datum. More... | |
float & | uncheckedAccess (size_t Voxel, size_t OpChannel) |
Unchecked access to a visibility datum. More... | |
float | uncheckedAccessRefl (size_t Voxel, size_t OpChannel) const |
Unchecked access to a reflected visibility datum. More... | |
float & | uncheckedAccessRefl (size_t Voxel, size_t OpChannel) |
Unchecked access to a reflected visibility datum. More... | |
float | uncheckedAccessReflT (size_t Voxel, size_t OpChannel) const |
Unchecked access to a reflected T0 visibility datum. More... | |
float & | uncheckedAccessReflT (size_t Voxel, size_t OpChannel) |
Unchecked access to a reflected T0 visibility datum. More... | |
float | uncheckedAccessTimingPar (size_t Voxel, size_t OpChannel, size_t parnum) const |
Unchecked access to a parameter the time distribution. More... | |
float & | uncheckedAccessTimingPar (size_t Voxel, size_t OpChannel, size_t parnum) |
Unchecked access to a parameter of the time distribution. More... | |
TF1 & | uncheckedAccessTimingTF1 (size_t Voxel, size_t OpChannel) |
Unchecked access to a parameter of the time distribution. More... | |
const TF1 & | uncheckedAccessTimingTF1 (size_t Voxel, size_t OpChannel) const |
Unchecked access to a parameter of the time distribution. More... | |
Static Private Member Functions | |
static size_t | ExtractNOpChannels (TTree *tree) |
Returns the number of optical channels in the specified tree. More... | |
static int | size_t2int (size_t val) |
Converts size_t into integer. More... | |
Private Attributes | |
bool | fHasReflected = false |
Whether the current library deals with reflected light counts. More... | |
bool | fHasReflectedT0 = false |
Whether the current library deals with reflected light timing. More... | |
size_t | fHasTiming = 0 |
Whether the current library deals with time propagation distribution. More... | |
util::LazyVector< float > | fLookupTable |
util::LazyVector< float > | fReflLookupTable |
util::LazyVector< float > | fReflTLookupTable |
util::LazyVector< std::vector< float > > | fTimingParLookupTable |
util::LazyVector< TF1 > | fTimingParTF1LookupTable |
std::string | fTimingParFormula |
size_t | fTimingParNParameters |
size_t | fNOpChannels |
size_t | fNVoxels |
Static Private Attributes | |
static std::string const | OpChannelBranchName = "OpChannel" |
Name of the optical channel number in the input tree. More... | |
Definition at line 18 of file PhotonLibrary.h.
|
default |
void phot::PhotonLibrary::CreateEmptyLibrary | ( | size_t | NVoxels, |
size_t | NChannels, | ||
bool | storeReflected = false , |
||
bool | storeReflT0 = false , |
||
size_t | storeTiming = 0 |
||
) |
Definition at line 104 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::clear(), fHasReflected, fHasReflectedT0, fHasTiming, fLookupTable, fNOpChannels, fNVoxels, fReflLookupTable, fReflTLookupTable, fTimingParLookupTable, fTimingParTF1LookupTable, phot::IPhotonLibrary::LibrarySize(), NOpChannels(), NVoxels(), and util::LazyVector< T, A >::resize().
Referenced by hasReflectedT0(), and phot::PhotonVisibilityService::LoadLibrary().
|
staticprivate |
Returns the number of optical channels in the specified tree.
Definition at line 404 of file PhotonLibrary.cxx.
References LOG_DEBUG, art::errors::NotFound, and OpChannelBranchName.
Referenced by LoadLibraryFromFile().
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 262 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccess().
|
overridevirtual |
Returns a pointer to NOpChannels() visibility values, one per channel.
Implements phot::IPhotonLibrary.
Definition at line 345 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::data_address(), fLookupTable, fNVoxels, and uncheckedIndex().
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 279 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessRefl().
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 388 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::data_address(), fNVoxels, fReflLookupTable, and uncheckedIndex().
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 288 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessReflT().
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 396 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::data_address(), fNVoxels, fReflTLookupTable, and uncheckedIndex().
float phot::PhotonLibrary::GetTimingPar | ( | size_t | Voxel, |
size_t | OpChannel, | ||
size_t | parnum | ||
) | const |
Definition at line 271 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessTimingPar().
Referenced by phot::PhotonVisibilityService::GetLibraryTimingParEntry().
const std::vector< float > * phot::PhotonLibrary::GetTimingPars | ( | size_t | Voxel | ) | const |
Definition at line 353 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::data_address(), fNVoxels, fTimingParLookupTable, and uncheckedIndex().
Referenced by phot::PhotonVisibilityService::GetLibraryTimingParEntries().
TF1 * phot::PhotonLibrary::GetTimingTF1s | ( | size_t | Voxel | ) | const |
Definition at line 361 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::data_address(), fNVoxels, fTimingParTF1LookupTable, and uncheckedIndex().
Referenced by phot::PhotonVisibilityService::GetLibraryTimingTF1Entries().
|
inlineoverridevirtual |
Returns whether the current library deals with reflected light count.
Implements phot::IPhotonLibrary.
Definition at line 54 of file PhotonLibrary.h.
References fHasReflected.
Referenced by StoreLibraryToFile().
|
inlineoverridevirtual |
Returns whether the current library deals with reflected light timing.
Implements phot::IPhotonLibrary.
Definition at line 57 of file PhotonLibrary.h.
References CreateEmptyLibrary(), fHasReflectedT0, LoadLibraryFromFile(), NVoxels(), and StoreLibraryToFile().
Referenced by StoreLibraryToFile().
|
inline |
Returns whether the current library deals with time propagation distributions.
Definition at line 51 of file PhotonLibrary.h.
References fHasTiming.
Referenced by StoreLibraryToFile().
|
inlineinherited |
Returns the number of elements in the library.
Definition at line 37 of file IPhotonLibrary.h.
References phot::IPhotonLibrary::NOpChannels(), and phot::IPhotonLibrary::NVoxels().
Referenced by CreateEmptyLibrary(), and LoadLibraryFromFile().
void phot::PhotonLibrary::LoadLibraryFromFile | ( | std::string | LibraryFile, |
size_t | NVoxels, | ||
bool | storeReflected = false , |
||
bool | storeReflT0 = false , |
||
size_t | storeTiming = 0 , |
||
int | maxrange = 200 |
||
) |
Definition at line 135 of file PhotonLibrary.cxx.
References util::LazyVector< T, A >::clear(), util::LazyVector< T, A >::data_init(), ExtractNOpChannels(), f, fHasReflected, fHasReflectedT0, fHasTiming, fLookupTable, fNOpChannels, fNVoxels, fReflLookupTable, fReflTLookupTable, fTimingParFormula, fTimingParLookupTable, fTimingParNParameters, fTimingParTF1LookupTable, phot::IPhotonLibrary::LibrarySize(), n, NVoxels(), util::LazyVector< T, A >::resize(), uncheckedAccess(), uncheckedAccessRefl(), uncheckedAccessReflT(), and uncheckedAccessTimingTF1().
Referenced by hasReflectedT0(), and phot::PhotonVisibilityService::LoadLibrary().
|
inlineoverridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 65 of file PhotonLibrary.h.
References fNOpChannels.
Referenced by CreateEmptyLibrary().
|
inlineoverridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 66 of file PhotonLibrary.h.
References fNVoxels.
Referenced by CreateEmptyLibrary(), hasReflectedT0(), and LoadLibraryFromFile().
TTree* phot::PhotonLibrary::ProduceTTree | ( | ) | const |
void phot::PhotonLibrary::SetCount | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count | ||
) |
Definition at line 298 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccess().
Referenced by phot::PhotonVisibilityService::SetLibraryEntry().
void phot::PhotonLibrary::SetReflCount | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count | ||
) |
Definition at line 326 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessRefl().
Referenced by phot::PhotonVisibilityService::SetLibraryEntry().
void phot::PhotonLibrary::SetReflT0 | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | reflT0 | ||
) |
Definition at line 335 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessReflT().
Referenced by phot::PhotonVisibilityService::SetLibraryReflT0Entry().
void phot::PhotonLibrary::SetTimingPar | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count, | ||
size_t | parnum | ||
) |
Definition at line 307 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessTimingPar().
Referenced by phot::PhotonVisibilityService::SetLibraryTimingParEntry().
void phot::PhotonLibrary::SetTimingTF1 | ( | size_t | Voxel, |
size_t | OpChannel, | ||
TF1 | func | ||
) |
Definition at line 316 of file PhotonLibrary.cxx.
References fNOpChannels, fNVoxels, and uncheckedAccessTimingTF1().
Referenced by phot::PhotonVisibilityService::SetLibraryTimingTF1Entry().
|
inlinestaticprivate |
Converts size_t into integer.
Definition at line 145 of file PhotonLibrary.h.
Referenced by StoreLibraryToFile().
void phot::PhotonLibrary::StoreLibraryToFile | ( | std::string | LibraryFile, |
bool | storeReflected = false , |
||
bool | storeReflT0 = false , |
||
size_t | storeTiming = 0 |
||
) | const |
Definition at line 23 of file PhotonLibrary.cxx.
References fLookupTable, fNOpChannels, fNVoxels, fReflLookupTable, fTimingParLookupTable, hasReflected(), hasReflectedT0(), hasTiming(), art::TFileDirectory::make(), OpChannelBranchName, util::LazyVector< T, A >::size(), size_t2int(), uncheckedAccess(), uncheckedAccessRefl(), uncheckedAccessReflT(), and uncheckedAccessTimingPar().
Referenced by hasReflectedT0(), and phot::PhotonVisibilityService::StoreLibrary().
|
inlineprivate |
Unchecked access to a visibility datum.
Definition at line 94 of file PhotonLibrary.h.
References uncheckedIndex().
Referenced by GetCount(), LoadLibraryFromFile(), SetCount(), and StoreLibraryToFile().
|
inlineprivate |
Unchecked access to a visibility datum.
Definition at line 98 of file PhotonLibrary.h.
References uncheckedIndex().
|
inlineprivate |
Unchecked access to a reflected visibility datum.
Definition at line 102 of file PhotonLibrary.h.
References uncheckedIndex().
Referenced by GetReflCount(), LoadLibraryFromFile(), SetReflCount(), and StoreLibraryToFile().
|
inlineprivate |
Unchecked access to a reflected visibility datum.
Definition at line 106 of file PhotonLibrary.h.
References uncheckedIndex().
|
inlineprivate |
Unchecked access to a reflected T0 visibility datum.
Definition at line 110 of file PhotonLibrary.h.
References uncheckedIndex().
Referenced by GetReflT0(), LoadLibraryFromFile(), SetReflT0(), and StoreLibraryToFile().
|
inlineprivate |
Unchecked access to a reflected T0 visibility datum.
Definition at line 114 of file PhotonLibrary.h.
References uncheckedIndex().
|
inlineprivate |
Unchecked access to a parameter the time distribution.
Definition at line 119 of file PhotonLibrary.h.
References uncheckedIndex().
Referenced by GetTimingPar(), SetTimingPar(), and StoreLibraryToFile().
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 123 of file PhotonLibrary.h.
References uncheckedIndex().
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 128 of file PhotonLibrary.h.
References uncheckedIndex().
Referenced by LoadLibraryFromFile(), and SetTimingTF1().
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 132 of file PhotonLibrary.h.
References util::LazyVector< T, A >::data_address(), and uncheckedIndex().
|
inlineprivate |
Returns the index of visibility of specified voxel and cell.
Definition at line 90 of file PhotonLibrary.h.
Referenced by GetCounts(), GetReflCounts(), GetReflT0s(), GetTimingPars(), GetTimingTF1s(), uncheckedAccess(), uncheckedAccessRefl(), uncheckedAccessReflT(), uncheckedAccessTimingPar(), and uncheckedAccessTimingTF1().
|
private |
Whether the current library deals with reflected light counts.
Definition at line 70 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), hasReflected(), and LoadLibraryFromFile().
|
private |
Whether the current library deals with reflected light timing.
Definition at line 71 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), hasReflectedT0(), and LoadLibraryFromFile().
|
private |
Whether the current library deals with time propagation distribution.
Definition at line 73 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), hasTiming(), and LoadLibraryFromFile().
|
private |
Definition at line 78 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetCounts(), LoadLibraryFromFile(), and StoreLibraryToFile().
|
private |
Definition at line 86 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetCount(), GetReflCount(), GetReflT0(), GetTimingPar(), LoadLibraryFromFile(), NOpChannels(), SetCount(), SetReflCount(), SetReflT0(), SetTimingPar(), SetTimingTF1(), and StoreLibraryToFile().
|
private |
Definition at line 87 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetCount(), GetCounts(), GetReflCount(), GetReflCounts(), GetReflT0(), GetReflT0s(), GetTimingPar(), GetTimingPars(), GetTimingTF1s(), LoadLibraryFromFile(), NVoxels(), SetCount(), SetReflCount(), SetReflT0(), SetTimingPar(), SetTimingTF1(), and StoreLibraryToFile().
|
private |
Definition at line 79 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetReflCounts(), LoadLibraryFromFile(), and StoreLibraryToFile().
|
private |
Definition at line 80 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetReflT0s(), and LoadLibraryFromFile().
|
private |
Definition at line 83 of file PhotonLibrary.h.
Referenced by LoadLibraryFromFile().
|
private |
Definition at line 81 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetTimingPars(), LoadLibraryFromFile(), and StoreLibraryToFile().
|
private |
Definition at line 84 of file PhotonLibrary.h.
Referenced by LoadLibraryFromFile().
|
private |
Definition at line 82 of file PhotonLibrary.h.
Referenced by CreateEmptyLibrary(), GetTimingTF1s(), and LoadLibraryFromFile().
|
staticprivate |
Name of the optical channel number in the input tree.
Definition at line 139 of file PhotonLibrary.h.
Referenced by ExtractNOpChannels(), and StoreLibraryToFile().