ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/StablePart.h
Revision: 1.3
Committed: Thu Jul 31 13:29:35 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: MITHEP_2_0_x
Changes since 1.2: +13 -50 lines
Log Message:
Cleaned up MitEdm classes

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.3 // $Id: StablePart.h,v 1.2 2008/07/29 22:52:54 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     StablePart(int pid, const reco::TrackRef &trk) :
31     BasePart(pid),
32     track_ (trk) {}
33 loizides 1.1 virtual ~StablePart() {}
34    
35     // Override recursion helper method
36     virtual void doAction (BasePartAction *Action) const;
37     // General printing method
38     virtual void print (std::ostream &os = std::cout) const;
39    
40 bendavid 1.3 // Accessors
41     const reco::Track *track () const { return track_.get(); }
42     const reco::TrackRef &trackRef() const { return track_; }
43     double charge () const { return track()->charge(); }
44    
45 loizides 1.1 private:
46 bendavid 1.3 reco::TrackRef track_;
47 loizides 1.1
48     };
49     }
50     #endif