ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DaughterData.h
Revision: 1.3
Committed: Wed Dec 3 16:58:17 2008 UTC (16 years, 5 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.2: +2 -2 lines
Log Message:
Make add and set functions for referencing objects accept const pointers

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: DaughterData.h,v 1.2 2008/09/30 12:52:52 bendavid Exp $
3 //
4 // DaughterData
5 //
6 // Additional information on a daughter which is specific to a particular decay
7 //
8 //
9 // Authors: J.Bendavid
10 //--------------------------------------------------------------------------------------------------
11
12 #ifndef MITANA_DATATREE_DAUGHTERDATA_H
13 #define MITANA_DATATREE_DAUGHTERDATA_H
14
15 #include "MitAna/DataTree/interface/Particle.h"
16 #include "MitAna/DataTree/interface/Types.h"
17
18 namespace mithep
19 {
20 class DaughterData : public Particle
21 {
22 public:
23 DaughterData() {}
24 DaughterData(const Particle *orig) : fOriginal(const_cast<Particle*>(orig)) {}
25 virtual ~DaughterData() {}
26
27 Double_t Charge() const { return Original()->Charge(); }
28
29 const Particle *Original() const;
30
31 protected:
32 TRef fOriginal; //TRef to original particle
33
34 ClassDef(DaughterData, 1) // Stable daughter class
35 };
36 }
37
38 inline const mithep::Particle *mithep::DaughterData::Original() const
39 {
40 // Return global combined track.
41
42 return static_cast<const Particle*>(fOriginal.GetObject());
43 }
44 #endif