KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVIdentificationResult.cpp
1//Created by KVClassFactory on Wed Jun 9 11:30:26 2010
2//Author: John Frankland,,,
3
4#include "KVIdentificationResult.h"
5
7
8
9
11
12void KVIdentificationResult::Copy(TObject& obj) const
13{
14 // Copy this to obj
15 KVBase::Copy(obj);
17 id.IDattempted = IDattempted;
18 id.IDOK = IDOK;
19 id.IDcode = IDcode;
20 id.Zident = Zident;
21 id.Aident = Aident;
22 id.IDquality = IDquality;
23 id.Z = Z;
24 id.A = A;
25 id.PID = PID;
26 id.deltaEpedestal = deltaEpedestal;
27 id.Rejecting_Cut = Rejecting_Cut;
28 id.flags = flags;
29}
30
31
32
35
37{
38 // Reset to initial values
39 SetIDType("");
40 SetComment("");
41 SetGridName("");
43 IDOK = kFALSE;
44 IDcode = -1;
45 Zident = kFALSE;
46 Aident = kFALSE;
47 IDquality = -1;
48 Z = -1;
49 A = -1;
50 PID = -1.0;
52 Rejecting_Cut = "";
53 flags.clear();
54}
55
56
57
59
61{
62 printf("Identification #%d - Type:%s ", GetNumber(), GetIDType());
63 if (!IDattempted) {
64 printf(" => not attempted\n\n");
65 return;
66 }
67 if (IDOK) printf(" => SUCCESS\n");
68 else printf(" => FAILURE\n");
69 printf(" Grid used: %s\n", GetGridName());
70 if (Rejecting_Cut != "") printf(" rejected by cut : %s", Rejecting_Cut.Data());
71 printf(" ID code = %d Quality code = %d (%s)\n", IDcode, IDquality, GetComment());
72 if (Zident) printf(" Z identified = %d", Z);
73 else printf(" Z returned = %d", Z);
74 if (Aident) printf(" A identified = %d", A);
75 else printf(" A returned = %d", A);
76 if (Zident || Aident) printf(" PID = %f", PID);
77 printf("\n");
78 switch (deltaEpedestal) {
79
81 printf(" delta-E pedestal : NO\n");
82 break;
83
85 printf(" delta-E pedestal : YES\n");
86 break;
87
88 default:
90 break;
91 }
92 if (auto nflags = flags.size()) {
93 printf(" Info flags:\n");
94 for (auto& fv : flags) {
95 printf(" %s : ", fv.first.c_str());
96 TString fmt_flags;
97 auto nflags = fv.second.size();
98 for (uint i = 0; i < nflags; ++i) {
99 if (i) fmt_flags += "|";
100 fmt_flags += fv.second[i];
101 }
102 printf("%s\n", fmt_flags.Data());
103 }
104 }
105}
106
107
constexpr Bool_t kFALSE
const char Option_t
virtual void Copy(TObject &) const
Make a copy of this object.
Definition KVBase.cpp:394
UInt_t GetNumber() const
Definition KVBase.h:220
Full result of one attempted particle identification.
Bool_t IDattempted
=kTRUE if identification was attempted
const Char_t * GetComment() const
const Char_t * GetIDType() const
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
void SetGridName(const Char_t *n)
void Print(Option_t *opt="") const
void SetComment(const Char_t *c)
const Char_t * GetGridName() const
void Clear(Option_t *opt="")
Reset to initial values.
TString Rejecting_Cut
name of cut in grid which rejected particle for identification
Bool_t Aident
= kTRUE if A of particle established
Double_t PID
= "real" Z if Zident==kTRUE and Aident==kFALSE, "real" A if Zident==Aident==kTRUE
Int_t deltaEpedestal
special code for handling particles which give no signal in deltaE
Int_t A
A of particle found (if Aident==kTRUE)
Int_t Z
Z of particle found (if Zident==kTRUE)
Int_t IDquality
specific quality code returned by identification procedure
Int_t IDcode
a general identification code for this type of identification
void SetIDType(const Char_t *t)
Bool_t Zident
=kTRUE if Z of particle established
const char * Data() const
ClassImp(TPyArg)