7 |
|
using namespace mithep; |
8 |
|
|
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
< |
Double_t DecayParticle::Charge() const |
11 |
< |
{ |
12 |
< |
// Return sum of charge of daughter particles. |
13 |
< |
|
14 |
< |
Double_t charge = 0; |
15 |
< |
for (UInt_t i=0; i<NDaughters(); ++i) |
16 |
< |
charge += DaughterDat(i)->Charge(); |
17 |
< |
|
18 |
< |
return charge; |
19 |
< |
} |
20 |
< |
|
21 |
< |
//-------------------------------------------------------------------------------------------------- |
22 |
< |
Double_t DecayParticle::PdgMass() const |
23 |
< |
{ |
24 |
< |
// Get Mass from Pdg Lookup |
25 |
< |
|
26 |
< |
TParticlePDG* pdgEntry = ParticlePdgEntry(); |
27 |
< |
if (pdgEntry) |
28 |
< |
return pdgEntry->Mass(); |
29 |
< |
else { |
30 |
< |
return -99.0; |
31 |
< |
printf("Absolute Pdg Code %i not found in table, returning Mass=-99.0 GeV", fAbsPdgId); |
32 |
< |
} |
33 |
< |
} |
34 |
< |
|
35 |
< |
//-------------------------------------------------------------------------------------------------- |
36 |
< |
Bool_t DecayParticle::HasDaughter(const Particle* p) const |
10 |
> |
Bool_t DecayParticle::HasDaughter(const Particle *p) const |
11 |
|
{ |
12 |
|
// Return true if given particle is among daughters. |
13 |
|
|
38 |
|
} |
39 |
|
|
40 |
|
//-------------------------------------------------------------------------------------------------- |
41 |
< |
Bool_t DecayParticle::HasSameDaughters(const DecayParticle* p) const |
41 |
> |
Bool_t DecayParticle::HasSameDaughters(const DecayParticle *p) const |
42 |
|
{ |
43 |
|
// Return true if daughters are the same. |
44 |
|
|
53 |
|
|
54 |
|
return kTRUE; |
55 |
|
} |
56 |
+ |
|
57 |
+ |
//-------------------------------------------------------------------------------------------------- |
58 |
+ |
Double_t DecayParticle::PdgMass() const |
59 |
+ |
{ |
60 |
+ |
// Get mass from pdg lookup. |
61 |
+ |
|
62 |
+ |
TParticlePDG *pdgEntry = ParticlePdgEntry(); |
63 |
+ |
if (pdgEntry) |
64 |
+ |
return pdgEntry->Mass(); |
65 |
+ |
else { |
66 |
+ |
Error("PdgMass", |
67 |
+ |
"Absolute pdg code %i not found in table, returning mass=-99.0 GeV", fAbsPdgId); |
68 |
+ |
return -99.0; |
69 |
+ |
} |
70 |
+ |
} |