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.6 by loizides, Wed Feb 18 15:38:55 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 //--------------------------------------------------------------------------------------------------
10   Bool_t DecayParticle::HasDaughter(const Particle* p) const
11   {
12    // Return true if given particle is among daughters.
# 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