#include <PhotonLibrary.h>
Public Member Functions | |
PhotonLibrary (art::TFileDirectory *pDir=nullptr) | |
If no valid pDir is provided, storage features will not be supported. More... | |
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) |
PhotonLibrary () | |
~PhotonLibrary () | |
float | GetCount (size_t Voxel, size_t OpChannel) |
void | SetCount (size_t Voxel, size_t OpChannel, float Count) |
const std::vector< float > * | GetCounts (size_t Voxel) const |
Returns a pointer to NOpChannels() visibility values, one per channel. More... | |
const std::vector< std::vector < float > > & | GetData () const |
void | StoreLibraryToFile (std::string LibraryFile) |
void | LoadLibraryFromFile (std::string LibraryFile, size_t NVoxels) |
void | CreateEmptyLibrary (size_t NVoxels, size_t NChannels) |
int | NOpChannels () const |
int | NVoxels () const |
Metadata: voxel information | |
bool | hasVoxelDef () const |
Returns whether voxel metadata is available. More... | |
sim::PhotonVoxelDef const & | GetVoxelDef () const |
void | SetVoxelDef (sim::PhotonVoxelDef const &voxelDef) |
Public Member Functions inherited from phot::IPhotonLibrary | |
virtual | ~IPhotonLibrary ()=default |
size_t | LibrarySize () const |
Returns the number of elements in the library. More... | |
Private Member Functions | |
virtual int | NOpChannels () const override |
virtual int | NVoxels () const override |
virtual bool | isVoxelValid (size_t Voxel) const override |
bool | isVoxelValidImpl (size_t Voxel) const |
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... | |
void | LoadMetadata (TDirectory &srcDir) |
Reads the metadata from specified ROOT directory and sets it as current. More... | |
void | StoreMetadata () const |
Writes the current metadata (if any) into the ROOT output file. 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... | |
static std::vector< float > * | EmptyList () |
Private Attributes | |
bool | fHasReflected = false |
Whether the current library deals with reflected light counts. More... | |
bool | fHasReflectedT0 |
Whether the current library deals with reflected light timing. More... | |
size_t | fHasTiming |
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 |
std::optional < sim::PhotonVoxelDef > | fVoxelDef |
Voxel definition loaded from library metadata. More... | |
art::TFileDirectory * | fDir = nullptr |
ROOT directory where to write data. More... | |
std::vector< std::vector< float > > | fLookupTable |
Static Private Attributes | |
static std::string const | OpChannelBranchName = "OpChannel" |
Name of the optical channel number in the input tree. More... | |
static std::vector< float > | EmptyChannelsList |
Additional Inherited Members | |
Public Types inherited from phot::IPhotonLibrary | |
using | Counts_t = const float * |
Type for visibility count per optical channel. More... | |
using | T0s_t = const float * |
Type for time of arrival per optical channel. More... | |
using | Params_t = std::vector< float > const * |
using | Functions_t = TF1 * |
Definition at line 25 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
phot::PhotonLibrary::PhotonLibrary | ( | art::TFileDirectory * | pDir = nullptr | ) |
If no valid pDir
is provided, storage features will not be supported.
Definition at line 46 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
phot::PhotonLibrary::PhotonLibrary | ( | ) |
Definition at line 23 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
phot::PhotonLibrary::~PhotonLibrary | ( | ) |
Definition at line 31 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
void phot::PhotonLibrary::CreateEmptyLibrary | ( | size_t | NVoxels, |
size_t | NChannels | ||
) |
Definition at line 77 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
void phot::PhotonLibrary::CreateEmptyLibrary | ( | size_t | NVoxels, |
size_t | NChannels, | ||
bool | storeReflected = false , |
||
bool | storeReflT0 = false , |
||
size_t | storeTiming = 0 |
||
) |
Definition at line 134 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inlinestaticprivate |
Definition at line 45 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
staticprivate |
Returns the number of optical channels in the specified tree.
Definition at line 577 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
float phot::PhotonLibrary::GetCount | ( | size_t | Voxel, |
size_t | OpChannel | ||
) |
Definition at line 186 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 310 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
virtual |
Returns a pointer to NOpChannels() visibility values, one per channel.
Implements phot::IPhotonLibrary.
|
overridevirtual |
Returns a pointer to NOpChannels() visibility values, one per channel.
Implements phot::IPhotonLibrary.
Definition at line 406 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inline |
Definition at line 26 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 329 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 457 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 339 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
overridevirtual |
Implements phot::IPhotonLibrary.
Definition at line 468 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
float phot::PhotonLibrary::GetTimingPar | ( | size_t | Voxel, |
size_t | OpChannel, | ||
size_t | parnum | ||
) | const |
Definition at line 320 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
const std::vector< float > * phot::PhotonLibrary::GetTimingPars | ( | size_t | Voxel | ) | const |
Definition at line 417 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
TF1 * phot::PhotonLibrary::GetTimingTF1s | ( | size_t | Voxel | ) | const |
Definition at line 428 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inline |
Returns the current voxel metadata (undefined behaviour if none).
hasVoxelDef()
Definition at line 106 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineoverridevirtual |
Returns whether the current library deals with reflected light count.
Implements phot::IPhotonLibrary.
Definition at line 64 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineoverridevirtual |
Returns whether the current library deals with reflected light timing.
Implements phot::IPhotonLibrary.
Definition at line 71 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inline |
Returns whether the current library deals with time propagation distributions.
Definition at line 57 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inline |
Returns whether voxel metadata is available.
Definition at line 98 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineoverrideprivatevirtual |
Reimplemented from phot::IPhotonLibrary.
Definition at line 136 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Definition at line 168 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
void phot::PhotonLibrary::LoadLibraryFromFile | ( | std::string | LibraryFile, |
size_t | NVoxels | ||
) |
Definition at line 95 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
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 165 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
private |
Reads the metadata from specified ROOT directory and sets it as current.
Definition at line 478 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inlinevirtual |
Implements phot::IPhotonLibrary.
Definition at line 34 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
inlineoverrideprivatevirtual |
Implements phot::IPhotonLibrary.
Definition at line 125 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlinevirtual |
Implements phot::IPhotonLibrary.
Definition at line 35 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
inlineoverrideprivatevirtual |
Implements phot::IPhotonLibrary.
Definition at line 130 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
TTree* phot::PhotonLibrary::ProduceTTree | ( | ) | const |
void phot::PhotonLibrary::SetCount | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count | ||
) |
void phot::PhotonLibrary::SetCount | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count | ||
) |
Definition at line 350 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
void phot::PhotonLibrary::SetReflCount | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count | ||
) |
Definition at line 383 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
void phot::PhotonLibrary::SetReflT0 | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | reflT0 | ||
) |
Definition at line 394 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
void phot::PhotonLibrary::SetTimingPar | ( | size_t | Voxel, |
size_t | OpChannel, | ||
float | Count, | ||
size_t | parnum | ||
) |
Definition at line 361 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
void phot::PhotonLibrary::SetTimingTF1 | ( | size_t | Voxel, |
size_t | OpChannel, | ||
TF1 | func | ||
) |
Definition at line 372 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inline |
Copies the specified voxel definition into our own (overwrites the existing metadata if any).
Definition at line 115 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlinestaticprivate |
Converts size_t into integer.
Definition at line 265 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
void phot::PhotonLibrary::StoreLibraryToFile | ( | std::string | LibraryFile | ) |
Definition at line 38 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.cxx.
void phot::PhotonLibrary::StoreLibraryToFile | ( | std::string | LibraryFile, |
bool | storeReflected = false , |
||
bool | storeReflT0 = false , |
||
size_t | storeTiming = 0 |
||
) | const |
Definition at line 51 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
private |
Writes the current metadata (if any) into the ROOT output file.
Definition at line 527 of file larsim/larsim/PhotonPropagation/PhotonLibrary.cxx.
|
inlineprivate |
Unchecked access to a visibility datum.
Definition at line 182 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a visibility datum.
Definition at line 189 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a reflected visibility datum.
Definition at line 196 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a reflected visibility datum.
Definition at line 203 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a reflected T0 visibility datum.
Definition at line 210 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a reflected T0 visibility datum.
Definition at line 217 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a parameter the time distribution.
Definition at line 224 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 231 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 238 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Unchecked access to a parameter of the time distribution.
Definition at line 245 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
inlineprivate |
Returns the index of visibility of specified voxel and cell.
Definition at line 175 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
staticprivate |
Definition at line 43 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
private |
ROOT directory where to write data.
Definition at line 165 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Whether the current library deals with reflected light counts.
Definition at line 141 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Whether the current library deals with reflected light timing.
Definition at line 142 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Whether the current library deals with time propagation distribution.
Definition at line 145 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 39 of file sbncode/sbncode/OpT0Finder/flashmatch/Base/FMWKTools/PhotonLibrary.h.
|
private |
Definition at line 150 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 158 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 159 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 151 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 152 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 155 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 153 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 156 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Definition at line 154 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
private |
Voxel definition loaded from library metadata.
Definition at line 162 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.
|
staticprivate |
Name of the optical channel number in the input tree.
Definition at line 258 of file larsim/larsim/PhotonPropagation/PhotonLibrary.h.