44 KVIDZAGrid::~KVIDZAGrid()
58 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
66 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
112 gROOT->ProcessLine(
"if(gROOT->FindObject(\"gIDGridEditorCanvas\")) gIDGridEditor->Clear()");
122 TIter next_id(tmplist);
168 UInt_t idx_max = nlines - 1;
173 while (idx_max > idx_min + 1) {
187 idx += (
Int_t)((idx_max - idx) / 2 + 0.5);
192 idx -= (
Int_t)((idx - idx_min) / 2 + 0.5);
197 if (
line->GetZ() == z) {
202 if (
line->GetZ() == z) {
233 if (
line->GetA() ==
a) {
238 if (
a >
line->GetA()) {
241 if (
line->GetZ() != z)
243 if (
line->GetA() ==
a) {
251 else if (a < line->GetA()) {
252 for (
int i = idx; i > 0; i--) {
254 if (
line->GetZ() != z)
256 if (
line->GetA() ==
a) {
346 i_other = (Zhi > -1 ? i + 1 : (Zlo > -1 ? i - 1 : -1));
350 i_other = (Zhi == Z ? i + 1 : (Zlo == Z ? i - 1 : -1));
353 i_other = (Zhi > -1 ? i + 1 : (Zlo > -1 ? i - 1 : -1));
477 if (!
gPad->GetListOfPrimitives()->GetSize()) {
486 line->GetLineWithWidth()->
Draw(
"3PL");
603 Error(
"FindFourEmbracingLines",
604 "I do not understand the result of FindNearestEmbracingIDLine!!!");
858 else if (
kinf > -1) {
921 dt = -(y1 + y2) /
dist;
928 else if (ix2 == -ix1 * 2) {
930 if (tmp > 0 &&
dist != 0) {
931 dt = -(y1 + 2. * y2 -
939 else if (ix1 == -ix2 * 2) {
941 if (tmp > 0 &&
dist != 0) {
942 dt = -(y2 + 2. * y1 +
954 deltaA = yy * ix2 / y2 / 2.;
960 if (
dist > -1. && dt * yy > -1.)
979 if (nextline->
GetZ() == Z
980 && !((
KVIDLine*)nextline)->IsBetweenEndPoints(
x,
y,
"x")) {
992 if (idx > -1 && --idx >= 0) {
994 if (nextline->
GetZ() == Z
995 && !((
KVIDLine*)nextline)->IsBetweenEndPoints(
x,
y,
"x")) {
1199 else if (
kinf > -1) {
1260 dt = -(y1 + y2) /
dist;
1267 else if (ix2 == -ix1 * 2) {
1269 if (tmp > 0. &&
dist != 0) {
1270 dt = -(y1 + 2. * y2 -
1278 else if (ix1 == -ix2 * 2) {
1280 if (tmp > 0. &&
dist != 0) {
1281 dt = -(y2 + 2. * y1 +
1293 deltaZ = yy * ix2 / y2 / 2.;
1299 if (
dist > -1. && dt * yy > -1.)
1332 if (idx > -1 && --idx >= 0) {
1409 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
1431 idr->
SetComment(
"slight ambiguity of Z, which could be larger");
1434 idr->
SetComment(
"slight ambiguity of Z, which could be smaller");
1437 idr->
SetComment(
"slight ambiguity of Z, which could be larger or smaller");
1440 idr->
SetComment(
"point is in between two lines of different Z, too far from either to be considered well-identified");
1443 idr->
SetComment(
"point is in between two lines of different Z, too far from either to be considered well-identified");
1446 idr->
SetComment(
"(x,y) is below first line in grid");
1449 idr->
SetComment(
"(x,y) is above last line in grid");
1452 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
1477 idr->
SetComment(
"slight ambiguity of A, which could be larger");
1480 idr->
SetComment(
"slight ambiguity of A, which could be smaller");
1483 idr->
SetComment(
"slight ambiguity of A, which could be larger or smaller");
1486 idr->
SetComment(
"point is in between two isotopes of different Z, too far from either to be considered well-identified");
1489 idr->
SetComment(
"point is in between two isotopes of different Z, too far from either to be considered well-identified");
1492 idr->
SetComment(
"(x,y) is below first line in grid");
1495 idr->
SetComment(
"(x,y) is above last line in grid");
1498 idr->
SetComment(
"no identification: (x,y) out of range covered by grid");
1535 void KVIDZAGrid::Streamer(
TBuffer& R__b)
1545 Warning(
"Streamer",
"Reading KVIDZGrid with version=%d", R__v);
1547 KVIDGrid::Streamer(R__b);
1686 if (!graph_class) graph_class = IsA();
1688 Error(
"MakeSubsetGraph",
"Called with graph class %s, does not derive from KVIDGraph",
1734 if (
l->GetZ() >= Zmin &&
l->GetZ() <= Zmax) lines->
Add(
l);
1758 void KVIDZGrid::Streamer(
TBuffer& R__b)
1766 Warning(
"Streamer",
"Reading KVIDZGrid with version=%d", R__v);
1768 KVIDGrid::Streamer(R__b);
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Base class for particle identification in a 2D map.
virtual void SetVarX(const char *v)
void RemoveIdentifier(KVIDentifier *)
Remove and destroy identifier.
void Draw(Option_t *opt="")
Int_t GetNumberOfIdentifiers() const
virtual void Copy(TObject &) const
virtual void Browse(TBrowser* b);
Int_t GetMassFormula() const
KVList * fIdentifiers
list of identification objects
KVIDentifier * GetIdentifierAt(Int_t index) const
const KVNumberList & GetRuns() const
void FindAxisLimits()
Calculate X/Y min/max of all objects in graph.
virtual void SetVarY(const char *v)
void SetMassFormula(Int_t)
const Char_t * GetName() const
TList fTelescopes
ID telescopes for which grid is valid.
void AddIDTelescopes(const TList *)
Associate this graph with all ID telescopes in list.
virtual void AddIdentifier(KVIDentifier *id)
virtual void SetInfos(Double_t, Double_t, KVIdentificationResult *) const
loop over KVIDGraph::fInfoZones to set flags in KVIdentificationResult
KVNameValueList * GetParameters() const
void SetRuns(const KVNumberList &nl)
Set list of runs for which grid is valid.
KVList * GetIdentifiers() const
virtual void SetOnlyZId(Bool_t yes=kTRUE)
KVIDLine * FindNearestEmbracingIDLine(Double_t x, Double_t y, const Char_t *position, const Char_t *axis, Int_t &idx, Int_t &idx_min, Int_t &idx_max, Double_t &dist, Double_t &dist_min, Double_t &dist_max) const
KVIDLine * FindNextEmbracingLine(Int_t &index, Int_t inc_index, Double_t x, Double_t y, const Char_t *axis) const
Base class for lines/cuts used for particle identification in 2D data maps.
Double_t DistanceToLine(Double_t px, Double_t py, Int_t &)
void GetStartPoint(Double_t &x, Double_t &y) const
Bool_t IsBetweenEndPoints(Double_t x, Double_t y, const Char_t *axis="") const
void GetEndPoint(Double_t &x, Double_t &y) const
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
Double_t fDistanceClosest
distance from point to closest line
virtual void CalculateLineWidths()
void init()
initialisation
KVIDLine * fClosest
closest line to last-identified point
void ReCheckQuality(Int_t &Z, Double_t &A)
virtual KVIDZALine * GetZLine(Int_t z, Int_t &) const
virtual void Copy(TObject &) const
Copy this to 'obj'.
void DrawLinesWithWidth()
void RemoveZLines(const Char_t *ZList)
Remove and destroy identifiers.
virtual void IdentZ(Double_t x, Double_t y, Double_t &Z)
virtual void Identify(Double_t x, Double_t y, KVIdentificationResult *) const
KVIDZALine * fZMaxLine
line with biggest Z and A
Int_t ksups
used by IdentZA and IdentZ
virtual void Initialize()
UShort_t fZMax
largest Z of lines in grid
KVIDZAGrid()
default ctor.
virtual void IdentZA(Double_t x, Double_t y, Int_t &Z, Double_t &A)
Int_t fIdxClosest
index of closest line in main list fIdentifiers
Int_t fICode
code de retour
Int_t Zint
Z of line used to identify particle.
void SetManualWidth(Double_t manual_width=.3, Double_t manual_width_scaling=0.05)
KVIDGraph * MakeSubsetGraph(Int_t Zmin, Int_t Zmax, const Char_t *="")
virtual void MakeEDeltaEZGrid(Int_t Zmin, Int_t Zmax, Int_t npoints=20, Double_t gamma = 2);//*MENU*
virtual Bool_t FindFourEmbracingLines(Double_t x, Double_t y, const Char_t *position)
Int_t Aint
mass of line used to identify particle
void RemoveLine(Int_t Z, Int_t A=-1)
Remove and destroy identifier.
virtual KVIDZALine * GetZALine(Int_t z, Int_t a, Int_t &) const
Base class for identification ridge lines corresponding to different nuclear species.
virtual void SetAsymWidth(Double_t d_l, Double_t d_r)
void SetWidth(Double_t w)
Base class for graphical cuts used in particle identification.
virtual Int_t GetA() const
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.
Double_t GetDoubleValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
Description of properties and kinematics of atomic nuclei.
Double_t GetLifeTime(Int_t z=-1, Int_t a=-1) const
Strings used to represent a set of ranges of values.
KVSeqCollection * GetSubListWithMethod(const Char_t *retvalue, const Char_t *method) const
virtual TObject * Last() const
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
Bool_t InheritsFrom(const char *cl) const
const char * GetVarY() const
const char * GetVarX() const
virtual void Add(TObject *obj)
virtual void Clear(Option_t *option="")
virtual const char * GetName() const
virtual TObject * Clone(const char *newname="") const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Draw(Option_t *option="")
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)