#include <CFold.h> class CFold { public: CFold(CGateContainer* m_pGate); std::string getFoldName(); void setGate(CGateContainer* pGate); void operator()(std::vector<std::pair<UInt_t, Float_t> >& rEvent, CGammaSpectrum* pSpectrum); void operator()(std::vector<std::pair<UInt_t, Float_t> >& xParams, std::vector<std::pair<UInt_t, Float_t> >& yParams, CGammaSpectrum* pSpectrum); protected: void CutDownParameters(std::vector<std::pair<UInt_t, Float_t> >& rNew, std::vector<std::pair<UInt_t, Float_t> >& rOld, UInt_t removeMe); void CutDownParameters(std::vector<std::pair<UInt_t, Float_t> >& rNew, std::vector<std::pair<UInt_t, Float_t> >& rOld, UInt_t remove1, UInt_t remove2); };
Fold mediate the processing of an event in Gamma spectra derived
from CGammaSpectrum
. They help determine which
peaks are part of a sequential decay process. They do this by only
incrementing parameters that are not in the fold's
gate
This cutting down of the parameters allows the spectrum to only increment for gamma rays that are coincident with the one in the fold. In this case, coincident means they gammas are in the same event.
CFold(CGateContainer* pGate);
The constructor requires a pGate
which will be used as the fold. The gate should be
a valid gamma gate, however it is not an error to use
a non-gamma gate. Using a non-gamma gate, however
will not affect how the spectrum is incremented.
std::string getFoldName();
Returns the name of the fold. The name of the fold is the same asw the name of the gate it evaluates.
void setGate(CGateContainer* pGate);
Sets the fold gate to pGate
.
Note that a side-effect of this is that the fold's name
is changed since it derived from the
name of the underlying gate.
void operator()(std::vector<std::pair<UInt_t, Float_t> >& xParams, std::vector<std::pair<UInt_t, Float_t> >& yParams, CGammaSpectrum* pSpectrum);
Processes the cut for a gamma deluxe spectrum. For each pair of parameters that satisfies the gamma gate, all other parameter pairs increment the spectrum.
protected void CutDownParameters(std::vector<std::pair<UInt_t, Float_t> >& rNew, std::vector<std::pair<UInt_t, Float_t> >& rOld, UInt_t removeMe);
Creates a new list of parameters, rNew
that consists of the previous list, rOld
without any instance of parameter id removeMe
in it.
protected void CutDownParameters(std::vector<std::pair<UInt_t, Float_t> >& rNew, std::vector<std::pair<UInt_t, Float_t> >& rOld, UInt_t remove1, UInt_t remove2);
Creates a new vector, rNew
consisting
of the elements of rOld
that cointains
neither remove1
nor
remove2
. This is somewhat faster
than using the previous method twice and is a natural
method for use with 2d gates that are wrapped by
a fold.