List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Types | Private Member Functions | Private Attributes
SdBaselineFinderKG::SdBaselineFinderKG Class Reference

#include <SdBaselineFinderKG.h>

Inheritance diagram for SdBaselineFinderKG::SdBaselineFinderKG:
Inheritance graph
[legend]

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 () override
 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 () override
 Initialize: invoked at beginning of run (NOT beginning of event) More...
 
void InitTiming ()
 
fwk::VModule::ResultFlag Run (evt::Event &event) override
 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

typedef std::pair< double, double > PairD
 
typedef std::pair< int, int > PairI
 

Private Member Functions

bool ComputeBaseline (const sevt::Station &station, sevt::PMT &pmt, const sdet::PMTConstants::PMTGain gain) const
 
std::vector< double > ComputeBaselineEstimates (const bool isUUB, const utl::TraceI &trace, const int start, const int baselineLength) const
 
bool ComputeBaselines (sevt::Station &station) const
 
void MakeFlatBaseline (sevt::PMT &pmt, const sdet::PMTConstants::PMTGain gain) const
 
 REGISTER_MODULE ("SdBaselineFinderKG", SdBaselineFinderKG)
 

Private Attributes

PairI fBaselineEstimationLengths {0, 0}
 
double fLowerSigma = 0
 
int fMinimumPeakSize = 0
 
PairD fNegativeSignalFactors {0, 0}
 
int fNumberOfIterations = 0
 
std::set< int > fRecalculateLSTriggerForTestStations
 
double fTruncationSigma = 0
 
PairI fUbBaselineEstimationLengths {0, 0}
 
double fUbLowerSigma = 0
 
int fUbMinimumPeakSize = 0
 
PairD fUbNegativeSignalFactors {0, 0}
 
double fUbTruncationSigma = 0
 
PairD fUbUpperSigma {0, 0}
 
PairD fUpperSigma {0, 0}
 
PairI fUubBaselineEstimationLengths {0, 0}
 
PairD fUubDecayConstant {0, 0}
 
double fUubLowerSigma = 0
 
int fUubMinimumPeakSize = 0
 
PairD fUubNegativeSignalFactors {0, 0}
 
double fUubTruncationSigma = 0
 
PairD fUubUpperSigma {0, 0}
 

Detailed Description

SdBaselineFinderKG

Find baseline based on a model of the PMT and electronics response.

Author
Tobias Schulz
David Schmidt
Darko Veberic
Date
Jun 2022

Definition at line 22 of file SdBaselineFinderKG.h.

Member Typedef Documentation

typedef std::pair<double, double> SdBaselineFinderKG::SdBaselineFinderKG::PairD
private

Definition at line 45 of file SdBaselineFinderKG.h.

typedef std::pair<int, int> SdBaselineFinderKG::SdBaselineFinderKG::PairI
private

Definition at line 40 of file SdBaselineFinderKG.h.

Member Enumeration Documentation

enum fwk::VModule::InfoLevel
protectedinherited
Enumerator
eInfoNone 
eInfoFinal 
eInfoIntermediate 
eInfoDebug 

Definition at line 125 of file VModule.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

bool SdBaselineFinderKG::SdBaselineFinderKG::ComputeBaseline ( const sevt::Station station,
sevt::PMT pmt,
const sdet::PMTConstants::PMTGain  gain 
) const
private
std::vector< double > SdBaselineFinderKG::SdBaselineFinderKG::ComputeBaselineEstimates ( const bool  isUUB,
const utl::TraceI trace,
const int  start,
const int  baselineLength 
) const
private
bool SdBaselineFinderKG::SdBaselineFinderKG::ComputeBaselines ( sevt::Station station) const
private
fwk::VModule::ResultFlag SdBaselineFinderKG::SdBaselineFinderKG::Finish ( )
inlineoverridevirtual

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 27 of file SdBaselineFinderKG.h.

References fwk::VModule::eSuccess.

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 SdBaselineFinderKG::SdBaselineFinderKG::Init ( )
overridevirtual

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 62 of file SdBaselineFinderKG.cc.

References io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetInstance(), 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().

void SdBaselineFinderKG::SdBaselineFinderKG::MakeFlatBaseline ( sevt::PMT pmt,
const sdet::PMTConstants::PMTGain  gain 
) const
private
SdBaselineFinderKG::SdBaselineFinderKG::REGISTER_MODULE ( "SdBaselineFinderKG"  ,
SdBaselineFinderKG   
)
private
VModule::ResultFlag SdBaselineFinderKG::SdBaselineFinderKG::Run ( evt::Event event)
overridevirtual

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 115 of file SdBaselineFinderKG.cc.

References utl::abs(), cevt::StationConstants::eBadCalib, io::eSuccess, and evt::Event::HasSEvent().

ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited

Member Data Documentation

PairI SdBaselineFinderKG::SdBaselineFinderKG::fBaselineEstimationLengths {0, 0}
private

Definition at line 41 of file SdBaselineFinderKG.h.

int fwk::VModule::fInfoLevel = 0
protectedinherited
double SdBaselineFinderKG::SdBaselineFinderKG::fLowerSigma = 0
private

Definition at line 57 of file SdBaselineFinderKG.h.

int SdBaselineFinderKG::SdBaselineFinderKG::fMinimumPeakSize = 0
private

Definition at line 65 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fNegativeSignalFactors {0, 0}
private

Definition at line 46 of file SdBaselineFinderKG.h.

int SdBaselineFinderKG::SdBaselineFinderKG::fNumberOfIterations = 0
private

Definition at line 38 of file SdBaselineFinderKG.h.

std::set<int> SdBaselineFinderKG::SdBaselineFinderKG::fRecalculateLSTriggerForTestStations
private

Definition at line 51 of file SdBaselineFinderKG.h.

double SdBaselineFinderKG::SdBaselineFinderKG::fTruncationSigma = 0
private

Definition at line 61 of file SdBaselineFinderKG.h.

PairI SdBaselineFinderKG::SdBaselineFinderKG::fUbBaselineEstimationLengths {0, 0}
private

Definition at line 42 of file SdBaselineFinderKG.h.

double SdBaselineFinderKG::SdBaselineFinderKG::fUbLowerSigma = 0
private

Definition at line 58 of file SdBaselineFinderKG.h.

int SdBaselineFinderKG::SdBaselineFinderKG::fUbMinimumPeakSize = 0
private

Definition at line 66 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUbNegativeSignalFactors {0, 0}
private

Definition at line 47 of file SdBaselineFinderKG.h.

double SdBaselineFinderKG::SdBaselineFinderKG::fUbTruncationSigma = 0
private

Definition at line 62 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUbUpperSigma {0, 0}
private

Definition at line 54 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUpperSigma {0, 0}
private

Definition at line 53 of file SdBaselineFinderKG.h.

PairI SdBaselineFinderKG::SdBaselineFinderKG::fUubBaselineEstimationLengths {0, 0}
private

Definition at line 43 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUubDecayConstant {0, 0}
private

Definition at line 50 of file SdBaselineFinderKG.h.

double SdBaselineFinderKG::SdBaselineFinderKG::fUubLowerSigma = 0
private

Definition at line 59 of file SdBaselineFinderKG.h.

int SdBaselineFinderKG::SdBaselineFinderKG::fUubMinimumPeakSize = 0
private

Definition at line 67 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUubNegativeSignalFactors {0, 0}
private

Definition at line 48 of file SdBaselineFinderKG.h.

double SdBaselineFinderKG::SdBaselineFinderKG::fUubTruncationSigma = 0
private

Definition at line 63 of file SdBaselineFinderKG.h.

PairD SdBaselineFinderKG::SdBaselineFinderKG::fUubUpperSigma {0, 0}
private

Definition at line 55 of file SdBaselineFinderKG.h.


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

, generated on Tue Sep 26 2023.