KaliVeda
1.12/06
Heavy-Ion Analysis Toolkit
|
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:
Definition at line 217 of file KVVarGlob.h.
Public Types | |
enum | { kOneBody , kTwoBody , kNBody } |
![]() | |
enum | EKaliVedaBits { kIsKaliVedaObject = BIT(23) } |
![]() | |
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 |
Make a copy of this object. More... | |
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 |
virtual Char_t | GetValueType (Int_t) const |
virtual std::vector< Double_t > | GetValueVector (void) const |
virtual void | Init ()=0 |
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_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 | SetEventSelection (const EventSelector &f) |
void | SetFrame (const Char_t *ref) |
void | SetMaxNumBranches (Int_t n) |
void | SetNewFrameDefinition (const FrameSetter &f) |
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) |
![]() | |
KVBase () | |
Default constructor. More... | |
KVBase (const Char_t *name, const Char_t *title="") | |
Ctor for object with given name and type. More... | |
KVBase (const KVBase &) | |
copy ctor More... | |
virtual | ~ KVBase () |
virtual void | Clear (Option_t *opt="") |
Clear object properties : name, type/title, number, label. More... | |
const Char_t * | GetLabel () const |
UInt_t | GetNumber () const |
UInt_t | GetNumberOfObjects () const |
virtual TObject * | GetObject () const |
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 More... | |
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) |
![]() | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TNamed &named) | |
TNamed (const TString &name, const TString &title) | |
virtual | ~TNamed () |
virtual TObject * | Clone (const char *newname="") const |
virtual Int_t | Compare (const TObject *obj) const |
virtual void | FillBuffer (char *&buffer) |
virtual const char * | GetName () const |
virtual const char * | GetTitle () const |
virtual ULong_t | Hash () const |
virtual Bool_t | IsSortable () const |
virtual void | ls (Option_t *option="") const |
TNamed & | operator= (const TNamed &rhs) |
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 |
![]() | |
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=0) |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
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) |
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 * | 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) |
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=0, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=0, 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 Bool_t | AreEqual (Double_t x, Double_t y, Long64_t maxdif=1) |
Comparison between two 64-bit floating-point values. More... | |
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.) More... | |
static const Char_t * | GetINCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetKVBuildDate () |
Returns KaliVeda build date. More... | |
static const Char_t * | GetKVBuildDir () |
Returns top-level directory used for build. More... | |
static const Char_t * | GetKVBuildTime () |
Returns KaliVeda build date. More... | |
static const Char_t * | GetKVBuildType () |
Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) More... | |
static const Char_t * | GetKVBuildUser () |
Returns username of person who performed build. More... | |
static const Char_t * | GetKVSourceDir () |
Returns top-level directory of source tree used for build. More... | |
static const Char_t * | GetKVVersion () |
Returns KaliVeda version string. More... | |
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. More... | |
static const Char_t * | gitCommit () |
Returns last git commit of sources. More... | |
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. More... | |
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 Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Protected 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 | SetNameIndex (const Char_t *name, Int_t index) |
![]() | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Static Protected Member Functions | |
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) |
Protected Attributes | |
Int_t | fType |
type of variable global; = kOneBody, kTwoBody or kNBody More... | |
Char_t | fValueType |
type (='I' integer or 'D' double) of global variable value More... | |
![]() | |
TString | fLabel |
label for the object More... | |
![]() | |
TString | fName |
TString | fTitle |
![]() | |
kOnlyPrepStep | |
Private Types | |
using | EventSelector = std::function< bool(const KVVarGlob *)> |
using | FrameSetter = std::function< void(KVEvent *, const KVVarGlob *)> |
Private Member Functions | |
void | init () |
Static Private Member Functions | |
static void | AddExtraInitMethodComment (KVClassFactory &cf, KVString &body) |
Private Attributes | |
EventSelector | fEventSelector |
used to select events in analysis based on value of variable More... | |
KVString | fFrame |
(optional) name of reference frame used for kinematics More... | |
FrameSetter | fFrameSetter |
used to define a new kinematical frame for event based on variable More... | |
Bool_t | fIsInitialized |
flag set after initialisation More... | |
Int_t | fMaxNumBranches |
max number of branches to create for multi-valued variable More... | |
Double_t | fNormalization |
optional normalization parameter More... | |
KVNameValueList | fOptions |
list of options More... | |
KVNameValueList | fParameters |
list of parameters More... | |
KVParticleCondition | fSelection |
(optional) condition used to select particles More... | |
KVNameValueList | nameList |
correspondence between variable name and index More... | |
Additional Inherited Members | |
![]() | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
#include <KVVarGlob.h>
|
private |
Definition at line 240 of file KVVarGlob.h.
|
private |
Definition at line 242 of file KVVarGlob.h.
anonymous enum |
Enumerator | |
---|---|
kOneBody | |
kTwoBody | |
kNBody |
Definition at line 220 of file KVVarGlob.h.
|
inline |
Definition at line 316 of file KVVarGlob.h.
|
inline |
Definition at line 321 of file KVVarGlob.h.
|
inlinevirtual |
Definition at line 348 of file KVVarGlob.h.
|
staticprivate |
Definition at line 130 of file KVVarGlob.cpp.
|
staticprotected |
PRIVATE method used by MakeClass. add 'Fill', 'Fill2', or 'FillN' method
Definition at line 164 of file KVVarGlob.cpp.
|
staticprotected |
PRIVATE method used by MakeClass. add body of fill method
Definition at line 191 of file KVVarGlob.cpp.
|
staticprotected |
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 581 of file KVVarGlob.h.
|
inline |
Definition at line 594 of file KVVarGlob.h.
|
pure virtual |
Implemented in KVZmax, KVVGVectorSum, KVVarGlobMean, KVSource, KVRiso, KVFoxH2, KVFlowTensor, KVEventClassifier, KVDummyGV, KVDirectivity, KVCalorimetry, and KVCaloBase.
|
inlineprotected |
Delete previously defined associations between variable name and index
Definition at line 251 of file KVVarGlob.h.
Make a copy of this object.
Copy this to obj
Reimplemented from KVBase.
Reimplemented in KVZmax, KVVGObjectSum< SumObject >, KVVGObjectSum< KVNucleus >, KVVGObjectSum< TVector3 >, KVVarGlobMean, and KVVarGlob1.
Definition at line 328 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 697 of file KVVarGlob.h.
abstract method which must be overriden in child classes describing one-body global variables.
Reimplemented in KVZVtot, KVSource, KVPtot, KVFlowTensor, KVDirectivity, KVZmax, KVVGSum, KVQuadMoment, KVRiso, KVCalorimetry, and KVCaloBase.
Definition at line 286 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
Definition at line 388 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 KVRelativeVelocity, and KVFoxH2.
Definition at line 293 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 396 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.
Definition at line 406 of file KVVarGlob.h.
|
inline |
Definition at line 485 of file KVVarGlob.h.
|
inlineprotected |
return index value stored for 'pos'-th parameter stored in NameIndex list
Definition at line 256 of file KVVarGlob.h.
|
inlineprotected |
return name value stored for 'pos'-th parameter stored in NameIndex list
Definition at line 261 of file KVVarGlob.h.
Definition at line 254 of file KVVarGlob.cpp.
|
inline |
Definition at line 552 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 609 of file KVVarGlob.h.
|
inlinevirtual |
Reimplemented in KVVarGlob1.
Definition at line 603 of file KVVarGlob.h.
Returns the value of the option
Definition at line 505 of file KVVarGlob.h.
Returns the value of the parameter 'par'
Definition at line 545 of file KVVarGlob.h.
|
inlineprotected |
Definition at line 306 of file KVVarGlob.h.
|
inlineprotected |
Definition at line 310 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 422 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 432 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Definition at line 412 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 278 of file KVVarGlob.h.
Implemented in KVVGVectorSum, KVVarGlob1, KVRiso, KVFlowTensor, KVDummyGV, KVCaloBase, KVVGSum, KVZmax, KVVarGlobMean, KVSource, and KVQuadMoment.
|
inlineprotectedvirtual |
By default, returns value with index 0
Definition at line 273 of file KVVarGlob.h.
Returns name of value associated with index 'i', as defined by using SetNameIndex method.
Reimplemented in KVVGSum.
Definition at line 619 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.
This can be overridden in child classes.
Reimplemented in KVSource, KVCaloBase, KVRiso, and KVFlowTensor.
Definition at line 628 of file KVVarGlob.h.
If a "Normalization" parameter has been set, it is applied here
Reimplemented in KVZmax, and KVCaloBase.
Definition at line 442 of file KVVarGlob.h.
|
staticprotected |
Definition at line 111 of file KVVarGlob.cpp.
Definition at line 16 of file KVVarGlob.cpp.
|
pure virtual |
Implemented in KVRiso, KVQuadMoment, KVZmax, KVVGVectorSum, KVVGSum, KVVarGlobMean, KVVarGlob1, KVSource, KVFoxH2, KVFlowTensor, KVEventClassifier, KVDummyGV, KVDirectivity, KVCalorimetry, and KVCaloBase.
|
inlinevirtual |
Reimplemented in KVEventClassifier, and KVDummyGV.
Definition at line 369 of file KVVarGlob.h.
|
inline |
Definition at line 363 of file KVVarGlob.h.
|
inline |
Definition at line 351 of file KVVarGlob.h.
Returns kTRUE if the option 'opt' has been set
Definition at line 498 of file KVVarGlob.h.
Returns kTRUE if the parameter 'par' has been set
Definition at line 538 of file KVVarGlob.h.
|
inline |
Definition at line 357 of file KVVarGlob.h.
|
inline |
Method called by KVGVList::Init Ensures that initialisation of variable is performed only once
Definition at line 374 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 598 of file KVVarGlob.h.
Definition at line 460 of file KVVarGlob.h.
Definition at line 465 of file KVVarGlob.h.
Definition at line 455 of file KVVarGlob.h.
Reimplemented from KVBase.
Definition at line 276 of file KVVarGlob.cpp.
|
pure virtual |
|
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 656 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 474 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 640 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 686 of file KVVarGlob.h.
Definition at line 533 of file KVVarGlob.h.
Set a value for an option
Definition at line 490 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 518 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 565 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 676 of file KVVarGlob.h.
Removes the option 'opt' from the internal lists, as if it had never been set
Definition at line 511 of file KVVarGlob.h.
Removes the parameter 'par' from the internal lists, as if it had never been set
Definition at line 557 of file KVVarGlob.h.
|
private |
used to select events in analysis based on value of variable
Definition at line 241 of file KVVarGlob.h.
|
private |
(optional) name of reference frame used for kinematics
Definition at line 232 of file KVVarGlob.h.
|
private |
used to define a new kinematical frame for event based on variable
Definition at line 243 of file KVVarGlob.h.
|
private |
flag set after initialisation
Definition at line 231 of file KVVarGlob.h.
|
private |
max number of branches to create for multi-valued variable
Definition at line 236 of file KVVarGlob.h.
|
private |
optional normalization parameter
Definition at line 237 of file KVVarGlob.h.
|
private |
list of options
Definition at line 233 of file KVVarGlob.h.
|
private |
list of parameters
Definition at line 234 of file KVVarGlob.h.
|
private |
(optional) condition used to select particles
Definition at line 235 of file KVVarGlob.h.
|
protected |
type of variable global; = kOneBody, kTwoBody or kNBody
Definition at line 227 of file KVVarGlob.h.
|
protected |
type (='I' integer or 'D' double) of global variable value
Definition at line 228 of file KVVarGlob.h.
|
private |
correspondence between variable name and index
Definition at line 230 of file KVVarGlob.h.