Performs calibration and signal analysis of the SD event. More...
#include "SdCalibratorOG/SdCalibrator.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 () override |
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 () 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 |
Private Member Functions | |
void | ApplyTimeCorrection (sevt::Station &station) |
Calculate corrected nanosecond from raw GPS parameter. More... | |
int | BuildSignals (sevt::Station &station) const |
bool | BuildSignals (sevt::PMT &pmt, const unsigned int traceLength, const int saturationValue) const |
void | CalculatePeakAndCharge (sevt::Station &station) |
bool | ComputeBaseline (const sevt::Station &station, sevt::PMT &pmt, const sdet::PMTConstants::PMTGain gain) const |
bool | ComputeBaselines (sevt::Station &station) const |
void | ComputeShapeRiseFallPeak (sevt::PMTRecData &pmtRecData, const double binTiming, const unsigned int startBin, const unsigned int startIntegration, const unsigned int endIntegration, const double traceIntegral) const |
bool | CopySmallPMTCalibData (sevt::Station &station) |
bool | IsTestStation (const int id) const |
bool | MakeComponentVEMTraces (sevt::PMT &pmt) const |
void | MakeFlatBaseline (sevt::PMT &pmt, const sdet::PMTConstants::PMTGain gain) const |
bool | MergeSignals (sevt::Station &station) const |
REGISTER_MODULE ("SdCalibratorOG", SdCalibrator) | |
bool | SelectSignal (sevt::Station &station) const |
void | SumPMTComponents (sevt::Station &station) const |
void | TreatSaturated (sevt::Station &station) const |
Performs calibration and signal analysis of the SD event.
Module does the following:
Differences to CDAS v3r2:
Definition at line 68 of file SdCalibrator.h.
|
private |
Definition at line 107 of file SdCalibrator.h.
|
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 |
Calculate corrected nanosecond from raw GPS parameter.
Definition at line 311 of file SdCalibrator.cc.
References sevt::Station::GetGPSData(), sevt::StationGPSData::GetTick(), and utl::nanosecond.
|
private |
Definition at line 1213 of file SdCalibrator.cc.
References sdet::PMTConstants::eAnyType, sdet::PMTConstants::eScintillator, sdet::PMTConstants::eWaterCherenkovLarge, sevt::Station::GetScintillator(), utl::Trace< T >::GetSize(), sevt::Station::GetVEMTrace(), sevt::Station::HasVEMTrace(), sevt::Scintillator::MakeMIPTrace(), sevt::Station::MakeVEMTrace(), and utl::Trace< T >::ResetAll().
|
private |
Definition at line 1274 of file SdCalibrator.cc.
References sdet::PMTConstants::eHighGain, sdet::PMTConstants::eLowGain, sdet::PMTConstants::eWaterCherenkovSmall, SdTraceCalibratorOG::CalibrationParameters::GetBinsWithLargeSignalThreshold(), SdTraceCalibratorOG::CalibrationParameters::GetBinsWithSignalThreshold(), sevt::PMT::GetCalibData(), sevt::PMT::GetFADCTrace(), SdTraceCalibratorOG::CalibrationParameters::GetFindSignalThresholdMultiplier(), SdTraceCalibratorOG::CalibrationParameters::GetLargeFADCThreshold(), SdTraceCalibratorOG::CalibrationParameters::GetMinFADCValue(), sevt::PMT::GetRecData(), SdTraceCalibratorOG::CalibrationParameters::GetSaturatedBinsMaximum(), SdTraceCalibratorOG::CalibrationParameters::GetSignalMaxDist(), sevt::PMT::GetType(), sevt::PMT::HasRecData(), sevt::PMTCalibData::IsLowGainOk(), sevt::PMT::MakeRecData(), max, and sevt::PMTRecData::SetFADCSaturatedBins().
|
private |
Definition at line 430 of file SdCalibrator.cc.
References sdet::PMTConstants::eAnyType, sdet::PMTConstants::eScintillator, sdet::PMTConstants::eWaterCherenkovSmall, sevt::Station::GetCalibData(), SdTraceCalibratorOG::CalibrationParameters::GetChargeHistogramSmallThreshold(), utl::QuadraticFitData::GetChi2(), utl::QuadraticFitData::GetExtremePosition(), utl::QuadraticFitData::GetExtremePositionError(), utl::AugerException::GetMessage(), utl::QuadraticFitData::GetNdof(), SdCalibratorOG::CalibrationParameters::GetNominalVEMPeak(), utl::ExponentialFitData::GetSlope(), utl::ExponentialFitData::GetSlopeError(), sevt::StationCalibData::GetVersion(), utl::MakeExponentialFitter(), utl::MakeQuadraticFitter(), utl::nanosecond, utl::Sqr(), and WARNING.
|
private |
Definition at line 906 of file SdCalibrator.cc.
References utl::abs(), sdet::PMTConstants::eHighGain, sdet::PMTConstants::eLowGain, sevt::PMTRecData::GetBaselineFlatPieces(), sevt::PMT::GetCalibData(), sevt::PMT::GetFADCTrace(), sevt::PMT::GetId(), sevt::Station::GetId(), SdTraceCalibratorOG::CalibrationParameters::GetMinLength(), sevt::PMT::GetRecData(), utl::Trace< T >::GetSize(), SdTraceCalibratorOG::CalibrationParameters::GetUsefulBins(), sevt::PMT::HasFADCTrace(), sevt::PMT::HasRecData(), sevt::PMTCalibData::IsLowGainOk(), sevt::PMTCalibData::IsTubeOk(), sevt::PMT::MakeRecData(), G4StationSimulatorOG::p, galactic::second, and WARNING.
|
private |
Definition at line 892 of file SdCalibrator.cc.
References sdet::PMTConstants::eAnyType, sdet::PMTConstants::eHighGain, and sdet::PMTConstants::eLowGain.
|
private |
Definition at line 734 of file SdCalibrator.cc.
References sevt::PMTRecData::GetVEMTrace(), utl::nanosecond, sevt::PMTRecData::SetFallTime(), sevt::PMTRecData::SetPeakAmplitude(), sevt::PMTRecData::SetRiseTime(), sevt::PMTRecData::SetShapeParameter(), sevt::PMTRecData::SetT40(), and sevt::PMTRecData::SetT50().
|
private |
Definition at line 355 of file SdCalibrator.cc.
References sevt::SmallPMTData::GetCalibData(), sevt::PMT::GetCalibData(), sevt::Station::GetId(), sevt::Station::GetSmallPMT(), sevt::Station::GetSmallPMTData(), INFO, utl::Sqr(), and WARNING.
|
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 73 of file SdCalibrator.h.
References fwk::VModule::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().
|
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 88 of file SdCalibrator.cc.
References ERROR, io::eSuccess, utl::Branch::GetChild(), utl::Branch::GetData(), fwk::CentralConfig::GetInstance(), fwk::CentralConfig::GetTopBranch(), INFO, SdEventSelectorOG::IsInRange(), and utl::Join().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
inlineprivate |
Definition at line 102 of file SdCalibrator.h.
References fTestStations, and utl::Is().
|
private |
Definition at line 1166 of file SdCalibrator.cc.
References sdet::PMTConstants::eHighGain, sevt::StationConstants::eTotal, sevt::StationConstants::eTotalNoSaturation, sevt::PMT::GetFADCTrace(), sevt::PMT::GetFADCTraceD(), sevt::PMTRecData::GetGainUsed(), sevt::PMT::GetMultiFADCTrace(), sevt::PMT::GetRecData(), and utl::Trace< T >::GetSize().
|
private |
Definition at line 877 of file SdCalibrator.cc.
References sevt::PMTCalibData::GetBaseline(), sevt::PMT::GetCalibData(), sevt::PMT::GetRecData(), and sevt::PMTRecData::MakeFADCBaseline().
|
private |
|
private |
|
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 169 of file SdCalibrator.cc.
References utl::abs(), io::ApplyTimeCorrection(), cevt::StationConstants::eBadCalib, sevt::StationConstants::eBadCompress, cevt::StationConstants::eErrorCode, cevt::StationConstants::eNoCalibData, cevt::StationConstants::eNoGPSData, sevt::StationConstants::eNotAliveT120, sevt::StationConstants::eNotAliveT2, cevt::StationConstants::eNoTrigger, sevt::StationConstants::eRandom, io::eSuccess, evt::Event::HasSEvent(), INFO, utl::String::Plural(), 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 1570 of file SdCalibrator.cc.
References sdet::PMTConstants::eAnyType, sdet::PMTConstants::eHighGain, sdet::PMTConstants::eLowGain, sdet::PMTConstants::eScintillator, sdet::PMTConstants::eWaterCherenkovLarge, sdet::PMTConstants::eWaterCherenkovSmall, sevt::Station::GetGPSData(), sevt::Station::GetId(), sevt::StationTriggerData::GetPLDTimeOffset(), sevt::Scintillator::GetRecData(), sevt::Station::GetRecData(), sevt::Station::GetScintillator(), sevt::Scintillator::GetSignals(), sevt::Station::GetSignals(), sevt::Station::GetSmallPMTData(), sevt::Station::GetTriggerData(), sevt::Station::GetVEMTrace(), sevt::Station::HasRecData(), sevt::Station::HasScintillator(), sevt::Station::HasSmallPMTData(), sevt::SmallPMTData::IsTubeOk(), sevt::Scintillator::MakeMIPTrace(), sevt::Station::MakeRecData(), max, sevt::Station::SetHighGainSaturation(), sevt::SmallPMTData::SetIsTubeOk(), sevt::Station::SetLowGainSaturation(), sevt::StationRecData::SetSignalStartSlot(), sevt::Station::SetSmallPMTSaturation(), sevt::Station::SetTraceStartTime(), and WARNING.
|
private |
Definition at line 816 of file SdCalibrator.cc.
References cevt::StationConstants::eLastSource, sevt::Station::GetVEMTrace(), sevt::Station::HasVEMTrace(), and sevt::Station::MakeVEMTrace().
|
private |
|
private |
Definition at line 128 of file SdCalibrator.h.
|
private |
Definition at line 131 of file SdCalibrator.h.
|
private |
Definition at line 115 of file SdCalibrator.h.
|
private |
Definition at line 114 of file SdCalibrator.h.
|
private |
Definition at line 119 of file SdCalibrator.h.
|
private |
Definition at line 117 of file SdCalibrator.h.
|
private |
Definition at line 118 of file SdCalibrator.h.
|
private |
Definition at line 116 of file SdCalibrator.h.
|
private |
Definition at line 129 of file SdCalibrator.h.
|
private |
Definition at line 123 of file SdCalibrator.h.
|
private |
Definition at line 126 of file SdCalibrator.h.
|
private |
Definition at line 125 of file SdCalibrator.h.
|
private |
Definition at line 130 of file SdCalibrator.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 |
Definition at line 137 of file SdCalibrator.h.
|
private |
Definition at line 109 of file SdCalibrator.h.
|
private |
Definition at line 108 of file SdCalibrator.h.
|
private |
Definition at line 113 of file SdCalibrator.h.
|
private |
Definition at line 111 of file SdCalibrator.h.
|
private |
Definition at line 112 of file SdCalibrator.h.
|
private |
Definition at line 110 of file SdCalibrator.h.
|
private |
Definition at line 105 of file SdCalibrator.h.
|
private |
Definition at line 122 of file SdCalibrator.h.
|
private |
Definition at line 120 of file SdCalibrator.h.
|
private |
Definition at line 121 of file SdCalibrator.h.
|
private |
Definition at line 124 of file SdCalibrator.h.
Referenced by IsTestStation().
|
private |
Definition at line 134 of file SdCalibrator.h.
|
private |
Definition at line 133 of file SdCalibrator.h.
|
private |
Definition at line 135 of file SdCalibrator.h.
|
private |
Definition at line 127 of file SdCalibrator.h.
|
private |
Definition at line 139 of file SdCalibrator.h.