ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitEdm/DataFormats/interface/StablePart.h
Revision: 1.1
Committed: Tue Jul 29 13:16:22 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Log Message:
Have our dedicated edm classes in MitEdm/DataFormats.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: $
3     //
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    
21     namespace mitedm
22     {
23     class BasePartAction;
24     class StablePart : public BasePart
25     {
26     public:
27     // Constructors
28     StablePart();
29     StablePart(int pid);
30     StablePart(int pid, double mass);
31     StablePart(const StablePart &);
32     // Destructor
33     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     //----------------------------------------------------------------------------------------------
41     // Acessors
42     //----------------------------------------------------------------------------------------------
43     // Getting
44     int stat () const { return stat_; }
45     int hits () const { return hits_; }
46     // Track parameters and errors
47     double phi0 () const { return phi0_; }
48     double phi0Err () const { return phi0Err_; }
49     //double d0 (TVector3 *vtx) const;
50     double d0Raw () const { return d0_; }
51     double d0Err () const { return d0Err_; }
52     double pt () const { return fabs(pt_); }
53     double ptErr () const { return ptErr_; }
54     //double z0 (TVector3 *vtx) const;
55     double z0Raw () const { return z0_; }
56     double z0Err () const { return z0Err_; }
57     double cotT () const { return cotT_; }
58     double cotTErr () const { return cotTErr_; }
59     // Setting
60     void setStat (int v) { stat_ = v; }
61     void setHits (int v) { hits_ = v; }
62     void setPhi0 (float v) { phi0_ = v; }
63     void setPhi0Err (float v) { phi0Err_ = v; }
64     void setD0Raw (float v) { d0_ = v; }
65     void setD0Err (float v) { d0Err_ = v; }
66     void setPt (float v) { pt_ = v; }
67     void setPtErr (float v) { ptErr_ = v; }
68     void setZ0Raw (float v) { z0_ = v; }
69     void setZ0Err (float v) { z0Err_ = v; }
70     void setCotT (float v) { cotT_ = v; }
71     void setCotTErr (float v) { cotTErr_ = v; }
72    
73     int charge () const { return (pt_>0) ? 1 : -1; }
74    
75     private:
76     // Constant which is store in the file
77     int hits_; // Mostly Hit informations
78     int stat_; // Storage for various interesting things
79     float phi0_,phi0Err_; // Follow track parameters/uncertainties
80     float d0_, d0Err_;
81     float pt_, ptErr_;
82     float z0_, z0Err_;
83     float cotT_,cotTErr_;
84    
85     //ClassDef(StablePart, 1)
86     };
87     }
88     #endif