GenParticle_ROOT.cc
Go to the documentation of this file.
1 #include <io/GenParticle_ROOT.h>
2 #include <evt/GenParticle.h>
3 
4 using namespace io;
5 
6 
7 ClassImp(GenParticle_ROOT)
8 
9 
10 #ifndef __CINT__
11 
14  *this >> gp;
15  return gp;
16 }
17 
19  const evt::GenParticle& evtGP) {
20  rootGP.SetParentId(evtGP.GetParentId());
21  rootGP.SetParentEnergy(evtGP.GetParentEnergy());
22  rootGP.SetEnergyCM(evtGP.GetEnergyCM());
23  rootGP.SetKinel(evtGP.GetKinel());
24  rootGP.SetMultiplicity(evtGP.GetMultiplicity());
25  rootGP.SetTargetMass(evtGP.GetTargetMass());
26  rootGP.SetDepth(evtGP.GetDepth());
27  rootGP.SetHeight(evtGP.GetHeight());
28 
29  unsigned numberOfDaughterParticles = evtGP.GetDaughterParticles().size();
30  rootGP.AddNDaughters(numberOfDaughterParticles);
31  for (unsigned i = 0; i < numberOfDaughterParticles; ++i) {
33  }
34 }
35 
36 
38  evt::GenParticle& evtGP) const {
39  evtGP.SetParentId(rootGP.GetParentId());
40  evtGP.SetParentEnergy(rootGP.GetParentEnergy());
41  evtGP.SetEnergyCM(rootGP.GetEnergyCM());
42  evtGP.SetKinel(rootGP.GetKinel());
43  evtGP.SetMultiplicity(rootGP.GetMultiplicity());
44  evtGP.SetTargetMass(rootGP.GetTargetMass());
45  evtGP.SetDepth(rootGP.GetDepth());
46  evtGP.SetHeight(rootGP.GetHeight());
47 
48  unsigned numberOfDaughterParticles = rootGP.GetDaughterParticles().size();
49  evtGP.AddNDaughters(numberOfDaughterParticles);
50  for (unsigned i = 0; i < numberOfDaughterParticles; ++i) {
52  }
53 }
54 #endif
55 
56 
58 {
59  ConvertGenParticleEvt2Root(*this, gp);
60 }
61 
62 
64 {
65  ConvertGenParticleRoot2Evt(*this, gp);
66 }
double GetDepth() const
void SetMultiplicity(const int mult)
Definition: GenParticle.h:33
void SetDepth(const double depth)
double GetHeight() const
Definition: GenParticle.h:22
int GetTargetMass() const
void SetTargetMass(const int targetMass)
std::vector< io::GenParticle_ROOT > & GetDaughterParticles()
double GetKinel() const
void SetKinel(const double kinel)
Definition: GenParticle.h:32
void SetDepth(const double depth)
Definition: GenParticle.h:35
void AddNDaughters(int size)
Definition: GenParticle.h:39
int GetMultiplicity() const
void SetParentEnergy(const double parentEnergy)
void SetMultiplicity(const int mult)
void ConvertGenParticleEvt2Root(io::GenParticle_ROOT &rootGP, const evt::GenParticle &evtGP)
int GetParentId() const
Definition: GenParticle.h:15
void SetEnergyCM(const double energyCM)
double GetHeight() const
void SetHeight(const double height)
double GetDepth() const
Definition: GenParticle.h:21
void SetParentId(const int parentId)
double GetEnergyCM() const
void SetTargetMass(const int targetMass)
Definition: GenParticle.h:34
double GetParentEnergy() const
Definition: GenParticle.h:16
std::vector< GenParticle > & GetDaughterParticles()
Definition: GenParticle.h:24
double GetEnergyCM() const
Definition: GenParticle.h:17
void SetParentId(const int parentId)
Definition: GenParticle.h:29
void AddNDaughters(int size)
void SetParentEnergy(const double parentEnergy)
Definition: GenParticle.h:30
int GetParentId() const
void operator>>(evt::GenParticle &gp) const
void SetEnergyCM(const double energyCM)
Definition: GenParticle.h:31
int GetTargetMass() const
Definition: GenParticle.h:20
void ConvertGenParticleRoot2Evt(const io::GenParticle_ROOT &rootGP, evt::GenParticle &evtGP) const
void SetHeight(const double height)
Definition: GenParticle.h:36
void SetKinel(const double kinel)
double GetKinel() const
Definition: GenParticle.h:18
evt::GenParticle Convert()
double GetParentEnergy() const
int GetMultiplicity() const
Definition: GenParticle.h:19

, generated on Tue Sep 26 2023.