2 #include "KVIDCutLine.h"
3 #include "KVIDCsIRLLine.h"
4 #include "KVIdentificationResult.h"
29 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
57 if (!GammaLine)
return kFALSE;
58 else if ((x < GammaLine->
GetX()[0]) && (x < GammaLine->
GetX()[GammaLine->
GetN() - 1]))
return kFALSE;
70 struct add_remove_imf_line {
75 if (imfline) idlines->
AddLast(imfline);
77 ~add_remove_imf_line()
79 if (imfline) idlines->
Remove(imfline);
124 add_remove_imf_line IMF(fIdentifiers, IMFLine);
128 if (!
const_cast<KVIDGCsI*
>(
this)->FindFourEmbracingLines(
x,
y,
"above")) {
132 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
148 idr->
SetComment(
"Z ok, mass may be greater than A");
151 idr->
SetComment(
"Z ok, mass may be smaller than A");
154 idr->
SetComment(
"Z ok, mass may be greater or smaller than A");
157 idr->
SetComment(
"Z ok, mass out of range, >=A");
160 idr->
SetComment(
"Z ok, mass out of range, <=A");
163 idr->
SetComment(
"point above IMF line, Z is a minimum value");
166 idr->
SetComment(
"point is left of IMF line, Z is the most probable lower limit");
169 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
172 idr->
SetComment(
"no identification for this module");
175 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
204 && (
index < (nlines - 1)))
207 if (
line->GetZ() != z) {
231 while ((
line->GetZ() != z ||
line->GetA() !=
a)
232 && (
index < (nlines - 1))) {
235 if (
line->GetZ() != z ||
line->GetA() !=
a) {
283 Int_t dA = Asup - Ainf;
324 y1 = 0.5 * (dinfi - dinf);
464 else if (kinf > -1) {
513 if (k > -1 && fICode ==
kICODE0) {
541 else if (ix2 == -ix1 * 2) {
543 if (tmp > 0. &&
dist != 0) {
544 dt = -(
y1 + 2. *
y2 -
552 else if (ix1 == -ix2 * 2) {
554 if (tmp > 0. &&
dist != 0) {
555 dt = -(
y2 + 2. *
y1 +
567 deltaA = yy * ix2 /
y2 / 2.;
573 if (
dist > -1. && dt * yy > -1.)
586 if (ibif == 1 || ibif == 3) {
591 Int_t idx = fIdxClosest;
595 if (nextline->
GetZ() == Z
603 if (ibif == 2 || ibif == 3) {
608 Int_t idx = fIdxClosest;
609 if (idx > -1 && --idx >= 0) {
612 if (nextline->
GetZ() == Z
647 if (imfline) fIdentifiers.Remove(imfline);
652 KVError::Error(
this,
"Initialize",
"%s: Cut 'gamma_line' not found in grid. Not a valid CsI R-L grid. Listing existing cuts:",
658 KVError::Error(
this,
"Initialize",
"%s: Cut 'IMF_line' not found in grid. Not a valid CsI R-L grid. Listing existing cuts:",
679 void KVIDGCsI::BackwardsCompatibilityFix()
692 KVIDZAGrid::BackwardsCompatibilityFix();
695 Fatal(
"BackwardsCompatibilityFix",
696 "This fix no longer works. There will be problems.");
699 if (GammaLine)((
KVIDCutLine*)GammaLine)->SetAcceptedDirection(
"above");
700 if (IMFLine)((
KVIDCutLine*)IMFLine)->SetAcceptedDirection(
"below");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
Base class for CsI R-L identification lines (A and Z identification).
Line in ID grid used to delimit regions where no identification is possible.
Identification grids for CsI R-L (fast-slow) matrices.
virtual void Identify(Double_t x, Double_t y, KVIdentificationResult *) const override
KVIDZALine * GetZALine(Int_t z, Int_t a, Int_t &) const override
KVIDZALine * GetZLine(Int_t z, Int_t &) const override
void Initialize() override
KVIDGCsI()
Default constructor.
void IdentZA(Double_t x, Double_t y, Int_t &Z, Double_t &A) override
void SetVarY(const char *v) override
Int_t GetNumberOfIdentifiers() const
KVIDentifier * GetCut(const Char_t *name) const
const KVList * GetCuts() const
void SetVarX(const char *v) override
const Char_t * GetName() const override
KVIDentifier * GetIdentifierAt(Int_t index) const
const KVNameValueList * GetParameters() const
virtual void SetInfos(Double_t, Double_t, KVIdentificationResult *) const
loop over KVIDGraph::fInfoZones to set flags in KVIdentificationResult
const KVList * GetIdentifiers() const
Base class for lines/cuts used for particle identification in 2D data maps.
Bool_t WhereAmI(Double_t px, Double_t py, Option_t *opt) const
Bool_t IsBetweenEndPoints(Double_t x, Double_t y, std::optional< TString > axis={}) const
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
void Copy(TObject &) const override
Copy this to 'obj'.
void Initialize() override
Base class for identification ridge lines corresponding to different nuclear species.
virtual Int_t GetZ() const
Full result of one attempted particle identification.
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
void SetComment(const Char_t *c)
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 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
Bool_t Zident
=kTRUE if Z of particle established
Extended TList class which owns its objects by default.
TObject * Remove(TObject *obj) override
Remove object from list.
void AddLast(TObject *obj) override
TObject * At(Int_t idx) const override
void ls(Option_t *option="") const override
TObject * FindObject(const char *name) const override
virtual void Fatal(const char *method, const char *msgfmt,...) const
void Error(UserClass p, const char *location, const char *va_(fmt),...)
double dist(AxisAngle const &r1, AxisAngle const &r2)
Double_t Min(Double_t a, Double_t b)
Double_t Sqrt(Double_t x)
Double_t Max(Double_t a, Double_t b)