the shower axis finder More...
#include "FdAxisFinderOG/FdAxisFinder.h"
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 Member Functions | |
void | AxisFirstGuess (fevt::Eye &eye) |
bool | CheckForLasers (evt::Event &event) |
void | FillPoints (fevt::Eye &eye) |
void | FindAxis (fevt::Eye &eye) |
void | FindAxisLaser (fevt::Eye &eye) |
bool | ReadmitPixel (fevt::Eye &eye) |
REGISTER_MODULE ("FdAxisFinderOG", FdAxisFinder) | |
bool | RejectPixel (fevt::Eye &eye) |
void | RemoveOutliers (fevt::Eye &eye) |
Static Private Member Functions | |
static void | MinuitFitFunc (int &npar, double *gin, double &f, double *par, int iflag) |
static void | MinuitFitFuncLaser (int &npar, double *gin, double &f, double *par, int iflag) |
Private Attributes | |
double | fChi0 |
double | fChi0Error |
double | fChi0First |
double | fCovariance [3][3] |
bool | fIsBlob |
True if the time extension is < fMinimumTimeExtension;. More... | |
double | fMinimumTimeExtension |
unsigned int | fMinPixels |
Minimum number of pixels to continue with time fit. More... | |
bool | fMinuitFailed |
flag failure of minuit More... | |
double | fRpError |
double | fRpFirst |
double | fSelectAndRecLasers |
double | fSigmasLimit |
double | fT0 |
double | fT0Error |
double | fT0First |
double | fTolerance |
Static Private Attributes | |
static double | fChi2 =0 |
static fevt::Eye * | fCurEye =0 |
static int | fDebuging |
switch for debuging More... | |
static bool | fIsCeleste = false |
static bool | fIsRamiro = false |
static unsigned int | fNDof =0 |
static double | fRp =0 |
static utl::Vector | fSDP = utl::Vector() |
|
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 |
Find a first guess for parameters T0 chi0 Rp, finding a best fit to a parabolic functions whose parameters are related to the wanted ones chi0 = chimed + 2* atan(-a2/a1) Rp = -2*c*a1^3/(a1^2+a2^2) T0 = a0 - 2*a2*a1^2/(a1^2+a2^2)
see gap 2003-045
Definition at line 723 of file FdAxisFinder.cc.
References degree, fevt::PixelRecData::GetChi_i(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), fevt::Pixel::GetRecData(), fevt::Eye::GetRecData(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), fevt::PixelRecData::GetTotalCharge(), utl::kPi, utl::kSpeedOfLight, utl::m, sqrt(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
private |
Definition at line 1076 of file FdAxisFinder.cc.
References utl::TimeStamp::GetGPSNanoSecond(), sevt::Station::GetId(), evt::Header::GetTime(), evt::Event::HasSEvent(), sevt::Station::IsCandidate(), sevt::Station::MakeRecData(), sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
private |
Definition at line 424 of file FdAxisFinder.cc.
References utl::abs(), fevt::EyeRecData::AddTimeFitPixel(), Angle(), utl::Cross(), fSDP(), fevt::PixelRecData::GetCentroid(), fevt::PixelRecData::GetCentroidError(), fdet::Pixel::GetDirection(), fdet::Eye::GetEyeCoordinateSystem(), fdet::Channel::GetFADCBinSize(), fevt::Pixel::GetId(), utl::Vector::GetMag(), fevt::Pixel::GetRecData(), fevt::Eye::GetRecData(), fevt::Eye::GetTelescope(), fevt::Pixel::GetTelescopeId(), fevt::Telescope::GetTimeOffset(), utl::kPi, fevt::EyeRecData::PulsedPixelsBegin(), fevt::EyeRecData::PulsedPixelsEnd(), fevt::EyeRecData::SDPPixelsBegin(), fevt::EyeRecData::SDPPixelsEnd(), fevt::PixelRecData::SetChi_i(), and fevt::PixelRecData::SetT_i().
|
private |
Definition at line 350 of file FdAxisFinder.cc.
References degree, ERROR, fRp(), fRpError(), UnivRecNS::npar, and WARNING.
|
private |
Definition at line 951 of file FdAxisFinder.cc.
References utl::abs(), Angle(), fwk::LocalCoordinateSystemConstructor< Policy >::Create(), utl::cross(), degree, ERROR, fRp(), fRpError(), fSDP(), fwk::CoordinateSystemRegistry::Get(), utl::UTMPoint::GetPoint(), utl::BasicVector< HepVector >::GetR(), utl::BasicVector< HepVector >::GetTheta(), utl::kPi, and UnivRecNS::npar.
|
virtual |
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 668 of file FdAxisFinder.cc.
References io::eSuccess.
|
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 99 of file FdAxisFinder.cc.
References degree, fdet::FTimeFitModel::eRealisticAtm, ERROR, io::eSuccess, fdet::FTimeFitModel::eVacuumAtm, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), INFO, ns, and fdet::FTimeFitModel::SetModel().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
staticprivate |
Definition at line 515 of file FdAxisFinder.cc.
References fSDP(), fevt::PixelRecData::GetChi_i(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), fdet::FTimeFitModel::GetTimeAtAperture(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
staticprivate |
Definition at line 557 of file FdAxisFinder.cc.
References utl::abs(), Angle(), fwk::LocalCoordinateSystemConstructor< Policy >::Create(), utl::Cross(), fRp(), fSDP(), fwk::CoordinateSystemRegistry::Get(), fevt::PixelRecData::GetChi_i(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), utl::UTMPoint::GetPoint(), utl::BasicVector< HepVector >::GetR(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), utl::BasicVector< HepVector >::GetTheta(), fdet::FTimeFitModel::GetTimeAtAperture(), utl::kPi, fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
private |
Check that the pixel is within an angular distance (fTolerance) from the SDP and that the t_i deviation from the expected one is less than 10 sigmas away , add it to the list of pixels to be used for Axis determination
Definition at line 803 of file FdAxisFinder.cc.
References fevt::EyeRecData::AddTimeFitPixel(), Angle(), fRp(), fSDP(), fevt::PixelRecData::GetChi_i(), fdet::Pixel::GetDirection(), fevt::Pixel::GetId(), fevt::Eye::GetId(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), fevt::Pixel::GetRecData(), fevt::Eye::GetRecData(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), fevt::Pixel::GetTelescopeId(), fdet::FTimeFitModel::GetTimeAtAperture(), utl::kPi, fevt::EyeRecData::PulsedPixelsBegin(), fevt::EyeRecData::PulsedPixelsEnd(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
private |
|
private |
Check that the pixel is within an angular distance (fTolerance) from the SDP and that the t_i deviation from the expected one is no more than fSigmas away , remove on by one from the list of pixels to be used for Axis determination
Definition at line 872 of file FdAxisFinder.cc.
References fRp(), fSDP(), fevt::PixelRecData::GetChi_i(), fevt::Pixel::GetId(), fevt::Eye::GetId(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), fevt::EyeRecData::GetNTimeFitPixels(), fevt::Pixel::GetRecData(), fevt::Eye::GetRecData(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), fevt::Pixel::GetTelescopeId(), fdet::FTimeFitModel::GetTimeAtAperture(), fevt::EyeRecData::RemoveTimeFitPixel(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
private |
Remove pixels that have a high residual from the first guess
Definition at line 676 of file FdAxisFinder.cc.
References fSDP(), fevt::PixelRecData::GetChi_i(), fevt::Eye::GetId(), utl::TimeInterval::GetInterval(), utl::TimeInterval::GetNanoSecond(), fevt::EyeRecData::GetNTimeFitPixels(), fevt::Pixel::GetRecData(), fevt::Eye::GetRecData(), fevt::PixelRecData::GetT_i(), fevt::PixelRecData::GetT_iError(), fevt::Pixel::GetTelescopeId(), fdet::FTimeFitModel::GetTimeAtAperture(), fevt::Eye::HasRecData(), fevt::EyeRecData::RemoveTimeFitPixel(), fevt::EyeRecData::TimeFitPixelsBegin(), and fevt::EyeRecData::TimeFitPixelsEnd().
|
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 147 of file FdAxisFinder.cc.
References utl::abs(), utl::cross(), degree, io::eSuccess, fevt::FEvent::EyesBegin(), fevt::FEvent::EyesEnd(), fRp(), fRpError(), fSDP(), fevt::EyeRecData::GetFRecShower(), fevt::EyeRecData::GetNTimeFitPixels(), utl::BasicVector< HepVector >::GetPhi(), fevt::Eye::GetRecData(), fevt::EyeRecData::GetSDP(), utl::BasicVector< HepVector >::GetTheta(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), evt::Event::HasFEvent(), fevt::EyeRecData::HasFRecShower(), fevt::Eye::HasRecData(), INFO, utl::kPi, fevt::EyeRecData::MakeFRecShower(), galactic::meter, utl::Vector::Normalize(), ns, evt::ShowerFRecData::SetAxis(), fevt::TelescopeRecData::SetChiZero(), fevt::EyeRecData::SetChiZero(), evt::ShowerFRecData::SetCorePosition(), evt::ShowerFRecData::SetCoreTime(), fevt::TelescopeRecData::SetRp(), fevt::EyeRecData::SetRp(), fevt::TelescopeRecData::SetTimeFitChiSquare(), fevt::EyeRecData::SetTimeFitChiSquare(), fevt::TelescopeRecData::SetTimeFitCorrelations(), fevt::EyeRecData::SetTimeFitCorrelations(), fevt::TelescopeRecData::SetTZero(), fevt::EyeRecData::SetTZero(), fevt::Eye::TelescopesBegin(), fevt::Eye::TelescopesEnd(), and WARNING.
|
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().
|
private |
Definition at line 64 of file FdAxisFinder.h.
|
private |
Definition at line 65 of file FdAxisFinder.h.
|
private |
Definition at line 73 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 61 of file FdAxisFinder.h.
|
private |
Definition at line 70 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 96 of file FdAxisFinder.h.
|
staticprivate |
switch for debuging
Definition at line 94 of file FdAxisFinder.h.
|
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 |
True if the time extension is < fMinimumTimeExtension;.
Definition at line 88 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 97 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 98 of file FdAxisFinder.h.
|
private |
minimum allowed difference between t_i_max and t_i_min; If below, the event is probably a lightning , blob or similar
Definition at line 85 of file FdAxisFinder.h.
|
private |
Minimum number of pixels to continue with time fit.
Definition at line 91 of file FdAxisFinder.h.
|
private |
flag failure of minuit
Definition at line 100 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 62 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 68 of file FdAxisFinder.h.
|
private |
Definition at line 69 of file FdAxisFinder.h.
|
private |
Definition at line 74 of file FdAxisFinder.h.
|
staticprivate |
Definition at line 60 of file FdAxisFinder.h.
|
private |
Definition at line 81 of file FdAxisFinder.h.
|
private |
pixel not used in time fit if its T_i is over fSigmasLimit away
Definition at line 80 of file FdAxisFinder.h.
|
private |
Definition at line 66 of file FdAxisFinder.h.
|
private |
Definition at line 67 of file FdAxisFinder.h.
|
private |
Definition at line 72 of file FdAxisFinder.h.
|
private |
max distance of pixel to SDP to take part in time fit
Definition at line 77 of file FdAxisFinder.h.