KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVIDCsIRLLine.cpp
1/***************************************************************************
2$Id: KVIDCsIRLLine.cpp,v 1.6 2009/03/03 13:36:00 franklan Exp $
3 KVIDCsIRLLine.cpp - description
4 -------------------
5 begin : Nov 10 2004
6 copyright : (C) 2004 by J.D. Frankland
7 email : frankland@ganil.fr
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#include "KVIDCsIRLLine.h"
20#include "Riostream.h"
21
22using namespace std;
23
25
26
27
29
31{
32 //Default ctor
33}
34
35
36
39
41 : KVIDZALine()
42{
43 // copy constructor
44 obj.Copy(*this);
45}
46
47
50
52{
53 //Default dtor
54}
55
56
57
58
63
65{
66 //Used to sort lists of KVIDCsIRLLines.
67 //Sorts the lines as a function of increasing Z, then increasing A
68 //but 8Be is between 6He and 6Li
69
70 int zline1 = GetZ();
71 int zline2 =
72 const_cast < KVIDZALine* >(static_cast <
73 const KVIDZALine* >(obj))->GetZ();
74 int aline1 = GetA();
75 int aline2 =
76 const_cast < KVIDCsIRLLine* >(static_cast <
77 const KVIDCsIRLLine *
78 >(obj))->GetA();
79 //both same line ?
80 if (zline1 == zline2 && aline1 == aline2)
81 return 0;
82 //special case : 8Be. If one of the two lines is 8Be, special treatment
83 //all lines with Z<3 are below 8Be, all lines with Z>=3 are above 8Be
84 if (zline1 == 4 && aline1 == 8) {
85 if (zline2 < 3)
86 return 1;
87 else
88 return -1;
89 }
90 if (zline2 == 4 && aline2 == 8) {
91 if (zline1 < 3)
92 return -1;
93 else
94 return 1;
95 }
96 //standard sorting when neither line is 8be
97 return KVIDZALine::Compare(obj);
98}
99
100
101
102
109
111{
112 //Print out for line
113 //The optional "opt" string, if given, is printed in parentheses after the line's name
114 //This is used by KVIDGrid in order to show which lines are "ID" lines and which are
115 //"OK" lines (i.e. used to define an identifiable area in a data map).
116 //"Natural width" of line is given
117 cout << ClassName() << " : " << GetName() << "(" << opt << ")" << endl;
118 cout << "Natural Line Width : " << GetWidth() << endl;
120}
121
122
123
124
132
134{
135 //Set the natural width of the line depending on its asymptotic separation
136 //a gauche (d_l) and a droite (d_r) from a neighbouring line.
137 //This method is used by KVIDZGrid::CalculateLineWidths
138 //
139 //For lines in a CsI R-L grid, this is the minimum of
140 //three times the asymptotic distance a gauche & the asymptotic distance a droite.
141 SetWidth(TMath::Min(3.*d_l, d_r));
142}
143
144
int Int_t
double Double_t
const char Option_t
Base class for CsI R-L identification lines (A and Z identification).
Int_t Compare(const TObject *) const
virtual ~KVIDCsIRLLine()
Default dtor.
KVIDCsIRLLine()
Default ctor.
void Print(Option_t *opt="") const
virtual void SetAsymWidth(Double_t d_l, Double_t d_r)
Base class for identification ridge lines corresponding to different nuclear species.
Definition KVIDZALine.h:33
void Copy(TObject &obj) const
copy 'this' to 'obj'
void SetWidth(Double_t w)
Definition KVIDZALine.h:65
Double_t GetWidth() const
Definition KVIDZALine.h:61
virtual Int_t Compare(const TObject *) const
Definition KVIDZALine.h:85
virtual Int_t GetA() const
virtual Int_t GetZ() const
void Print(Option_t *chopt="") const override
const char * GetName() const override
virtual const char * ClassName() const
Double_t Min(Double_t a, Double_t b)
ClassImp(TPyArg)