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 |
|
|
}
|