CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/GeneratorInterface/CosmicMuonGenerator/interface/SingleParticleEvent.h

Go to the documentation of this file.
00001 #ifndef SingleParticleEvent_h
00002 #define SingleParticleEvent_h
00003 //
00004 // SingleParticleEvent by droll (23/DEC/2005)
00005 //
00006 
00007 // include files
00008 #include "GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonParameters.h"
00009 #include "GeneratorInterface/CosmicMuonGenerator/src/Point5MaterialMap.cc"
00010 #include <iostream>
00011 
00012 
00013 class SingleParticleEvent{
00014 public:
00015   // constructor
00016   SingleParticleEvent(){
00017     ID = 0;
00018     Px = 0.; Py = 0.; Pz = 0.; E = 0.; M = 0.;
00019     Vx = 0.; Vy = 0.; Vz = 0.; T0 = 0.;
00020     ID_in = 0;
00021     Px_in = 0.; Py_in = 0.; Pz_in = 0.; E_in = 0.; M_in = 0.;
00022     Vx_in = 0.; Vy_in = 0.; Vz_in = 0.; T0_in = 0.;
00023     HitTarget = false;
00024     PlugVx = PlugOnShaftVx;
00025     PlugVz = PlugOnShaftVz;
00026     RhoAir = 0.;
00027     RhoWall = 0.;
00028     RhoRock = 0.;
00029     RhoClay = 0.;
00030     RhoPlug = 0.;
00031     ClayWidth = DefaultClayWidth;
00032   }
00033   // destructor
00034   ~SingleParticleEvent(){}
00035 private:
00036   int ID;
00037   double Px; double Py; double Pz; double E; double M;
00038   double Vx; double Vy; double Vz; double T0;
00039   int ID_in;
00040   double Px_in; double Py_in; double Pz_in; double E_in; double M_in;
00041   double Vx_in; double Vy_in; double Vz_in; double T0_in;
00042   bool HitTarget;
00043   bool MTCC;
00044 
00045   // other stuff
00046   double dX; double dY; double dZ;
00047   double tmpVx; double tmpVy; double tmpVz;
00048   // update event during propagation
00049   void update(double stepSize);
00050   // temporary propagation
00051   void updateTmp(double stepSize);
00052   void subtractEloss(double waterEquivalents); // update 4momentum
00053   double absVzTmp(); // |Vz| [mm]
00054   double rVxyTmp();  // R_XY [mm]
00055 
00056 
00057 public:
00058   // create (initialize) an event with a single particle
00059   void create(int id, double px, double py, double pz, double e, double m, double vx, double vy, double vz, double t0);
00060   // propagate particle to target area
00061   void propagate(double ElossScaleFac, double RadiusTarget, double Z_DistTarget, double Z_CentrTarget, bool TrackerOnly, bool MTCCHalf);
00062   double Eloss(double waterEquivalents, double Energy); //return Eloss
00063   // particle has hit the target volume (during propagation)
00064   bool hitTarget();
00065   // event info (direct access)
00066   //initial state mother particle
00067   int    id_in(); // [HEP particle code]
00068   double px_in(); // [GeV/c]
00069   double py_in(); // [GeV/c]
00070   double pz_in(); // [GeV/c]
00071   double e_in();  // [GeV]
00072   double m_in();  // [GeV/c^2]
00073   double vx_in(); // [mm]
00074   double vy_in(); // [mm]
00075   double vz_in(); // [mm]
00076   double t0_in(); // [mm/c] with c = 299.792458 mm/ns
00077   double WaterEquivalents(); //[g cm^-2]
00078 
00079   //final state daughter particles
00080   int    id(); // [HEP particle code]
00081   double px(); // [GeV/c]
00082   double py(); // [GeV/c]
00083   double pz(); // [GeV/c]
00084   double e();  // [GeV]
00085   double m();  // [GeV/c^2]
00086   double vx(); // [mm]
00087   double vy(); // [mm]
00088   double vz(); // [mm]
00089   double t0(); // [mm/c] with c = 299.792458 mm/ns
00090   // event info (calculated)
00091   double phi();   // in horizontal (x-z) plane [rad]
00092   double theta(); // off vertical    (y) axis  [rad]
00093   double absmom(); // |p| [GeV/c]
00094   double absVz(); // |Vz| [mm]
00095   double rVxy();  // R_XY [mm]
00096 
00097   void setEug(double Eug); // [GeV]
00098   double Eug(); // [GeV/c]
00099   double deltaEmin(double Energy); // [GeV]
00100   void SurfProj(double Vx_in, double Vy_in, double Vz_in,
00101                 double Px_in, double Py_in, double Pz_in,
00102                 double& Vx_up, double& Vy_up, double& Vz_up);
00103 
00104   double PlugVx;
00105   double PlugVz;
00106   double RhoAir;
00107   double RhoWall;
00108   double RhoRock;
00109   double RhoClay;
00110   double RhoPlug;
00111   double ClayWidth;
00112   double waterEquivalents;
00113   double E_ug;
00114 };
00115 #endif