Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:43

0001 #ifndef CoreSimTrack_H
0002 #define CoreSimTrack_H
0003 
0004 #include "DataFormats/Math/interface/Vector3D.h"
0005 #include "DataFormats/Math/interface/LorentzVector.h"
0006 
0007 #include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
0008 
0009 class CoreSimTrack {
0010 public:
0011   /// constructors
0012   CoreSimTrack() : tId(0), thePID(0) {}
0013   CoreSimTrack(int ipart, const math::XYZTLorentzVectorD& p) : tId(0), thePID(ipart), theMomentum(p) {}
0014 
0015   CoreSimTrack(int ipart, math::XYZVectorD& ip, double ie) : tId(0), thePID(ipart) {
0016     theMomentum.SetXYZT(ip.x(), ip.y(), ip.z(), ie);
0017   }
0018 
0019   const math::XYZTLorentzVectorD& momentum() const { return theMomentum; }
0020 
0021   /// particle type (HEP PDT convension)
0022   int type() const { return thePID; }
0023 
0024   /// charge
0025   float charge() const;
0026 
0027   void setEventId(EncodedEventId e) { eId = e; }
0028   EncodedEventId eventId() const { return eId; }
0029 
0030   void setTrackId(unsigned int t) { tId = t; }
0031   unsigned int trackId() const { return tId; }
0032 
0033 private:
0034   EncodedEventId eId;
0035   unsigned int tId;
0036   int thePID;
0037   math::XYZTLorentzVectorD theMomentum;
0038 };
0039 
0040 #include <iosfwd>
0041 std::ostream& operator<<(std::ostream& o, const CoreSimTrack& t);
0042 
0043 #endif