4#include "KVDataPatch_INDRA_SanityChecks.h"
6#include <KVINDRAReconNuc.h>
20 SetTitle(
Class()->GetTitle());
56 Fatal(
"ApplyToParticle",
"Cannot apply this data patch to objects of class %s, only KVINDRAReconNuc objects",
N->ClassName());
58 if ((
n->GetIDCode() >= 2 &&
n->GetIDCode() <= 4) ||
n->GetIDCode() == 6) {
59 if (!
n->IsIdentified() || !
n->IsZMeasured() || !
n->GetIdentifyingTelescope()) {
61 if (
n->GetReconstructionTrajectory()->GetN() == 1 && !
n->GetStoppingDetector()->IsType(
"CSI"))
68 else if (
n->IsZMeasured()) {
69 if (
n->GetZ() < 1 ||
n->GetZ() > 92) {
71 n->SetIsUnidentified();
76 if (
n->GetIDCode() == 2 &&
n->GetIdentifyingTelescope()->IsType(
"CSI_R_L") &&
n->IsAMeasured()) {
79 n->SetIsUnidentified();
85 if ((
n->GetZ() == 1 &&
n->GetA() > 3)
86 || ((
n->GetZ() == 2 && (
n->GetA() < 3 ||
n->GetA() == 5 ||
n->GetA() > 6)))) {
88 n->SetIsUnidentified();
96 if (
n->GetECode() > 0 &&
n->GetECode() < 3) {
99 n->SetIsUncalibrated();
111 std::cout <<
"General sanity checks:\n";
112 std::cout <<
" - any particle with 'good' ID codes should have\n";
113 std::cout <<
" IsIdentified() = true\n";
114 std::cout <<
" IsZMeasured() = true\n";
115 std::cout <<
" GetIdentifyingTelescope() returns pointer to ID telescope\n";
116 std::cout <<
" - any particle with IsZMeasured()=true should have:\n";
117 std::cout <<
" 1 <= Z <= 92\n";
118 std::cout <<
" - any particle with 'good' calib codes should have\n";
119 std::cout <<
" E>0\n";
120 std::cout <<
" - any particle identified in CsI-RL should have\n";
121 std::cout <<
" Z<6\n";
122 std::cout <<
" no 4H, no 5He or 7He\n";
General sanity checks for old INDRA data.
virtual void PrintPatchInfo() const
void ApplyToParticle(KVReconstructedNucleus *)
Correction to be applied to reconstructed calibrated data.
Nuclei reconstructed from data measured in the INDRA array.
virtual void AcceptParticleForAnalysis(KVReconstructedNucleus *) const
Nuclei reconstructed from data measured by a detector array .
virtual void Fatal(const char *method, const char *msgfmt,...) const
RooCmdArg ClassName(const char *name)