QCoincidence Class Reference

List of all members.


Detailed Description

base class for coincidence analysis

Author:
Sergio Di Domizio

Carlos Martinez
The aim of this class is simply to store relevant quantities for a group of two or more events that occurred within a certain time window. No assumptions on the coincidence criteria are made. This class has no dependency on diana.


Public Member Functions

 QCoincidence ()
 default constructor
virtual ~QCoincidence ()
 destructor
bool operator< (const QCoincidence &other) const
 "less than" operator needed to sort coincidences
size_t Size () const
 get the number of events in this coincidence
int AddEvent (const QCoincidentEvent &ev)
 add new event to coincidence
int AddEventFast (const QCoincidentEvent &ev)
 add new event to coincidence
void Clear ()
 delete all events from this coincidence
const std::list
< QCoincidentEvent > & 
GetEvents () const
 get list of events stored in this coincidence
double GetEnergy () const
 get total energy
void AddIndex (int pos, unsigned long long ind)
 Add QCoincidentEvent with fId ind to fEventIndex @ pos.
const QCoincidentEventGetEventByIndex (int pos) const
 return pointer to coincidentEvent @ pos in fEventIndex
int GetNIndex () const
 return number of index

Private Attributes

std::list< QCoincidentEventfEvents
std::map< int, unsigned long long > fEventIndex
 fId of the events selected by the filters.

Member Function Documentation

bool QCoincidence::operator< ( const QCoincidence other  )  const [inline]

"less than" operator needed to sort coincidences

coincidences are sorted based on the time of the earliest occurring event they contain

References GetEvents().

int QCoincidence::AddEvent ( const QCoincidentEvent ev  ) 

add new event to coincidence

Parameters:
ev event to be added
Returns:
0 on success, -1 if event occurred too early to belong to this coincidence, 1 if event occurred too late to belong to this coincidence
This method refuses to add duplicated events (same event number) in the same coincidence. If this happen it will return success but will not duplicate the event.

Referenced by QCFVariableWindow::BuildCoincidences(), and QCFStaticWindow::BuildCoincidences().

int QCoincidence::AddEventFast ( const QCoincidentEvent ev  ) 

add new event to coincidence

Parameters:
ev event to be added
Returns:
0 on success, -1 if event occurred too early to belong to this This method does not order the events according to the time. Use this method when events are already ordered.

Referenced by QCoPositionSplitter::Split().


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

Generated on Tue Nov 16 10:50:04 2010 for CUORE Software by  doxygen 1.5.6