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.22 by loizides, Mon Jul 13 11:00:18 2009 UTC vs.
Revision 1.24 by paus, Thu Mar 29 23:41:54 2012 UTC

# Line 5 | Line 5
5   //
6   // A composite particle class that holds other (daughter) particles.
7   //
8 < // Authors: J.Bendavid, C.Loizides
8 > // Authors: J.Bendavid, C.Loizides, C.Paus
9   //--------------------------------------------------------------------------------------------------
10  
11   #ifndef MITANA_DATATREE_COMPOSITEPARTICLE_H
# Line 21 | Line 21 | namespace mithep
21      public:
22        CompositeParticle() {}
23      
24 <      void                      AddDaughter(const Particle *p)    
24 >      void                      AddDaughter      (const Particle *p)
25                                    { fDaughters.Add(p); ClearMom(); ClearCharge(); }
26 <      void                      Clear(Option_t *opt="")          
26 >      void                      Clear            (Option_t *opt="")
27                                    { fDaughters.Clear(opt); ClearMom(); ClearCharge(); }
28 <      const Particle           *Daughter(UInt_t i)    const       { return fDaughters.At(i);     }
29 <      UInt_t                    NDaughters()          const       { return fDaughters.Entries(); }
30 <      Bool_t                    HasDaughter(const Particle *p)                const;
28 >      const Particle           *Daughter         (UInt_t i) const  { return fDaughters.At(i); }
29 >      UInt_t                    NDaughters       ()         const  { return fDaughters.Entries(); }
30 >      Bool_t                    HasDaughter      (const Particle *p)          const;
31        Bool_t                    HasCommonDaughter(const CompositeParticle *p) const;
32 <      Bool_t                    HasSameDaughters(const CompositeParticle *p)  const;
33 <      EObjType                  ObjType()             const       { return kCompositeParticle;   }
32 >      Bool_t                    HasSameDaughters (const CompositeParticle *p) const;
33 >      EObjType                  ObjType          ()                           const
34 >                                  { return kCompositeParticle;   }
35 >
36 >      // Some structural tools
37 >      void                      Mark(UInt_t i=1)      const;
38  
39      protected:
40        Double_t                  GetCharge()           const;
# Line 43 | Line 47 | namespace mithep
47   }
48  
49   //--------------------------------------------------------------------------------------------------
50 + inline void mithep::CompositeParticle::Mark(UInt_t i) const
51 + {
52 +  // mark myself
53 +  mithep::DataObject::Mark(i);
54 +  // mark my dependencies if they are there
55 +  fDaughters.Mark(i);
56 + }
57 +
58 + //--------------------------------------------------------------------------------------------------
59   inline Double_t mithep::CompositeParticle::GetCharge() const
60   {
61    // Return sum of charge of daughter particles.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines