ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DaughterData.h
Revision: 1.5
Committed: Tue Dec 9 17:46:59 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.4: +7 -6 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: DaughterData.h,v 1.4 2008/12/03 17:37:46 loizides Exp $
3 //
4 // DaughterData
5 //
6 // Daughter decay information: Keep reference to original particle.
7 //
8 // Authors: J.Bendavid
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_DAUGHTERDATA_H
12 #define MITANA_DATATREE_DAUGHTERDATA_H
13
14 #include "MitAna/DataTree/interface/Particle.h"
15 #include "MitAna/DataTree/interface/Types.h"
16
17 namespace mithep
18 {
19 class DaughterData : public Particle
20 {
21 public:
22 DaughterData() {}
23 DaughterData(const Particle *orig) : fOriginal(const_cast<Particle*>(orig)) {}
24 ~DaughterData() {}
25
26 Double_t Charge() const { return Original()->Charge(); }
27 EObjType ObjType() const { return kDaughterData; }
28 const Particle *Original() const;
29
30 protected:
31 TRef fOriginal; //reference to original particle
32
33 ClassDef(DaughterData, 1) // Daughter data class
34 };
35 }
36
37 //--------------------------------------------------------------------------------------------------
38 inline const mithep::Particle *mithep::DaughterData::Original() const
39 {
40 // Return original particle.
41
42 return static_cast<const Particle*>(fOriginal.GetObject());
43 }
44 #endif