Batch commands for particle and value operations This class allows for particle operations for analysing angles, masses, or making boost and rotations of TLorentzVectors/PParticles It is used for the PProjector to make histograms _inside_ the event loop without the need of an analysis macro The syntax is inspired by C++, but only a few rules of C++ have been implemented. Furthermore, the syntax has been simplified to make it more readable, and an interface to the particle input (and maybe to the database in a later step) has been foreseen As usual we have assignments, operators, functions and methods Each operation can be seperated by a semicolon (;) A simple case is outlined in the following command _x = [p,1]->M(); This means that the double _x (which is automatically constructed) is assigned to the mass of the particle [p,1] Particle in brackets are the only allowed use without instantiantion as they are (hopefully) filled by the input. The additional number can be used for ordering information + and - operation This adds/subtracts PParticles or doubles: pp = [p,1] + [p,2]; ...nothing else then the pp composite _x = pp->M(); gives the invariant mass of the pp pair CAVEAT: Do _not_ use object name which are already assigned to particles in the data base, e.g. pi0=[pi0] is not allowed, use _pi0=[pi0] instead Brackets: Objects can be nested: _x = ([p,1] + [p,2])->M(); ...makes the same as the 2 lines above Build-in methods: M() : Invariant mass of the object M2() : Invariant mass^2 of the object Boost(obj) : Boost into rest frame of "obj" Example: pp = p1->Boost([p,1] + [p,2]); ...boost p1 in the rest frame of [p,1]+[p,2] Rot(obj) : Rotate object such that obj would point to z-Direction Angle(obj) : Opening angle between obj Theta() : Theta of momentum Print() : Dump 4momentum or double In addition, all browsable methods of the class PParticle can be used (functions without arguments) Example: obj->Px(); Build-in functions: cos() fabs() In addition, the TFormula syntax can be used Example: val_new = (val + 1.2); val = (val * TMath::Pi()); Conditions: if(arg) : Interrupts the current chain if arg == 0 A very complex example: Look for the helicity distribution of the e+e- pair in the eta Dalitz decay _eta=[eta]; _ep=[e+]; _em=[e-]; _eta->Boost([p + p]); _em->Boost([p + p]); _ep->Boost([p + p]); _ep->Rot(_eta); _em->Rot(_eta); _eta->Rot(_eta) ; _ep->Boost(_eta); _em->Boost(_eta); dil=_ep+_em; _ep->Rot(dil); _em->Rot(dil); dil->Rot(dil); _ep->Boost(dil); _em->Boost(dil) ; s1= _ep->Theta(); _x = cos(s1) Author: I. Froehlich Written: 14.02.2008 Revised:
virtual | ~PBatch() |
void | TObject::AbstractMethod(const char* method) const |
Bool_t | AddCommand(const char* command) |
Bool_t | AddCommand(char command, int key_a, int key1, int key2, int key3 = -1, int key4 = -1, int key5 = -1) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
Bool_t | Execute(const char* command) |
Int_t | Execute(Int_t command_pos = 0, Int_t retval = kFALSE) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
Int_t | ExecuteLastLine() |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
Int_t | GetBranch() |
PParticle* | GetCurrentParticle() |
Int_t | GetCurrentPosition() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
Int_t | GetElsePosition() |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TObject::GetName() const |
Int_t | GetNewBatch() |
Int_t | GetNewBulk() |
Int_t | GetNewCommand() |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
Int_t | GetOldCommand() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
TTree* | GetTree() |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
Int_t | IsReadonly() |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
PBatch& | operator=(const PBatch&) |
PBatch& | operator=(PBatch&&) |
virtual void | TObject::Paint(Option_t* option = "") |
PBatch() | |
PBatch(PBatch&&) | |
PBatch(const PBatch&) | |
virtual void | TObject::Pop() |
virtual void | Print(const Option_t* delme = __null) const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | ReplaceAll(TString* op, const char* oldstring, const char* newstring) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetKeysBranches(Int_t* my_key_branches) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetPosition(Int_t my_num_batch, Int_t my_num_bulk) |
void | SetSizeBranches(Int_t* my_size_branches) |
void | SetToolObject(TH1* Histo1) |
void | SetToolObject(TH2* Histo2) |
void | SetToolObject(TH3* Histo3) |
void | SetToolObject(TGraph* Graph) |
void | SetToolObject(TGraph2D* Graph2D) |
void | SetToolObject(FILE* f) |
void | SetToolObjectTmp(FILE* f) |
void | SetTree(TTree* my_tree) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetVarList(char* my_x) |
virtual void | ShowMembers(TMemberInspector& insp) const |
Int_t | Status() |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
void | AddSpacePlaceholder(char* command) |
Bool_t | CheckAndSplit(char* arg, char delim, int* key1, int* key2) |
Int_t | CheckObjectType(Int_t key) |
Int_t | CrackMethodArgs(char* name) |
Int_t | EvalPFormula(char* command) |
Bool_t | GetArguments(const char* a, char* name, char** function, char** arg1, char** arg2) |
Int_t | GetDelimPosition(char* arg, char delim, Int_t* yes = __null) |
Int_t | GetKey(char* name, int fl, int makeflag) |
Int_t | GetMethodHandle(char* name, Int_t flag = 0) |
void | RemoveSpacePlaceholder(char* command) |
static TObject::(anonymous) | TObject::kBitMask | |
static TObject::EStatusBits | TObject::kCanDelete | |
static TObject::EStatusBits | TObject::kCannotPick | |
static TObject::EStatusBits | TObject::kHasUUID | |
static TObject::EStatusBits | TObject::kInvalidObject | |
static TObject::(anonymous) | TObject::kIsOnHeap | |
static TObject::EStatusBits | TObject::kIsReferenced | |
static TObject::EStatusBits | TObject::kMustCleanup | |
static TObject::EStatusBits | TObject::kNoContextMenu | |
static TObject::(anonymous) | TObject::kNotDeleted | |
static TObject::EStatusBits | TObject::kObjInCanvas | |
static TObject::(anonymous) | TObject::kOverwrite | |
static TObject::(anonymous) | TObject::kSingleKey | |
static TObject::(anonymous) | TObject::kWriteDelete | |
static TObject::(anonymous) | TObject::kZombie |
Int_t | arg1 | |
Int_t | arg2 | |
Int_t | arg3 | |
Int_t | arg4 | |
Int_t | batch_histogram_param | |
Int_t | batch_models_param | |
Int_t | batch_particle_param | |
Int_t | batch_update_param | |
Int_t | batch_value_param | |
Int_t | command_pointer | |
PParticle* | current_particle | For push command |
Int_t | current_position | |
char* | echo_string[1000] | |
Int_t | else_position | |
Int_t | error_flag[1000] | |
Int_t | eval_err_dumped | |
TGraph* | fGraph | |
TGraph2D* | fGraph2D | |
TH1* | fHisto1 | |
TH2* | fHisto2 | |
TH3* | fHisto3 | |
FILE* | file | |
Int_t | flag_command_int[1000] | =0: PParticle, =1: PUtilsRengine |
Int_t | is_readonly | |
Int_t* | key_branches | |
Int_t | last_command_pointer | |
Int_t | locnum_batch | Position in the projector & reaction loop |
Int_t | locnum_branch | current branch number |
Int_t | locnum_bulk | Position in the projector & reaction loop |
Int_t | locnum_command | Position in the projector & reaction loop |
Int_t | locnum_old_command | Position in the projector & reaction loop |
char | lst_command[1000] | |
Int_t | lst_command_int[1000] | |
PFormula* | lst_form[1000] | |
Int_t | lst_key[10][1000] | |
Int_t | lst_key_a[1000] | |
Int_t | lst_options_counter[1000] | |
char* | method_name[100] | |
Int_t | method_pointer | |
TMethodCall* | methods[100] | |
Int_t | methods_arg_flags[4][100] | |
Int_t | methods_flags[100] | |
Int_t | num_batch | Position in the projector & reaction loop |
Int_t | num_batch_param | |
Int_t | num_bulk | Position in the projector & reaction loop |
Int_t | num_bulk_param | |
Int_t | num_command_param | |
PValues | pdummy | |
Int_t | pid_param | |
Double_t** | readline_args[1000] | |
char* | readline_format_string[1000] | |
int | readline_num_args[1000] | |
char* | readline_string[1000] | |
Int_t* | size_branches | |
TH1D** | slicesx | |
TH1D** | slicesy | |
static Int_t | stack_num_batch[20] | |
static Int_t | stack_num_bulk[20] | |
static Int_t | stack_num_command[20] | |
static Int_t | stack_num_pos | |
Int_t | status | |
Int_t | stream_default_pos_param | |
Int_t | stream_max_pos_param | |
FILE* | tmp_file | |
TTree* | tree | Pointer to storage tree |
char* | varlist | Allowed command for new variables |
Double_t* | x | Axis values for _eval |
Double_t* | y | Axis values for _eval |
Double_t* | z | Axis values for _eval |
This helper function evaluates a (possible) PFormula command, and put the arguments on the stack if this did not worked out, the stack is resetted
Similar to TString::ReplaceAll, but checks also the following char
seeks for the internal method returns a -1 if not found or invalid
looks for syntax like f(a,b);
Allowed commands for new variables
Format must be "a;b;c;" with trailing ;'s
If NULL don't care!