Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:04

0001 #ifndef LaserAlignmentSimulation_LaserBeamsBarrel_h
0002 #define LaserAlignmentSimulation_LaserBeamsBarrel_h
0003 
0004 /** \class LaserBeamsBarrel
0005  *  Define the LaserBeams which connect both TECs and TIB and TOB with eachother
0006  *
0007  *  $Date: 2007/06/11 14:44:28 $
0008  *  $Revision: 1.3 $
0009  *  \author Maarten Thomas
0010  */
0011 
0012 #include "CLHEP/Random/DRand48Engine.h"
0013 
0014 // G4 includes
0015 #include "G4ParticleTable.hh"
0016 #include "G4VUserPrimaryGeneratorAction.hh"
0017 
0018 class G4ParticleGun;
0019 class G4Event;
0020 
0021 class LaserBeamsBarrel : public G4VUserPrimaryGeneratorAction {
0022 public:
0023   /// default constructor
0024   LaserBeamsBarrel();
0025   /// constructor
0026   LaserBeamsBarrel(G4int nPhotonsInGun, G4int nPhotonsInBeam, G4double PhotonEnergy);
0027   /// destructor
0028   ~LaserBeamsBarrel() override;
0029 
0030 public:
0031   /// shoot optical photons into the detector at the beginning of an event
0032   void GeneratePrimaries(G4Event *myEvent) override;
0033   /// set the polarisation of the photons
0034   void setOptPhotonPolar(G4double Angle);
0035 
0036 private:
0037   G4int thenParticleInGun;
0038   G4int thenParticle;
0039   G4double thePhotonEnergy;
0040 
0041 private:
0042   G4ParticleGun *theParticleGun;
0043 
0044   // Unique random number generator
0045   CLHEP::DRand48Engine *theDRand48Engine;
0046 };
0047 #endif