PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
correlate decays with previous implants More...
#include <Correlator.hpp>
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... | |
EventInfo * | lastImplant |
last implant processed by correlator More... | |
EventInfo * | lastDecay |
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 |
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.
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.
Correlator::Correlator | ( | ) |
Default Constructor
Definition at line 48 of file Correlator.cpp.
|
virtual |
Default Destructor
Definition at line 173 of file Correlator.cpp.
void Correlator::Correlate | ( | EventInfo & | event, |
unsigned int | fch, | ||
unsigned int | bch | ||
) |
Correlate two locations in the event
[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.
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
[in] | event | : the even to correlate with |
Definition at line 308 of file Correlator.cpp.
void Correlator::CorrelateAllX | ( | EventInfo & | event, |
unsigned int | bch | ||
) |
Correlates all X positions in the event
[in] | event | : the event to correlate with |
[in] | bch | : the locations to correlate with |
Definition at line 322 of file Correlator.cpp.
void Correlator::CorrelateAllY | ( | EventInfo & | event, |
unsigned int | fch | ||
) |
Correlates all Y positions in the event
[in] | event | : the even to correlate with |
[in] | fch | : the locations to correlate with |
Definition at line 328 of file Correlator.cpp.
|
inlineprivatevirtual |
Declares a 1D histogram calls the C++ wrapper for DAMM.
[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.
|
inlineprivatevirtual |
Declares a 2D histogram calls the C++ wrapper for DAMM.
[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.
void Correlator::DeclarePlots | ( | void | ) |
Declare plots for the correlator
Definition at line 183 of file Correlator.cpp.
void Correlator::Flag | ( | int | fch, |
int | bch | ||
) |
Set the flag for the two locations
[in] | fch | : first channel that we'll set |
[in] | bch | : the second channel to set |
Definition at line 360 of file Correlator.cpp.
|
inline |
Definition at line 164 of file Correlator.hpp.
double Correlator::GetDecayTime | ( | void | ) | const |
Definition at line 334 of file Correlator.cpp.
double Correlator::GetDecayTime | ( | int | fch, |
int | bch | ||
) | const |
[in] | fch | : the first channel to look for |
[in] | bch | : the second channel to look for |
Definition at line 343 of file Correlator.cpp.
double Correlator::GetImplantTime | ( | void | ) | const |
Definition at line 347 of file Correlator.cpp.
double Correlator::GetImplantTime | ( | int | fch, |
int | bch | ||
) | const |
[in] | fch | : the first channel to look for |
[in] | bch | : the second channel to look for |
Definition at line 356 of file Correlator.cpp.
|
inline |
Initialize the correlator - Does nothing
[in] | rawev | : the raw even for initialization |
Definition at line 113 of file Correlator.hpp.
bool Correlator::IsFlagged | ( | int | fch, |
int | bch | ||
) |
Check if the two channels that we have are flagged
[in] | fch | : the first channel to check |
[in] | bch | : the second channel to check |
Definition at line 365 of file Correlator.cpp.
|
inlineprivatevirtual |
plots data into a histogram with provided DAMM ID
[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.
void Correlator::PrintDecayList | ( | unsigned int | fch, |
unsigned int | bch | ||
) | const |
Print the decay list
[in] | fch | : the first location to print |
[in] | bch | : the second location to print |
Definition at line 369 of file Correlator.cpp.
|
staticprivate |
Size of the 2D array to hold the decay lists
Definition at line 200 of file Correlator.hpp.
|
private |
condition for last processed event
Definition at line 214 of file Correlator.hpp.
|
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.
|
private |
list of event data for a particular pixel since implant
Definition at line 215 of file Correlator.hpp.
|
staticprivate |
Times shorter than this are output as a fast decay
Definition at line 208 of file Correlator.hpp.
|
private |
Instance of the Plots class.
Definition at line 169 of file Correlator.hpp.
|
private |
last decay procssed by correlator
Definition at line 212 of file Correlator.hpp.
|
private |
last implant processed by correlator
Definition at line 211 of file Correlator.hpp.
|
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.