StRoot
1
|
Public Types | |
enum | { DIN_FPD, DIN_FT, DIN_FDIN, DIN_FDIN_VPD, DIN_VPD_FPD, DIN_VPD_FT, DIN_VPD_FDIN, DIN_VPD_FDIN_VPD, FDIN_FPD, FDIN_VPD_FPD, FT_FPD, FT_FT, FDIN_FDIN, FDIN_VPD_FDIN_VPD, DIN_FPD1, DIN_FPD2 } |
Public Member Functions | |
Altro (int timebins, short *Channel) | |
Consturctor of Altro Class. More... | |
~Altro () | |
Destructor of Altro Class. More... | |
void | ConfigAltro (int ONBaselineCorrection1, int ONTailcancellation, int ONBaselineCorrection2, int ONClipping, int ONZerosuppression) |
Configures which modules of the Altro should be on. More... | |
void | ConfigBaselineCorrection_1 (int mode, int ValuePeDestal, int *PedestalMem, int polarity) |
Configures the Base Line Correction 1 (BSL1) Module. More... | |
void | ConfigTailCancellationFilter (int K1, int K2, int K3, int L1, int L2, int L3) |
Configures the Tail Cancellation Filter (TCF) Module. More... | |
void | ConfigBaselineCorrection_2 (int HighThreshold, int LowThreshold, int Offset, int Presamples, int Postsamples) |
Configures the Moving Average Filter (BSL2) Module. More... | |
void | ConfigZerosuppression (int Threshold, int MinSamplesaboveThreshold, int Presamples, int Postsamples) |
Configures the Zero Suppression Module (ZSU) More... | |
void | PrintParameters () |
Prints the set Parameters, if module is configured. More... | |
void | RunEmulation () |
Runs the emulation of all configured Modules. More... | |
float | calculatecompression () |
calculates the compression out of the bitmask More... | |
Public Attributes | |
short * | ADCkeep |
anonymous enum |
Altro::Altro | ( | int | timebins, |
short * | Channel | ||
) |
Consturctor of Altro Class.
Consturctor of Altro Class, some variables are set.
The input Data is altered, so after running the complete emulation you have the Altro Processed Data in the Channel Pointer.
timebins | an int sets the length of the input Data (Channel) |
Channel | an short* Pointer to a 1d short Array with the input Data |
Altro::~Altro | ( | ) |
float Altro::calculatecompression | ( | ) |
void Altro::ConfigAltro | ( | int | ONBaselineCorrection1, |
int | ONTailcancellation, | ||
int | ONBaselineCorrection2, | ||
int | ONClipping, | ||
int | ONZerosuppression | ||
) |
Configures which modules of the Altro should be on.
Configures which modules of the Altro should be on. Each of the modules which are configured to be on, have to be configured later before running the emulation!
ONBaselineCorrection1 | an int Switch (0,1) to turn on the Base Line Correction 1 (BSL1) Module |
ONTailcancellation | an int Switch (0,1) to turn on the Tail Cancellation Filter (TCF) Module |
ONBaselineCorrection2 | an int Switch (0,1) to turn on the Moving Average Filter (BSL2) Module |
ONClipping | an int Switch (0,1) to turn on the Clipping Module. This is not possible in the real Altro, there it is always on. |
ONZerosuppression | an int Switch (0,1) to turn on the Zero Suppression (ZSU) Module |
void Altro::ConfigBaselineCorrection_1 | ( | int | mode, |
int | ValuePeDestal, | ||
int * | PedestalMem, | ||
int | polarity | ||
) |
Configures the Base Line Correction 1 (BSL1) Module.
Configures the Base Line Correction 1 (BSL1) Module. You dont have to build a proper pedestalMemory array, a pointer of the correct type is enough, of course you are not allowed to use Basline Correction Modes which need then the array ...
All configurable values are "Range checked" and if out of the Range set to the nearest extreme. So the Emulation will work, but the result is maybe not the expected one.
void Altro::ConfigBaselineCorrection_2 | ( | int | HighThreshold, |
int | LowThreshold, | ||
int | Offset, | ||
int | Presamples, | ||
int | Postsamples | ||
) |
Configures the Moving Average Filter (BSL2) Module.
Configures the Moving Average Filter (BSL2) Module. All configurable values are "Range checked" and if out of the Range set to the nearest extreme. So the Emulation will work, but the result is maybe not the expected one.
HighThreshold | an int sets the high Threshold |
LowThreshold | an int sets the low Theshold |
Offset | an int sets the the offset which is added to the Signal |
Presamples | an int sets the number of pre samples excluded from the moving average caclulation |
Postsamples | an int sets the number of post samples excluded from the moving average caclulation |
void Altro::ConfigTailCancellationFilter | ( | int | K1, |
int | K2, | ||
int | K3, | ||
int | L1, | ||
int | L2, | ||
int | L3 | ||
) |
Configures the Tail Cancellation Filter (TCF) Module.
Configures the Tail Cancellation Filter (TCF) Module. You have to set the coefficients in the Integer version.
To convert from int to float use (int)*(pow(2,-16)-1) To convert from float to int usw (float)*(pow(2,16)-1) All configurable values are "Range checked" and if out of the Range set to the nearest extreme. So the Emulation will work, but the result is maybe not the expected one.
K1 | an int sets the K1 coeeficient of the TCF |
K2 | an int sets the K2 coeeficient of the TCF |
K3 | an int sets the K3 coeeficient of the TCF |
L1 | an int sets the L1 coeeficient of the TCF |
L2 | an int sets the L2 coeeficient of the TCF |
L3 | an int sets the L3 coeeficient of the TCF |
void Altro::ConfigZerosuppression | ( | int | Threshold, |
int | MinSamplesaboveThreshold, | ||
int | Presamples, | ||
int | Postsamples | ||
) |
Configures the Zero Suppression Module (ZSU)
Configures the Zero Suppression Module (ZSU). All configurable values are "Range checked" and if out of the Range set to the nearest extreme. So the Emulation will work, but the result is maybe not the expected one.
Threshold | an int sets the Threshold |
MinSamplesaboveThreshold | an int sets the minimum number of samples which have to be greater than the threshold |
Presamples | an int sets the number of pre samples which are kept |
Postsamples | an int sets the number of post samples which are kept |
void Altro::PrintParameters | ( | ) |
Prints the set Parameters, if module is configured.
Prints the set Parameters, if module is configured.
void Altro::RunEmulation | ( | ) |