KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVTemplateEvent.h
1/***************************************************************************
2 kvevent.h - description
3 -------------------
4 begin : Sun May 19 2002
5 copyright : (C) 2002 by J.D. Frankland
6 email : frankland@ganil.fr
7
8$Id: KVEvent.h,v 1.29 2008/12/17 11:23:12 ebonnet Exp $
9 ***************************************************************************/
10
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
19
20#ifndef KVEVENT_H
21#define KVEVENT_H
22
23#define KVEVENT_PART_INDEX_OOB "Particle index %d out of bounds [1,%d]"
24
25#include "TTree.h"
26#include "TVector3.h"
27#include "TClonesArray.h"
28#include "KVEvent.h"
29#include "KVConfig.h"
30#include "TRotation.h"
31#include "TLorentzRotation.h"
32#include "KVTemplateParticleCondition.h"
33#include "KVNameValueList.h"
34#include "TMethodCall.h"
35
36#include <KVFrameTransform.h>
37#include <KVIntegerList.h>
38#include <TH1.h>
39#include <TObjString.h>
40#include <iterator>
41
42class KVIntegerList;
43
90template <typename Particle>
91class KVTemplateEvent: public KVEvent {
92
93public:
110
119 class Iterator {
120 public:
121 typedef std::forward_iterator_tag iterator_category;
122 typedef Particle value_type;
123 typedef std::ptrdiff_t difference_type;
124 typedef Particle* pointer;
125 typedef Particle& reference;
126
127 enum Type { // type of iterator
128 Null, // null value
129 All, // include all particles
130 OK, // include particles which are "OK"
131 Group, // include particles belonging to group
132 Bad // type mismatch: iterator goes straight to end
133 };
134
135 private:
136 KVTemplateParticleCondition<Particle> fSelection;//condition for selecting particles
137 TIter fIter;//iterator over TClonesArray
138 Type fType;//iterator type
139 mutable Bool_t fIterating;//=kTRUE when iteration in progress
141 {
146
147 if (fType == Type::Bad)
148 return kFALSE;
149 return fSelection.Test(current());
150 }
151 Particle* current() const
152 {
154 return static_cast<Particle*>(*fIter);
155 }
156 public:
158 : fSelection(),
159 fIter(static_cast<TIterator*>(nullptr)),
160 fType(Type::Null),
162 {}
165 fIter(i.fIter),
166 fType(i.fType),
168 {}
169
172 {
175
176 if (!e->GetParticleArray()->GetClass()->InheritsFrom(Particle::Class())) {
177 ::Warning("KVTemplateEvent::Iterator", "KVTemplateEvent<%s>::Iterator for %s particles requested for event containing %s particles. Iteration is aborted.",
178 Particle::Class()->GetName(), Particle::Class()->GetName(), e->GetParticleArray()->GetClass()->GetName());
179 fType = Bad;
180 }
181
182 fIter.Begin();// set iterator to first particle of event corresponding to selection
183 while ((current() != nullptr) && !AcceptableIteration()) ++fIter;
184 if (current() == nullptr) fIterating = kFALSE;
185 }
186
189 {
192
193 if (!e.GetParticleArray()->GetClass()->InheritsFrom(Particle::Class())) {
194 ::Warning("KVTemplateEvent::Iterator", "KVTemplateEvent<%s>::Iterator for %s particles requested for event containing %s particles. Iteration is aborted.",
195 Particle::Class()->GetName(), Particle::Class()->GetName(), e.GetParticleArray()->GetClass()->GetName());
196 fType = Bad;
197 }
198
199 fIter.Begin();// set iterator to first particle of event corresponding to selection
200 while ((current() != nullptr) && !AcceptableIteration()) ++fIter;
201 if (current() == nullptr) fIterating = kFALSE;
202 }
203
204 Iterator(const KVEvent* e, Type t = Type::All, TString grp = "")
206 {
208
209 if (!e->GetParticleArray()->GetClass()->InheritsFrom(Particle::Class())) {
210 ::Warning("KVTemplateEvent::Iterator", "KVTemplateEvent<%s>::Iterator for %s particles requested for event containing %s particles. Iteration is aborted.",
211 Particle::Class()->GetName(), Particle::Class()->GetName(), e->GetParticleArray()->GetClass()->GetName());
212 fType = Bad;
213 }
214 if (fType == Type::OK) {
215 fSelection.Set("ok", [](const Particle * n) {
216 return n->IsOK();
217 });
218 }
219 else if (fType == Type::Group) {
220 fSelection.Set("group", [grp](const Particle * n) {
221 return n->BelongsToGroup(grp);
222 });
223 }
224
225 fIter.Begin();// set iterator to first particle of event corresponding to selection
226 while ((current() != nullptr) && !AcceptableIteration()) ++fIter;
227 if (current() == nullptr) fIterating = kFALSE;
228 }
229
230 Iterator(const KVEvent& e, Type t = Type::All, TString grp = "")
232 {
234
235 if (!e.GetParticleArray()->GetClass()->InheritsFrom(Particle::Class())) {
236 ::Warning("KVTemplateEvent::Iterator", "KVTemplateEvent<%s>::Iterator for %s particles requested for event containing %s particles. Iteration is aborted.",
237 Particle::Class()->GetName(), Particle::Class()->GetName(), e.GetParticleArray()->GetClass()->GetName());
238 fType = Bad;
239 }
240 if (fType == Type::OK) {
241 fSelection.Set("ok", [](const Particle * n) {
242 return n->IsOK();
243 });
244 }
245 else if (fType == Type::Group) {
246 fSelection.Set("group", [grp](const Particle * n) {
247 return n->BelongsToGroup(grp);
248 });
249 }
250
251 fIter.Begin();// set iterator to first particle of event corresponding to selection
252 while ((current() != nullptr) && !AcceptableIteration()) ++fIter;
253 if (current() == nullptr) fIterating = kFALSE;
254 }
255
256 Particle& operator* () const
257 {
259
260 return *(current());
261 }
262 template<typename PointerType = Particle>
263 PointerType * get_pointer() const
264 {
265 return dynamic_cast<PointerType*>(current());
266 }
267 template<typename ReferenceType = Particle>
268 ReferenceType & get_reference() const
269 {
270 return dynamic_cast<ReferenceType&>(*current());
271 }
272 template<typename PointerType = Particle>
273 const PointerType * get_const_pointer() const
274 {
275 return dynamic_cast<const PointerType*>(current());
276 }
277 template<typename ReferenceType = Particle>
278 const ReferenceType & get_const_reference() const
279 {
280 return dynamic_cast<const ReferenceType&>(*current());
281 }
282 Bool_t operator!= (const Iterator& it) const
283 {
285 return current() != it.current();
286 }
287 Bool_t operator== (const Iterator& it) const
288 {
290 return current() == it.current();
291 }
293 {
296 if (current() == nullptr) fIterating = kFALSE;
297 ++fIter;
298 while (current() != nullptr && !AcceptableIteration()) ++fIter;
299 return *this;
300 }
302 {
305 Iterator tmp(*this);
306 operator++();
307 return tmp;
308 }
310 {
312 if (this != &rhs) { // check self-assignment based on address of object
314 fIter = rhs.fIter;
315 fType = rhs.fType;
317 }
318 return *this;
319 }
320
321 static Iterator End()
322 {
323 return Iterator();
324 }
325
326 void Reset(Type t = Type::Null, TString grp = "")
327 {
333 if (t != Type::Null) {
334 fType = t;
335 if (fType == Type::OK) {
336 fSelection.Set("ok", [](const Particle * n) {
337 return n->IsOK();
338 });
339 }
340 else if (fType == Type::Group) {
341 fSelection.Set("group", [grp](const Particle * n) {
342 return n->BelongsToGroup(grp);
343 });
344 }
345 }
346 fIter.Begin();
348 while ((current() != nullptr) && !AcceptableIteration()) ++fIter;
349 }
351 {
353 return fIterating;
354 }
355 void SetIsIterating(Bool_t on = kTRUE)
356 {
358 fIterating = on;
359 }
360 };
361protected:
363
364public:
366 : KVEvent(Particle::Class(), mult)
367 {}
368
369 Particle* AddParticle()
370 {
375
376 Int_t mult = GetMult();
377#ifdef __WITHOUT_TCA_CONSTRUCTED_AT
378 Particle* tmp = (Particle*) ConstructedAt(mult, "C");
379#else
380 Particle* tmp = (Particle*) fParticles->ConstructedAt(mult, "C");
381#endif
382 if (!tmp) {
383 Error("AddParticle", "Allocation failure, Mult=%d", mult);
384 return 0;
385 }
386 return tmp;
387 }
388 Particle* GetParticle(Int_t npart) const
389 {
391
392 if (npart < 1 || npart > fParticles->GetEntriesFast()) {
393 Error("GetParticle", KVEVENT_PART_INDEX_OOB, npart,
395 return 0;
396 }
397
398 return (Particle*)((*fParticles)[npart - 1]);
399 }
400 virtual Int_t GetMult(Option_t* opt = "") const
401 {
410
411 if (TString(opt) == "") return KVEvent::GetMult();
412 Int_t fMultOK = 0;
413 for (Iterator it = GetNextParticleIterator(opt); it != end(); ++it) ++fMultOK;
414 return fMultOK;
415 }
417 {
423
424 if (A > 0) return (Int_t)GetSum("IsIsotope", "int,int", Form("%d,%d", Z, A), opt);
425 return (Int_t)GetSum("IsElement", "int", Form("%d", Z), opt);
426 }
427 void GetMultiplicities(Int_t mult[], const TString& species, Option_t* opt = "")
428 {
440
441 std::unique_ptr<TObjArray> spec(species.Tokenize(", "));// remove any spaces
442 Int_t nspec = spec->GetEntries();
443 memset(mult, 0, nspec * sizeof(Int_t)); // set multiplicities to zero
444 for (Iterator it = GetNextParticleIterator(opt); it != end(); ++it) {
445 for (int i = 0; i < nspec; i++) {
446 if (((TObjString*)(*spec)[i])->String() == (*it).GetSymbol()) mult[i] += 1;
447 }
448 }
449 }
450 Double_t GetSum(const Char_t* Nucleus_method, Option_t* opt = "")
451 {
459
460 Double_t fSum = 0;
461 TMethodCall mt;
462 mt.InitWithPrototype(Particle::Class(), Nucleus_method, "");
463
464 if (mt.IsValid()) {
466 if (mt.ReturnType() == TMethodCall::kLong) {
467 Long_t ret;
468 for (; it != end(); ++it) {
469 Particle* tmp = it.get_pointer();
470 mt.Execute(tmp, "", ret);
471 fSum += ret;
472 }
473 }
474 else if (mt.ReturnType() == TMethodCall::kDouble) {
475 Double_t ret;
476 for (; it != end(); ++it) {
477 Particle* tmp = it.get_pointer();
478 mt.Execute(tmp, "", ret);
479 fSum += ret;
480 }
481 }
482 }
483
484 return fSum;
485 }
486 Double_t GetSum(const Char_t* Nucleus_method, const Char_t* method_prototype, const Char_t* args, Option_t* opt = "")
487 {
494
495 Double_t fSum = 0;
496 TMethodCall mt;
497 mt.InitWithPrototype(Particle::Class(), Nucleus_method, method_prototype);
498
499 if (mt.IsValid()) {
501 if (mt.ReturnType() == TMethodCall::kLong) {
502 Long_t ret;
503 for (; it != end(); ++it) {
504 Particle* tmp = it.get_pointer();
505 mt.Execute(tmp, args, ret);
506 fSum += ret;
507 }
508 }
509 else if (mt.ReturnType() == TMethodCall::kDouble) {
510 Double_t ret;
511 for (; it != end(); ++it) {
512 Particle* tmp = it.get_pointer();
513 mt.Execute(tmp, args, ret);
514 fSum += ret;
515 }
516 }
517 }
518
519 return fSum;
520 }
521 void FillHisto(TH1* h, const Char_t* Nucleus_method, Option_t* opt = "")
522 {
529
530 TMethodCall mt;
531 mt.InitWithPrototype(Particle::Class(), Nucleus_method, "");
532
533 if (mt.IsValid()) {
535 if (mt.ReturnType() == TMethodCall::kLong) {
536 Long_t ret;
537 for (; it != end(); ++it) {
538 Particle* tmp = it.get_pointer();
539 mt.Execute(tmp, "", ret);
540 h->Fill((Double_t)ret);
541 }
542 }
543 else if (mt.ReturnType() == TMethodCall::kDouble) {
544 Double_t ret;
545 for (; it != end(); ++it) {
546 Particle* tmp = it.get_pointer();
547 mt.Execute(tmp, "", ret);
548 h->Fill(ret);
549 }
550 }
551 }
552 }
553 void FillHisto(TH1* h, const Char_t* Nucleus_method, const Char_t* method_prototype, const Char_t* args, Option_t* opt = "")
554 {
560
561 TMethodCall mt;
562 mt.InitWithPrototype(Particle::Class(), Nucleus_method, method_prototype);
563
564 if (mt.IsValid()) {
566 if (mt.ReturnType() == TMethodCall::kLong) {
567 Long_t ret;
568 for (; it != end(); ++it) {
569 Particle* tmp = it.get_pointer();
570 mt.Execute(tmp, args, ret);
571 h->Fill((Double_t)ret);
572 }
573 }
574 else if (mt.ReturnType() == TMethodCall::kDouble) {
575 Double_t ret;
576 for (; it != end(); ++it) {
577 Particle* tmp = it.get_pointer();
578 mt.Execute(tmp, args, ret);
579 h->Fill(ret);
580 }
581 }
582 }
583 }
584 virtual void Print(Option_t* t = "") const
585 {
588
589 std::cout << "\nKVEvent with " << GetMult(t) << " particles :" << std::endl;
590 std::cout << "------------------------------------" << std::endl;
592 for (Iterator it = GetNextParticleIterator(t); it != end(); ++it)(*it).Print();
593 }
594 virtual void ls(Option_t* t = "") const
595 {
596 Print(t);
597 }
598 Particle* GetParticleWithName(const Char_t* name) const
599 {
602
603 Particle* tmp = (Particle*)fParticles->FindObject(name);
604 return tmp;
605 }
606 Particle* GetParticle(const Char_t* group_name) const
607 {
609
610 Iterator it = GetNextParticleIterator(group_name);
611 Particle* tmp = it.get_pointer();
612 if (!tmp) Warning("GetParticle", "Particle not found: %s", group_name);
613 return tmp;
614 }
615
617 {
619 return Iterator(this);
620 }
621 Iterator end() const
622 {
624 return Iterator::End();
625 }
626
627 Particle* GetNextParticle(Option_t* opt = "") const
628 {
651
652 TString Opt(opt);
653 Opt.ToUpper();
654
656 if (fIter.IsIterating()) return &(*(fIter++));
657
659 Bool_t ok_iter = (Opt == "OK");
660 Bool_t grp_iter = (!ok_iter && Opt.Length());
661
662 if (ok_iter) fIter = Iterator(this, Iterator::Type::OK);
663 else if (grp_iter) fIter = Iterator(this, Iterator::Type::Group, Opt);
664 else fIter = Iterator(this);
665 return &(*(fIter++));
666 }
668 {
672
674 }
675
677 {
685
686 for (Iterator it = begin(); it != end(); ++it) {
687 (*it).ResetEnergy();
688 }
689 }
690
691 void DefineGroup(const Char_t* groupname, const Char_t* from = "")
692 {
697
698 for (Iterator it = GetNextParticleIterator(from); it != end(); ++it) {
699 (*it).AddGroup(groupname);
700 }
701 }
702 void DefineGroup(const Char_t* groupname, KVTemplateParticleCondition<Particle>* cond, const Char_t* from = "")
703 {
707
708 for (Iterator it = GetNextParticleIterator(from); it != end(); ++it) {
709 if (cond->Test(it.get_const_pointer()))(*it).AddGroup(groupname, from);
710 }
711 }
712
713 void SetFrame(const Char_t* frame, const KVFrameTransform& ft)
714 {
720
721 for (auto& part : *this) {
722 part.SetFrame(frame, ft);
723 }
724 }
725 void SetFrame(const Char_t* newframe, const Char_t* oldframe, const KVFrameTransform& ft)
726 {
736
737 for (auto& part : *this) {
738 part.SetFrame(newframe, oldframe, ft);
739 }
740 }
741 void ChangeFrame(const KVFrameTransform& ft, const KVString& name = "")
742 {
748
749
750 for (auto& part : *this) {
751 part.ChangeFrame(ft, name);
752 }
753 if (name != "") SetParameter("defaultFrame", name);
754 }
755 void ChangeDefaultFrame(const Char_t* newdef, const Char_t* defname = "")
756 {
762
763 for (auto& part : *this) {
764 part.ChangeDefaultFrame(newdef, defname);
765 }
766 SetParameter("defaultFrame", newdef);
767 }
769 {
774
775 for (auto& part : *this) {
776 part.UpdateAllFrames();
777 }
778 }
779
780 template<typename U = Particle>
781 typename std::enable_if<std::is_base_of<KVNucleus, U>::value>::type
783 {
789
790 IL->Clear();
791 for (Iterator it = GetNextParticleIterator(opt); it != end(); ++it) IL->Add((*it).GetZ());
792 IL->SetPopulation(1);
793 IL->CheckForUpdate();
794 }
795
796 void GetMasses(std::vector<Double_t>& mass)
797 {
799
800 mass.clear();
801 mass.reserve(GetMult());
802 int i = 0;
803 for (Iterator it = begin(); it != end(); ++it) mass[i++] = (*it).GetMass();
804 }
805
806 template<typename U = Particle>
807 typename std::enable_if<std::is_base_of<KVNucleus, U>::value>::type
808 GetGSMasses(std::vector<Double_t>& mass)
809 {
811
812 mass.clear();
813 mass.reserve(GetMult());
814 int i = 0;
815 for (Iterator it = begin(); it != end(); ++it) mass[i++] = (*it).GetMassGS();
816 }
817
818 template<typename U = Particle>
819 typename std::enable_if<std::is_base_of<KVNucleus, U>::value, Double_t>::type
821 {
836
837 Double_t sumM = 0;
838 Particle CN;
839 Int_t M = GetMult();
840 for (int i = 1; i <= M; i++) {
841 sumM += GetParticle(i)->GetMass();
842 CN += *(GetParticle(i));
843 }
844 return CN.GetMassGS() - sumM;
845 }
846 template<typename U = Particle>
847 typename std::enable_if < !std::is_base_of<KVNucleus, U>::value, Double_t >::type
849 {
851 return 0;
852 }
854 {
855 return get_channel_qvalue();
856 }
857 template<typename U = Particle>
858 typename std::enable_if<std::is_base_of<KVNucleus, U>::value, Double_t>::type
860 {
873
874 Double_t sumM = 0;
875 Particle CN;
876 Int_t M = GetMult();
877 for (int i = 1; i <= M; i++) {
878 sumM += GetParticle(i)->GetMassGS();
879 CN += *(GetParticle(i));
880 }
881 return CN.GetMassGS() - sumM;
882 }
883 template<typename U = Particle>
884 typename std::enable_if<std::is_base_of<KVNucleus, U>::value, KVString>::type
886 {
894 fParticles->Sort();
895 KVString partition;
896
897 KVNameValueList nvl;
898 partition = "";
899 for (Iterator it = begin(); it != end(); ++it) {
900 TString st = (*it).GetSymbol();
901 Int_t pop = TMath::Max(nvl.GetIntValue(st.Data()), 0);
902 pop += 1;
903 nvl.SetValue(st.Data(), pop);
904 }
905 for (Int_t ii = 0; ii < nvl.GetEntries(); ii += 1) {
906 Int_t pop = nvl.GetIntValue(ii);
907 if (pop == 1) partition += nvl.GetNameAt(ii);
908 else partition += Form("%s(%d)", nvl.GetNameAt(ii), pop);
909 if (ii < nvl.GetEntries() - 1) partition += " ";
910 }
911 return partition;
912 }
913
914 template<typename U = Particle>
915 typename std::enable_if < !std::is_base_of<KVNucleus, U>::value, KVString >::type
917 {
919 return "";
920 }
921
923 {
924 return get_partition_name();
925 }
926
927 void SetFrameName(const KVString& name)
928 {
935
936 for (Iterator it = begin(); it != end(); ++it) {
937 (*it).SetFrameName(name);
938 }
939 SetParameter("defaultFrame", name);
940 }
941
945 : it(event, t, grp)
946 {}
948 : it(event, t, grp)
949 {}
951 : it(event, selection)
952 {}
954 : it(event, selection)
955 {}
957 {
958 return it;
959 }
960 Iterator end() const
961 {
962 return Iterator::End();
963 }
964 };
965
974
977 EventIterator(event, Iterator::Type::Group, grp)
978 {}
980 EventIterator(event, Iterator::Type::Group, grp)
981 {}
982 };
983
985 {
991
992 TString Opt(opt);
993 Opt.ToUpper();
994 Bool_t ok_iter = (Opt == "OK");
995 Bool_t grp_iter = (!ok_iter && Opt.Length());
996
997 if (ok_iter) return EventOKIterator(this).begin();
998 else if (grp_iter) return EventGroupIterator(this, Opt).begin();
999 return EventIterator(this).begin();
1000 }
1001
1013
1014 ClassDef(KVTemplateEvent, 0) //Base class for all types of multiparticle event
1015};
1016
1017#endif
1018
int Int_t
long Long_t
#define c(i)
#define e(i)
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
const char Option_t
#define ClassDef(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
char name[80]
char * Form(const char *fmt,...)
Abstract base class container for multi-particle events.
Definition KVEvent.h:67
KVNameValueList fParameters
general-purpose list of parameters
Definition KVEvent.h:72
TClonesArray * fParticles
array of particles in event
Definition KVEvent.h:71
virtual Int_t GetMult(Option_t *opt="") const
Definition KVEvent.h:142
void SetParameter(const Char_t *name, ValType value) const
Definition KVEvent.h:197
const TClonesArray * GetParticleArray() const
Definition KVEvent.h:138
Utility class for kinematical transformations of KVParticle class.
Handle a list of positive integers (partition)
void Add(TArrayI *tab)
void Fill(Double_t* tab,Int_t mult);
void Clear(Option_t *option="")
Classe dérivée de TNamed, Reinitialisation de l'object.
void SetPopulation(Int_t pop)
Initialise la population à "pop".
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual void Print(Option_t *opt="") const
Int_t GetIntValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
const Char_t * GetNameAt(Int_t idx) const
Int_t GetEntries() const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition KVString.h:73
Class used for iterating over particles in events.
Iterator(const KVEvent *e, const KVTemplateParticleCondition< Particle > &selection)
Particle * current() const
std::forward_iterator_tag iterator_category
Iterator(const Iterator &i)
const ReferenceType & get_const_reference() const
Iterator(const KVEvent &e, Type t=Type::All, TString grp="")
Iterator(const KVEvent &e, const KVTemplateParticleCondition< Particle > &selection)
ReferenceType & get_reference() const
KVTemplateParticleCondition< Particle > fSelection
Bool_t operator==(const Iterator &it) const
const Iterator & operator++()
Particle & operator*() const
Iterator & operator=(const Iterator &rhs)
Iterator(const KVEvent *e, Type t=Type::All, TString grp="")
Bool_t operator!=(const Iterator &it) const
void Reset(Type t=Type::Null, TString grp="")
void SetIsIterating(Bool_t on=kTRUE)
PointerType * get_pointer() const
const PointerType * get_const_pointer() const
Base class for event classes (containers for different types of particle objects)
EventIterator ConditionalIterator(const KVTemplateParticleCondition< Particle > &c)
void ResetGetNextParticle() const
void ChangeFrame(const KVFrameTransform &ft, const KVString &name="")
void GetMasses(std::vector< Double_t > &mass)
virtual void ls(Option_t *t="") const
Particle * GetParticle(const Char_t *group_name) const
std::enable_if<!std::is_base_of< KVNucleus, U >::value, Double_t >::type get_channel_qvalue() const
std::enable_if<!std::is_base_of< KVNucleus, U >::value, KVString >::type get_partition_name()
Particle * GetParticleWithName(const Char_t *name) const
std::enable_if< std::is_base_of< KVNucleus, U >::value >::type GetGSMasses(std::vector< Double_t > &mass)
void DefineGroup(const Char_t *groupname, const Char_t *from="")
Int_t GetMultiplicity(Int_t Z, Int_t A=0, Option_t *opt="")
void SetFrame(const Char_t *newframe, const Char_t *oldframe, const KVFrameTransform &ft)
Particle * GetParticle(Int_t npart) const
Iterator GetNextParticleIterator(Option_t *opt) const
KVString GetPartitionName()
Particle * GetNextParticle(Option_t *opt="") const
std::enable_if< std::is_base_of< KVNucleus, U >::value, Double_t >::type GetGSChannelQValue() const
KVTemplateEvent(Int_t mult=50)
internal iterator used by GetNextParticle()
void FillHisto(TH1 *h, const Char_t *Nucleus_method, const Char_t *method_prototype, const Char_t *args, Option_t *opt="")
Double_t GetSum(const Char_t *Nucleus_method, Option_t *opt="")
Iterator begin() const
Particle * AddParticle()
std::enable_if< std::is_base_of< KVNucleus, U >::value, KVString >::type get_partition_name()
void SetFrame(const Char_t *frame, const KVFrameTransform &ft)
std::enable_if< std::is_base_of< KVNucleus, U >::value, Double_t >::type get_channel_qvalue() const
void DefineGroup(const Char_t *groupname, KVTemplateParticleCondition< Particle > *cond, const Char_t *from="")
void SetFrameName(const KVString &name)
Double_t GetChannelQValue() const
void GetMultiplicities(Int_t mult[], const TString &species, Option_t *opt="")
Iterator end() const
void FillHisto(TH1 *h, const Char_t *Nucleus_method, Option_t *opt="")
virtual Int_t GetMult(Option_t *opt="") const
void ChangeDefaultFrame(const Char_t *newdef, const Char_t *defname="")
Double_t GetSum(const Char_t *Nucleus_method, const Char_t *method_prototype, const Char_t *args, Option_t *opt="")
std::enable_if< std::is_base_of< KVNucleus, U >::value >::type FillIntegerList(KVIntegerList *IL, Option_t *opt)
virtual void Print(Option_t *t="") const
An object for handling particle selection.
Bool_t Test(const ParticleType *nuc) const
void Set(const KVString &name, const LambdaFunc &F)
void Sort(Int_t upto=kMaxInt) override
TObject * ConstructedAt(Int_t idx)
virtual Int_t Fill(const char *name, Double_t w)
TIter & Begin()
EReturnType ReturnType()
static const EReturnType kLong
void InitWithPrototype(const char *function, const char *proto, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Bool_t IsValid() const
static const EReturnType kDouble
void Execute()
const char * GetName() const override
static TClass * Class()
Int_t GetEntriesFast() const
TObject * FindObject(const char *name) const override
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
Ssiz_t Length() const
const char * Data() const
void ToUpper()
TObjArray * Tokenize(const TString &delim) const
Type
const Int_t n
TH1 * h
Double_t Max(Double_t a, Double_t b)
EventGroupIterator(const KVEvent &event, const TString &grp)
EventGroupIterator(const KVEvent *event, const TString &grp)
EventIterator(const KVEvent &event, typename Iterator::Type t=Iterator::Type::All, const TString &grp="")
EventIterator(const KVEvent *event, typename Iterator::Type t=Iterator::Type::All, const TString &grp="")
EventIterator(const KVEvent *event, const KVTemplateParticleCondition< Particle > &selection)
EventIterator(const KVEvent &event, const KVTemplateParticleCondition< Particle > &selection)
EventOKIterator(const KVEvent &event)
EventOKIterator(const KVEvent *event)