KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVRTGIDManager Class Reference

Detailed Description

Run-dependant KVTGIDManager.

Created by KVClassFactory on Thu Oct 11 11:51:14 2012 Author: Guilain Ademard

As KVTGIDManager, this class handles a set of Tassan-Got functional-based identifications (KVTGID objects) for use by KVIDTelescope. However, it allows to load the identification functions associated to a given run. To do that, you can remove all identification functions loaded in the KVIDTelescopes (which inherits from KVRTGIDManager) with the method RemoveAllTGID(). Then use the static function SetIDFuncInTelescopes(run) to load the functions, which are valid for the given run, in the KVIDTelescope associated to these functions. See the following exemple:

TIter next_idt(gMultiDetArray->GetListOfIDTelescopes());
KVIDTelescope *idt = NULL;
KVRTGIDManager *rtgidm = NULL;
while ((idt = (KVIDTelescope *) next_idt()))
{
if(idt->InheritsFrom("KVRTGIDManager")){
rtgidm = (KVRTGIDManager *)idt->IsA()->DynamicCast(KVRTGIDManager::Class(),idt);
rtgidm->RemoveAllTGID();
}
}
Base class for all detectors or associations of detectors in array which can identify charged particl...
KVSeqCollection * GetListOfIDTelescopes() const
Run-dependant KVTGIDManager.
static void SetIDFuncInTelescopes(UInt_t run)
virtual void RemoveAllTGID()
Remove all identification objects of the local list.
const void * DynamicCast(const TClass *base, const void *obj, Bool_t up=kTRUE)
TClass * IsA() const override
virtual Bool_t InheritsFrom(const char *classname) const

Definition at line 38 of file KVRTGIDManager.h.

#include <KVRTGIDManager.h>

Inheritance diagram for KVRTGIDManager:

Public Member Functions

 KVRTGIDManager ()
 
virtual ~KVRTGIDManager ()
 
virtual void AddTGID (KVTGID *)
 
virtual KVTGIDGetTGID (const Char_t *idt_name, const Char_t *id_type, const Char_t *grid_type)
 
virtual void RemoveAllTGID ()
 Remove all identification objects of the local list.
 
virtual void RemoveTGID (const Char_t *name)
 Remove the identification object with name from the local list.
 
- Public Member Functions inherited from KVTGIDManager
 KVTGIDManager ()
 Default constructor.
 
virtual ~KVTGIDManager ()
 
Double_t GetIDmax () const
 
const KVListGetListOfIDFunctions () const
 
virtual Int_t GetStatus () const
 
virtual const Char_tGetStatusString (ETGIDMStatus s=kCurrentStatus) const
 
KVTGIDGetTGID (const Char_t *name)
 Retrieve the identification object with name.
 
virtual KVTGIDGridGetTGIDGrid (const Char_t *idt_name, const Char_t *id_type, const Char_t *grid_type, Double_t xmax, Double_t xmin=0., Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=100, Bool_t logscale=kFALSE)
 
virtual KVTGIDGridGetTGIDGrid (const Char_t *tgid_name, Double_t xmax, Double_t xmin=0., Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=100, Bool_t logscale=kFALSE)
 
virtual KVTGIDGridGetTGIDGrid (KVTGID *tgid, Double_t xmax, Double_t xmin=0., Int_t ID_min=0, Int_t ID_max=0, Int_t npoints=100, Bool_t logscale=kFALSE)
 
const Char_tGetTGIDName (const Char_t *idt_name, const Char_t *id_type, const Char_t *grid_type)
 
virtual Double_t IdentA (const Char_t *, Double_t, Double_t, Double_t &funLTG, const Char_t *grid_type, Int_t Z)
 
virtual Double_t IdentZ (const Char_t *, Double_t, Double_t, Double_t &funLTG, const Char_t *grid_type)
 
void SetStatus (ETGIDMStatus s)
 

Static Public Member Functions

static void AddTGIDToGlobalList (KVTGID *)
 ----— static methods -----------------------—//
 
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 Clear ()
 
static void DeleteTGID (const Char_t *name)
 
static KVListGetGlobalListOfIDFunctions ()
 
static TCollectionGetIDTelescopesForTGID (KVTGID *)
 
static Bool_t GetTGIDfromIDGridManager (TList *tgid_list)
 
static Bool_t ReadAsciiFile (const Char_t *filename)
 
static void SetIDFuncInTelescopes (UInt_t run)
 
static Int_t UpdateListFromIDGridManager ()
 
static Int_t WriteAsciiFile (const Char_t *filename, const TCollection *selection=0, Bool_t update=kTRUE)
 

Private Member Functions

virtual void SetTGID (KVTGID *)
 Add an identification object to the local list (fIDList).
 

Static Private Attributes

static KVListfIDGlobalList = NULL
 Global list of TGID of all the KVRTGIDManager.
 

Additional Inherited Members

- Public Types inherited from KVTGIDManager
enum  ETGIDMStatus {
  kStatus_OK , kStatus_noTGID , kStatus_OutOfIDRange , kStatus_ZtooSmall ,
  kStatus_ZtooLarge , kCurrentStatus
}
 status codes for IdentZ/IdentA More...
 

Constructor & Destructor Documentation

◆ KVRTGIDManager()

KVRTGIDManager::KVRTGIDManager ( )

Default constructor The list fIDList is not owner anymore. Now the identification function belong to fIDGlobalList, the list return by GetListOfIDFunctions() is not the owner of identification functions anymore.

Definition at line 27 of file KVRTGIDManager.cpp.

◆ ~KVRTGIDManager()

KVRTGIDManager::~KVRTGIDManager ( )
virtual

Destructor Remove the global list of identification functions if it is empty.

Definition at line 46 of file KVRTGIDManager.cpp.

Member Function Documentation

◆ AddTGID()

void KVRTGIDManager::AddTGID ( KVTGID _tgid)
virtual

Add an identification object to the global list (fIDGlobalList). The identification object is not added to the local list (fIDList) in this method anymore. To do that, see SetIDFunctionInTelescopes) This method just calls AddTGIDToGlobalList(KVTGID *);

Reimplemented from KVTGIDManager.

Definition at line 62 of file KVRTGIDManager.cpp.

◆ AddTGIDToGlobalList()

void KVRTGIDManager::AddTGIDToGlobalList ( KVTGID tgid)
static

----— static methods -----------------------—//

Add an identification object to the global list (fIDGlobalList).

Definition at line 273 of file KVRTGIDManager.cpp.

◆ BuildGridForAllTGID()

void KVRTGIDManager::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

Build a grid (KVTGIDGrid) for all the identification functions of the global list. The new grids are automatically loaded in gIDGridManager and are visible in the Grid Manager GUI. If a function is already associated to a grid then a new grid is not built. No grid is built for copies of KVTGID's made in the method ReadAsciiFile(...).

Inputs: idtype - type of the identification for which the grids will be built (CI-SI, SI-CSI, CI-CSI, SI75-SILI, ...). By default, all grids are built xmin xmax ID_min ID_max npoints logscale - see KVTGIDGrid::Generate(...)

Definition at line 306 of file KVRTGIDManager.cpp.

◆ Clear()

void KVRTGIDManager::Clear ( )
static

Delete the global list of identification objects. Since this list is owner then all listed identification objects are deleted.

Definition at line 381 of file KVRTGIDManager.cpp.

◆ DeleteTGID()

void KVRTGIDManager::DeleteTGID ( const Char_t name)
static

Definition at line 157 of file KVRTGIDManager.cpp.

◆ GetGlobalListOfIDFunctions()

static KVList * KVRTGIDManager::GetGlobalListOfIDFunctions ( )
inlinestatic

Definition at line 62 of file KVRTGIDManager.h.

◆ GetIDTelescopesForTGID()

TCollection * KVRTGIDManager::GetIDTelescopesForTGID ( KVTGID tgid)
static

Return TList of all ID telescopes for which fit is valid. Returns 0 if no telescopes are defined, or if gMultiDetArray object is not defined (we search for the telescopes using their name and gMultiDetArray->GetIDTelescope()). WARNING: DELETE this list after use !!!

Definition at line 522 of file KVRTGIDManager.cpp.

◆ GetTGID()

KVTGID * KVRTGIDManager::GetTGID ( const Char_t idt_name,
const Char_t id_type,
const Char_t grid_type 
)
virtual

Overrides the same method of KVTGIDManager. This method Retrieve the identification object using: id_type = type of identification ("Z", "A", "A_for_Z=3", etc.) grid_type = type of identification grid ("GG", "PG1", etc.) but the name of ID telescope is not used anymore because identification object can be associated to several ID telescopes. If any object is found then it returns the first:

Reimplemented from KVTGIDManager.

Definition at line 84 of file KVRTGIDManager.cpp.

◆ GetTGIDfromIDGridManager()

Bool_t KVRTGIDManager::GetTGIDfromIDGridManager ( TList tgid_list)
static

Fill a sublist of TGID found in object inheriting from KVTGIDGrid in gIDGridManager. Return kFALSE if gIDGridManager is not defined.

Definition at line 178 of file KVRTGIDManager.cpp.

◆ ReadAsciiFile()

Bool_t KVRTGIDManager::ReadAsciiFile ( const Char_t filename)
static

Read file, create KVTGID fits corresponding to information in file. Comment line beginning by '#' is skipped.

Definition at line 209 of file KVRTGIDManager.cpp.

◆ RemoveAllTGID()

void KVRTGIDManager::RemoveAllTGID ( )
virtual

Remove all identification objects of the local list.

Reimplemented from KVTGIDManager.

Definition at line 261 of file KVRTGIDManager.cpp.

◆ RemoveTGID()

void KVRTGIDManager::RemoveTGID ( const Char_t name)
virtual

Remove the identification object with name from the local list.

Reimplemented from KVTGIDManager.

Definition at line 136 of file KVRTGIDManager.cpp.

◆ SetIDFuncInTelescopes()

void KVRTGIDManager::SetIDFuncInTelescopes ( UInt_t  run)
static

For each identification function of the global list which is valid for this run, we add it in the associated telescope which have to inherits from KVTGIDManager and from a KVIDTelescope.

Definition at line 395 of file KVRTGIDManager.cpp.

◆ SetTGID()

void KVRTGIDManager::SetTGID ( KVTGID _tgid)
privatevirtual

Add an identification object to the local list (fIDList).

Definition at line 120 of file KVRTGIDManager.cpp.

◆ UpdateListFromIDGridManager()

Int_t KVRTGIDManager::UpdateListFromIDGridManager ( )
static

Returns the number of identification functions found in grids of gIDGridManager which were missing in the the global list and updates this list.

Definition at line 432 of file KVRTGIDManager.cpp.

◆ WriteAsciiFile()

Int_t KVRTGIDManager::WriteAsciiFile ( const Char_t filename,
const TCollection selection = 0,
Bool_t  update = kTRUE 
)
static

Write identification functions in file 'filename'. If selection=0 (default), write all grids. If update=true, call UpdateListFromIDGridManager() before writing If selection!=0, write only grids in list. Returns number of functions written in file.

Definition at line 468 of file KVRTGIDManager.cpp.

Member Data Documentation

◆ fIDGlobalList

KVList * KVRTGIDManager::fIDGlobalList = NULL
staticprivate

Global list of TGID of all the KVRTGIDManager.

Definition at line 41 of file KVRTGIDManager.h.