ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/StablePart.h
Revision: 1.6
Committed: Sat Sep 27 05:48:24 2008 UTC (16 years, 7 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006, Mit_005, Mit_004
Changes since 1.5: +18 -19 lines
Log Message:
Cleanup

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.6 // $Id: StablePart.h,v 1.5 2008/08/29 00:27:21 loizides 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 loizides 1.5 // Authors: C.Paus
11 loizides 1.1 //--------------------------------------------------------------------------------------------------
12    
13 loizides 1.6 #ifndef MITEDM_DATAFORMATS_STABLEPART_H
14     #define MITEDM_DATAFORMATS_STABLEPART_H
15 loizides 1.1
16     #include <iostream>
17     #include <cmath>
18     #include "MitEdm/DataFormats/interface/BasePart.h"
19 bendavid 1.3 #include "DataFormats/TrackReco/interface/TrackFwd.h"
20     #include "DataFormats/TrackReco/interface/Track.h"
21 loizides 1.1
22     namespace mitedm
23     {
24     class BasePartAction;
25     class StablePart : public BasePart
26     {
27 loizides 1.6 public:
28     StablePart() {}
29     StablePart(int pid, const reco::TrackRef &trk) : BasePart(pid), track_(trk) {}
30     virtual ~StablePart() {}
31 loizides 1.1
32 loizides 1.6 // Override recursion helper method
33     void doAction(BasePartAction *Action) const;
34     // General printing method
35     void print(std::ostream &os = std::cout) const;
36    
37     // Accessors
38     const reco::Track *track() const { return track_.get(); }
39     const reco::TrackRef &trackRef() const { return track_; }
40     double charge() const { return track()->charge(); }
41 bendavid 1.3
42 loizides 1.6 private:
43     reco::TrackRef track_;
44 loizides 1.1 };
45     }
46     #endif