A simple module to reconstruct the light flux at the apertures. More...
#include "FdApertureLightFinderKG/FdApertureLightFinder.h"
Classes | |
class | LastTelTime |
Public Types | |
enum | ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop } |
Flag returned by module methods to the RunController. More... | |
enum | VersionInfoType { eFilename = 1, eRevisionNumber = 2, eDate = 3, eTime = 4, eLastEditor = 5 } |
Different types of version info that can be retrieved from GetVersionInfo. More... | |
Public Member Functions | |
fwk::VModule::ResultFlag | Finish () |
Finish: invoked at end of the run (NOT end of the event) More... | |
utl::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () const |
std::string | GetVersionInfo (const VersionInfoType v) const |
Retrieve different sorts of module version info. More... | |
fwk::VModule::ResultFlag | Init () |
Initialize: invoked at beginning of run (NOT beginning of event) More... | |
void | InitTiming () |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
Static Public Member Functions | |
static std::string | GetResultFlagByName (const ResultFlag flag) |
Protected Types | |
enum | InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 } |
Protected Attributes | |
int | fInfoLevel = 0 |
Private Types | |
enum | eModeOfOperation { ePerEye, ePerTelescope, ePerEyeAndTelescope } |
Private Member Functions | |
bool | CalculateShowerGeometryData (const fevt::Eye &eye) |
void | FillEyeFluxes (fevt::Eye &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &) |
void | FillFluxes (utl::TabulatedFunctionErrors &, utl::TabulatedFunctionErrors &, utl::TabulatedFunctionErrors &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &) |
void | FillTelescopeFluxes (fevt::Telescope &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const std::vector< const std::vector< unsigned int > * > &, const std::list< std::pair< double, double >> &) |
bool | FindLightFlux (fevt::Eye &eye) |
double | FindZeta (fevt::Eye &eye, double initZeta, double finZeta, double stepZeta, bool fillFlux=false) |
utl::TabulatedFunctionErrors & | GetClearedEyeLightFlux (fevt::Eye &eye, const fevt::FdConstants::LightSource source) |
utl::TabulatedFunctionErrors & | GetClearedTelescopeLightFlux (fevt::Telescope &tel, const fevt::FdConstants::LightSource source) |
bool | IsNearBorder (const utl::Vector &direction, const fevt::Telescope &telescope, double zeta) const |
REGISTER_MODULE ("FdApertureLightKG", FdApertureLightFinder) | |
Private Attributes | |
double | fmaxZetaAngle |
double | fminZetaAngle |
bool | fOnlyUsedForTimeFit |
double | fSafetyMargin |
std::map< unsigned short, std::vector < ShowerGeometryData > > | fShowerGeometryData |
geometry and trace bin data More... | |
double | fstepZetaAngle |
int | fVerbosity = 0 |
XML cards. More... | |
A simple module to reconstruct the light flux at the apertures.
Definition at line 96 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
Enumerator | |
---|---|
ePerEye | |
ePerTelescope | |
ePerEyeAndTelescope |
Definition at line 98 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
protectedinherited |
|
inherited |
Flag returned by module methods to the RunController.
Enumerator | |
---|---|
eSuccess |
Report success to RunController. |
eFailure |
Report failure to RunController, causing RunController to terminate execution. |
eBreakLoop |
Break current loop. It works for nested loops too! |
eContinueLoop |
Skip remaining modules in the current loop and continue with next iteration of the loop. |
|
inherited |
|
private |
calculates shower geometry data for each telescope
Definition at line 135 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References Angle(), utl::CosAngle(), fwk::LocalCoordinateSystemConstructor< Policy >::Create(), utl::deg, FdApertureLightFinderKG::ShowerGeometryData::fADCTraceIndex, FdApertureLightFinderKG::ShowerGeometryData::fChiVecMean, FdApertureLightFinderKG::ShowerGeometryData::fEyeBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fNearBorder, FdApertureLightFinderKG::ShowerGeometryData::fT1, FdApertureLightFinderKG::ShowerGeometryData::fT2, FdApertureLightFinderKG::ShowerGeometryData::fTelBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fTelFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fTelVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fUsedForTimeFit, fdet::Telescope::GetAxis(), evt::ShowerFRecData::GetAxis(), fdet::Telescope::GetCamera(), fdet::FDetector::GetChannel(), evt::ShowerFRecData::GetCorePosition(), evt::ShowerFRecData::GetCoreTime(), fdet::FDetector::GetEye(), fdet::Eye::GetEyeCoordinateSystem(), fdet::Channel::GetFADCBinSize(), fdet::Camera::GetFADCBinSize(), fdet::Camera::GetFADCTraceLength(), fevt::EyeRecData::GetFRecShower(), fevt::Eye::GetHeader(), fevt::Eye::GetId(), fdet::Telescope::GetId(), utl::Vector::GetMag(), fdet::Telescope::GetPosition(), fevt::Eye::GetRecData(), fevt::Telescope::GetRecData(), fevt::Eye::GetTelescope(), fdet::FDetector::GetTelescope(), fevt::EyeHeader::GetTimeStamp(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), fevt::EyeRecData::HasFRecShower(), fevt::Eye::HasRecData(), INFO, utl::kSpeedOfLight, utl::Vector::Normalize(), utl::ns, fevt::Eye::TelescopesBegin(), fevt::Eye::TelescopesEnd(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
private |
Fills light fluxes for an eye
Definition at line 485 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References fevt::FdConstants::eBackground, fevt::FdConstants::eFluorTotal, and cevt::StationConstants::eTotal.
|
private |
Generic guts of the combines-and-fill-flux methods
Definition at line 539 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References utl::TabulatedFunctionErrors::PushBack(), and sqrt().
|
private |
Fills light fluxes for a telescope
Definition at line 507 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References fevt::FdConstants::eBackground, fevt::FdConstants::eFluorTotal, cevt::StationConstants::eTotal, fevt::TelescopeRecData::GetPixelsInZetaOverTime(), fevt::Telescope::GetRecData(), and fevt::TelescopeRecData::SetSpotFarFromBorderTimeRanges().
|
private |
Definition at line 283 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References degree, FdApertureLightFinderKG::ShowerGeometryData::fEyeBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fNearBorder, FdApertureLightFinderKG::ShowerGeometryData::fPixelsInZeta, FdApertureLightFinderKG::ShowerGeometryData::fT1, FdApertureLightFinderKG::ShowerGeometryData::fT2, FdApertureLightFinderKG::ShowerGeometryData::fTelBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fTelFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fTelVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fUsedForTimeFit, fevt::Eye::GetRecData(), fevt::Eye::GetTelescope(), INFO, fevt::EyeRecData::SetZeta(), fevt::Eye::TelescopesBegin(), fevt::Eye::TelescopesEnd(), and WARNING.
|
private |
Find the angle zeta that maximizes S/N
Definition at line 560 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References fwk::LocalCoordinateSystemConstructor< Policy >::Create(), degree, ERROR, FdApertureLightFinderKG::ShowerGeometryData::fADCTraceIndex, FdApertureLightFinderKG::ShowerGeometryData::fChiVecMean, FdApertureLightFinderKG::ShowerGeometryData::fEyeBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fEyeVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fNearBorder, FdApertureLightFinderKG::ShowerGeometryData::fPixelsInZeta, FdApertureLightFinderKG::ShowerGeometryData::fTelBgVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fTelFluxSum, FdApertureLightFinderKG::ShowerGeometryData::fTelVarianceSum, FdApertureLightFinderKG::ShowerGeometryData::fUsedForTimeFit, fdet::Telescope::GetCamera(), fdet::Pixel::GetDiaPhoton2PEFactor(), fdet::Telescope::GetDiaphragmArea(), fdet::Pixel::GetDirection(), fdet::Camera::GetGainVariance(), fdet::FDetector::GetPixel(), fdet::Telescope::GetPosition(), fdet::FDetector::GetReferenceLambda(), utl::Trace< T >::GetStart(), utl::Trace< T >::GetStop(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), std::pow(), sqrt(), fevt::Eye::TelescopesBegin(), and fevt::Eye::TelescopesEnd().
|
inlinevirtual |
Finish: invoked at end of the run (NOT end of the event)
This method is for things that should be done at the end of the run (for example, closing files or writing out histograms) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 107 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
References io::eSuccess.
|
private |
Get (and potentially create or clear) a type of light flux type for the eye
Definition at line 470 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References utl::TabulatedFunctionErrors::Clear(), fevt::EyeRecData::GetLightFlux(), fevt::Eye::GetRecData(), fevt::EyeRecData::HasLightFlux(), and fevt::EyeRecData::MakeLightFlux().
|
private |
Get (and potentially create or clear) a type of light flux for one telescope
Definition at line 457 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References utl::TabulatedFunctionErrors::Clear(), fevt::TelescopeRecData::GetLightFlux(), fevt::Telescope::GetRecData(), fevt::TelescopeRecData::HasLightFlux(), and fevt::TelescopeRecData::MakeLightFlux().
|
staticinherited |
Definition at line 8 of file VModule.cc.
References fwk::VModule::eBreakLoop, fwk::VModule::eContinueLoop, fwk::VModule::eFailure, and fwk::VModule::eSuccess.
Referenced by fwk::RunController::DoNextInSequence(), fwk::RunController::FinishBranch(), and fwk::RunController::InitBranch().
|
inlineinherited |
Definition at line 106 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inlineinherited |
Definition at line 107 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inherited |
Retrieve different sorts of module version info.
Definition at line 26 of file VModule.cc.
Referenced by fwk::CentralConfig::GetConfig(), ThresholdCalculatorKG::ThresholdCalculator::Init(), fdDoubleBumpFinder::FdDoubleBumpFinder::Init(), LaserGeneratorNA::LaserGenerator::Init(), LaserLightSimulatorNA::LaserLightSimulator::Init(), FdElectronicsSimulatorOG::FdElectronicsSimulator::Init(), TelescopeSimulatorKG::TelescopeSimulator::Init(), TelescopeSimulatorKG2::TelescopeSimulator::Init(), SdSimpleSimKG::SdSimpleSim::Init(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Init(), and testRunController::testModuleVersionInfo().
|
virtual |
Initialize: invoked at beginning of run (NOT beginning of event)
This method is for things that should be done once at the beginning of a run (for example, booking histograms, performing calculations that need to be done only once, initializing parameters) {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 64 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References ERROR, io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetData(), and fwk::CentralConfig::GetTopBranch().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Check if the light spot centered in direction and of radius zeta touches the borders of the camera
Definition at line 696 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References utl::CosAngle(), fevt::Telescope::MirrorEventBorderPixelsBegin(), and fevt::Telescope::MirrorEventBorderPixelsEnd().
|
private |
|
virtual |
Run: invoked once per event.
This method is for things that should be done once per event {You must override this method in your concrete module}
Implements fwk::VModule.
Definition at line 94 of file FdApertureLightFinderKG/FdApertureLightFinder.cc.
References io::eSuccess, fevt::FEvent::EyesBegin(), evt::Event::GetFEvent(), fevt::Eye::GetId(), evt::Event::HasFEvent(), and INFO.
|
inlineinherited |
Definition at line 98 of file VModule.h.
References fwk::VModule::fStopwatch, fwk::VModule::Run(), utl::Stopwatch::Start(), and utl::Stopwatch::Stop().
Referenced by fwk::RunController::DoNextInSequence().
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
Definition at line 120 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
Definition at line 121 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
Definition at line 124 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
Definition at line 123 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
geometry and trace bin data
Definition at line 127 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
Definition at line 122 of file FdApertureLightFinderKG/FdApertureLightFinder.h.
|
private |
XML cards.
Definition at line 113 of file FdApertureLightFinderKG/FdApertureLightFinder.h.