#include <RdBeamTimeOptimizer.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 | |
utl::TraceD | crosscorr (revt::REvent &rEvent, evt::ShowerRRecData &rrec, const std::vector< double > &shifts) const |
evt::BeamPeak | findPeak (const utl::TraceD &trace) |
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 () |
utl::TraceD | powertrace (revt::REvent &rEvent, evt::ShowerRRecData &rrec, const std::vector< double > &shifts) const |
power beam for given sky position More... | |
RdBeamTimeOptimizer () | |
fwk::VModule::ResultFlag | Run (evt::Event &event) |
Run: invoked once per event. More... | |
ResultFlag | RunWithTiming (evt::Event &event) |
utl::TraceD | xtrace (utl::TraceD ccTrace, double ccMean, utl::TraceD pwNormal) |
virtual | ~RdBeamTimeOptimizer () |
Static Public Member Functions | |
static std::string | GetResultFlagByName (const ResultFlag flag) |
Protected Types | |
enum | InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 } |
Protected Member Functions | |
std::vector< double > | delaysFromRRec (revt::REvent &rEvent, evt::ShowerRRecData &rrec) |
void | delaysToShifts (revt::REvent &rEvent, utl::TimeStamp meanTime, std::vector< double > ×) |
std::vector< double > | shiftsFromRRec (revt::REvent &rEvent, evt::ShowerRRecData &rrec) |
void | shiftsToDelays (revt::REvent &rEvent, utl::TimeStamp meanTime, std::vector< double > ×) |
Protected Attributes | |
int | fInfoLevel = 0 |
enum gridtype_t | gridtype |
std::string | outfile |
int | startbin |
int | stopbin |
RdWaveModel * | waveModel |
Private Member Functions | |
void | efieldproduct (const revt::StationTimeSeries &in1, const revt::StationTimeSeries &in2, utl::TraceD &out, int start, int stop) const |
Helper for crosscorr. More... | |
void | efieldtopower (const revt::StationTimeSeries &in, utl::TraceD &out, int start, int stop) const |
Helper for powertrace. More... | |
REGISTER_MODULE ("RdBeamTimeOptimizer", RdBeamTimeOptimizer) | |
void | WriteASCII_XYZ (const utl::TraceD &power, const utl::TraceD &cc, const utl::TraceD &x, const evt::BeamPeak &pwPeak, const evt::BeamPeak &ccPeak, const evt::BeamPeak &xPeak, const utl::Triple &coords) const |
Write out results using carthesian CS. More... | |
void | WriteASCIIPolar (const utl::TraceD &power, const utl::TraceD &cc, const utl::TraceD &x, const evt::BeamPeak &pwPeak, const evt::BeamPeak &ccPeak, const evt::BeamPeak &xPeak, const utl::Triple &coords) const |
Write out results using polar CS. More... | |
void | WriteASCIISpectrum (const revt::Station &, const std::string &) const |
Writes out a spectrum in an ASCII file. More... | |
void | writeRecData (revt::REvent &rEvent, std::vector< double > &shifts) |
void | WriteTrace3D (const utl::TraceD &trace, const std::string &filename, const utl::Triple &coords) const |
Private Attributes | |
double | peakTime |
Definition at line 53 of file RdBeamTimeOptimizer.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 |
RdBeamTimeOptimizer::RdBeamTimeOptimizer::RdBeamTimeOptimizer | ( | ) |
Definition at line 43 of file RdBeamTimeOptimizer.cc.
|
virtual |
Definition at line 47 of file RdBeamTimeOptimizer.cc.
TraceD RdBeamTimeOptimizer::RdBeamTimeOptimizer::crosscorr | ( | revt::REvent & | rEvent, |
evt::ShowerRRecData & | rrec, | ||
const std::vector< double > & | shifts | ||
) | const |
Definition at line 208 of file RdBeamTimeOptimizer.cc.
References revt::REvent::GetNumberOfStations(), utl::FFTDataContainerAlgorithm::ShiftTimeSeries(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
Referenced by RdBeamTimeOptimizer::crossFCN::operator()().
|
protected |
Definition at line 102 of file RdBeamTimeOptimizer.cc.
References evt::ShowerRRecData::GetAxis(), evt::ShowerRRecData::GetCorePosition(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
|
protected |
Definition at line 91 of file RdBeamTimeOptimizer.cc.
References revt::REvent::GetNumberOfStations(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
|
inlineprivate |
Helper for crosscorr.
Definition at line 198 of file RdBeamTimeOptimizer.cc.
References utl::Trace< T >::Begin().
|
inlineprivate |
Helper for powertrace.
Definition at line 149 of file RdBeamTimeOptimizer.cc.
References utl::Trace< T >::Begin().
evt::BeamPeak RdBeamTimeOptimizer::RdBeamTimeOptimizer::findPeak | ( | const utl::TraceD & | trace | ) |
Definition at line 261 of file RdBeamTimeOptimizer.cc.
References utl::Trace< T >::Begin(), utl::Trace< T >::End(), utl::Trace< T >::GetBinning(), utl::Trace< T >::GetStart(), utl::Trace< T >::GetStop(), max, utl::TraceAlgorithm::Mean(), and utl::TraceAlgorithm::RMS().
Referenced by RdBeamTimeOptimizer::powerFCN::operator()(), and RdBeamTimeOptimizer::crossFCN::operator()().
|
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 458 of file RdBeamTimeOptimizer.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 52 of file RdBeamTimeOptimizer.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().
TraceD RdBeamTimeOptimizer::RdBeamTimeOptimizer::powertrace | ( | revt::REvent & | rEvent, |
evt::ShowerRRecData & | rrec, | ||
const std::vector< double > & | shifts | ||
) | const |
power beam for given sky position
Definition at line 155 of file RdBeamTimeOptimizer.cc.
References data, utl::FFTDataContainer< C, T, F >::GetTimeSeries(), utl::FFTDataContainerAlgorithm::ShiftTimeSeries(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
Referenced by RdBeamTimeOptimizer::powerFCN::operator()().
|
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 291 of file RdBeamTimeOptimizer.cc.
References DEBUGLOG, io::eSuccess, revt::REvent::GetHeader(), revt::Header::GetId(), revt::REvent::GetNumberOfStations(), evt::Event::HasRecShower(), evt::Event::HasREvent(), INFO, utl::m, utl::nanosecond, 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().
|
protected |
Definition at line 119 of file RdBeamTimeOptimizer.cc.
References evt::ShowerRRecData::GetAxis(), evt::ShowerRRecData::GetCorePosition(), rdet::Station::GetPosition(), rdet::RDetector::GetStation(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
|
protected |
Definition at line 80 of file RdBeamTimeOptimizer.cc.
References revt::REvent::GetNumberOfStations(), revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
|
private |
Write out results using carthesian CS.
Definition at line 519 of file RdBeamTimeOptimizer.cc.
References km.
|
private |
Write out results using polar CS.
Definition at line 492 of file RdBeamTimeOptimizer.cc.
|
private |
Writes out a spectrum in an ASCII file.
Definition at line 467 of file RdBeamTimeOptimizer.cc.
References utl::abs(), revt::Station::GetFrequencyOfBin(), utl::Trace< T >::GetSize(), utl::megahertz, galactic::meter, utl::micro, out, and galactic::volt.
|
private |
Definition at line 277 of file RdBeamTimeOptimizer.cc.
References revt::REvent::StationsBegin(), and revt::REvent::StationsEnd().
|
private |
Definition at line 538 of file RdBeamTimeOptimizer.cc.
References utl::Trace< T >::GetBinning(), utl::Trace< T >::GetSize(), utl::nanosecond, and out.
TraceD RdBeamTimeOptimizer::RdBeamTimeOptimizer::xtrace | ( | utl::TraceD | ccTrace, |
double | ccMean, | ||
utl::TraceD | pwNormal | ||
) |
Definition at line 246 of file RdBeamTimeOptimizer.cc.
References utl::abs(), utl::Trace< T >::Begin(), utl::Trace< T >::End(), and result.
|
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().
|
protected |
Definition at line 76 of file RdBeamTimeOptimizer.h.
|
protected |
Definition at line 78 of file RdBeamTimeOptimizer.h.
|
private |
Definition at line 134 of file RdBeamTimeOptimizer.h.
|
protected |
Definition at line 75 of file RdBeamTimeOptimizer.h.
|
protected |
Definition at line 75 of file RdBeamTimeOptimizer.h.
|
protected |
Definition at line 74 of file RdBeamTimeOptimizer.h.