Fit of the LDF for SSD. More...
#include <ScintillatorLDFFinderKG/ScintillatorLDFFinder.h>
Classes | |
struct | LDFFitResult |
struct | Stage0 |
struct | Stage1 |
struct | Stage2 |
Public Types | |
enum | InfoLevel { eNone = 0, eFinal = 1, eIntermediate = 2, eObscure = 3, eMinuit = 4 } |
enum | LDFParameter { eShowerSize = 0, eCoreX = 1, eCoreY = 2, eShapeParameters = 3 } |
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 Member Functions | |
bool | FitLDF (LDFFitResult &result, LDFFitConfig &config, const utl::Vector &showerAxis, const std::vector< StationFitData > &data) const |
void | FitLDFSimplified (LDFFitResult &result, LDFFitConfig &config, const utl::Vector &showerAxis, const std::vector< StationFitData > &data) const |
Early estimate of shower size. More... | |
bool | FixBeta (const LDFFitResult &result, const utl::Vector &showerAxis, const std::vector< StationFitData > &data) const |
bool | FixGamma (const LDFFitResult &result, const utl::Vector &showerAxis, const std::vector< StationFitData > &data) const |
Criterion if gamma can be fitted analogue to beta must be checked/updated. More... | |
std::vector< StationFitData > | MakeStationFitData (const sevt::SEvent &sEvent, const utl::Point core, const double showerSize, const utl::Vector &showerAxis) const |
Init station data used by LDF fit. More... | |
void | OutputResults (const evt::Event &event) const |
REGISTER_MODULE ("ScintillatorLDFFinderKG", ScintillatorLDFFinder) | |
void | SetRecData (evt::Event &event, const LDFFitResult &lresult) const |
Private Attributes | |
utl::Point | fBarycenter |
utl::TimeStamp | fBaryTime |
bool | fCorePropagation |
bool | fFixedCore |
int | fInfoLevel |
LDFFitConfig | fLDFFitConfig |
double | fMaxBaryToCoreDistance |
double | fMaxChi2 |
struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage0 | fStage0 |
struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage1 | fStage1 |
struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage2 | fStage2 |
bool | fUseMaxLikelihood |
Fit of the LDF for SSD.
Definition at line 45 of file ScintillatorLDFFinder.h.
Enumerator | |
---|---|
eNone | |
eFinal | |
eIntermediate | |
eObscure | |
eMinuit |
Definition at line 51 of file ScintillatorLDFFinder.h.
Enumerator | |
---|---|
eShowerSize | |
eCoreX | |
eCoreY | |
eShapeParameters |
Definition at line 59 of file ScintillatorLDFFinder.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 |
|
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 628 of file ScintillatorLDFFinder.cc.
References io::eSuccess.
|
private |
Definition at line 913 of file ScintillatorLDFFinder.cc.
References SdHorizontalReconstructionNS::eCoreX, SdHorizontalReconstructionNS::eCoreY, ScintillatorLDFFinderKG::eFitted, ScintillatorLDFFinderKG::eModeled, SdMonteCarloPropagatorKVI::eShowerSize, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fChi2, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fCov, ScintillatorLDFFinderKG::LDFFitConfig::fFixCore, ScintillatorLDFFinderKG::LDFFitConfig::fLDF, ScintillatorLDFFinderKG::LDFFitConfig::fLDFShapeTreatment, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fLogLikelihood, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fNdof, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fPar, ScintillatorLDFFinderKG::gBaryCS, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetCore(), utl::BasicVector< HepVector >::GetCosTheta(), ScintillatorLDFFinderKG::LDF::GetNShapeParameters(), ScintillatorLDFFinderKG::GetShapeLabel(), ScintillatorLDFFinderKG::GetShowerSizeLabel(), ScintillatorLDFFinderKG::HasNaN(), INFO, km, utl::m, galactic::meter, OUT, ScintillatorLDFFinderKG::LDF::ShapeModel(), and ScintillatorLDFFinderKG::ToString().
|
private |
Early estimate of shower size.
Definition at line 809 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::eModeled, SdMonteCarloPropagatorKVI::eShowerSize, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fCov, ScintillatorLDFFinderKG::LDFFitConfig::fFixCore, ScintillatorLDFFinderKG::LDFFitConfig::fLDF, ScintillatorLDFFinderKG::LDFFitConfig::fLDFShapeTreatment, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fLogLikelihood, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fPar, ScintillatorLDFFinderKG::gBaryCS, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetCore(), utl::BasicVector< HepVector >::GetCosTheta(), ScintillatorLDFFinderKG::LDF::GetReferenceDistance(), ScintillatorLDFFinderKG::GetShowerSizeLabel(), max, OUT, result, ScintillatorLDFFinderKG::RPerp(), utl::s, ScintillatorLDFFinderKG::LDF::ShapeModel(), and sqrt().
|
private |
Definition at line 465 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetCore(), galactic::meter, OUT, ScintillatorLDFFinderKG::RPerp(), and utl::s.
|
private |
Criterion if gamma can be fitted analogue to beta must be checked/updated.
Definition at line 550 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetCore(), galactic::meter, OUT, ScintillatorLDFFinderKG::RPerp(), and utl::s.
|
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 194 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::eFitted, utl::ssd::eGAP2018_025, utl::ssd::eGAP2019_000, ERROR, io::eSuccess, utl::Branch::Get(), utl::Branch::GetChild(), utl::Branch::GetData(), ScintillatorLDFFinderKG::GetShowerSizeLabel(), fwk::CentralConfig::GetTopBranch(), and INFO.
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
Init station data used by LDF fit.
Definition at line 752 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::DistanceCut(), ScintillatorLDFFinderKG::StationFitData::fId, ScintillatorLDFFinderKG::StationFitData::fIsSaturated, ScintillatorLDFFinderKG::StationFitData::fPos, ScintillatorLDFFinderKG::StationFitData::fSignal, ScintillatorLDFFinderKG::gBaryCS, utl::BasicVector< HepVector >::GetCosTheta(), sdet::Station::GetPosition(), sdet::SDetector::GetStation(), sevt::ScintillatorRecData::GetTotalSignal(), ScintillatorLDFFinderKG::RPerp(), sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
private |
Definition at line 175 of file ScintillatorLDFFinder.cc.
References evt::ShowerScintillatorRecData::GetBeta(), evt::ShowerScintillatorRecData::GetBetaError(), evt::ShowerScintillatorRecData::GetGamma(), evt::ShowerScintillatorRecData::GetGammaError(), evt::ShowerScintillatorRecData::GetLDFChi2(), evt::ShowerScintillatorRecData::GetLDFNdof(), evt::ShowerSRecData::GetScintillatorRecShower(), evt::ShowerScintillatorRecData::GetShowerSize(), evt::ShowerScintillatorRecData::GetShowerSizeError(), ScintillatorLDFFinderKG::GetShowerSizeLabel(), and OUT.
|
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 276 of file ScintillatorLDFFinder.cc.
References ScintillatorLDFFinderKG::DeltaR(), ScintillatorLDFFinderKG::DistanceCut(), SdHorizontalReconstructionNS::eCoreX, SdHorizontalReconstructionNS::eCoreY, ScintillatorLDFFinderKG::eFitted, ScintillatorLDFFinderKG::eModeled, io::eSuccess, ScintillatorLDFFinderKG::LDFFitConfig::fLDFShapeTreatment, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fPar, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fRecStage, ScintillatorLDFFinderKG::gBaryCS, evt::ShowerSRecData::GetAxis(), evt::ShowerSRecData::GetBarycenter(), evt::ShowerSRecData::GetBarycenterCoordinateSystem(), evt::ShowerSRecData::GetBarytime(), evt::ShowerSRecData::GetCorePosition(), utl::BasicVector< HepVector >::GetCosTheta(), sdet::Station::GetPosition(), evt::ShowerSRecData::GetShowerSize(), ScintillatorLDFFinderKG::GetShowerSizeLabel(), sdet::SDetector::GetStation(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), evt::ShowerSRecData::HasLDF(), evt::Event::HasSEvent(), OUT, result, ScintillatorLDFFinderKG::RPerp(), sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
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 635 of file ScintillatorLDFFinder.cc.
References utl::TabulatedFunctionErrors::Clear(), SdMonteCarloPropagatorKVI::eShowerSize, fwk::CoordinateSystemRegistry::eUndefined, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fChi2, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fCov, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fLogLikelihood, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fNdof, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fPar, ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::fRecStage, evt::ShowerSRecData::GetAxis(), ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetCore(), utl::BasicVector< HepVector >::GetCosTheta(), evt::ShowerScintillatorRecData::GetLDF(), ScintillatorLDFFinderKG::ScintillatorLDFFinder::LDFFitResult::GetLDFShapeParameters(), utl::BasicVector< HepVector >::GetPhi(), sdet::Station::GetPosition(), sevt::Scintillator::GetRecData(), ScintillatorLDFFinderKG::LDF::GetReferenceDistance(), evt::ShowerSRecData::GetScintillatorRecShower(), sdet::SDetector::GetStation(), utl::BasicVector< HepVector >::GetTheta(), sevt::ScintillatorRecData::GetTotalSignal(), utl::BasicVector< HepVector >::GetX(), utl::BasicVector< HepVector >::GetY(), evt::ShowerScintillatorRecData::HasLDF(), sevt::Scintillator::HasRecData(), evt::ShowerSRecData::HasScintillatorRecShower(), utl::kilometer, evt::ShowerScintillatorRecData::MakeLDF(), evt::ShowerSRecData::MakeScintillatorRecShower(), galactic::meter, utl::TabulatedFunctionErrors::PushBack(), evt::ShowerScintillatorRecData::SetBeta(), evt::ShowerScintillatorRecData::SetGamma(), evt::ShowerScintillatorRecData::SetLDFChi2(), evt::ShowerScintillatorRecData::SetLDFLikelihood(), evt::ShowerScintillatorRecData::SetLDFRecStage(), sevt::ScintillatorRecData::SetLDFResidual(), evt::ShowerScintillatorRecData::SetShowerSize(), evt::ShowerScintillatorRecData::SetShowerSizeType(), sevt::ScintillatorRecData::SetTotalSignal(), utl::ssd::SignalUncertainty(), sqrt(), sevt::SEvent::StationsBegin(), and sevt::SEvent::StationsEnd().
|
private |
Definition at line 133 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 134 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 131 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 130 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 126 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 135 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 127 of file ScintillatorLDFFinder.h.
|
private |
Definition at line 128 of file ScintillatorLDFFinder.h.
|
private |
|
private |
|
private |
|
private |
Definition at line 129 of file ScintillatorLDFFinder.h.