Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -59,8 +59,8 @@ const CCalHit& CCalHit::operator=(const CCalHit &right) {
|
||||
}
|
||||
|
||||
|
||||
Hep3Vector CCalHit::getEntry() const {return entry;}
|
||||
void CCalHit::setEntry(Hep3Vector xyz) { entry = xyz; }
|
||||
CLHEP::Hep3Vector CCalHit::getEntry() const {return entry;}
|
||||
void CCalHit::setEntry(CLHEP::Hep3Vector xyz) { entry = xyz; }
|
||||
|
||||
double CCalHit::getIncidentEnergy() const {return theIncidentEnergy; }
|
||||
void CCalHit::setIncidentEnergy (double e){theIncidentEnergy = e; }
|
||||
|
||||
@@ -116,10 +116,11 @@ void CCalMagneticField::MagneticField(const double x[3], double B[3]) const {
|
||||
}
|
||||
|
||||
|
||||
Hep3Vector CCalMagneticField::MagneticField(const Hep3Vector point) const {
|
||||
CLHEP::Hep3Vector CCalMagneticField::
|
||||
MagneticField(const CLHEP::Hep3Vector point) const {
|
||||
|
||||
G4double x[3],B[3];
|
||||
Hep3Vector v;
|
||||
CLHEP::Hep3Vector v;
|
||||
|
||||
x[0] = point.x();
|
||||
x[1] = point.y();
|
||||
|
||||
@@ -84,11 +84,11 @@ void CCalPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) {
|
||||
if (isInitialized == 0) initialize();
|
||||
|
||||
if (generatorInput == singleRandom) {
|
||||
particleEnergy = RandFlat::shoot(energyMin,energyMax);
|
||||
particleEnergy = CLHEP::RandFlat::shoot(energyMin,energyMax);
|
||||
particleGun->SetParticleEnergy(particleEnergy);
|
||||
|
||||
G4double eta = RandFlat::shoot(etaMin,etaMax);
|
||||
G4double phi = RandFlat::shoot(phiMin,phiMax);
|
||||
G4double eta = CLHEP::RandFlat::shoot(etaMin,etaMax);
|
||||
G4double phi = CLHEP::RandFlat::shoot(phiMin,phiMax);
|
||||
G4double theta = std::atan(std::exp(-eta))*2.;
|
||||
G4double randomX = std::sin(theta)*std::cos(phi);
|
||||
G4double randomY = std::sin(theta)*std::sin(phi);
|
||||
|
||||
@@ -182,11 +182,11 @@ G4RotationMatrix* CCalRotationMatrixFactory::AddMatrix(const G4String& name,
|
||||
}
|
||||
|
||||
//xprime axis coordinates
|
||||
Hep3Vector xprime(sinth1*cosph1,sinth1*sinph1,costh1);
|
||||
CLHEP::Hep3Vector xprime(sinth1*cosph1,sinth1*sinph1,costh1);
|
||||
//yprime axis coordinates
|
||||
Hep3Vector yprime(sinth2*cosph2,sinth2*sinph2,costh2);
|
||||
CLHEP::Hep3Vector yprime(sinth2*cosph2,sinth2*sinph2,costh2);
|
||||
//zprime axis coordinates
|
||||
Hep3Vector zprime(sinth3*cosph3,sinth3*sinph3,costh3);
|
||||
CLHEP::Hep3Vector zprime(sinth3*cosph3,sinth3*sinph3,costh3);
|
||||
|
||||
#ifdef ddebug
|
||||
G4cout << xprime << '\t'; G4cout << yprime << '\t'; G4cout << zprime << G4endl;
|
||||
|
||||
@@ -27,29 +27,22 @@
|
||||
#include "CCalutils.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include <strstream>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
G4String operator+(const G4String& str, const int i) {
|
||||
int l = str.length() + 15; //How long can an integer be?
|
||||
char *cname = new char[l];
|
||||
cname[0]='\0';
|
||||
std::ostrstream os(cname, l);
|
||||
std::ostringstream os;
|
||||
os << str << i <<'\0';
|
||||
G4String back(cname);
|
||||
delete[] cname;
|
||||
G4String back = os.str();
|
||||
return back;
|
||||
}
|
||||
|
||||
|
||||
G4String operator+(const G4String& str, const double i) {
|
||||
int l = str.length() + 15; //How long can an double be?
|
||||
char *cname = new char[l];
|
||||
cname[0]='\0';
|
||||
std::ostrstream os(cname, l);
|
||||
std::ostringstream os;
|
||||
os << str << i <<'\0';
|
||||
G4String back(cname);
|
||||
delete[] cname;
|
||||
G4String back = os.str();
|
||||
return back;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user