FitterInputHandler Class Reference

Ratpac-two: RAT::FitterInputHandler Class Reference
Ratpac-two

Public Types

enum class  Mode { kPMT = 0 , kDigitPMT = 1 , kWaveformAnalysis = 2 }
 

Public Member Functions

 FitterInputHandler ()
 
 FitterInputHandler (const std::string &index)
 
void Configure (const std::string &index)
 
DS::FitResultFindFitResult (const std::string &name) const
 
TVector3 GetSeedPosition (const std::string &_fitter_name="") const
 
bool ValidSeedPosition (const std::string &_fitter_name="") const
 
double GetSeedTime (const std::string &_fitter_name="") const
 
bool ValidSeedTime (const std::string &_fitter_name="") const
 
TVector3 GetSeedDirection (const std::string &_fitter_name="") const
 
bool ValidSeedDirection (const std::string &_fitter_name="") const
 
double GetSeedEnergy (const std::string &_fitter_name="") const
 
bool ValidSeedEnergy (const std::string &_fitter_name="") const
 
void RegisterEvent (DS::EV *_ev)
 
const std::vector< Int_t > & GetAllHitPMTIDs () const
 Get PMTIDs for all pmts in the event. PMT will not be in the list if it never created a hit on DS::PMT or if the digitized waveform never crossed threshold. More...
 
size_t GetNHits () const
 Get number of hit channels in the event.
 
double GetCharge (Int_t id) const
 Get the integrated charge of a PMT. This method returns the integrated charge of all hits on a PMT. To get information about individual hits, use GetCharges. More...
 
std::vector< double > GetCharges (Int_t id) const
 Get the charge of each hit registered on a PMT. To get the integrated charge a PMT, use GetCharge. More...
 
double GetTime (Int_t id) const
 Get the earliest time for a hit PMT. In the case where a waveoform analyzer created multiple hits on the PMT (multi-PE), this method returns the time of only the first hit. To get the times of each hit, use GetTimes. More...
 
std::vector< double > GetTimes (Int_t id) const
 Get the time of each hit registered on a PMT. To get the time of only the first hit, see GetTime. More...
 
unsigned int GetNPEs (Int_t id) const
 Return the (approximate) number of hits registered on a PMT. Behavior is different depending on the mode. If mode is set to kPMT, always return 1 since no information about nhit is given. If mode is set to kDigitPMT, return the number of times that the waveform crosses threshold. If mode is set to kWaveformAnalysis, return the number of hits created by the analyzer. More...
 

Public Attributes

Mode mode
 
std::string wfm_ana_name
 
uint64_t hit_cleaning_mask
 
std::string vertex_seed
 
std::string direction_seed
 
std::string energy_seed
 

Protected Attributes

DS::EVev = nullptr
 
std::vector< Int_t > hitPMTChannels
 

Constructor & Destructor Documentation

◆ FitterInputHandler()

RAT::FitterInputHandler::FitterInputHandler ( )
inline

Default constructor. Configures the input based on the FIT_COMMON entry.

Member Function Documentation

◆ Configure()

void RAT::FitterInputHandler::Configure ( const std::string &  index)
inline

Configures the class based on FIT_COMMON[index]

Parameters
indexratdb index to configure the class with.

◆ FindFitResult()

DS::FitResult* RAT::FitterInputHandler::FindFitResult ( const std::string &  name) const
inline

Find the fit result in the current event. Dies if the specified fitter does not exist.

Parameters
fitter_namename of the fitter to find.
Returns
pointer to the found fit result.

◆ GetAllHitPMTIDs()

const std::vector<Int_t>& RAT::FitterInputHandler::GetAllHitPMTIDs ( ) const
inline

Get PMTIDs for all pmts in the event. PMT will not be in the list if it never created a hit on DS::PMT or if the digitized waveform never crossed threshold.

Returns
vector of all PMTs in event.

◆ GetCharge()

double RAT::FitterInputHandler::GetCharge ( Int_t  id) const
inline

Get the integrated charge of a PMT. This method returns the integrated charge of all hits on a PMT. To get information about individual hits, use GetCharges.

Parameters
idPMT ID.
Returns
integrated charge of a PMT.

◆ GetCharges()

std::vector<double> RAT::FitterInputHandler::GetCharges ( Int_t  id) const
inline

Get the charge of each hit registered on a PMT. To get the integrated charge a PMT, use GetCharge.

Parameters
idPMT ID.
Returns
vector of the charges registered on all hits on the PMT.

◆ GetNPEs()

unsigned int RAT::FitterInputHandler::GetNPEs ( Int_t  id) const
inline

Return the (approximate) number of hits registered on a PMT. Behavior is different depending on the mode. If mode is set to kPMT, always return 1 since no information about nhit is given. If mode is set to kDigitPMT, return the number of times that the waveform crosses threshold. If mode is set to kWaveformAnalysis, return the number of hits created by the analyzer.

Parameters
idPMT ID.

◆ GetSeedDirection()

TVector3 RAT::FitterInputHandler::GetSeedDirection ( const std::string &  _fitter_name = "") const
inline

Get the seed direction from the specified fitter. If no valid fitter is found, issue a warning and return a default

Parameters
_fitter_namename of the fitter to get the seed direction from. If empty, use the default direction_seed.
Returns
fitter direction.

◆ GetSeedPosition()

TVector3 RAT::FitterInputHandler::GetSeedPosition ( const std::string &  _fitter_name = "") const
inline

Get the seed position from the specified fitter. If no valid fitter is found, issue a warning and return a default value.

Parameters
_fitter_namename of the fitter to get the seed position from. If empty, use the default vertex_seed.
Returns
fitter position.

◆ GetSeedTime()

double RAT::FitterInputHandler::GetSeedTime ( const std::string &  _fitter_name = "") const
inline

Get the seed time from the specified fitter. If no valid fitter is found, issue a warning and return a default value.

Parameters
_fitter_namename of the fitter to get the seed time from. If empty, use the default vertex_seed.
Returns
fitter time.

◆ GetTime()

double RAT::FitterInputHandler::GetTime ( Int_t  id) const
inline

Get the earliest time for a hit PMT. In the case where a waveoform analyzer created multiple hits on the PMT (multi-PE), this method returns the time of only the first hit. To get the times of each hit, use GetTimes.

Parameters
idPMT ID.
Returns
time of the first hit.

◆ GetTimes()

std::vector<double> RAT::FitterInputHandler::GetTimes ( Int_t  id) const
inline

Get the time of each hit registered on a PMT. To get the time of only the first hit, see GetTime.

Parameters
idPMT ID.
Returns
vector of the times registered for each hit on the PMT.

◆ RegisterEvent()

void RAT::FitterInputHandler::RegisterEvent ( DS::EV _ev)
inline

Register an event to the input handler, so that we know to return the hits from this event.

Parameters
_evevent to register.

◆ ValidSeedDirection()

bool RAT::FitterInputHandler::ValidSeedDirection ( const std::string &  _fitter_name = "") const
inline

Determine if the seed direction is valid.

Parameters
_fitter_namename of the fitter to check. If empty, use the default direction_seed.
Returns
true if the seed direction is valid, false otherwise.

◆ ValidSeedPosition()

bool RAT::FitterInputHandler::ValidSeedPosition ( const std::string &  _fitter_name = "") const
inline

Determine if the seed position is valid.

Parameters
_fitter_namename of the fitter to check. If empty, use the default vertex_seed.
Returns
true if the seed position is valid, false otherwise.

◆ ValidSeedTime()

bool RAT::FitterInputHandler::ValidSeedTime ( const std::string &  _fitter_name = "") const
inline

Determine if the seed time is valid.

Parameters
_fitter_namename of the fitter to check. If empty, use the default vertex_seed.
Returns
true if the seed time is valid, false otherwise.

The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/fit/include/RAT/FitterInputHandler.hh