4#include "KVRTGIDManager.h"
7#include "KVIDGridManager.h"
8#include "KVMultiDetArray.h"
9#include "KVIDTelescope.h"
103 buff.
Form(
"_%s_%s", id_type, grid_type);
110 while ((tgid = (
KVTGID*)next())) {
112 if (
name.Contains(buff))
return tgid;
184 if (!gIDGridManager)
return kFALSE;
190 TIter next_g(grid_list);
193 while ((obj = next_g())) {
197 tgid_list->
Add(tgid);
216 if (!fitfile.good()) {
217 Error(
"KVRTGIDManager::ReadAsciiFile",
"File %s cannot be opened",
filename);
221 while (fitfile.good()) {
225 if (s.BeginsWith(
"#"))
continue;
226 if (s.BeginsWith(
"++")) {
231 cname.Remove(s.Index(
"::"));
233 if (cl && cl->InheritsFrom(
"KVTGID")) {
235 s.Remove(0, s.Index(
"::") + 2);
244 if (!
fit->GetZorA()) {
336 grid_list->Disconnect(
"Modified()", gm,
"Modified()");
341 Bool_t IDtypeOK = strcmp(idtype,
"");
343 while ((tgid = (
KVTGID*)next())) {
349 if (!idt_list)
continue;
352 if (strcmp(idtype, idt->
GetLabel()))
continue;
359 Warning(
"KVRTGIDManager::BuildGridForAllTGID",
"No grid built for %s (%s, %p) because it is a copy of %s (%s, %p)"
368 Info(
"KVRTGIDManager::BuildGridForAllTGID",
"grid built from its TGID function %s (%s, %p)"
371 if (grid_list) grid_list->Connect(
"Modified()",
"KVIDGridManager", gm,
"Modified()");
403 while ((tgid = (
KVTGID*)next())) {
409 TIter nextidt(lidtel);
413 while ((idt = nextidt())) {
415 Error(
"KVRTGIDManager::SetIDFuncInTelescopes",
"The IDtelescope %s does not inherit from KVRTGIDManager", idt->
GetName());
443 TIter next(&tgid_list);
446 while ((tgid = (
KVTGID*)next())) {
478 Warning(
"KVRTGIDManager::WriteAsciiFile",
"No listed identification functions to write");
483 if (!tgidfile.is_open()) {
484 Error(
"KVRTGIDManager::WriteAsciiFile",
"No write permission for file %s",
filename);
489 TIter next(list_tgid);
493 while ((tgid = (
KVTGID*)next())) {
500 Warning(
"KVRTGIDManager::WriteAsciiFile",
"The function %s (%s, %p) is not written because it is a copy of %s (%s, %p)"
506 Info(
"KVRTGIDManager::WriteAsciiFile",
"%s (%s, %p) saved", tgid->
GetName(), tgid->
ClassName(), tgid);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
const Char_t * GetLabel() const
void SetMassFormula(Int_t)
virtual void SetOnlyZId(Bool_t yes=kTRUE)
Handles a stock of identification grids to be used by one or more identification telescopes.
Extended TList class which owns its objects by default.
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
Run-dependant KVTGIDManager.
static void BuildGridForAllTGID(const Char_t *idtype="", Double_t xmin=0., Double_t xmax=4096., Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=50, Bool_t logscale=kTRUE)
static void SetIDFuncInTelescopes(UInt_t run)
virtual ~KVRTGIDManager()
static Int_t WriteAsciiFile(const Char_t *filename, const TCollection *selection=0, Bool_t update=kTRUE)
static Int_t UpdateListFromIDGridManager()
virtual KVTGID * GetTGID(const Char_t *idt_name, const Char_t *id_type, const Char_t *grid_type)
static TCollection * GetIDTelescopesForTGID(KVTGID *)
static Bool_t ReadAsciiFile(const Char_t *filename)
virtual void SetTGID(KVTGID *)
Add an identification object to the local list (fIDList).
virtual void RemoveTGID(const Char_t *name)
Remove the identification object with name from the local list.
virtual void AddTGID(KVTGID *)
static Bool_t GetTGIDfromIDGridManager(TList *tgid_list)
virtual void RemoveAllTGID()
Remove all identification objects of the local list.
static void DeleteTGID(const Char_t *name)
static KVList * fIDGlobalList
Global list of TGID of all the KVRTGIDManager.
static void AddTGIDToGlobalList(KVTGID *)
----— static methods -----------------------—//
virtual TObject * FindObject(const char *name) const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual void Clear(Option_t *option="")
virtual void SetCleanup(Bool_t enable=kTRUE)
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from list.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Grid representing result of fit.
virtual void Generate(Double_t xmax, Double_t xmin, Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=50, Bool_t logscale=kTRUE)
Double_t fID_max
maximum ID of all TGID objects
KVList fIDList
KVTGID objects for identifications.
virtual void AddTGID(KVTGID *)
Abstract base class for charged particle Z identfication using functionals developed by L....
Abstract base class for particle identfication using functionals developed by L. Tassan-Got (IPN Orsa...
const KVString & GetIDTelescopes() const
Bool_t IsValidForRun(Int_t run) const
Double_t GetIDmax() const
void WriteToAsciiFile(std::ofstream &) const
Write parameters of LTG fit in file.
static KVTGID * ReadFromAsciiFile(const Char_t *name, std::ifstream &)
Int_t GetMassFormula() const
const void * DynamicCast(const TClass *base, const void *obj, Bool_t up=kTRUE)
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
void SetTitle(const char *title="") override
TObject * FindObject(const char *name) const override
void Add(TObject *obj) override
const char * GetName() const override
const char * GetTitle() const override
virtual const char * GetName() const
virtual const char * ClassName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual TClass * IsA() const
virtual TObject * First() const=0
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, criterion, save_best, scheduler)
void update(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData, double factorWeightDecay, EnumRegularization regularization)
Double_t Max(Double_t a, Double_t b)