1 |
bendavid |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
bendavid |
1.8 |
// $Id: StableParticle.h,v 1.7 2008/12/09 17:47:00 loizides Exp $
|
3 |
bendavid |
1.1 |
//
|
4 |
|
|
// StableParticle
|
5 |
|
|
//
|
6 |
loizides |
1.4 |
// Generic stable particle with track. Stores absolute pdg code and link to track.
|
7 |
bendavid |
1.1 |
//
|
8 |
|
|
// Authors: C.Loizides, J.Bendavid
|
9 |
|
|
//--------------------------------------------------------------------------------------------------
|
10 |
|
|
|
11 |
loizides |
1.5 |
#ifndef MITANA_DATATREE_STABLEPARTICLE_H
|
12 |
|
|
#define MITANA_DATATREE_STABLEPARTICLE_H
|
13 |
bendavid |
1.1 |
|
14 |
|
|
#include "MitAna/DataTree/interface/ChargedParticle.h"
|
15 |
|
|
|
16 |
|
|
namespace mithep
|
17 |
|
|
{
|
18 |
|
|
class StableParticle : public ChargedParticle
|
19 |
|
|
{
|
20 |
|
|
public:
|
21 |
bendavid |
1.3 |
StableParticle() : fAbsPdgId(0) {}
|
22 |
|
|
StableParticle(UInt_t absPdgId) : fAbsPdgId(absPdgId) {}
|
23 |
bendavid |
1.8 |
StableParticle(UInt_t absPdgId, const Track *track) : fAbsPdgId(absPdgId), fTrackRef(track) {}
|
24 |
bendavid |
1.1 |
~StableParticle() {}
|
25 |
|
|
|
26 |
loizides |
1.7 |
UInt_t AbsPdgId() const { return fAbsPdgId; }
|
27 |
bendavid |
1.8 |
const Track *Trk() const { return fTrackRef.Obj(); }
|
28 |
loizides |
1.7 |
const Track *TrackerTrk() const { return Trk(); }
|
29 |
bendavid |
1.1 |
Double_t Mass() const;
|
30 |
loizides |
1.7 |
EObjType ObjType() const { return kStableParticle; }
|
31 |
bendavid |
1.1 |
TParticlePDG *ParticlePdgEntry() const;
|
32 |
|
|
void SetAbsPdgId(UInt_t absPdgId) { fAbsPdgId=absPdgId; }
|
33 |
bendavid |
1.8 |
void SetTrk(const Track *t) { fTrackRef = t; }
|
34 |
bendavid |
1.1 |
|
35 |
|
|
protected:
|
36 |
|
|
UInt_t fAbsPdgId; //pdg identifier (absolute value)
|
37 |
bendavid |
1.8 |
Ref<Track> fTrackRef; //tracker track reference
|
38 |
bendavid |
1.1 |
|
39 |
loizides |
1.4 |
ClassDef(StableParticle, 1) // Stable particle class
|
40 |
bendavid |
1.1 |
};
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
//--------------------------------------------------------------------------------------------------
|
44 |
|
|
inline TParticlePDG *mithep::StableParticle::ParticlePdgEntry() const
|
45 |
|
|
{
|
46 |
|
|
// Return entry to pdg database for the PARTICLE.
|
47 |
|
|
|
48 |
|
|
return TDatabasePDG::Instance()->GetParticle(fAbsPdgId);
|
49 |
|
|
}
|
50 |
|
|
#endif
|