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

Comparing UserCode/MitAna/DataTree/interface/GenericParticle.h (file contents):
Revision 1.5 by loizides, Mon May 11 07:59:47 2009 UTC vs.
Revision 1.6 by loizides, Fri Jun 19 07:41:34 2009 UTC

# Line 20 | Line 20 | namespace mithep
20    class GenericParticle : public Particle
21    {
22      public:
23 <      GenericParticle(): fQ(0), fObjType(kGenericParticle) {}
23 >      GenericParticle(): fQ(0), fObjId(kGenericParticle), fObjType(kGenericParticle) {}
24        GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t c,
25 <                      EObjType type=kGenericParticle) :
26 <        fMom(FourVector(px,py,pz,e)), fQ(c), fObjType(type) {}
25 >                      Int_t id=kGenericParticle, EObjType type=kGenericParticle) :
26 >        fMom(FourVector(px,py,pz,e)), fQ(c), fObjId(id), fObjType(type) {}
27        GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e,                    
28 <                      EObjType type=kGenericParticle) :
29 <        fMom(FourVector(px,py,pz,e)), fQ(0), fObjType(type) {}
30 <      GenericParticle(const FourVector &m, Double_t c, EObjType type=kGenericParticle) :
31 <        fMom(m), fQ(c), fObjType(type) {}
32 <      GenericParticle(const FourVectorM &m, Double_t c, EObjType type=kGenericParticle) :
33 <        fMom(m), fQ(c), fObjType(type) {}
28 >                      Int_t id=kGenericParticle, EObjType type=kGenericParticle) :
29 >        fMom(FourVector(px,py,pz,e)), fQ(0), fObjId(id), fObjType(type) {}
30 >      GenericParticle(const FourVector &m, Double_t c,
31 >                      Int_t id=kGenericParticle, EObjType type=kGenericParticle) :
32 >        fMom(m), fQ(c), fObjId(id), fObjType(type) {}
33 >      GenericParticle(const FourVectorM &m, Double_t c,
34 >                      Int_t id=kGenericParticle, EObjType type=kGenericParticle) :
35 >        fMom(m), fQ(c), fObjId(id), fObjType(type) {}
36 >      GenericParticle(const Particle &p) :
37 >        fMom(p.Mom()), fQ(p.Charge()), fObjId(p.ObjId()), fObjType(p.ObjType()) {}
38      
39        void               Print(Option_t *opt="")   const;
40 <      EObjType           RecoObjType()             const { return fObjType;        }
41 <      void               SetCharge(Double_t c)           { fQ = c; ClearCharge();  }
40 >      Int_t              ObjId()                   const { return fObjId;           }
41 >      EObjType           ObjType()                 const { return fObjType;         }
42 >      void               SetCharge(Double_t c)           { fQ = c; ClearCharge();   }
43        void               SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
44 <      void               SetRecoObjType(EObjType t)      { fObjType = t;           }
44 >      void               SetObjId(Int_t id)              { fObjId = id;             }
45 >      void               SetObjType(EObjType t)          { fObjType = t;            }
46      
47      protected:
48 <      Double_t           GetCharge()               const { return fQ;              }
49 <      Double_t           GetMass()                 const { return fMom.M();        }
48 >      Double_t           GetCharge()               const { return fQ;               }
49 >      Double_t           GetMass()                 const { return fMom.M();         }
50        void               GetMom()                  const;
51  
52        FourVectorM        fMom;     //momentum vector
53        Double_t           fQ;       //charge value
54 +      Int_t              fObjId;   //object id
55        EObjType           fObjType; //object type
56  
57 <    ClassDef(GenericParticle, 1) // Generic particle class
57 >    ClassDef(GenericParticle, 2) // Generic particle class
58    };
59   }
60  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines