CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CMSTrackingCutModel.cc
Go to the documentation of this file.
2 
3 #include "G4ParticleDefinition.hh"
4 #include "G4Electron.hh"
5 #include "G4Positron.hh"
6 #include "G4PhysicalConstants.hh"
7 #include "Randomize.hh"
8 
9 CMSTrackingCutModel::CMSTrackingCutModel(const G4ParticleDefinition* part)
10  : particle_(part), deltaE_(0.0), factor_(0.0), rms_(0.0) {
11  if (part == G4Positron::Positron()) {
12  deltaE_ = 2 * CLHEP::electron_mass_c2;
13  }
14 }
15 
17 
18 G4double CMSTrackingCutModel::SampleEnergyDepositEcal(G4double kinEnergy) {
19  G4double edep = kinEnergy * factor_;
20  if (rms_ > 0.) {
21  edep *= G4RandGauss::shoot(1.0, rms_);
22  }
23  return edep + deltaE_;
24 }
CMSTrackingCutModel(const G4ParticleDefinition *)
virtual G4double SampleEnergyDepositEcal(G4double kinEnergy)
part
Definition: HCALResponse.h:20