KaliVeda
Toolkit for HIC analysis
|
Base class for all global variable implementations.
Abstract base class for the management of global variables.
A global variable is an analysis tool for condensing the information in a multibody event into one or a few characteristic values. A simple example is the event multiplicity (the number of particles in each event), which can be used to characterize heavy-ion collision events in terms of violence or centrality.
In KaliVeda, the base class for a multibody event is KVEvent, which is basically a collection of nuclei (base class KVNucleus). Therefore the global variable classes below can be used with any event described by a class derived from KVEvent, containing particles described by a class which inherits from KVNucleus.
Each global variable class implements the calculation of a given observable for any set of nuclei; this is done independently of the selection of the nuclei in the set, or in what reference frame kinematics should be calculated for either selection purposes or for the calculation of the observable. The way the observable is calculated is defined by the implementation of the fill(const KVNucleus*) (for 1-body observables: see below) and Calculate() methods.
Global variables can be of different types:
KVVarGlob::kOneBody
)KVVarGlob::kTwoBody
)KVVarGlob::kNBody
)Derived global variable classes of 2-body or N-body type must set the fType
member variable to the appropriate type (kTwoBody
or kNBody
) and define the fill2(const KVNucleus*,const KVNucleus*) method (for 2-body variables) or the fillN(KVEvent*) method (for N-body variables).
This is handled semi-automatically when using method
to generate a skeleton '.h' and '.cpp' file for the implementation of a new global variable class.
By default, global variables are 1-body and must define the fill(const KVNucleus*) method.
In addition, implementations in daughter classes must define the following methods:
Note that although the Fill() method is called for all particles, only those which satsify the conditions given to SetSelection() will be used to calculate the variable. Also, the internal fill(const KVNucleus*) etc. methods of each global variable class actually receive a pointer to each nucleus with as default kinematics those of the frame chosen with SetFrame().
The KVGVList class handles a list of global variables. The recommended way to use global variables is through a list of this type (even if only one). The user analysis classes derived from KVEventSelector all have an internal KVGVList for definition and calculation of global variables. See KVGVList and KVEventSelector class documentation for more details.
The selection of particles which are taken into account is handled by the variable itself by calling method SetSelection().
To change the reference frame used by the variable to calculate kinematical properties of particles (including those used for particle selection), call method SetFrame() (see KVEvent::SetFrame() and KVParticle::GetFrame() for how to define and access different frames).
In order to give greater flexibility to global variable classes without the need to add member variables and the associated Get/Set methods, we provide methods to handle generic 'options' and 'parameters' for all variables.
An 'option' is a name-value pair, the value is a character string. Methods to use are:
A 'parameter' is a name-value pair, the value is a double-precision float value. Methods to use are:
The value(s) returned by the variable will all be divided by the normalization factor set with one of the following methods:
When used in a KVGVList of global variables, conditions ('cuts') can be set on each variable which decide whether or not to retain an event for analysis. If any variable in the list fails the test, processing of the list is abandoned.
Selection criteria are set using lambda expressions. In this example, the variable "mtot" must have a value of at least 4 for the event to be retained:
Any event selection criterion is tested as soon as each variable has been calculated. If the test fails, no further variables are calculated and the KVGVList goes into 'abort event' mode:
This mechanism is implemented in KVEventSelector, i.e. in all user analysis classes.
When used in a KVGVList of global variables, a variable can be used to define a new kinematical frame which can in turn be used by any variables which occur after them in the list. In order to do so, call method SetNewFrameDefinition() with a lambda function having the following signature:
When called (e.g. by KVGVList), the KVVarGlob pointer gives access to the global variable.
As an example of use, imagine that KVZmax is used to find the heaviest (largest Z) fragment in the forward CM hemisphere, then the velocity of this fragment is used to define a "QP_FRAME" in order to calculate the KVFlowTensor in this frame:
Each global variable can be used to 'tag' the particles which are used for its calculation, i.e. those which satisfy the selection criteria set with SetSelection(). Each particle will be added to a group which can be subsequently used for iteration (see Iterating over nuclei). By default, the group name will be the same as the global variable, but can be changed by giving an argument to the SetDefineGroup() method:
Definition at line 233 of file KVVarGlob.h.
#include <KVVarGlob.h>
Public Types | |
enum | { kOneBody , kTwoBody , kNBody } |
Public Types inherited from KVBase | |
enum | EKaliVedaBits { kIsKaliVedaObject = BIT(23) } |
Public Types inherited from TObject | |
enum | EDeprecatedStatusBits |
enum | EStatusBits |
Public Member Functions | |
KVVarGlob () | |
KVVarGlob (const Char_t *nom) | |
virtual | ~KVVarGlob (void) |
void | AddSelection (const KVParticleCondition &sel) |
Double_t | AsDouble () const |
virtual void | Calculate ()=0 |
void | Copy (TObject &obj) const |
void | DefineNewFrame (KVEvent *e) const |
void | Fill (const KVNucleus *c) |
void | Fill2 (const KVNucleus *n1, const KVNucleus *n2) |
virtual void | FillN (const KVEvent *) |
const TString & | GetFrame () const |
Int_t | GetNameIndex (const Char_t *name) const |
Double_t | GetNormalization () const |
Int_t | GetNumberOfBranches () const |
virtual Int_t | GetNumberOfValues () const |
TString | GetOptionString (const Char_t *opt) const |
Double_t | GetParameter (const Char_t *par) const |
Double_t | GetValue (const Char_t *name) const |
Double_t | GetValue (Int_t i) const |
Double_t | GetValue (void) const |
virtual TString | GetValueName (Int_t i) const |
const KVNameValueList & | GetValueNameList () const |
virtual Char_t | GetValueType (Int_t) const |
virtual std::vector< Double_t > | GetValueVector (void) const |
Bool_t | HasValue (const Char_t *name) const |
virtual void | Init ()=0 |
bool | IsDefiningNewFrame () const |
virtual Bool_t | IsGlobalVariable () const |
Bool_t | IsNBody () const |
Bool_t | IsOneBody () const |
Bool_t | IsOptionGiven (const Char_t *opt) |
Bool_t | IsParameterSet (const Char_t *par) |
bool | IsSelectingEvents () const |
Bool_t | IsTwoBody () const |
void | ListInit () |
operator double () const | |
Double_t | operator() (const Char_t *name) const |
Double_t | operator() (Int_t i) const |
Double_t | operator() (void) const |
void | Print (Option_t *="") const |
virtual void | Reset ()=0 |
void | SetDefineGroup (const KVString &groupname="") |
void | SetEventSelection (const EventSelector &f) |
void | SetFrame (const Char_t *ref) |
void | SetMaxNumBranches (Int_t n) |
void | SetNewFrameDefinition (const FrameSetter &f) |
virtual void | SetNormalization (Double_t norm) |
void | SetOption (const Char_t *option, const Char_t *value) |
void | SetParameter (const Char_t *par, Double_t value) |
void | SetSelection (const KVParticleCondition &sel) |
bool | TestEventSelection () const |
void | UnsetOption (const Char_t *opt) |
void | UnsetParameter (const Char_t *par) |
Public Member Functions inherited from KVBase | |
KVBase () | |
Default constructor. | |
KVBase (const Char_t *name, const Char_t *title="") | |
Ctor for object with given name and type. | |
KVBase (const KVBase &) | |
copy ctor | |
virtual | ~KVBase () |
virtual void | Clear (Option_t *opt="") |
Clear object properties : name, type/title, number, label. | |
const Char_t * | GetLabel () const |
UInt_t | GetNumber () const |
UInt_t | GetNumberOfObjects () const |
virtual TObject * | GetObject () const |
virtual const Char_t * | GetType () const |
Bool_t | HasLabel () const |
virtual Bool_t | IsCalled (const Char_t *name) const |
Bool_t | IsLabelled (const Char_t *l) const |
virtual Bool_t | IsType (const Char_t *typ) const |
virtual void | List () |
KVBase & | operator= (const KVBase &) |
copy assignment operator | |
Double_t | ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) const |
void | SetLabel (const Char_t *lab) |
virtual void | SetNumber (UInt_t num) |
virtual void | SetType (const Char_t *str) |
Public Member Functions inherited from TNamed | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TNamed &named) | |
TNamed (const TString &name, const TString &title) | |
virtual | ~TNamed () |
void | Clear (Option_t *option="") override |
TObject * | Clone (const char *newname="") const override |
Int_t | Compare (const TObject *obj) const override |
void | Copy (TObject &named) const override |
virtual void | FillBuffer (char *&buffer) |
const char * | GetName () const override |
const char * | GetTitle () const override |
ULong_t | Hash () const override |
TClass * | IsA () const override |
Bool_t | IsSortable () const override |
void | ls (Option_t *option="") const override |
TNamed & | operator= (const TNamed &rhs) |
void | Print (Option_t *option="") const override |
virtual void | SetName (const char *name) |
virtual void | SetNameTitle (const char *name, const char *title) |
virtual void | SetTitle (const char *title="") |
virtual Int_t | Sizeof () const |
void | Streamer (TBuffer &) override |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TObject | |
TObject () | |
TObject (const TObject &object) | |
virtual | ~TObject () |
void | AbstractMethod (const char *method) const |
virtual void | AppendPad (Option_t *option="") |
virtual void | Browse (TBrowser *b) |
ULong_t | CheckedHash () |
virtual const char * | ClassName () const |
virtual void | Delete (Option_t *option="") |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
virtual void | Draw (Option_t *option="") |
virtual void | DrawClass () const |
virtual TObject * | DrawClone (Option_t *option="") const |
virtual void | Dump () const |
virtual void | Error (const char *method, const char *msgfmt,...) const |
virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
virtual TObject * | FindObject (const char *name) const |
virtual TObject * | FindObject (const TObject *obj) const |
virtual Option_t * | GetDrawOption () const |
virtual const char * | GetIconName () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
virtual Option_t * | GetOption () const |
virtual UInt_t | GetUniqueID () const |
virtual Bool_t | HandleTimer (TTimer *timer) |
Bool_t | HasInconsistentHash () const |
virtual void | Info (const char *method, const char *msgfmt,...) const |
virtual Bool_t | InheritsFrom (const char *classname) const |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
virtual void | Inspect () const |
void | InvertBit (UInt_t f) |
Bool_t | IsDestructed () const |
virtual Bool_t | IsEqual (const TObject *obj) const |
virtual Bool_t | IsFolder () const |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
R__ALWAYS_INLINE Bool_t | IsZombie () const |
void | MayNotUse (const char *method) const |
virtual Bool_t | Notify () |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *vp) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, void *vp) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
virtual void | Paint (Option_t *option="") |
virtual void | Pop () |
virtual Int_t | Read (const char *name) |
virtual void | RecursiveRemove (TObject *obj) |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
void | SetBit (UInt_t f) |
void | SetBit (UInt_t f, Bool_t set) |
virtual void | SetDrawOption (Option_t *option="") |
virtual void | SetUniqueID (UInt_t uid) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | UseCurrentStyle () |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
Static Public Member Functions | |
static void | MakeClass (const Char_t *classname, const Char_t *classdesc, int type=kOneBody) |
Static Public Member Functions inherited from KVBase | |
static Bool_t | AreEqual (Double_t x, Double_t y, Long64_t maxdif=1) |
Comparison between two 64-bit floating-point values. | |
static void | BackupFileWithDate (const Char_t *path) |
static void | CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE) |
static void | Deprecated (const char *method, const char *advice) |
static Bool_t | FindClassSourceFiles (const Char_t *class_name, KVString &imp_file, KVString &dec_file, const Char_t *dir_name=".") |
static Bool_t | FindExecutable (TString &exec, const Char_t *path="$(PATH)") |
static const Char_t * | FindFile (const Char_t *search, TString &wfil) |
static const Char_t * | GetBINDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetDATABASEFilePath () |
static const Char_t * | GetDATADIRFilePath (const Char_t *namefile="") |
static Bool_t | GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval) |
static const Char_t * | GetDataSetEnv (const Char_t *dataset, const Char_t *type, const Char_t *defval) |
static Double_t | GetDataSetEnv (const Char_t *dataset, const Char_t *type, Double_t defval) |
static const Char_t * | GetETCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetExampleFilePath (const Char_t *library, const Char_t *namefile) |
Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) | |
static const Char_t * | GetINCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetKVBuildDate () |
Returns KaliVeda build date. | |
static const Char_t * | GetKVBuildDir () |
Returns top-level directory used for build. | |
static const Char_t * | GetKVBuildTime () |
Returns KaliVeda build time. | |
static const Char_t * | GetKVBuildType () |
Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) | |
static const Char_t * | GetKVBuildUser () |
Returns username of person who performed build. | |
static const Char_t * | GetKVSourceDir () |
Returns top-level directory of source tree used for build. | |
static const Char_t * | GetKVVersion () |
Returns KaliVeda version string. | |
static const Char_t * | GetLIBDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetListOfPlugins (const Char_t *base) |
static const Char_t * | GetListOfPluginURIs (const Char_t *base) |
static const Char_t * | GetPluginURI (const Char_t *base, const Char_t *plugin) |
static void | GetTempFileName (TString &base) |
static const Char_t * | GetTEMPLATEDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetWORKDIRFilePath (const Char_t *namefile="") |
static const Char_t * | gitBranch () |
Returns git branch of sources. | |
static const Char_t * | gitCommit () |
Returns last git commit of sources. | |
static void | InitEnvironment () |
static bool | is_gnuinstall () |
static Bool_t | IsThisAPlugin (const TString &uri, TString &base) |
static TPluginHandler * | LoadPlugin (const Char_t *base, const Char_t *uri="0") |
static Bool_t | OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="") |
static void | OpenTempFile (TString &base, std::ofstream &fp) |
static void | PrintSplashScreen () |
Prints welcome message and infos on version etc. | |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="") |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0) |
static Bool_t | SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="") |
static const Char_t * | WorkingDirectory () |
Static Public Member Functions inherited from TNamed | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Private Types | |
using | EventSelector = std::function< bool(const KVVarGlob *)> |
using | FrameSetter = std::function< void(KVEvent *, const KVVarGlob *)> |
Private Member Functions | |
void | ClearNameIndex () |
virtual void | fill (const KVNucleus *) |
virtual void | fill2 (const KVNucleus *, const KVNucleus *) |
int | GetIndexAtListPosition (int pos) const |
TString | GetNameAtListPosition (int pos) const |
KVNameValueList & | GetParameters () |
const KVNameValueList & | GetParameters () const |
virtual Double_t | getvalue_char (const Char_t *name) const |
virtual Double_t | getvalue_int (Int_t) const =0 |
virtual Double_t | getvalue_void () const |
void | init () |
void | SetNameIndex (const Char_t *name, Int_t index) |
Static Private Member Functions | |
static void | AddExtraInitMethodComment (KVClassFactory &cf, KVString &body) |
static void | AddFillMethod (KVClassFactory &cf, int type) |
static void | AddFillMethodBody (KVClassFactory &cf, KVString &body, int type) |
static void | AddInitMethod (KVClassFactory &cf, KVString &body) |
static void | FillMethodBody (KVString &body, int type) |
static void | ImplementInitMethod (KVClassFactory &cf, KVString &body, int type) |
Private Attributes | |
Bool_t | fDefineGroupFromSelection {kFALSE} |
EventSelector | fEventSelector |
used to select events in analysis based on value of variable | |
KVString | fFrame |
(optional) name of reference frame used for kinematics | |
FrameSetter | fFrameSetter |
used to define a new kinematical frame for event based on variable | |
Bool_t | fIsInitialized |
flag set after initialisation | |
Int_t | fMaxNumBranches |
max number of branches to create for multi-valued variable | |
Double_t | fNormalization |
optional normalization parameter | |
KVNameValueList | fOptions |
list of options | |
KVNameValueList | fParameters |
list of parameters | |
KVParticleCondition | fSelection |
(optional) condition used to select particles | |
Int_t | fType |
type of variable global; = kOneBody, kTwoBody or kNBody | |
Char_t | fValueType |
type (='I' integer or 'D' double) of global variable value | |
KVNameValueList | nameList |
correspondence between variable name and index | |
Additional Inherited Members | |
Public Attributes inherited from TObject | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Protected Attributes inherited from TNamed | |
TString | fName |
TString | fTitle |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
|
private |
Definition at line 256 of file KVVarGlob.h.
|
private |
Definition at line 258 of file KVVarGlob.h.
anonymous enum |
Enumerator | |
---|---|
kOneBody | |
kTwoBody | |
kNBody |
Definition at line 236 of file KVVarGlob.h.
|
inline |
Definition at line 334 of file KVVarGlob.h.
|
inline |
Definition at line 339 of file KVVarGlob.h.
|
inlinevirtual |
Definition at line 366 of file KVVarGlob.h.
|
staticprivate |
Definition at line 130 of file KVVarGlob.cpp.
|
staticprivate |
PRIVATE method used by MakeClass. add 'Fill', 'Fill2', or 'FillN' method
Definition at line 164 of file KVVarGlob.cpp.
|
staticprivate |
PRIVATE method used by MakeClass. add body of fill method
Definition at line 191 of file KVVarGlob.cpp.
|
staticprivate |
PRIVATE method used by MakeClass. add 'init' method
Definition at line 148 of file KVVarGlob.cpp.
|
inline |
Use this method to add a condition which will be applied to select particles to contribute to the global variable.
The final selection will be a logical 'AND' between any previously set conditions and this one
Definition at line 616 of file KVVarGlob.h.
|
inline |
Definition at line 629 of file KVVarGlob.h.
|
pure virtual |
Implemented in KVCaloBase, KVCalorimetry, KVDirectivity, KVDummyGV, KVEventClassifier, KVEventParameter, KVFlowTensor, KVFoxH2, KVRiso, KVSource, KVSubEventMaker, KVVarGlobMean, KVVGVectorSum, and KVZmax.
|
inlineprivate |
Delete previously defined associations between variable name and index
Definition at line 269 of file KVVarGlob.h.
Copy this to obj
Reimplemented from KVBase.
Reimplemented in KVVarGlob1, KVVarGlobMean, KVVGObjectSum< SumObject >, KVVGObjectSum< KVNucleus >, KVVGObjectSum< TVector3 >, and KVZmax.
Definition at line 346 of file KVVarGlob.h.
If method SetFrameDefinition() was called with a valid function to define a new kinematical frame for events, it will be used here to define the frame for all particles in the event.
Definition at line 745 of file KVVarGlob.h.
abstract method which must be overriden in child classes describing one-body global variables.
Reimplemented in KVCaloBase, KVCalorimetry, KVRiso, KVSubEventMaker, KVQuadMoment, KVVGSum, KVZmax, KVDirectivity, KVFlowTensor, KVPtot, KVReactionPlaneEstimator, KVSource, and KVZVtot.
Definition at line 304 of file KVVarGlob.h.
Evaluate contribution of particle to variable only if it satisfies the particle selection criteria given with SetSelection()/AddSelection(), call fill() with particle in desired frame
If SetDefineFrame() has been called, each selected particle will be added to a group with the name given to the method (default = name of variable)
Definition at line 406 of file KVVarGlob.h.
abstract method which must be overriden in child classes describing two-body global variables.
NOTE: this method will be called for EVERY pair of nuclei in the event (i.e. n1-n2 and n2-n1), including pairs of identical nuclei (n1 = n2). If you want to calculate a global variable using only each non-identical pair once, then make sure in your implementation that you check n1!=n2 and divide the result of summing over the pairs by 2 to avoid double-counting.
Reimplemented in KVFoxH2, and KVRelativeVelocity.
Definition at line 311 of file KVVarGlob.h.
Evaluate contribution of particles to variable only if both satisfy the particle selection criteria given with SetSelection(KVParticleCondition&), call fill() with particle in desired frame
Definition at line 420 of file KVVarGlob.h.
PRIVATE method used by MakeClass. body of 'fill', 'fill2', or 'FillN' method
Definition at line 87 of file KVVarGlob.cpp.
abstract method which must be overriden in child classes describing N-body global variables.
Reimplemented in KVEventParameter.
Definition at line 430 of file KVVarGlob.h.
|
inline |
Definition at line 516 of file KVVarGlob.h.
|
inlineprivate |
return index value stored for 'pos'-th parameter stored in NameIndex list
Definition at line 274 of file KVVarGlob.h.
|
inlineprivate |
return name value stored for 'pos'-th parameter stored in NameIndex list
Definition at line 279 of file KVVarGlob.h.
Definition at line 254 of file KVVarGlob.cpp.
|
inline |
Definition at line 587 of file KVVarGlob.h.
|
inline |
Returns number of branches to create for this global variable (see KVGVList::MakeBranches).
This is the same as GetNumberOfValues() unless SetMaxNumBranches() has been called with a different (smaller) value.
Note that if SetMaxNumBranches(0) is called, no branch will be created for this variable.
Definition at line 644 of file KVVarGlob.h.
|
inlinevirtual |
Reimplemented in KVVarGlob1.
Definition at line 638 of file KVVarGlob.h.
Returns the value of the option
Definition at line 536 of file KVVarGlob.h.
Returns the value of the parameter 'par'
Definition at line 580 of file KVVarGlob.h.
|
inlineprivate |
Definition at line 324 of file KVVarGlob.h.
|
inlineprivate |
Definition at line 328 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 453 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 463 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 443 of file KVVarGlob.h.
By default, this method returns the value of the variable "name" using the name-index table set up with SetNameIndex(const Char_t*,Int_t).
Reimplemented in KVVGSum.
Definition at line 296 of file KVVarGlob.h.
Implemented in KVQuadMoment, KVSource, KVVarGlobMean, KVZmax, KVVGSum, KVCaloBase, KVDummyGV, KVFlowTensor, KVReactionPlaneEstimator, KVRiso, KVSubEventMaker, KVVarGlob1, and KVVGVectorSum.
|
inlineprivatevirtual |
By default, returns value with index 0
Definition at line 291 of file KVVarGlob.h.
Reimplemented in KVVGSum.
Definition at line 654 of file KVVarGlob.h.
|
inline |
Definition at line 663 of file KVVarGlob.h.
Returns type of value associated with index i.
This can be either 'I' (integer values) or 'D' (floating-point/double). By default, this method returns the same type (value of member variable fValueType) for all values of i.
For all global variables for which a normalization is defined (see SetNormalization()) the type becomes 'D' even if initially it was 'I'.
This can be overridden in child classes.
Reimplemented in KVFlowTensor, KVRiso, KVCaloBase, and KVSource.
Definition at line 668 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Reimplemented in KVCaloBase, and KVZmax.
Definition at line 473 of file KVVarGlob.h.
[in] | name | name of a value calculated by this variable |
Definition at line 436 of file KVVarGlob.h.
|
staticprivate |
Definition at line 111 of file KVVarGlob.cpp.
Definition at line 16 of file KVVarGlob.cpp.
|
pure virtual |
Implemented in KVCaloBase, KVCalorimetry, KVDirectivity, KVDummyGV, KVEventClassifier, KVFlowTensor, KVFoxH2, KVReactionPlaneEstimator, KVSource, KVSubEventMaker, KVVarGlob1, KVVarGlobMean, KVVGSum, KVVGVectorSum, KVZmax, KVQuadMoment, and KVRiso.
|
inline |
Definition at line 752 of file KVVarGlob.h.
|
inlinevirtual |
Reimplemented in KVDummyGV, and KVEventClassifier.
Definition at line 387 of file KVVarGlob.h.
|
inline |
Definition at line 381 of file KVVarGlob.h.
|
inline |
Definition at line 369 of file KVVarGlob.h.
Returns kTRUE if the option 'opt' has been set
Definition at line 529 of file KVVarGlob.h.
Returns kTRUE if the parameter 'par' has been set
Definition at line 573 of file KVVarGlob.h.
|
inline |
Definition at line 729 of file KVVarGlob.h.
|
inline |
Definition at line 375 of file KVVarGlob.h.
|
inline |
Method called by KVGVList::Init Ensures that initialisation of variable is performed only once
Definition at line 392 of file KVVarGlob.h.
|
static |
Creates skeleton '.h' and '.cpp' files for a new global variable class which inherits from this class. Give a name for the new class and a short description which will be used to document the class.
By default the new class will be of type 1-body. A fill(const KVNucleus*) method will be generated which the user should complete.
For a 2-body variable, call MakeClass with type = KVVarGlob::kTwoBody. A skeleton fill2(const KVNucleus*,const KVNucleus*) method will be generated.
For a N-body variable, call MakeClass with type = KVVarGlob::kNBody. A skeleton fillN(KVEvent*) method will be generated.
Definition at line 45 of file KVVarGlob.cpp.
|
inline |
Definition at line 633 of file KVVarGlob.h.
Definition at line 491 of file KVVarGlob.h.
Definition at line 496 of file KVVarGlob.h.
Definition at line 486 of file KVVarGlob.h.
Reimplemented from KVBase.
Definition at line 277 of file KVVarGlob.cpp.
|
pure virtual |
If called, any particle which is accepted by the selection conditions will be added to a group with the name of this variable.
[in] | groupname | [optional] specify different name of group |
Definition at line 333 of file KVVarGlob.cpp.
|
inline |
Call this method with a lambda expression in order to define an event selection criterion based on the value of this variable. The signature of the lambda is
i.e. it evaluates to bool
based on the value of the global variable passed to it.
If capture by reference is used, the 'cut' can be defined later:
The condition will be tested by KVGVList just after calculation of this variable; if the condition is not met, no further variables will be calculated and the event will be rejected for further analysis.
Definition at line 699 of file KVVarGlob.h.
Sets the reference frame used for kinematical calculations. By default, i.e. if this method is not called, we use the default frame of particles which (usually) corresponds to the 'laboratory' or 'detector' frame.
The frame 'ref' must be defined before calculating global variables. See KVParticle::SetFrame and KVEvent::SetFrame methods for defining new reference frames. See KVParticle::GetFrame how to access particle kinematics in different frames.
Definition at line 505 of file KVVarGlob.h.
Used for automatic TTree branch creation for multi-valued variables (see KVGVList::MakeBranches).
Normally a branch will be created for each of the \(N\) values declared with the SetNameIndex() method, but if this method is called before analysis begins with \(n<N\), only the first \(n\) branches will be used.
Note that if SetMaxNumBranches(0) is called, no branch will be created for this variable.
Definition at line 683 of file KVVarGlob.h.
For a multi-valued global variable, sets up the correspondance between value name and index.
These can then be used to retrieve values with GetValue("name") or GetValue(index).
When automatic branch creation in a TTree is used (see KVGVList::MakeBranches()), the names given to this method will be used to name the branches as:
GetNumberOfValues() returns the number of values associated with the variable, corresponding to the number of name-index associations are created by calling this method.
Definition at line 223 of file KVVarGlob.cpp.
|
inline |
Call this method with a lambda expression in order to define a new frame for events based on the calculated value(s) of this variable.
The signature of the lambda is (the KVVarGlob pointer passed will be 'this')
Definition at line 734 of file KVVarGlob.h.
Set a normalization factor for the variable.
The type of the variable's value automatically becomes 'D' (float/double).
Reimplemented in KVReactionPlaneEstimator.
Definition at line 564 of file KVVarGlob.h.
Set a value for an option
Definition at line 521 of file KVVarGlob.h.
Set the value for a parameter
before v1.12, certain global variables used a parameter to select particles force analysis to abort in case user has not updated an old analysis class
Definition at line 549 of file KVVarGlob.h.
|
inline |
Use this method to define the condition(s) which will be applied to select particles to contribute to the global variable.
Any previously set conditions are replaced by this.
Definition at line 600 of file KVVarGlob.h.
|
inline |
Called by KVGVList just after calculation of this variable; if the condition is not met, no further variables will be calculated and the event will be rejected for further analysis.
Definition at line 719 of file KVVarGlob.h.
Removes the option 'opt' from the internal lists, as if it had never been set
Definition at line 542 of file KVVarGlob.h.
Removes the parameter 'par' from the internal lists, as if it had never been set
Definition at line 592 of file KVVarGlob.h.
Definition at line 262 of file KVVarGlob.h.
|
private |
used to select events in analysis based on value of variable
Definition at line 257 of file KVVarGlob.h.
|
private |
(optional) name of reference frame used for kinematics
Definition at line 248 of file KVVarGlob.h.
|
private |
used to define a new kinematical frame for event based on variable
Definition at line 259 of file KVVarGlob.h.
|
private |
flag set after initialisation
Definition at line 247 of file KVVarGlob.h.
|
private |
max number of branches to create for multi-valued variable
Definition at line 252 of file KVVarGlob.h.
|
private |
optional normalization parameter
Definition at line 253 of file KVVarGlob.h.
|
private |
list of options
Definition at line 249 of file KVVarGlob.h.
|
private |
list of parameters
Definition at line 250 of file KVVarGlob.h.
|
private |
(optional) condition used to select particles
Definition at line 251 of file KVVarGlob.h.
|
private |
type of variable global; = kOneBody, kTwoBody or kNBody
Definition at line 243 of file KVVarGlob.h.
|
private |
type (='I' integer or 'D' double) of global variable value
Definition at line 244 of file KVVarGlob.h.
|
private |
correspondence between variable name and index
Definition at line 246 of file KVVarGlob.h.