1 |
bendavid |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
loizides |
1.10 |
// $Id: Electron.h,v 1.9 2008/07/01 08:54:57 loizides Exp $
|
3 |
bendavid |
1.1 |
//
|
4 |
paus |
1.3 |
// Electron
|
5 |
bendavid |
1.1 |
//
|
6 |
|
|
// Details to be worked out...
|
7 |
|
|
//
|
8 |
loizides |
1.9 |
// Authors: C.Loizides, J.Bendavid
|
9 |
bendavid |
1.1 |
//--------------------------------------------------------------------------------------------------
|
10 |
|
|
|
11 |
loizides |
1.6 |
#ifndef DATATREE_ELECTRON_H
|
12 |
|
|
#define DATATREE_ELECTRON_H
|
13 |
|
|
|
14 |
|
|
#include "MitAna/DataTree/interface/Lepton.h"
|
15 |
|
|
|
16 |
bendavid |
1.1 |
namespace mithep
|
17 |
|
|
{
|
18 |
|
|
class Electron : public Lepton
|
19 |
|
|
{
|
20 |
|
|
public:
|
21 |
|
|
Electron() {}
|
22 |
|
|
~Electron() {}
|
23 |
|
|
|
24 |
loizides |
1.10 |
const Track *BestTrk() const;
|
25 |
|
|
const Track *GsfTrk() const;
|
26 |
|
|
const Track *TrackerTrk() const;
|
27 |
loizides |
1.9 |
Double_t Mass() const { return 0.51099892e-3; }
|
28 |
loizides |
1.8 |
|
29 |
loizides |
1.10 |
void SetGsfTrk(Track* t) { fGsfTrackRef = t; }
|
30 |
|
|
void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
|
31 |
loizides |
1.8 |
|
32 |
|
|
protected:
|
33 |
loizides |
1.9 |
TRef fGsfTrackRef; //global combined track reference
|
34 |
|
|
TRef fTrackerTrackRef; //tracker track reference
|
35 |
loizides |
1.8 |
|
36 |
loizides |
1.7 |
ClassDef(Electron, 1) // Electron class
|
37 |
bendavid |
1.1 |
};
|
38 |
loizides |
1.4 |
}
|
39 |
loizides |
1.8 |
|
40 |
loizides |
1.9 |
//--------------------------------------------------------------------------------------------------
|
41 |
loizides |
1.10 |
inline const mithep::Track *mithep::Electron::BestTrk() const
|
42 |
loizides |
1.9 |
{
|
43 |
loizides |
1.10 |
// Return "best" track.
|
44 |
|
|
|
45 |
|
|
if (GsfTrk())
|
46 |
|
|
return GsfTrk();
|
47 |
|
|
else if (TrackerTrk())
|
48 |
|
|
return TrackerTrk();
|
49 |
loizides |
1.9 |
|
50 |
loizides |
1.10 |
return 0;
|
51 |
loizides |
1.9 |
}
|
52 |
|
|
|
53 |
|
|
//--------------------------------------------------------------------------------------------------
|
54 |
loizides |
1.10 |
inline const mithep::Track *mithep::Electron::GsfTrk() const
|
55 |
loizides |
1.9 |
{
|
56 |
loizides |
1.10 |
// Return global combined track.
|
57 |
loizides |
1.9 |
|
58 |
loizides |
1.10 |
return static_cast<const Track*>(fGsfTrackRef.GetObject());
|
59 |
loizides |
1.9 |
}
|
60 |
|
|
|
61 |
|
|
//--------------------------------------------------------------------------------------------------
|
62 |
loizides |
1.10 |
inline const mithep::Track *mithep::Electron::TrackerTrk() const
|
63 |
loizides |
1.9 |
{
|
64 |
loizides |
1.10 |
// Return tracker track.
|
65 |
loizides |
1.9 |
|
66 |
loizides |
1.10 |
return static_cast<const Track*>(fTrackerTrackRef.GetObject());
|
67 |
loizides |
1.9 |
}
|
68 |
loizides |
1.8 |
#endif
|