5 |
|
// |
6 |
|
// Details to be worked out... |
7 |
|
// |
8 |
< |
// Authors: C.Loizides, J. Bendavid |
9 |
< |
// |
8 |
> |
// Authors: C.Loizides, J.Bendavid |
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
|
|
11 |
|
#ifndef DATATREE_ELECTRON_H |
19 |
|
{ |
20 |
|
public: |
21 |
|
Electron() {} |
23 |
– |
Electron(Double_t px, Double_t py, Double_t pz, Double_t e) : Lepton(px,py,pz,e) {} |
22 |
|
~Electron() {} |
23 |
|
|
24 |
< |
ClassDef(Electron, 1) // Electron class |
24 |
> |
const Track *GetGsfTrack() const; |
25 |
> |
const Track *GetTrackerTrack() const; |
26 |
> |
const Track *GetTrack() const; |
27 |
> |
Double_t Mass() const { return 0.51099892e-3; } |
28 |
> |
|
29 |
> |
void SetGsfTrack(Track* t) { fGsfTrackRef = t; } |
30 |
> |
void SetTrackerTrack(Track* t) { fTrackerTrackRef = t; } |
31 |
> |
|
32 |
> |
protected: |
33 |
> |
TRef fGsfTrackRef; //global combined track reference |
34 |
> |
TRef fTrackerTrackRef; //tracker track reference |
35 |
> |
|
36 |
> |
ClassDef(Electron, 1) // Electron class |
37 |
|
}; |
38 |
|
} |
39 |
+ |
|
40 |
+ |
//-------------------------------------------------------------------------------------------------- |
41 |
+ |
inline const mithep::Track *mithep::Electron::GetGsfTrack() const |
42 |
+ |
{ |
43 |
+ |
// Return global combined track. |
44 |
+ |
|
45 |
+ |
return static_cast<const Track*>(fGsfTrackRef.GetObject()); |
46 |
+ |
} |
47 |
+ |
|
48 |
+ |
//-------------------------------------------------------------------------------------------------- |
49 |
+ |
inline const mithep::Track *mithep::Electron::GetTrackerTrack() const |
50 |
+ |
{ |
51 |
+ |
// Return tracker track. |
52 |
+ |
|
53 |
+ |
return static_cast<const Track*>(fTrackerTrackRef.GetObject()); |
54 |
+ |
} |
55 |
+ |
|
56 |
+ |
//-------------------------------------------------------------------------------------------------- |
57 |
+ |
inline const mithep::Track *mithep::Electron::GetTrack() const |
58 |
+ |
{ |
59 |
+ |
// Return "best" track. |
60 |
+ |
|
61 |
+ |
if (GetGsfTrack()) |
62 |
+ |
return GetGsfTrack(); |
63 |
+ |
else if (GetTrackerTrack()) |
64 |
+ |
return GetTrackerTrack(); |
65 |
+ |
|
66 |
+ |
return 0; |
67 |
+ |
} |
68 |
|
#endif |