NTagCandidate¶
-
class
NTagCandidate¶ Public Functions
-
NTagCandidate(int id, NTagEventInfo *eventInfo)¶ Constructor of NTagCandidate.
- Parameters
id – Candidate ID of the constructed candidate.
eventInfo – A pointer to the concurrent NTagEventInfo.
-
~NTagCandidate()¶ Destructor of NTagCandidate.
-
void
SetHitInfo(const std::vector<float> &rawT, const std::vector<float> &resT, const std::vector<float> &Q, const std::vector<int> &I, const std::vector<int> &sigF)¶ Copies input vectors to private member vectors: vHitResTimes, vHitChargePE, vHitCableIDs, and vHitSigFlags.
- Parameters
rawT – A vector of raw PMT hit times. [ns]
resT – A vector of residual (ToF-subtracted) PMT hit times. [ns]
Q – A vector of PMT deposit charge in p.e.
I – A vector of hit PMT cable IDs.
sigF – A vector of hit signal flags. (0: bkg, 1: sig)
-
void
SetVariables()¶ Set feature variables in iVarMap and fVarMap.
Called inside NTagEventInfo::SavePeakFromHit which is called in NTagEventInfo::SearchCaptureCandidates. Calls other setter functions, i.e., NTagCandidate::SetVariablesForMode, NTagCandidate::SetTrueInfo, NTagCandidate::SetNNVariables, NTagCandidate::SetTMVAOutput.
-
void
SetVariablesForMode(ExtractionMode tWindow)¶ Set feature variables within given time window
tWindow.The input parameter
tWindowserves as a mode for setting variables. Currently two modes (50 ns and 1300 ns) are supported, so that for 50 ns mode, this function searches for TRMS-minimizing vertex (Neut-fit vertex) within ± 25 ns, and for 1300 ns mode, it feeds all hits within [-520.8 ns, +779.2 ns] with the reconstructed capture time “ReconCT” being 0 into BONSAI to extracxt BONSAI variables, i.e., “BSgood”, “BSpatlik”, “BSovaq”, etc. See the source code for details.See also
NTagCandidate::MinimizeTRMS for the Neut-fit algorithm.
- Parameters
tWindow – Time window modes in ns. Only 50 and 1300 are supported at the moment.
-
void
SetTrueInfo()¶ Searches for the relevant true capture in case the input file is MC.
This function looks for the relevant true capture by looking for a true capture time (from #NTagEventInfo::vTruecT) that is close to the candidate’s reconstructed capture time. The width of the time window for a match, which is NTagEventInfo::TMATCHWINDOW, is by default NTagDefault::TMATCHWINDOW and can be manually set by NTagEventInfo::SetTMatchWindow.
-
void
SetNNVariables()¶ Pushes back feature variables that are specified in NTagTMVAVariables to a neural network.
-
void
SetTMVAOutput()¶ Extracts TMVA classifier output by calling NTagTMVA::GetOutputFromCandidate.
-
void
DumpHitInfo()¶ Dump raw hit info, i.e., vHitResTimes, vHitChargePE, vHitCableIDs, and vHitSigFlags.
-
std::array<float, 6>
GetBetaArray(const std::vector<int> &PMTID, float v[3])¶ Evaluate _i values of a hit cluster for i = 1…5 and return those in an array.
See also
For the details of the values, see Eq. (5) of the SNO review article at arXiv:1602.02469.
- Parameters
PMTID – A vector of PMT cable IDs. The locations of the PMTs are fetched from #PMTXYZ.
v – A 3D array of float that represents the SK coordinates of photon emission vertex.
- Returns
An size-6 array of values. The i-th element of the returned array is the i-th value. The 0-th element is a dummy filled with 0.
-
float
MinimizeTRMS(const std::vector<float> &T, const std::vector<int> &PMTID, float fitVertex[3])¶ Gets the minimum RMS value of hit-times by searching for the minizing vertex.
Note
The input hit-time vector must not have ToF subtracted as ToF will be subtracted inside this function.
- Parameters
T – A vector of PMT hit times. [ns]
PMTID – A vector of PMT cable IDs corresponding to each hit in
T.fitVertex – The array to have minimizing vertex coordinates filled.
- Returns
The RMS value of the extracted hit cluster from the input hit-tme vector
T.fitVertexis also returned as the coordinates of the TRMS minimizing vertex ofT.
Private Members
-
NTagEventInfo *
currentEvent¶ A pointer to the concurrent NTagEventInfo.
-
FVarMap
fVarMap¶ A map of integer feature variables.
-
IVarMap
iVarMap¶ A map of float feature variables.
-
int
candidateID¶ Candidate ID of the candidate.
-
float
TWIDTH¶ TWIDTH for NHits counting. (ns) Taken from NTagCandidate::currentEvent.
-
std::vector<float>
vHitRawTimes¶ Vector of residual hit times. [Size: NHits].
-
std::vector<float>
vHitResTimes¶ Vector of residual hit times. [Size: NHits].
-
std::vector<float>
vHitChargePE¶ Vector of deposited charge in photoelectrons. [Size: NHits].
-
std::vector<int>
vHitCableIDs¶ Vector of hit cable IDs. [Size: NHits].
-
std::vector<int>
vHitSigFlags¶ Vector of signal flags. (0: bkg, 1: sig) [Size: NHits].
-