Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-17 23:10:51

0001 #ifndef SingleParticleEvent_h
0002 #define SingleParticleEvent_h
0003 //
0004 // SingleParticleEvent by droll (23/DEC/2005)
0005 //
0006 
0007 // include files
0008 #include "GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonParameters.h"
0009 #include "GeneratorInterface/CosmicMuonGenerator/interface/Point5MaterialMap.h"
0010 #include <iostream>
0011 
0012 class SingleParticleEvent {
0013 public:
0014   // constructor
0015   SingleParticleEvent() {
0016     ID = 0;
0017     Px = 0.;
0018     Py = 0.;
0019     Pz = 0.;
0020     E = 0.;
0021     M = 0.;
0022     Vx = 0.;
0023     Vy = 0.;
0024     Vz = 0.;
0025     T0 = 0.;
0026     ID_in = 0;
0027     Px_in = 0.;
0028     Py_in = 0.;
0029     Pz_in = 0.;
0030     E_in = 0.;
0031     M_in = 0.;
0032     Vx_in = 0.;
0033     Vy_in = 0.;
0034     Vz_in = 0.;
0035     T0_in = 0.;
0036     HitTarget = false;
0037     PlugVx = PlugOnShaftVx;
0038     PlugVz = PlugOnShaftVz;
0039     RhoAir = 0.;
0040     RhoWall = 0.;
0041     RhoRock = 0.;
0042     RhoClay = 0.;
0043     RhoPlug = 0.;
0044     ClayWidth = DefaultClayWidth;
0045   }
0046   // destructor
0047   ~SingleParticleEvent() {}
0048 
0049 private:
0050   int ID;
0051   double Px;
0052   double Py;
0053   double Pz;
0054   double E;
0055   double M;
0056   double Vx;
0057   double Vy;
0058   double Vz;
0059   double T0;
0060   int ID_in;
0061   double Px_in;
0062   double Py_in;
0063   double Pz_in;
0064   double E_in;
0065   double M_in;
0066   double Vx_in;
0067   double Vy_in;
0068   double Vz_in;
0069   double T0_in;
0070   bool HitTarget;
0071   bool MTCC;
0072 
0073   // other stuff
0074   double dX;
0075   double dY;
0076   double dZ;
0077   double tmpVx;
0078   double tmpVy;
0079   double tmpVz;
0080   // update event during propagation
0081   void update(double stepSize);
0082   // temporary propagation
0083   void updateTmp(double stepSize);
0084   void subtractEloss(double waterEquivalents);  // update 4momentum
0085   double absVzTmp();                            // |Vz| [mm]
0086   double rVxyTmp();                             // R_XY [mm]
0087 
0088 public:
0089   // create (initialize) an event with a single particle
0090   void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0);
0091   // propagate particle to target area
0092   void propagate(double ElossScaleFac,
0093                  double RadiusTarget,
0094                  double Z_DistTarget,
0095                  double Z_CentrTarget,
0096                  bool TrackerOnly,
0097                  bool MTCCHalf);
0098   double Eloss(double waterEquivalents, double Energy);  //return Eloss
0099   // particle has hit the target volume (during propagation)
0100   bool hitTarget();
0101   // event info (direct access)
0102   //initial state mother particle
0103   int id_in();                // [HEP particle code]
0104   double px_in();             // [GeV/c]
0105   double py_in();             // [GeV/c]
0106   double pz_in();             // [GeV/c]
0107   double e_in();              // [GeV]
0108   double m_in();              // [GeV/c^2]
0109   double vx_in();             // [mm]
0110   double vy_in();             // [mm]
0111   double vz_in();             // [mm]
0112   double t0_in();             // [mm/c] with c = 299.792458 mm/ns
0113   double WaterEquivalents();  //[g cm^-2]
0114 
0115   //final state daughter particles
0116   int id();     // [HEP particle code]
0117   double px();  // [GeV/c]
0118   double py();  // [GeV/c]
0119   double pz();  // [GeV/c]
0120   double e();   // [GeV]
0121   double m();   // [GeV/c^2]
0122   double vx();  // [mm]
0123   double vy();  // [mm]
0124   double vz();  // [mm]
0125   double t0();  // [mm/c] with c = 299.792458 mm/ns
0126   // event info (calculated)
0127   double phi();     // in horizontal (x-z) plane [rad]
0128   double theta();   // off vertical    (y) axis  [rad]
0129   double absmom();  // |p| [GeV/c]
0130   double absVz();   // |Vz| [mm]
0131   double rVxy();    // R_XY [mm]
0132 
0133   void setEug(double Eug);          // [GeV]
0134   double Eug();                     // [GeV/c]
0135   double deltaEmin(double Energy);  // [GeV]
0136   void SurfProj(double Vx_in,
0137                 double Vy_in,
0138                 double Vz_in,
0139                 double Px_in,
0140                 double Py_in,
0141                 double Pz_in,
0142                 double& Vx_up,
0143                 double& Vy_up,
0144                 double& Vz_up);
0145 
0146   double PlugVx;
0147   double PlugVz;
0148   double RhoAir;
0149   double RhoWall;
0150   double RhoRock;
0151   double RhoClay;
0152   double RhoPlug;
0153   double ClayWidth;
0154   double waterEquivalents;
0155   double E_ug;
0156 };
0157 #endif