#include <RdScintPlaneFit.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) |
Private Types | |
enum | InfoLevel { eNone = 0, eFinal = 1, eIntermediate = 2, eObscure = 3, eMinuit = 4 } |
Private Member Functions | |
void | CalculateTimeResidual (const utl::Vector &axis, const double ct0, double &chi2) const |
fwk::VModule::ResultFlag | LinearFit (FitParameters &fit, const bool reuseFit=false) const |
performs a Linear fit, approximation that z= equal for all stations More... | |
fwk::VModule::ResultFlag | PlaneFit3DDriver (FitParameters &fit) const |
Setting up / Executing the minimalization routines. More... | |
REGISTER_MODULE ("RdScintPlaneFit", RdScintPlaneFit) | |
Static Private Member Functions | |
static void | PlaneFit3DFnc (int &nPar, double *const grad, double &value, double *const par, const int flag) |
Function to minimize the plane fit, z != equal for all stations. More... | |
static void | PlaneFit3DHorizonFnc (int &nPar, double *const grad, double &value, double *const par, const int flag) |
Private Attributes | |
bool | fAllowUnphysicalCosines |
int | fInfoLevel |
int | fMinNumberOfStations |
bool | fMinuitOutput |
Static Private Attributes | |
static utl::Point | fgBarycenter |
static utl::TimeStamp | fgBaryTime |
static utl::Point | fgCoordinateOrigin |
static revt::REvent * | fgCurrentREvent |
static utl::CoordinateSystemPtr | fgLocalCS |
static double | fgMeanEventTime |
Definition at line 48 of file RdScintPlaneFit.h.
|
private |
Enumerator | |
---|---|
eNone | |
eFinal | |
eIntermediate | |
eObscure | |
eMinuit |
Definition at line 77 of file RdScintPlaneFit.h.
|
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 |
Calculation of the time residual of the individual station. Also fills them in the StationRecData
Definition at line 552 of file RdScintPlaneFit.cc.
References revt::StationRecData::GetParameter(), revt::StationRecData::GetParameterError(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), revt::StationRecData::HasParameter(), utl::kSpeedOfLight, std::pow(), revt::StationRecData::SetParameter(), and revt::StationRecData::SetParameterError().
|
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 439 of file RdScintPlaneFit.cc.
References io::eSuccess, and INFO.
|
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 65 of file RdScintPlaneFit.cc.
References io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetData(), utl::Branch::GetTopBranch(), and INFO.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
performs a Linear fit, approximation that z= equal for all stations
Definition at line 93 of file RdScintPlaneFit.cc.
References RdScintPlaneFit::FitParameters::ct0, io::eSuccess, revt::StationRecData::GetParameter(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), revt::StationRecData::HasParameter(), INFO, utl::kSpeedOfLight, G4StationSimulatorOG::p, RdScintPlaneFit::FitParameters::sigmact02, RdScintPlaneFit::FitParameters::sigmaU2, RdScintPlaneFit::FitParameters::sigmaUV, RdScintPlaneFit::FitParameters::sigmaV2, utl::Sqr(), sqrt(), RdScintPlaneFit::FitParameters::u, RdScintPlaneFit::FitParameters::v, RdScintPlaneFit::FitParameters::w, and WARNING.
|
private |
Setting up / Executing the minimalization routines.
Definition at line 355 of file RdScintPlaneFit.cc.
References RdScintPlaneFit::FitParameters::ct0, io::eSuccess, galactic::meter, OUT, RdScintPlaneFit::FitParameters::sigmact02, RdScintPlaneFit::FitParameters::sigmaU2, RdScintPlaneFit::FitParameters::sigmaUV, RdScintPlaneFit::FitParameters::sigmaV2, utl::Sqr(), sqrt(), RdScintPlaneFit::FitParameters::u, RdScintPlaneFit::FitParameters::v, and RdScintPlaneFit::FitParameters::w.
|
staticprivate |
Function to minimize the plane fit, z != equal for all stations.
Definition at line 447 of file RdScintPlaneFit.cc.
References revt::StationRecData::GetParameter(), revt::StationRecData::GetParameterError(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), revt::StationRecData::HasParameter(), utl::kSpeedOfLight, utl::kSpeedOfLight2, utl::Sqr(), and sqrt().
|
staticprivate |
Function to minimize the plane fit, z != equal for all stations. To be used in the case of horizontal events
Definition at line 505 of file RdScintPlaneFit.cc.
References revt::StationRecData::GetParameter(), revt::StationRecData::GetParameterError(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), revt::StationRecData::HasParameter(), utl::kSpeedOfLight, utl::kSpeedOfLight2, and utl::Sqr().
|
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 202 of file RdScintPlaneFit.cc.
References RdScintPlaneFit::FitParameters::ct0, degree, io::eSuccess, revt::StationRecData::GetParameter(), evt::ShowerRRecData::GetParameter(), det::Detector::GetReferenceCoordinateSystem(), evt::ShowerRecData::GetRRecShower(), det::Detector::GetSiteCoordinateSystem(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), utl::BasicVector< HepVector >::GetZ(), revt::StationRecData::HasParameter(), evt::ShowerRRecData::HasParameter(), evt::Event::HasREvent(), INFO, otoa::LinearFit(), galactic::meter, utl::nanosecond, NL, OUT, evt::ShowerRRecData::SetParameter(), sqrt(), RdScintPlaneFit::FitParameters::stage, ToString(), RdScintPlaneFit::FitParameters::u, RdScintPlaneFit::FitParameters::v, and RdScintPlaneFit::FitParameters::w.
|
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 85 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 89 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 90 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 91 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 88 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 92 of file RdScintPlaneFit.h.
|
staticprivate |
Definition at line 93 of file RdScintPlaneFit.h.
|
private |
Definition at line 82 of file RdScintPlaneFit.h.
|
private |
Definition at line 84 of file RdScintPlaneFit.h.
|
private |
Definition at line 83 of file RdScintPlaneFit.h.