List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ScintillatorLDFFinderKG::ScintillatorLDFFinder Class Reference

Fit of the LDF for SSD. More...

#include <ScintillatorLDFFinderKG/ScintillatorLDFFinder.h>

Inheritance diagram for ScintillatorLDFFinderKG::ScintillatorLDFFinder:
Inheritance graph
[legend]

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::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () 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< StationFitDataMakeStationFitData (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
 

Detailed Description

Fit of the LDF for SSD.

Definition at line 45 of file ScintillatorLDFFinder.h.

Member Enumeration Documentation

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.

enum fwk::VModule::ResultFlag
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.

Definition at line 60 of file VModule.h.

Different types of version info that can be retrieved from GetVersionInfo.

Enumerator
eFilename 
eRevisionNumber 
eDate 
eTime 
eLastEditor 

Definition at line 110 of file VModule.h.

Member Function Documentation

VModule::ResultFlag ScintillatorLDFFinder::Finish ( )
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.

bool ScintillatorLDFFinder::FitLDF ( LDFFitResult result,
LDFFitConfig config,
const utl::Vector showerAxis,
const std::vector< StationFitData > &  data 
) const
private
void ScintillatorLDFFinder::FitLDFSimplified ( LDFFitResult result,
LDFFitConfig config,
const utl::Vector showerAxis,
const std::vector< StationFitData > &  data 
) const
private
bool ScintillatorLDFFinder::FixBeta ( const LDFFitResult result,
const utl::Vector showerAxis,
const std::vector< StationFitData > &  data 
) const
private
bool ScintillatorLDFFinder::FixGamma ( const LDFFitResult result,
const utl::Vector showerAxis,
const std::vector< StationFitData > &  data 
) const
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.

std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::Stopwatch& fwk::VModule::GetStopwatch ( )
inlineinherited

Definition at line 106 of file VModule.h.

References fwk::VModule::fStopwatch.

const utl::Stopwatch& fwk::VModule::GetStopwatch ( ) const
inlineinherited

Definition at line 107 of file VModule.h.

References fwk::VModule::fStopwatch.

std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag ScintillatorLDFFinder::Init ( )
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.

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().

vector< StationFitData > ScintillatorLDFFinder::MakeStationFitData ( const sevt::SEvent sEvent,
const utl::Point  core,
const double  showerSize,
const utl::Vector showerAxis 
) const
private
void ScintillatorLDFFinder::OutputResults ( const evt::Event event) const
private
ScintillatorLDFFinderKG::ScintillatorLDFFinder::REGISTER_MODULE ( "ScintillatorLDFFinderKG"  ,
ScintillatorLDFFinder   
)
private
VModule::ResultFlag ScintillatorLDFFinder::Run ( evt::Event event)
virtual
ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited
void ScintillatorLDFFinder::SetRecData ( evt::Event event,
const LDFFitResult lresult 
) const
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().

Member Data Documentation

utl::Point ScintillatorLDFFinderKG::ScintillatorLDFFinder::fBarycenter
private

Definition at line 133 of file ScintillatorLDFFinder.h.

utl::TimeStamp ScintillatorLDFFinderKG::ScintillatorLDFFinder::fBaryTime
private

Definition at line 134 of file ScintillatorLDFFinder.h.

bool ScintillatorLDFFinderKG::ScintillatorLDFFinder::fCorePropagation
private

Definition at line 131 of file ScintillatorLDFFinder.h.

bool ScintillatorLDFFinderKG::ScintillatorLDFFinder::fFixedCore
private

Definition at line 130 of file ScintillatorLDFFinder.h.

int ScintillatorLDFFinderKG::ScintillatorLDFFinder::fInfoLevel
private

Definition at line 126 of file ScintillatorLDFFinder.h.

LDFFitConfig ScintillatorLDFFinderKG::ScintillatorLDFFinder::fLDFFitConfig
private

Definition at line 135 of file ScintillatorLDFFinder.h.

double ScintillatorLDFFinderKG::ScintillatorLDFFinder::fMaxBaryToCoreDistance
private

Definition at line 127 of file ScintillatorLDFFinder.h.

double ScintillatorLDFFinderKG::ScintillatorLDFFinder::fMaxChi2
private

Definition at line 128 of file ScintillatorLDFFinder.h.

struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage0 ScintillatorLDFFinderKG::ScintillatorLDFFinder::fStage0
private
struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage1 ScintillatorLDFFinderKG::ScintillatorLDFFinder::fStage1
private
struct ScintillatorLDFFinderKG::ScintillatorLDFFinder::Stage2 ScintillatorLDFFinderKG::ScintillatorLDFFinder::fStage2
private
bool ScintillatorLDFFinderKG::ScintillatorLDFFinder::fUseMaxLikelihood
private

Definition at line 129 of file ScintillatorLDFFinder.h.


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.