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

Comparing UserCode/MitAna/DataTree/src/CompositeParticle.cc (file contents):
Revision 1.6 by bendavid, Wed Feb 18 08:18:36 2009 UTC vs.
Revision 1.8 by loizides, Fri Mar 20 18:23:27 2009 UTC

# Line 7 | Line 7 | ClassImp(mithep::CompositeParticle)
7   using namespace mithep;
8  
9   //--------------------------------------------------------------------------------------------------
10 < Double_t CompositeParticle::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 += Daughter(i)->Charge();
17 <  
18 <  return charge;
19 < }
20 <
21 < //--------------------------------------------------------------------------------------------------
22 < Bool_t CompositeParticle::HasDaughter(const Particle* p) const
10 > Bool_t CompositeParticle::HasDaughter(const Particle *p) const
11   {
12    // Return true if given particle is among daughters.
13  
# Line 43 | Line 31 | Bool_t CompositeParticle::HasCommonDaugh
31   }
32  
33   //--------------------------------------------------------------------------------------------------
34 < Bool_t CompositeParticle::HasSameDaughters(const CompositeParticle* p) const
34 > Bool_t CompositeParticle::HasSameDaughters(const CompositeParticle *p) const
35   {
36    // Return true if daughters are the same.
37  
# Line 58 | Line 46 | Bool_t CompositeParticle::HasSameDaughte
46          
47    return kTRUE;
48   }
61
62 //--------------------------------------------------------------------------------------------------
63 FourVector CompositeParticle::Mom() const
64 {
65  // Return the vector sum of the momenta of the daughters.
66
67  FourVector mom;
68  for (UInt_t i=0; i<NDaughters(); ++i)
69    mom += (Daughter(i))->Mom();
70  
71  return mom;
72 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines