1 |
bendavid |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
bendavid |
1.2 |
// $Id: ChargedParticle.h,v 1.1 2008/07/25 16:04:44 bendavid Exp $
|
3 |
bendavid |
1.1 |
//
|
4 |
|
|
// ChargedParticle
|
5 |
|
|
//
|
6 |
bendavid |
1.2 |
// Abstract base class for particles which have a track
|
7 |
bendavid |
1.1 |
//
|
8 |
|
|
// Authors: C.Loizides, J.Bendavid
|
9 |
|
|
//--------------------------------------------------------------------------------------------------
|
10 |
|
|
|
11 |
|
|
#ifndef DATATREE_CHARGEDPARTICLE_H
|
12 |
|
|
#define DATATREE_CHARGEDPARTICLE_H
|
13 |
|
|
|
14 |
|
|
#include "MitAna/DataTree/interface/Particle.h"
|
15 |
|
|
#include "MitAna/DataTree/interface/Track.h"
|
16 |
|
|
|
17 |
|
|
namespace mithep
|
18 |
|
|
{
|
19 |
|
|
class ChargedParticle : public Particle
|
20 |
|
|
{
|
21 |
|
|
public:
|
22 |
|
|
ChargedParticle() {}
|
23 |
|
|
~ChargedParticle() {}
|
24 |
|
|
|
25 |
|
|
Double_t Charge() const { return BestTrk()->Charge(); }
|
26 |
|
|
Double_t E() const;
|
27 |
|
|
Double_t Eta() const { return BestTrk()->Mom().Eta(); }
|
28 |
|
|
virtual const Track *BestTrk() const=0;
|
29 |
|
|
FourVector Mom() const { return FourVector(Px(),Py(),Pz(),E()); }
|
30 |
|
|
Double_t Phi() const { return BestTrk()->Phi(); }
|
31 |
|
|
Double_t P() const { return BestTrk()->P(); }
|
32 |
|
|
Double_t Pt() const { return BestTrk()->Pt(); }
|
33 |
|
|
Double_t Px() const { return BestTrk()->Px(); }
|
34 |
|
|
Double_t Py() const { return BestTrk()->Py(); }
|
35 |
|
|
Double_t Pz() const { return BestTrk()->Pz(); }
|
36 |
|
|
|
37 |
|
|
ClassDef(ChargedParticle, 1) // ChargedParticle class
|
38 |
|
|
};
|
39 |
|
|
}
|
40 |
|
|
|
41 |
|
|
//--------------------------------------------------------------------------------------------------
|
42 |
|
|
inline Double_t mithep::ChargedParticle::E() const
|
43 |
|
|
{
|
44 |
|
|
return TMath::Sqrt(BestTrk()->P()*BestTrk()->P() + Mass()*Mass());
|
45 |
|
|
}
|
46 |
|
|
#endif
|