Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
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
 

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.
 
EventInfolastImplant
 last implant processed by correlator
 
EventInfolastDecay
 last decay procssed by correlator
 
EConditions condition
 condition for last processed event
 
CorrelationList decaylist [arraySize][arraySize]
 list of event data for a particular pixel since implant
 

Static Private Attributes

static const size_t arraySize = 40
 
static const double minImpTime
 
static const double corrTime
 
static const double fastTime
 

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.

Constructor & Destructor Documentation

Correlator::Correlator ( )

Default Constructor

virtual Correlator::~Correlator ( )
virtual

Default Destructor

Member Function Documentation

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
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
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
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
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
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
void Correlator::DeclarePlots ( void  )

Declare plots for the correlator

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
EConditions Correlator::GetCondition ( void  ) const
inline
Returns
The conditions for correlation
double Correlator::GetDecayTime ( void  ) const
Returns
the decay time
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
double Correlator::GetImplantTime ( void  ) const
Returns
get the implant time
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
void Correlator::Init ( RawEvent rawev)
inline

Initialize the correlator - Does nothing

Parameters
[in]rawev: the raw even for initialization
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
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
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

Field Documentation

const size_t Correlator::arraySize = 40
staticprivate

Size of the 2D array to hold the decay lists

const double Correlator::corrTime
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

const double Correlator::fastTime
staticprivate

Times shorter than this are output as a fast decay

const double Correlator::minImpTime
staticprivate

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


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