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

Comparing UserCode/MitAna/DataTree/interface/CompositeParticle.h (file contents):
Revision 1.2 by loizides, Tue Jul 1 08:56:49 2008 UTC vs.
Revision 1.4 by loizides, Thu Jul 3 08:22:17 2008 UTC

# Line 3 | Line 3
3   //
4   // Composite Particle
5   //
6 < // Details to be worked out...
6 > // A composite particle class that holds other (daughter) particles.
7   //
8   // Authors: J.Bendavid, C.Loizides
9 //
9   //--------------------------------------------------------------------------------------------------
10  
11   #ifndef DATATREE_COMPOSITEPARTICLE_H
# Line 21 | Line 20 | namespace mithep
20    class CompositeParticle : public Particle
21    {
22      public:
23 <      CompositeParticle() {}
23 >      CompositeParticle() { SetClearBit(); }
24        ~CompositeParticle() {}
25      
26 <      void                      AddDaughter(Particle *p) { fDaughters.Add(p); }
26 >      void                      AddDaughter(Particle *p) { fDaughters.Add(p); fDaughters.Trim(); }
27        Int_t                     Charge()              const;
28        const Particle           *GetDaughter(UInt_t i) const { return fDaughters.At(i); }
29        UInt_t                    GetNDaughters()       const { return fDaughters.GetEntries(); }
# Line 34 | Line 33 | namespace mithep
33        FourVector                Mom()                 const;
34          
35      protected:
36 +      void                      Clear(Option_t */*option*/="") { fDaughters.Reset(); }
37 +
38        RefArray<Particle>        fDaughters; //references to daughter particles
39        
40      ClassDef(CompositeParticle, 1) // Composite particle class

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines