Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:11

0001 #ifndef FastSimDataFormats_CTPPSFastSim_CTPPSFastTrack_H
0002 #define FastSimDataFormats_CTPPSFastSim_CTPPSFastTrack_H
0003 
0004 #include "DataFormats/Math/interface/Vector.h"
0005 #include "DataFormats/Math/interface/Vector3D.h"
0006 #include "DataFormats/Math/interface/Point3D.h"
0007 
0008 #include <vector>
0009 class CTPPSFastTrack {
0010 public:
0011   typedef math::XYZVector Vector;
0012   typedef math::XYZPoint Point;
0013   // ~CTPPSFastTrack() {}
0014   CTPPSFastTrack()
0015       : thet(0.),
0016         thexi(0.),
0017         thecellid(0),
0018         thetof(0.),
0019         thex1(0.),
0020         they1(0.),
0021         thex2(0.),
0022         they2(0.),
0023         momentum_(0, 0, 0),
0024         vertex_(0, 0, 0) {}
0025   // constructor
0026   CTPPSFastTrack(float t,
0027                  float xi,
0028                  unsigned int cellid,
0029                  float tof,
0030                  float x1,
0031                  float y1,
0032                  float x2,
0033                  float y2,
0034                  const Vector &momentum,
0035                  const Point &vertex)
0036       : thet(t),
0037         thexi(xi),
0038         thecellid(cellid),
0039         thetof(tof),
0040         thex1(x1),
0041         they1(y1),
0042         thex2(x2),
0043         they2(y2),
0044         momentum_(momentum),
0045         vertex_(vertex) {}
0046 
0047   ////////////////////////////
0048   //
0049   /// track momentum vector
0050   const Vector &momentum() const;
0051   /// Reference point on the track
0052   const Point &referencePoint() const;
0053   // reference point on the track. This method is DEPRECATED, please use referencePoint() instead
0054   const Point &vertex() const;
0055   /* Time of flight in nanoseconds from the primary interaction
0056          *  to the entry point. Always positive in a PSimHit,
0057          *  but may become negative in a SimHit due to bunch assignment.
0058          */
0059   float timeOfFlight() const { return tof(); }
0060 
0061   float t() const { return thet; }
0062 
0063   float xi() const { return thexi; }
0064 
0065   float tof() const { return thetof; }
0066 
0067   float x1() const { return thex1; }
0068 
0069   float y1() const { return they1; }
0070 
0071   float x2() const { return thex2; }
0072 
0073   float y2() const { return they2; }
0074   float px() const { return momentum_.x(); }
0075   float py() const { return momentum_.Y(); }
0076   float pz() const { return momentum_.Z(); }
0077   float x0() const { return vertex_.x(); }
0078   float y0() const { return vertex_.Y(); }
0079   float z0() const { return vertex_.Z(); }
0080 
0081   unsigned int cellid() const { return thecellid; }
0082 
0083   void setp(const Vector &momentum) { momentum_ = momentum; }
0084 
0085   void setvertex(const Point &vertex) { vertex_ = vertex; }
0086 
0087   void settof(float tof) { thetof = tof; }
0088 
0089   void sett(float t) { thet = t; }
0090 
0091   void setxi(float xi) { thexi = xi; }
0092 
0093   void setx1(float x1) { thex1 = x1; }
0094 
0095   void sety1(float y1) { they1 = y1; }
0096 
0097   void setx2(float x2) { thex2 = x2; }
0098 
0099   void sety2(float y2) { they2 = y2; }
0100 
0101   void setcellid(unsigned int cellid) { thecellid = cellid; }
0102 
0103 private:
0104   float thet;
0105   float thexi;
0106   unsigned int thecellid;
0107   float thetof;
0108   float thex1;
0109   float they1;
0110   float thex2;
0111   float they2;
0112   Vector momentum_;
0113   Point vertex_;
0114 };
0115 
0116 #endif  //CTPPSFastTrack_H