1 |
– |
// $Id$ |
2 |
– |
|
3 |
– |
#ifndef DATATREE_ELECTRON_H |
4 |
– |
#define DATATREE_ELECTRON_H |
5 |
– |
|
6 |
– |
#include "MitAna/DataTree/interface/Lepton.h" |
7 |
– |
|
1 |
|
//-------------------------------------------------------------------------------------------------- |
2 |
+ |
// $Id$ |
3 |
|
// |
4 |
|
// Electron |
5 |
|
// |
6 |
|
// Details to be worked out... |
7 |
|
// |
8 |
< |
// Authors: C.Loizides, J. Bendavid |
15 |
< |
// |
8 |
> |
// Authors: C.Loizides, J.Bendavid |
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
|
|
11 |
+ |
#ifndef DATATREE_ELECTRON_H |
12 |
+ |
#define DATATREE_ELECTRON_H |
13 |
+ |
|
14 |
+ |
#include "MitAna/DataTree/interface/ChargedParticle.h" |
15 |
+ |
|
16 |
|
namespace mithep |
17 |
|
{ |
18 |
< |
class Electron : public Lepton |
18 |
> |
class Electron : public ChargedParticle |
19 |
|
{ |
20 |
|
public: |
21 |
|
Electron() {} |
24 |
– |
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) // Muon class |
24 |
> |
const Track *BestTrk() const; |
25 |
> |
const Track *GsfTrk() const; |
26 |
> |
const Track *TrackerTrk() const; |
27 |
> |
Double_t Mass() const { return 0.51099892e-3; } |
28 |
> |
|
29 |
> |
void SetGsfTrk(Track* t) { fGsfTrackRef = t; } |
30 |
> |
void SetTrackerTrk(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 |
< |
} /*namespace mithep*/ |
38 |
> |
} |
39 |
> |
|
40 |
> |
//-------------------------------------------------------------------------------------------------- |
41 |
> |
inline const mithep::Track *mithep::Electron::BestTrk() const |
42 |
> |
{ |
43 |
> |
// Return "best" track. |
44 |
> |
|
45 |
> |
if (GsfTrk()) |
46 |
> |
return GsfTrk(); |
47 |
> |
else if (TrackerTrk()) |
48 |
> |
return TrackerTrk(); |
49 |
> |
|
50 |
> |
return 0; |
51 |
> |
} |
52 |
> |
|
53 |
> |
//-------------------------------------------------------------------------------------------------- |
54 |
> |
inline const mithep::Track *mithep::Electron::GsfTrk() const |
55 |
> |
{ |
56 |
> |
// Return global combined track. |
57 |
> |
|
58 |
> |
return static_cast<const Track*>(fGsfTrackRef.GetObject()); |
59 |
> |
} |
60 |
> |
|
61 |
> |
//-------------------------------------------------------------------------------------------------- |
62 |
> |
inline const mithep::Track *mithep::Electron::TrackerTrk() const |
63 |
> |
{ |
64 |
> |
// Return tracker track. |
65 |
|
|
66 |
< |
#endif /*DATATREE_MUON_H*/ |
66 |
> |
return static_cast<const Track*>(fTrackerTrackRef.GetObject()); |
67 |
> |
} |
68 |
> |
#endif |