ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/DecayParticle.cc
Revision: 1.4
Committed: Tue Sep 30 12:53:59 2008 UTC (16 years, 7 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_005, Mit_004
Changes since 1.3: +13 -1 lines
Log Message:
updated DecayParticle to use proper decay parameters and StableData and DecayData classes

File Contents

# User Rev Content
1 bendavid 1.4 // $Id: DecayParticle.cc,v 1.3 2008/07/29 12:29:47 bendavid Exp $
2 loizides 1.1
3     #include "MitAna/DataTree/interface/DecayParticle.h"
4    
5     ClassImp(mithep::DecayParticle)
6 bendavid 1.3
7     using namespace mithep;
8    
9     //--------------------------------------------------------------------------------------------------
10 bendavid 1.4 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 bendavid 1.3 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     }