4 #include "KVZALineFinder.h" 
    5 #include "KVIdentificationResult.h" 
    6 #include "KVSpiderLine.h" 
    8 #include "KVIDZALine.h" 
    9 #include "KVIDGridEditor.h" 
   31    SetAList(
"1,4,7,9,11,12,14,16,19,21,23,25,27,29,31,34,37,40,41");
 
  127    fLinearHisto = 
new TH2F(
"fLinearHisto", 
"fLinearHisto", ebins, emin, emax, zbins, zmin, zmax);
 
  130    fConvertHisto = 
new TH2F(
"fConvertHisto", 
"fConvertHisto", ebins, emin, emax, zbins, zmin, zmax);
 
  134    Int_t events_read = 0;
 
  138          if (poids == 0) 
continue;
 
  147          Double_t weight = (kmax == 20 ? poids / 20. : 1.);
 
  148          for (
int k = 0; k < kmax; k++) {
 
  154                if (idr->
Aident) PID = (idr->
Z + 0.1 * (idr->
PID - 2. * idr->
Z));
 
  158             events_read += (
Int_t) poids;
 
  165             if (idr->
Aident) PID = (idr->
Z + 0.1 * (idr->
PID - 2. * idr->
Z));
 
  197    line->GetStartPoint(lX, lY);
 
  199    line->GetEndPoint(lX, lY);
 
  204    Int_t widthmax = (
Int_t)((xbmax - xbmin) * 1.0 / 30.);
 
  214    for (
int xx = xbmin; xx < xbmax; xx += 
width) {
 
  218       if ((yline > zz - 0.5) && (yline < zz + 0.5)) {
 
  219          if (i == 0) lasty = yline;
 
  249    line->GetStartPoint(lX, lY);
 
  251    line->GetEndPoint(lX, lY);
 
  267       Info(
"FindALine", 
"%d peack found...", nfound);
 
  268 #if ROOT_VERSION_CODE > ROOT_VERSION(5,99,01) 
  275       for (
int p = 0; 
p < nfound; 
p++) {
 
  277          if (ypeaks[
p] < 10) 
continue;
 
  283             Info(
"FindALine", 
"line found but I don't know why...");
 
  292       if (projey) 
delete projey;
 
  294    else Error(
"FindALine", 
"not starting bin indicated...");
 
  299    for (
int xx = startBin - 
width; xx > xbmin; xx -= 
width) {
 
  302 #if ROOT_VERSION_CODE > ROOT_VERSION(5,99,01) 
  309       for (
int p = 0; 
p < nfound; 
p++) {
 
  310          if (
p >= nLines + 1) 
continue;
 
  311          if (ypeaks[
p] < 5) 
continue;
 
  323       if (projey) 
delete projey;
 
  326    TIter nextli(&Lines);
 
  330    for (
int xx = startBin + 
width; xx <= xbmax - 
width / 2; xx += 
width) {
 
  333 #if ROOT_VERSION_CODE > ROOT_VERSION(5,99,01) 
  340       for (
int p = 0; 
p < nfound; 
p++) {
 
  341          if (
p >= nLines + 1) 
continue;
 
  342          if (ypeaks[
p] < 5) 
continue;
 
  354       if (projey) 
delete projey;
 
  371    double* yy = 
new double[nn];
 
  372    Int_t*    ii = 
new int[nn];
 
  373    for (
int i = 0; i < nn; i++) yy[i] = ((
KVSpiderLine*)Lines->
At(i))->GetY(0);
 
  378    for (
int i = 0; i < nn; i++) {
 
  379       if (ii[i] == 0) iMostProb = i;
 
  386    for (
int i = 0; i < nn; i++) {
 
  387       Int_t aa = aMostProb - (iMostProb - i);
 
  415       if ((spline->
GetN() > 5)) {
 
  419          for (
int i = 0; i < spline->
GetN(); i++) {
 
  427             if ((i > spline->
GetN() - 3) && (std::abs(
y - TheLine->
GetY()[TheLine->
GetN() - 1]) > 20)) 
continue;
 
  432          if (!TheZLine) 
continue;
 
  436          if ((x0 > 2.*x0ref) && (x0 < 0.15 * x1ref)) {
 
  438             for (
int i = 0; i <= TheZLine->
GetN(); i++) {
 
  450             for (
int i = TheZLine->
GetN() - 1; i > 0; i--) {
 
  526    Info(
"ProcessIdentification", 
"histo linearization using Z grid...");
 
  528    Info(
"ProcessIdentification", 
"linearization done!");
 
  534    for (
int z = zmin; z <= zmax; z++) {
 
  546    if (zmax >= zmGrid) 
return;
 
  548    for (
int z = zmax + 1; z <= zmGrid; z++) {
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char x1
 
R__EXTERN TRandom * gRandom
 
char * Form(const char *fmt,...)
 
R__EXTERN TSystem * gSystem
 
Base class for KaliVeda framework.
 
virtual void Copy(TObject &) const
Make a copy of this object.
 
void Add(TString, KVIDentifier *)
 
virtual void SetVarX(const char *v)
 
const TList * GetIDTelescopes() const
 
virtual void SetName(const char *name)
 
Int_t GetMassFormula() const
 
KVIDentifier * GetIdentifier(Int_t Z, Int_t A) const
 
virtual Bool_t IsIdentifiable(Double_t, Double_t, TString *rejected_by=nullptr) const
 
virtual void SetVarY(const char *v)
 
const Char_t * GetName() const
 
void AddIDTelescopes(const TList *)
Associate this graph with all ID telescopes in list.
 
const KVList * GetIdentifiers() const
 
void SetGrid(KVIDGraph *gg, Bool_t histo=true)
 
void StartViewer()
Close();.
 
Base class for lines/cuts used for particle identification in 2D data maps.
 
Identification grid with lines corresponding to different nuclear isotopes (KVIDZALine)
 
virtual void Identify(Double_t x, Double_t y, KVIdentificationResult *) const
 
Base class for identification ridge lines corresponding to different nuclear species.
 
Base class for graphical cuts used in particle identification.
 
virtual Int_t GetZ() const
 
virtual void SetA(Int_t atnum)
 
virtual void SetZ(Int_t ztnum)
 
Full result of one attempted particle 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 Z
Z of particle found (if Zident==kTRUE)
 
Description of properties and kinematics of atomic nuclei.
 
void SetZandA(Int_t z, Int_t a)
Set atomic number and mass number.
 
static Int_t GetAFromZ(Double_t, Char_t mt)
 
Double_t GetLifeTime(Int_t z=-1, Int_t a=-1) const
 
Strings used to represent a set of ranges of values.
 
virtual TObject * Last() const
 
virtual TObject * First() const
 
Part of Spider Identification.
 
void Sort(bool ascending_=true)
 
double GetX(int n_) const
 
double GetY(int n_) const
 
bool AddPoint(double x_, double y_, bool test_=false, int n_=-1)
 
(try to) find mass lines from charge lines
 
void FindALine(Int_t zz, Int_t width=10)
 
TH2 * LinearizeHisto(Int_t nZbin=40)
 
void IncrementLinear(Float_t x)
 
void Copy(TObject &) const
 
std::vector< int > fAList
 
virtual ~KVZALineFinder()
Destructor.
 
void SetAList(const char *Alist)
 
void SortLines(TList *Lines)
 
void Increment(Float_t x)
 
void ProcessIdentification(Int_t zmin=-1, Int_t zmax=-1)
 
KVZALineFinder(KVIDZAGrid *gg, TH2 *hh)
constructor
 
KVIDZAGrid * fGeneratedGrid
 
virtual void SetMarkerStyle(Style_t mstyle=1)
 
virtual Int_t FindBin(const char *label)
 
virtual Double_t GetBinCenter(Int_t bin) const
 
virtual Double_t GetBinWidth(Int_t bin) const
 
virtual void AddAll(const TCollection *col)
 
virtual Int_t GetSize() const
 
const char * GetVarX() const
 
const char * GetVarY() const
 
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
 
static Bool_t CompareX(const TGraph *gr, Int_t left, Int_t right)
 
virtual void Sort(Bool_t(*greater)(const TGraph *, Int_t, Int_t)=&TGraph::CompareX, Bool_t ascending=kTRUE, Int_t low=0, Int_t high=-1111)
 
virtual Double_t Eval(Double_t x, TSpline *spline=nullptr, Option_t *option="") const
 
virtual Double_t GetBinCenter(Int_t bin) const
 
virtual Int_t GetNbinsY() const
 
virtual Double_t GetMean(Int_t axis=1) const
 
virtual Int_t GetNbinsX() const
 
virtual Int_t GetMaximumBin() const
 
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
 
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
 
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
 
virtual Int_t Fill(const char *namex, const char *namey, Double_t w)
 
void SetBinContent(Int_t bin, Double_t content) override
 
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
 
virtual Double_t GetBinContent(Int_t bin) const
 
void AddLast(TObject *obj) override
 
TObject * Remove(const TObjLinkPtr_t &lnk)
 
TObject * At(Int_t idx) const override
 
virtual void Error(const char *method, const char *msgfmt,...) const
 
virtual void Info(const char *method, const char *msgfmt,...) const
 
virtual Double_t Uniform(Double_t x1, Double_t x2)
 
Double_t * GetPositionY() const
 
virtual Int_t Search(const TH1 *hist, Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
 
Double_t * GetPositionX() const
 
virtual Bool_t ProcessEvents()
 
Double_t Min(Double_t a, Double_t b)
 
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
 
Double_t Max(Double_t a, Double_t b)