Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:15:01

0001 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0002   Class to contain all information on each particle in the event.
0003   Includes: TLorentz vector with momenta information.
0004   Charge, PID, etc.
0005   Access functions for E, theta, etc.
0006   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
0007 
0008 #ifndef Particle_H
0009 #define Particle_H
0010 
0011 #pragma clang diagnostic ignored "-Woverloaded-virtual"
0012 
0013 #include "TLorentzVector.h"
0014 
0015 class Particle:public TLorentzVector
0016 {
0017   double vx, vy, vz;
0018 
0019   char identifier[100];
0020 
0021 
0022 public:
0023   int pid;
0024   int charge;
0025   double proper_mass;
0026 
0027   int GetPid();
0028   int GetCharge();
0029   double GetMass();
0030 
0031   void SetPid(int x);
0032   void SetCharge(int x);
0033   void SetMass(double x);
0034 
0035   void SetVx(double x);
0036   void SetVy(double x);
0037   void SetVz(double x);
0038 
0039   double GetVx();
0040   double GetVy();
0041   double GetVz();
0042 
0043   double Pmag();
0044 
0045   int Complete(Particle a, Particle b);
0046   // Set particle momentum to sum zero with
0047   // the supplied particle
0048   // (i.e. p_this + p_a + P_b = 0
0049 
0050 
0051   Particle(double m, const char* name, int pid_in);
0052 
0053   Particle(double m, double px, double py, double pz);
0054 
0055   Particle(double m, TVector3& v);
0056 
0057   Particle(double m, Particle a, Particle b);
0058 
0059   Particle():TLorentzVector(){}
0060 
0061   Particle operator + (const Particle& q);
0062   Particle operator - (const Particle& q);
0063   Particle operator = (const Particle& q);
0064   Particle operator -();
0065 
0066   char * GetName();
0067   void SetName(char * name);
0068 
0069   void SetThetaPhiE(double theta, double phi, double E);
0070   void SetThetaPhiP(double theta, double phi, double P);
0071 
0072 };
0073 #endif