#include <RigFillCut.h>
Public Member Functions | |
RigFillCut (const char *cutName, std::vector< float > binning, float thresholdCoeff) | |
Constructor. | |
~RigFillCut () | |
Destructor. | |
int | Check (PamLevel2 *event) |
The rigidity and cutoff rigidity check. | |
void | OnGood (PamLevel2 *event) |
The histogram filling. | |
SimpleMatrix< UInt_t > & | GetHisto () |
Returns the histogram. | |
Private Attributes | |
std::vector< float > | _binning |
SimpleMatrix< UInt_t > | _histogram |
float | _thresholdCoeff |
This class checks the events and builds a 2D histogram binned in rigidity modulus and threshold rigidity. Each 2D bin will contain the number of events whose rigidity modulus and threshold rigidity (eg., Stoermer cutoff rigidity times a threshold coefficient) lie in that bin. Note that the meaning of this threshold coefficient is the same as in TrkRigGeoCut, so it must have the same value used for TrkRigGeoCut (consider using TrkRigGeoCut::GetThresholdCoeff() to retrieve its value). Events are discarded only if their rigidity modulus or cutoff rigidity lies outside the histogram bounds.
CUT DEPENDECIES: TrkPhSinCut for single physical track, TrkRigGeoCut for galactic event.
Definition at line 37 of file RigFillCut.h.
RigFillCut::RigFillCut | ( | const char * | cutName, | |
std::vector< float > | binning, | |||
float | thresholdCoeff | |||
) | [inline] |
Constructor.
The binning vectors must contain both the upper and lower limits, and the elements must be ordered (ie., lowest value in the first element and so on) and positive, so that charge sign will be irrelevant.
cutName | The cut's name. | |
binning | A vector containing the histogram binning in rigidity modulus (X axis) and cutoff rigidity (Y axis). | |
thresholdCoeff | The threshold rigidity coefficient for the event selection. |
Definition at line 51 of file RigFillCut.h.
RigFillCut::~RigFillCut | ( | ) | [inline] |
int RigFillCut::Check | ( | PamLevel2 * | event | ) | [virtual] |
The rigidity and cutoff rigidity check.
The event is discarded if its rigidity modulus or threshold rigidity are outside the limits of the binnings. Please note that only absolute rigidity is considered.
event | The event to analyze. |
0 otherwise.
Implements PamCut.
Definition at line 12 of file RigFillCut.cpp.
References _binning, _thresholdCoeff, CUTOK, RIGOUT, and THRESHRIGOUT.
SimpleMatrix<UInt_t>& RigFillCut::GetHisto | ( | ) | [inline] |
Returns the histogram.
This method returns a SimpleMatrix. Its [i][j] element contain the number of analyzed events whose rigidity modulus falls in the i-th rigidity bin and whose threshold rigidity falls in the j-th rigidity bin.
Definition at line 86 of file RigFillCut.h.
References _histogram.
void RigFillCut::OnGood | ( | PamLevel2 * | event | ) | [virtual] |
The histogram filling.
The method fills the histogram with the currently selected event.
event | The currently selected event. |
Reimplemented from PamCut.
Definition at line 29 of file RigFillCut.cpp.
References _binning, _histogram, and _thresholdCoeff.
std::vector<float> RigFillCut::_binning [private] |
SimpleMatrix<UInt_t> RigFillCut::_histogram [private] |
float RigFillCut::_thresholdCoeff [private] |