PAASS
Software suite to Acquire and Analyze Data from Pixie16
Correlator Class Reference

correlate decays with previous implants More...

#include <Correlator.hpp>

Collaboration diagram for Correlator:

Public Types

enum  EConditions {
  INVALID_LOCATION = 4, VALID_IMPLANT = 12, VALID_DECAY = 16, BACK_TO_BACK_IMPLANT = 32,
  DECAY_TOO_LATE = 48, IMPLANT_TOO_SOON = 52, UNKNOWN_CONDITION = 100
}
 correlator condition based on the given events More...
 

Public Member Functions

 Correlator ()
 
virtual ~Correlator ()
 
void DeclarePlots (void)
 
void Init (RawEvent &rawev)
 
void Correlate (EventInfo &event, unsigned int fch, unsigned int bch)
 
void CorrelateAll (EventInfo &event)
 Correlates all positions. More...
 
void CorrelateAllX (EventInfo &event, unsigned int bch)
 
void CorrelateAllY (EventInfo &event, unsigned int fch)
 
void PrintDecayList (unsigned int fch, unsigned int bch) const
 
double GetDecayTime (void) const
 
double GetDecayTime (int fch, int bch) const
 
double GetImplantTime (void) const
 
double GetImplantTime (int fch, int bch) const
 
void Flag (int fch, int bch)
 
bool IsFlagged (int fch, int bch)
 
EConditions GetCondition (void) const
 

Private Member Functions

virtual void plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h")
 plots data into a histogram with provided DAMM ID More...
 
virtual void DeclareHistogram1D (int dammId, int xSize, const char *title)
 Declares a 1D histogram calls the C++ wrapper for DAMM. More...
 
virtual void DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title)
 Declares a 2D histogram calls the C++ wrapper for DAMM. More...
 

Private Attributes

Plots histo
 Instance of the Plots class. More...
 
EventInfolastImplant
 last implant processed by correlator More...
 
EventInfolastDecay
 last decay procssed by correlator More...
 
EConditions condition
 condition for last processed event More...
 
CorrelationList decaylist [arraySize][arraySize]
 list of event data for a particular pixel since implant More...
 

Static Private Attributes

static const size_t arraySize = 40
 
static const double minImpTime = 5e-3
 
static const double corrTime = 60
 
static const double fastTime = 40e-6
 

Detailed Description

correlate decays with previous implants

The class controls the correlations of decays with previous implants. There are arrays of size MAX_STRIP x MAX_STRIP that store implants and decays. When an event has been identified as either an implant or decay, its information is placed in the appropriate array based on its pixel location. If a decay was identified, it is correlated with a previous implant. The correlator checks to make sure that the time between implants is sufficiently long and that the correlation time has not been exceeded before correlating an implant with a decay.

Definition at line 94 of file Correlator.hpp.

Member Enumeration Documentation

§ EConditions

correlator condition based on the given events

Enumerator
INVALID_LOCATION 
VALID_IMPLANT 
VALID_DECAY 
BACK_TO_BACK_IMPLANT 
DECAY_TOO_LATE 
IMPLANT_TOO_SOON 
UNKNOWN_CONDITION 

Definition at line 97 of file Correlator.hpp.

Constructor & Destructor Documentation

§ Correlator()

Correlator::Correlator ( )

Default Constructor

Definition at line 48 of file Correlator.cpp.

§ ~Correlator()

Correlator::~Correlator ( )
virtual

Default Destructor

Definition at line 173 of file Correlator.cpp.

Here is the call graph for this function:

Member Function Documentation

§ Correlate()

void Correlator::Correlate ( EventInfo event,
unsigned int  fch,
unsigned int  bch 
)

Correlate two locations in the event

Parameters
[in]event: the event to use to correlate
[in]fch: the first channel to correlate
[in]bch: the second channel to correlate

Definition at line 195 of file Correlator.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ CorrelateAll()

void Correlator::CorrelateAll ( EventInfo event)

Correlates all positions.

This correlates an event with all positions in the setup. This is useful for cases where the event is interesting but can not be assigned to a particular implant location as in the case of external gamma-ray detectors

Parameters
[in]event: the even to correlate with

Definition at line 308 of file Correlator.cpp.

Here is the call graph for this function:

§ CorrelateAllX()

void Correlator::CorrelateAllX ( EventInfo event,
unsigned int  bch 
)

Correlates all X positions in the event

Parameters
[in]event: the event to correlate with
[in]bch: the locations to correlate with

Definition at line 322 of file Correlator.cpp.

§ CorrelateAllY()

void Correlator::CorrelateAllY ( EventInfo event,
unsigned int  fch 
)

Correlates all Y positions in the event

Parameters
[in]event: the even to correlate with
[in]fch: the locations to correlate with

Definition at line 328 of file Correlator.cpp.

Here is the caller graph for this function:

§ DeclareHistogram1D()

virtual void Correlator::DeclareHistogram1D ( int  dammId,
int  xSize,
const char *  title 
)
inlineprivatevirtual

Declares a 1D histogram calls the C++ wrapper for DAMM.

Parameters
[in]dammId: The histogram number to define
[in]xSize: The range of the x-axis
[in]title: The title for the histogram

Definition at line 186 of file Correlator.hpp.

Here is the call graph for this function:

§ DeclareHistogram2D()

virtual void Correlator::DeclareHistogram2D ( int  dammId,
int  xSize,
int  ySize,
const char *  title 
)
inlineprivatevirtual

Declares a 2D histogram calls the C++ wrapper for DAMM.

Parameters
[in]dammId: The histogram number to define
[in]xSize: The range of the x-axis
[in]ySize: The range of the y-axis
[in]title: The title of the histogram

Definition at line 195 of file Correlator.hpp.

Here is the call graph for this function:

§ DeclarePlots()

void Correlator::DeclarePlots ( void  )

Declare plots for the correlator

Definition at line 183 of file Correlator.cpp.

§ Flag()

void Correlator::Flag ( int  fch,
int  bch 
)

Set the flag for the two locations

Parameters
[in]fch: first channel that we'll set
[in]bch: the second channel to set

Definition at line 360 of file Correlator.cpp.

Here is the caller graph for this function:

§ GetCondition()

EConditions Correlator::GetCondition ( void  ) const
inline
Returns
The conditions for correlation

Definition at line 164 of file Correlator.hpp.

Here is the caller graph for this function:

§ GetDecayTime() [1/2]

double Correlator::GetDecayTime ( void  ) const
Returns
the decay time

Definition at line 334 of file Correlator.cpp.

§ GetDecayTime() [2/2]

double Correlator::GetDecayTime ( int  fch,
int  bch 
) const
Returns
the decay time for a given pair of channels
Parameters
[in]fch: the first channel to look for
[in]bch: the second channel to look for

Definition at line 343 of file Correlator.cpp.

§ GetImplantTime() [1/2]

double Correlator::GetImplantTime ( void  ) const
Returns
get the implant time

Definition at line 347 of file Correlator.cpp.

§ GetImplantTime() [2/2]

double Correlator::GetImplantTime ( int  fch,
int  bch 
) const
Returns
the implant time for a given pair of channels
Parameters
[in]fch: the first channel to look for
[in]bch: the second channel to look for

Definition at line 356 of file Correlator.cpp.

§ Init()

void Correlator::Init ( RawEvent rawev)
inline

Initialize the correlator - Does nothing

Parameters
[in]rawev: the raw even for initialization

Definition at line 113 of file Correlator.hpp.

§ IsFlagged()

bool Correlator::IsFlagged ( int  fch,
int  bch 
)

Check if the two channels that we have are flagged

Parameters
[in]fch: the first channel to check
[in]bch: the second channel to check
Returns
true if it is flagged

Definition at line 365 of file Correlator.cpp.

§ plot()

virtual void Correlator::plot ( int  dammId,
double  val1,
double  val2 = -1,
double  val3 = -1,
const char *  name = "h" 
)
inlineprivatevirtual

plots data into a histogram with provided DAMM ID

Parameters
[in]dammId: the dammID to plot into
[in]val1: the x value
[in]val2: the y value
[in]val3: the z value
[in]name: the name of the histogram

Definition at line 177 of file Correlator.hpp.

Here is the call graph for this function:

§ PrintDecayList()

void Correlator::PrintDecayList ( unsigned int  fch,
unsigned int  bch 
) const

Print the decay list

Parameters
[in]fch: the first location to print
[in]bch: the second location to print

Definition at line 369 of file Correlator.cpp.

Field Documentation

§ arraySize

const size_t Correlator::arraySize = 40
staticprivate

Size of the 2D array to hold the decay lists

Definition at line 200 of file Correlator.hpp.

§ condition

EConditions Correlator::condition
private

condition for last processed event

Definition at line 214 of file Correlator.hpp.

§ corrTime

const double Correlator::corrTime = 60
staticprivate

The maximum amount of time allowed between a decay and its previous implant for a correlation between the two to occur in clock ticks

Definition at line 205 of file Correlator.hpp.

§ decaylist

CorrelationList Correlator::decaylist[arraySize][arraySize]
private

list of event data for a particular pixel since implant

Definition at line 215 of file Correlator.hpp.

§ fastTime

const double Correlator::fastTime = 40e-6
staticprivate

Times shorter than this are output as a fast decay

Definition at line 208 of file Correlator.hpp.

§ histo

Plots Correlator::histo
private

Instance of the Plots class.

Definition at line 169 of file Correlator.hpp.

§ lastDecay

EventInfo* Correlator::lastDecay
private

last decay procssed by correlator

Definition at line 212 of file Correlator.hpp.

§ lastImplant

EventInfo* Correlator::lastImplant
private

last implant processed by correlator

Definition at line 211 of file Correlator.hpp.

§ minImpTime

const double Correlator::minImpTime = 5e-3
staticprivate

The minimum amount of time that must pass before an implant will be considered for correlation in clock ticks

Definition at line 202 of file Correlator.hpp.


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