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 <<
"KVParticle mass=" <<
M() <<
239 if (et * et >
M2()) {
242 if (pmod && newp.
Mag()) {
257 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
278 ((
KVParticle&) obj).SetGroups(this->GetGroups());
280 fParameters.Copy(((
KVParticle&) obj).fParameters);
432 Warning(
"AddGroup_Withcondition",
"DUUUUUUUUUUUUUMYYYYYYY do nothing");
472 f->GetParticle()->AddGroup(sgroupname);
634 f->GetParticle()->RemoveGroup(sgroupname);
655 f->GetParticle()->RemoveAllGroups();
670 cout <<
"Cette particle n appartient a aucun groupe" << endl;
673 cout <<
"--------------------------------------------------" << endl;
674 cout <<
"Liste des groupes auxquels la particule appartient" << endl;
679 cout <<
"--------------------------------------------------" << endl;
752 f->GetParticle()->GetListOfFrames()->Remove(newdframe);
754 next_trans =
f->GetTransform();
763 Set4Mom(*(save_newdef->GetParticle()));
764 save_newdef->GetParticle()->
Set4Mom(old_def_p);
765 save_newdef->SetTransform(next_trans.
Inverse());
766 save_newdef->
SetName(_defname);
901 if (!strcmp(frame,
""))
return;
909 tmp->ApplyTransform(
this, ft);
994 (warn_and_return_null_if_unknown ?
995 Warning(
"GetFrame(const Char_t*)",
"No frame \"%s\" defined for particle. 0x0 returned.",
1019 f->ReapplyTransform(
this);
1021 f->GetParticle()->UpdateAllFrames();
1049 if ((
f = p->GetParticle()->get_frame(_frame)))
break;
1074 if ((
r = p->GetParticle()->get_parent_frame(_frame, p)))
return r;
1096 Error(
"SetFrame(newframe,oldframe)",
"oldframe=%s does not exist!", oldframe);
1099 f->GetParticle()->SetFrame(newframe, ft);
1115 beta.SetXYZ(0, 0, 0);
1150 if (!strcmp(
"spher", opt) || !strcmp(
"spherical", opt)) {
1157 if (strcmp(
"cart", opt) && strcmp(
"cartesian", opt)) {
1158 Warning(
"SetMomentum(Double_t,Double_t,Double_t,Option_t*)",
1159 "Unkown coordinate system\n known system are :\n\t\"cartesian\" or \"cart\" (default)\n\t\"spherical\" or \"spher\"");
1160 Warning(
"SetMomentum(Double_t,Double_t,Double_t,Option_t*)",
1188 void KVParticle::Streamer(
TBuffer& R__b)
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
double pow(double, double)
Kinematical representation of a particle in different reference frames.
virtual void Print(Option_t *opt="") const
virtual void Clear(Option_t *opt="")
const Char_t * GetStringValue(const Char_t *name) const
Handles particle selection criteria for data analysis classes ,.
Base class for relativistic kinematics of massive particles.
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)
void AddGroup(const Char_t *groupname, const Char_t *from="")
KVUniqueNameList * GetGroups() const
return the KVUniqueNameList pointeur where list of groups are stored
TVector3 GetMomentum() const
KVUniqueNameList fGroups
list of TObjString for manage different group name
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 SetMomentum(const TVector3 &v)
virtual void AddGroup_Withcondition(const Char_t *, KVParticleCondition *)
void SetVelocity(const TVector3 &)
Set velocity of particle (in cm/ns units)
const Char_t * GetName() const
return the field fName
void SetKE(Double_t ecin)
virtual void Clear(Option_t *opt="")
Reset particle properties i.e. before creating/reading a new event.
KVList fBoosted
list of momenta of the particle in different Lorentz-boosted frames
void ls(Option_t *option="") const
void init()
default initialisation
KVNameValueList fParameters
a general-purpose list of parameters associated with this particle
virtual void Copy(TObject &) const
KVList * GetListOfFrames(void)
void Set4Mom(const TLorentzVector &p)
KVKinematicalFrame * get_parent_frame(const Char_t *, KVKinematicalFrame *F=nullptr) const
virtual void Print(Option_t *t="") const
print out characteristics of particle
KVParticle InFrame(const KVFrameTransform &)
void SetE0(TVector3 *e=0)
TString fFrameName
non-persistent frame name field, sets when calling SetFrame method
Int_t GetNumberOfDefinedFrames(void)
void SetFrameName(const Char_t *framename)
static Double_t kSpeedOfLight
speed of light in cm/ns
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 &)
KVParticle const * GetFrame(const Char_t *frame, Bool_t warn_and_return_null_if_unknown=kTRUE) const
void ChangeFrame(const KVFrameTransform &, const KVString &="")
void SetGroups(KVUniqueNameList *un)
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")
Int_t GetNumberOfDefinedGroups(void)
return the number of defined groups for the particle
TString fName
non-persistent name field - Is useful
KVKinematicalFrame * get_frame(const Char_t *) const
virtual void AddGroup_Sanscondition(const Char_t *groupname, const Char_t *from="")
void ListGroups(void) const
List all stored groups.
TVector3 GetVelocity() const
returns velocity vector in cm/ns units
Double_t GetVperp() const
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")
virtual void Clear(Option_t *option="")
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from list.
virtual void Delete(Option_t *option="")
virtual TObject * FindObject(const char *name) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void AddAll(const TCollection *col)
virtual Int_t GetEntries() const
virtual void Add(TObject *obj)
TLorentzRotation Inverse() const
TLorentzVector & operator=(const TLorentzVector &)
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 void Error(const char *method, const char *msgfmt,...) 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)
double beta(double x, double y)
VecExpr< UnaryOp< Sqrt< T >, SVector< T, D >, T >, T, D > sqrt(const SVector< T, D > &rhs)
Double_t Sqrt(Double_t x)