ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/StablePart.h
Revision: 1.5
Committed: Fri Aug 29 00:27:21 2008 UTC (16 years, 8 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.4: +2 -3 lines
Log Message:
A bit of cleanup.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.5 // $Id: StablePart.h,v 1.4 2008/08/28 22:09:16 paus 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     #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     #endif