ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/DecayParticle.cc
(Generate patch)

Comparing UserCode/MitAna/DataTree/src/DecayParticle.cc (file contents):
Revision 1.5 by bendavid, Wed Oct 29 17:02:55 2008 UTC vs.
Revision 1.7 by loizides, Fri Mar 20 18:23:27 2009 UTC

# Line 7 | Line 7 | ClassImp(mithep::DecayParticle)
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  
# Line 64 | Line 38 | Bool_t DecayParticle::HasCommonDaughter(
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  
# Line 79 | Line 53 | Bool_t DecayParticle::HasSameDaughters(c
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 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines