20 #include "KVPosition.h" 
   21 #include "KVParticle.h" 
   27 #include "KVKinematicalFrame.h" 
   55    fGroups.SetOwner(
kTRUE);
 
   67 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0) 
  105 KVParticle::~KVParticle()
 
  198          cout << fmt << 
" [" << frame->
GetName() << 
"] : ";
 
  200          cout << 
" Theta=" << part->
GetTheta() << 
" Phi=" << part->
GetPhi()
 
  201               << 
" KE=" << part->
GetKE() << 
" Vpar=" << part->
GetVpar() << endl;
 
  216    cout << 
"Mass=" << 
M() << endl;
 
  225       if (ngroups > 1) cout << 
"s";
 
  230       while ((
gr = it())) {
 
  232          if (ngroups > 1 && 
index < ngroups) cout << 
", ";
 
  255       if (et * et > 
M2()) {
 
  258          if (pmod && newp.
Mag()) {
 
  409       if (rhs.GetPInitial()) 
SetE0(rhs.GetPInitial());
 
  529       nf += 
p->GetParticle()->_GetNumberOfDefinedFrames();
 
  594       cout << 
"Particle belongs to no groups" << endl;
 
  598       cout << 
"----------------------------------------" << endl;
 
  599       cout << 
"List of groups this particle belongs to:" << endl;
 
  600       cout << 
"----------------------------------------" << endl;
 
  605    cout << 
"----------------------------------------" << endl;
 
  667    if (_defname == 
"") _defname = 
"default";
 
  686       f->GetParticle()->GetListOfFrames()->Remove(newdframe);
 
  688       next_trans = 
f->GetTransform();
 
  697    Set4Mom(*(save_newdef->GetParticle()));
 
  698    save_newdef->GetParticle()->
Set4Mom(old_def_p);
 
  699    save_newdef->SetTransform(next_trans.
Inverse());
 
  700    save_newdef->
SetName(_defname);
 
  836    if (!strcmp(frame, 
"")) 
return;
 
  854       tmp->ApplyTransform(
this, ft);
 
  939           (warn_and_return_null_if_unknown ?
 
  940            Warning(
"GetFrame(const Char_t*)", 
"No frame \"%s\" defined for particle. 0x0 returned.",
 
  964          f->ReapplyTransform(
this);
 
  966          f->GetParticle()->UpdateAllFrames();
 
  996       if ((
f = 
p->GetParticle()->get_frame(_frame))) 
break;
 
 1021       if ((
r = 
p->GetParticle()->get_parent_frame(_frame, 
p))) 
return r;
 
 1050       Error(
"SetFrame(newframe,oldframe)", 
"oldframe=%s does not exist!", oldframe);
 
 1053    f->GetParticle()->SetFrame(newframe, ft);
 
 1070       beta.SetXYZ(0, 0, 0);
 
 1105    if (!strcmp(
"spher", opt) || !strcmp(
"spherical", opt)) {
 
 1113       if (strcmp(
"cart", opt) && strcmp(
"cartesian", opt)) {
 
 1114          Warning(
"SetMomentum(Double_t,Double_t,Double_t,Option_t*)",
 
 1115                  "Unkown coordinate system\n known system are :\n\t\"cartesian\" or \"cart\" (default)\n\t\"spherical\" or \"spher\"");
 
 1116          Warning(
"SetMomentum(Double_t,Double_t,Double_t,Option_t*)",
 
 1183       if (_f->GetParticle()->GetParentFrame() == 
parent) {
 
 1202       if (
f->GetParticle()->GetParentFrame() == parent) {
 
 1203          f->GetParticle()->SetParentFrame(
nullptr);
 
 1220       f->GetParticle()->SetParentFrame(parent);
 
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Kinematical representation of a particle in different reference frames.
void Copy(TObject &nvl) const override
void ls(Option_t *opt="") const override
void Clear(Option_t *opt="") override
const Char_t * GetStringValue(const Char_t *name) const
void Clear(Option_t *="") override
When the frame list is cleared, this particle is no longer the parent of any frames in the list.
TObject * Remove(TObject *) override
When a kinematical frame is removed, this particle is no longer the parent frame.
void Add(TObject *) override
When a kinematical frame is added, this particle becomes the parent frame.
void Copy(TObject &_new_list) const override
void AddAll(const TCollection *) override
When all frames in a list are added to this one, this particle becomes the parent of all frames in th...
Base class for relativistic kinematics of massive particles.
Int_t GetNumberOfDefinedGroups() const
void AddGroups(KVUniqueNameList *un)
list of groups added to the current one
void SetIsOK(Bool_t flag=kTRUE)
TVector3 * GetPInitial() const
virtual void SetMass(Double_t m)
void RemoveGroup(const Char_t *groupname)
Remove group from list of groups.
void AddGroup(const Char_t *groupname, const Char_t *from="") const
const KVParticle * GetOriginal() const
TVector3 GetMomentum() const
void RemoveAllGroups()
Remove all groups.
KVUniqueNameList fGroups
list of momenta of the particle in different Lorentz-boosted frames
KVNameValueList * GetParameters() const
Double_t GetTheta() const
KVParticle & operator=(const KVParticle &rhs)
KVParticle assignment operator.
void SetVectM(const TVector3 &spatial, Double_t mass)
const Char_t * GetFrameName(void) const
void ls(Option_t *option="") const override
void SetVelocity(const TVector3 &)
Set velocity of particle (in cm/ns units)
KVUniqueNameList * GetGroups() const
Bool_t IsDetected() const
const Char_t * GetName() const override
return the field fName
void SetKE(Double_t ecin)
void init()
default initialisation
KVNameValueList fParameters
a general-purpose list of parameters associated with this particle
void Copy(TObject &) const override
void SetMomentum(const TVector3 *v)
void Set4Mom(const TLorentzVector &p)
KVKinematicalFrame * get_parent_frame(const Char_t *, KVKinematicalFrame *F=nullptr) const
KVParticle InFrame(const KVFrameTransform &) const
void SetE0(TVector3 *e=0)
TString fFrameName
non-persistent frame name field, sets when calling SetFrame method
void Clear(Option_t *opt="") override
Reset particle properties i.e. before creating/reading a new event.
void ListGroups() const
List all stored groups.
Bool_t fFrameCopyOnly
if != nullptr, this object is a representation of the particle in a kinematical frame
void SetFrameName(const Char_t *framename)
static Double_t kSpeedOfLight
speed of light in cm/ns
void SetParentFrame(KVParticle *p)
void SetXYZM(Double_t x, Double_t y, Double_t z, Double_t m)
void SetName(const Char_t *nom)
Set Name of the particle.
void SetFrame(const Char_t *frame, const KVFrameTransform &)
friend class KVKinematicalFrame
KVParticle const  * GetFrame(const Char_t *frame, Bool_t warn_and_return_null_if_unknown=kTRUE) const
void ChangeFrame(const KVFrameTransform &, const KVString &="")
void SetOriginal(KVParticle *p)
void SetGroups(KVUniqueNameList *un)
Define for the particle a new list of groups.
Bool_t BelongsToGroup(const Char_t *groupname) const
TVector3 * fE0
the momentum of the particle before it is slowed/stopped by an absorber
void ChangeDefaultFrame(const Char_t *, const Char_t *defname="")
void SetRandomMomentum(Double_t T, Double_t thmin, Double_t thmax, Double_t phmin, Double_t phmax, Option_t *opt="isotropic")
const KVParticle * GetCurrentDefaultKinematics() const
TString fName
non-persistent name field - Is useful
KVKinematicalFrame * get_frame(const Char_t *) const
void Print(Option_t *t="") const override
print out characteristics of particle
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Double_t GetVperp() const
const KVParticle * GetTopmostParentFrame() const
KVList * GetListOfFrames() const
Int_t _GetNumberOfDefinedFrames() const
used to inhibit full copying of particles in different kinematical frames
void print_frames(TString fmt="") const
recursive print out of all defined kinematical frames
Base class used for handling geometry in a multidetector array.
virtual TVector3 GetRandomDirection(Option_t *t="isotropic")
TObject * Remove(TObject *obj) override
Remove object from list.
void Add(TObject *obj) override
void Clear(Option_t *option="") override
void Delete(Option_t *option="") override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Optimised list in which named objects can only be placed once.
void Add(TObject *obj) override
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void AddAll(const TCollection *col)
virtual Int_t GetEntries() const
void Add(TObject *obj) override
TLorentzRotation Inverse() const
TLorentzVector & operator=(const TLorentzVector &)
void Streamer(TBuffer &) override
const char * GetName() const override
const char * GetName() const override
virtual const char * GetName() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual TObject * FindObject(const char *name) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void ls(Option_t *option="") const
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
const char * Data() const
void Form(const char *fmt,...)
void SetXYZ(Double_t x, Double_t y, Double_t z)
RooCmdArg Parameters(const RooArgSet ¶ms)
Expr< UnaryOp< Sqrt< T >, SMatrix< T, D, D2, R >, T >, T, D, D2, R > sqrt(const SMatrix< T, D, D2, R > &rhs)
double beta(double x, double y)
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)
Double_t Sqrt(Double_t x)