![]() |
GosSiP
1.32
|
#include <HitMatrix.h>
Public Member Functions | |
HitMatrix () | |
~HitMatrix () | |
int | AddHit (int x, int y, double time, int type) |
void | Clear (int type) |
TH2D * | DrawMatrix () |
void | EraseHit (vector< double > aHit) |
int | FindHit (vector< double > aHit) |
vector< double > | GetHit (unsigned int iHit) |
double | GetPreviousTime (unsigned int iHit) |
bool | GetProcessed (unsigned int iHit) |
void | HitProcessed (unsigned int iHit) |
void | Init () |
int | nHits (int type) |
int | nHits () |
void | PrintMatrix () |
void | SetAmplitude (unsigned int iHit, double amplitude) |
void | SetGate (double g, bool gCut=true) |
void | SetGeometry (TH2I *geometry) |
List of avalanche breakdowns (hits)
Class inherits from vector<vector<double> >
Hit vector contains: 0:x, 1:y, 2:type, 3:time, 4:amplitude, 5:processed flag
Types are: 0:PE (detected photon), 1:DR (thermal pulse), 2:CT (cross-talk), 3:AP (after-pulse)
HitMatrix::HitMatrix | ( | ) |
HitMatrix::~HitMatrix | ( | ) |
int HitMatrix::AddHit | ( | int | x, |
int | y, | ||
double | time, | ||
int | type | ||
) |
Adds hit (amplitude = -1, processed = 0). x,y coordinates in units of pixels! (x,y >= 0,0)
void HitMatrix::Clear | ( | int | type | ) |
Deletes all hits of type "type"
TH2D * HitMatrix::DrawMatrix | ( | ) |
Draws all hits of type "type" (-1 = all)
void HitMatrix::EraseHit | ( | vector< double > | aHit | ) |
Deletes aHit from the list
int HitMatrix::FindHit | ( | vector< double > | aHit | ) |
Returns position i of aHit in the list
vector< double > HitMatrix::GetHit | ( | unsigned int | iHit | ) |
Returns hit i in the list. Hit vector contains: 0:x, 1:y, 2:type, 3:time, 4:amplitude, 5:processed flag.
double HitMatrix::GetPreviousTime | ( | unsigned int | iHit | ) |
Returns time of pixel hit before iHit
bool HitMatrix::GetProcessed | ( | unsigned int | iHit | ) |
Returns processed status
void HitMatrix::HitProcessed | ( | unsigned int | iHit | ) |
Sets processed flag for iHit
void HitMatrix::Init | ( | ) |
Initializes the hitmatrix and delets all hits
int HitMatrix::nHits | ( | int | type | ) |
Returns number of hits of type "type"
int HitMatrix::nHits | ( | ) |
Returns total number of hits
void HitMatrix::PrintMatrix | ( | ) |
Prints out hitmatrix
void HitMatrix::SetAmplitude | ( | unsigned int | iHit, |
double | amplitude | ||
) |
Sets amplitude for iHit
|
inline |
Sets integtration gate in ns. gCut=false one more avalanche after end of gate appears in the hitmatrix. Mainly for test purposes of TDCSpectrum. Leave at "true" for most applications!
void HitMatrix::SetGeometry | ( | TH2I * | geometry | ) |
Sets pixel layout