1 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
paus |
1.4 |
// $Id: StablePart.h,v 1.3 2008/07/31 13:29:35 bendavid Exp $
|
3 |
loizides |
1.1 |
//
|
4 |
|
|
// StablePart
|
5 |
|
|
//
|
6 |
|
|
// Implementation of a stable particle class for use in general analyses in CMS. The contents of a
|
7 |
|
|
// stable particle is basically its link to the track it refers to. This will be hopefully at some
|
8 |
|
|
// point a useful and good implementation. See the double dispatcher doAction(MyAction).
|
9 |
|
|
//
|
10 |
|
|
// Author List: Ch.Paus
|
11 |
|
|
//--------------------------------------------------------------------------------------------------
|
12 |
|
|
|
13 |
|
|
#ifndef MITEDM_STABLEPART_H
|
14 |
|
|
#define MITEDM_STABLEPART_H
|
15 |
|
|
|
16 |
|
|
#include <iostream>
|
17 |
|
|
#include <cmath>
|
18 |
|
|
|
19 |
|
|
#include "MitEdm/DataFormats/interface/BasePart.h"
|
20 |
bendavid |
1.3 |
#include "DataFormats/TrackReco/interface/TrackFwd.h"
|
21 |
|
|
#include "DataFormats/TrackReco/interface/Track.h"
|
22 |
loizides |
1.1 |
|
23 |
|
|
namespace mitedm
|
24 |
|
|
{
|
25 |
|
|
class BasePartAction;
|
26 |
|
|
class StablePart : public BasePart
|
27 |
|
|
{
|
28 |
|
|
public:
|
29 |
bendavid |
1.3 |
StablePart() {}
|
30 |
paus |
1.4 |
StablePart(int pid, const reco::TrackRef &trk) : BasePart(pid), track_(trk) {}
|
31 |
loizides |
1.1 |
virtual ~StablePart() {}
|
32 |
|
|
|
33 |
|
|
// Override recursion helper method
|
34 |
paus |
1.4 |
virtual void doAction(BasePartAction *Action) const;
|
35 |
loizides |
1.1 |
// General printing method
|
36 |
paus |
1.4 |
virtual void print (std::ostream &os = std::cout) const;
|
37 |
loizides |
1.1 |
|
38 |
bendavid |
1.3 |
// Accessors
|
39 |
paus |
1.4 |
const reco::Track *track () const { return track_.get(); }
|
40 |
bendavid |
1.3 |
const reco::TrackRef &trackRef() const { return track_; }
|
41 |
|
|
double charge () const { return track()->charge(); }
|
42 |
|
|
|
43 |
loizides |
1.1 |
private:
|
44 |
paus |
1.4 |
reco::TrackRef track_;
|
45 |
loizides |
1.1 |
|
46 |
|
|
};
|
47 |
|
|
}
|
48 |
|
|
#endif
|