Continued changes for geant4.10, still not yet finished

This commit is contained in:
nemu 2014-08-14 17:31:31 +02:00
parent 040457f56e
commit b5072a3e20
15 changed files with 266 additions and 245 deletions

View File

@ -101,7 +101,7 @@ inline G4double MuDecayChannelWithSpin::F_c(G4double x, G4double x0)
f_c = (5.+17.*x-34.*x*x)*(omega+std::log(x))-22.*x+34.*x*x;
f_c = (1.-x)/(3.*x*x)*f_c;
f_c = (6.-4.*x)*R_c(x)+(6.-6.*x)*std::log(x) + f_c;
f_c = (fine_structure_const/twopi) * (x*x-x0*x0) * f_c;
f_c = ( CLHEP::fine_structure_const/CLHEP::twopi) * (x*x-x0*x0) * f_c;
return f_c;
}
@ -116,7 +116,7 @@ inline G4double MuDecayChannelWithSpin::F_theta(G4double x, G4double x0)
f_theta = f_theta + ((4.*(1.-x)*(1.-x))/x)*std::log(1.-x);
f_theta = (1.-x)/(3.*x*x) * f_theta;
f_theta = (2.-4.*x)*R_c(x)+(2.-6.*x)*std::log(x)-f_theta;
f_theta = (fine_structure_const/twopi) * (x*x-x0*x0) * f_theta;
f_theta = (CLHEP::fine_structure_const/CLHEP::twopi) * (x*x-x0*x0) * f_theta;
return f_theta;
}

View File

@ -34,6 +34,13 @@
#include "TVectorD.h"
//
#include <map>
#include "G4ios.hh"
#include <fstream>
#include <vector>
#include <cmath>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class musrRootOutput {

View File

@ -52,12 +52,12 @@ F04ElementField::F04ElementField(G4ThreeVector c, G4LogicalVolume* lv)
lvolume = lv;
lvolume->SetVisAttributes(getVisAttribute(color));
maxStep = 1*mm;
maxStep = 1*CLHEP::mm;
userLimits->SetMaxAllowedStep(maxStep);
userLimits->SetUserMaxTrackLength(500.*m);
userLimits->SetUserMaxTime(10*ms);
userLimits->SetUserMaxTrackLength(500.*CLHEP::m);
userLimits->SetUserMaxTime(10*CLHEP::ms);
// userLimits->SetUserMinEkine(0.1*MeV);
// userLimits->SetUserMinRange(1*mm);
@ -83,7 +83,7 @@ void F04ElementField::construct()
geomManager->CloseGeometry(true);
}
G4cout<<"F04ElementField: center="<<center.x()/mm<<", "<<center.y()/mm<<", "<<center.z()/mm<<" mm"<<G4endl;
G4cout<<"F04ElementField: center="<<center.x()/CLHEP::mm<<", "<<center.y()/CLHEP::mm<<", "<<center.z()/CLHEP::mm<<" mm"<<G4endl;
aNavigator->LocateGlobalPointAndSetup(center,0,false);
G4TouchableHistoryHandle fTouchable = aNavigator->
@ -111,7 +111,7 @@ void F04ElementField::construct()
// Print out the point of the origin of the field in the local coordinate system of the logical volume:
G4ThreeVector local_center = global2local.TransformPoint(center);
G4cout<<"\t==> "<<elementFieldName<<" in vol.=\""<<volumeName<<"\", center(local coord. system): "
<<local_center.x()/mm<<", "<<local_center.y()/mm<<", "<<local_center.z()/mm<<" mm."<<G4endl;
<<local_center.x()/CLHEP::mm<<", "<<local_center.y()/CLHEP::mm<<", "<<local_center.z()/CLHEP::mm<<" mm."<<G4endl;
// Now move the centre of the transformation such that it coincides with the point "center":
global2local*=G4AffineTransform(-local_center);
@ -179,7 +179,7 @@ void F04ElementField::SetEventNrDependentField(G4double initialField, G4double f
G4cout << "Setting field in steps for field "<<elementFieldName<<G4endl;
std::map<G4int,G4double>::iterator it;
for ( it=changeFieldInStepsMap.begin() ; it != changeFieldInStepsMap.end(); it++ ) {
G4cout << "Field will be changed at event "<< (*it).first << " to the value of " << (*it).second/tesla<<" T" << G4endl;
G4cout << "Field will be changed at event "<< (*it).first << " to the value of " << (*it).second/CLHEP::tesla<<" T" << G4endl;
// G4double nominalFieldValue=it->second;
// it->SetNominalFieldValue(nominalFieldValue);
}

View File

@ -48,9 +48,9 @@
F04GlobalField* F04GlobalField::object = 0;
F04GlobalField::F04GlobalField() : G4ElectroMagneticField(),
minStep(0.01*mm), deltaChord(3.0*mm),
deltaOneStep(0.01*mm), deltaIntersection(0.1*mm),
epsMin(2.5e-7*mm), epsMax(0.05*mm),
minStep(0.01*CLHEP::mm), deltaChord(3.0*CLHEP::mm),
deltaOneStep(0.01*CLHEP::mm), deltaIntersection(0.1*CLHEP::mm),
epsMin(2.5e-7*CLHEP::mm), epsMax(0.05*CLHEP::mm),
fEquation(0), fFieldManager(0),
fFieldPropagator(0), fStepper(0), fChordFinder(0)
// F04GlobalField::F04GlobalField() : G4MagneticField(),
@ -310,7 +310,7 @@ void F04GlobalField::CheckWhetherAnyNominalFieldValueNeedsToBeChanged(G4int even
void F04GlobalField::PrintFieldAtRequestedPoints() const {
G4ThreeVector p;
G4double point[4];
G4double delta=0.1*mm;
G4double delta=0.1*CLHEP::mm;
G4double point2[4]; G4double point3[4]; G4double point4[4];
G4double Bfi[6]={0,0,0,0,0,0};
G4double BfiX[6]={0,0,0,0,0,0};
@ -326,9 +326,9 @@ void F04GlobalField::PrintFieldAtRequestedPoints() const {
// printf (" Magnetic Field at %f, %f, %f mm is B= %10.10f, %10.10f, %10.10f tesla.\n",
// point[0]/mm,point[1]/mm,point[2]/mm,Bfi[0]/tesla,Bfi[1]/tesla,Bfi[2]/tesla);
printf (" Field at (%.2f, %.2f, %.2f) mm is: B = (%0.10g, %0.10g, %0.10g) T, E = (%0.10g, %0.10g, %0.10g) kV/mm\n",
point[0]/mm, point[1]/mm, point[2]/mm,
Bfi[0]/tesla, Bfi[1]/tesla, Bfi[2]/tesla,
Bfi[3]/(kilovolt/mm), Bfi[4]/(kilovolt/mm), Bfi[5]/(kilovolt/mm));
point[0]/CLHEP::mm, point[1]/CLHEP::mm, point[2]/CLHEP::mm,
Bfi[0]/CLHEP::tesla, Bfi[1]/CLHEP::tesla, Bfi[2]/CLHEP::tesla,
Bfi[3]/(CLHEP::kilovolt/CLHEP::mm), Bfi[4]/(CLHEP::kilovolt/CLHEP::mm), Bfi[5]/(CLHEP::kilovolt/CLHEP::mm));
}
if (pointsAtWhichUserWantsToPrintFieldDerivative.size()>0) {
@ -353,10 +353,10 @@ void F04GlobalField::PrintFieldAtRequestedPoints() const {
// printf (" Magnetic Field at %f, %f, %f mm is B= %10.10f, %10.10f, %10.10f tesla.\n",
// point[0]/mm,point[1]/mm,point[2]/mm,Bfi[0]/tesla,Bfi[1]/tesla,Bfi[2]/tesla);
printf (" %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n",
point[0]/mm, point[1]/mm, point[2]/mm,
(BfiX[0]-Bfi[0])/gauss/delta*mm, (BfiY[0]-Bfi[0])/gauss/delta*mm, (BfiZ[0]-Bfi[0])/gauss/delta*mm,
(BfiX[1]-Bfi[1])/gauss/delta*mm, (BfiY[1]-Bfi[1])/gauss/delta*mm, (BfiZ[1]-Bfi[1])/gauss/delta*mm,
(BfiX[2]-Bfi[2])/gauss/delta*mm, (BfiY[2]-Bfi[2])/gauss/delta*mm, (BfiZ[2]-Bfi[2])/gauss/delta*mm );
point[0]/CLHEP::mm, point[1]/CLHEP::mm, point[2]/CLHEP::mm,
(BfiX[0]-Bfi[0])/CLHEP::gauss/delta*CLHEP::mm, (BfiY[0]-Bfi[0])/CLHEP::gauss/delta*CLHEP::mm, (BfiZ[0]-Bfi[0])/CLHEP::gauss/delta*CLHEP::mm,
(BfiX[1]-Bfi[1])/CLHEP::gauss/delta*CLHEP::mm, (BfiY[1]-Bfi[1])/CLHEP::gauss/delta*CLHEP::mm, (BfiZ[1]-Bfi[1])/CLHEP::gauss/delta*CLHEP::mm,
(BfiX[2]-Bfi[2])/CLHEP::gauss/delta*CLHEP::mm, (BfiY[2]-Bfi[2])/CLHEP::gauss/delta*CLHEP::mm, (BfiZ[2]-Bfi[2])/CLHEP::gauss/delta*CLHEP::mm );
}
}

View File

@ -53,6 +53,8 @@
#include "G4LorentzRotation.hh"
#include "G4RotationMatrix.hh"
MuDecayChannel::MuDecayChannel(const G4String& theParentName,
G4double theBR)
:G4VDecayChannel("Muonium Decay",1)
@ -89,23 +91,28 @@ G4DecayProducts *MuDecayChannel::DecayIt(G4double)
if (GetVerboseLevel()>1) G4cout << "MuDecayChannel::DecayIt ";
#endif
if (parent == 0) FillParent();
if (daughters == 0) FillDaughters();
// parent mass
G4double parentmass = parent->GetPDGMass();
//------------------------------modified----------xran----------------
if (G4MT_parent == 0) FillParent();
if (G4MT_daughters == 0) FillDaughters();
//------------------------------modified----------xran----------------
// parent mass
//------------------------------modified----------xran----------------
G4double parentmass = G4MT_parent->GetPDGMass();
//------------------------------modified----------xran----------------
//daughters'mass
G4double daughtermass[3];
G4double sumofdaughtermass = 0.0;
for (G4int index=0; index<3; index++){
daughtermass[index] = daughters[index]->GetPDGMass();
daughtermass[index] = G4MT_daughters[index]->GetPDGMass();
sumofdaughtermass += daughtermass[index];
}
//create parent G4DynamicParticle at rest
G4ThreeVector dummy;
G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0);
G4DynamicParticle * parentparticle = new G4DynamicParticle( G4MT_parent, dummy, 0.0);
//create G4Decayproducts
G4DecayProducts *products = new G4DecayProducts(*parentparticle);
delete parentparticle;
@ -141,9 +148,9 @@ do {
sintheta=std::sqrt(1.-costheta*costheta);
rphi=twopi*G4UniformRand()*rad;
rphi=CLHEP::twopi*G4UniformRand()*CLHEP::rad;
rtheta=(std::acos(2.*G4UniformRand()-1.));
rpsi=twopi*G4UniformRand()*rad;
rpsi=CLHEP::twopi*G4UniformRand()*CLHEP::rad;
G4RotationMatrix rot;
rot.set(rphi,rtheta,rpsi);
@ -154,7 +161,7 @@ do {
direction0 *= rot;
G4DynamicParticle * daughterparticle = new G4DynamicParticle ( daughters[0], direction0 * daughtermomentum[0]);
G4DynamicParticle * daughterparticle = new G4DynamicParticle (G4MT_daughters[0], direction0 * daughtermomentum[0]);
products->PushProducts(daughterparticle);
@ -165,7 +172,7 @@ do {
direction1 *= rot;
G4DynamicParticle * daughterparticle1 = new G4DynamicParticle ( daughters[1], direction1 * daughtermomentum[1]);
G4DynamicParticle * daughterparticle1 = new G4DynamicParticle ( G4MT_daughters[1], direction1 * daughtermomentum[1]);
products->PushProducts(daughterparticle1);
//muonic neutrino 2
@ -175,7 +182,7 @@ do {
direction2 *= rot;
G4DynamicParticle * daughterparticle2 = new G4DynamicParticle ( daughters[2],
G4DynamicParticle * daughterparticle2 = new G4DynamicParticle ( G4MT_daughters[2],
direction2 * daughtermomentum[2]);
products->PushProducts(daughterparticle2);

View File

@ -262,7 +262,7 @@ G4double MuDecayChannelWithSpin::R_c(G4double x){
G4double r_c;
r_c = 2.*L2-(pi*pi/3.)-2.;
r_c = 2.*L2-(CLHEP::pi*CLHEP::pi/3.)-2.;
r_c = r_c + omega * (1.5+2.*std::log((1.-x)/x));
r_c = r_c - std::log(x)*(2.*std::log(x)-1.);
r_c = r_c + (3.*std::log(x)-1.-1./x)*std::log(1.-x);

View File

@ -88,7 +88,7 @@ void musrMuFormation::GetDatas(const G4Step* aStep)
{ // Particle generation according to yield table
particleTable=G4ParticleTable::GetParticleTable();
rnd=G4UniformRand();
G4double E = aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy()/keV;
G4double E = aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy()/CLHEP::keV;
Gonin.GetYields(E,105.658369*1000,yvector); // Energy [keV], muon mass [keV/c2], yield table
G4String p_new = "Mu";

View File

@ -51,19 +51,19 @@ musrMuonium* musrMuonium::Definition()
// stable lifetime decay table
// shortlived subType anti_encoding
anInstance = new G4ParticleDefinition(
name, 0.1056584*GeV, 2.99591e-16*MeV, 0.*eplus,
name, 0.1056584*CLHEP::GeV, 2.99591e-16*CLHEP::MeV, 0.*CLHEP::eplus,
1, 0, 0,
0, 0, 0,
"lepton", -1, 0, -1313,
false, 2197.03*ns, NULL,
false, 2197.03*CLHEP::ns, NULL,
false, "mu"
);
// Bohr magnetron of Muonium - T. Shiroka
// The magnetic moment of Mu is the sum of those of mu+ and e- with
// the respective gyromagnetic ratio anomalies as coefficients
G4double muBmu = 0.5*eplus*hbar_Planck/(0.10565840*GeV/c_squared);
G4double muBel = -0.5*eplus*hbar_Planck/(0.51099906*MeV/c_squared);
G4double muBmu = 0.5*CLHEP::eplus*CLHEP::hbar_Planck/(0.10565840*CLHEP::GeV/CLHEP::c_squared);
G4double muBel = -0.5*CLHEP::eplus*CLHEP::hbar_Planck/(0.51099906*CLHEP::MeV/CLHEP::c_squared);
G4double muB = 1.0011659208*muBmu + 1.0011596521859*muBel;
anInstance->SetPDGMagneticMoment( muB );

View File

@ -25,6 +25,8 @@
// #include "musrErrorMessage.hh" - musrErrorMessage class can not be used inside "musrParameters" constructor, because
// musrErrorMessage is crated later!
#include "CLHEP/Units/SystemOfUnits.h"
musrParameters::musrParameters(G4String steeringFileName)
{
pointerToParameters = this;
@ -110,7 +112,7 @@ G4String musrParameters::myStopFileName="Unsetblablabla034tdk40928jfmfnakfh921dj
G4String musrParameters::myRandomNumberFileName="Unsetblablabla034tdk40928jfmfnakfh921djf02UNSED";
G4bool musrParameters::storeOnlyEventsWithHits=true;
G4int musrParameters::storeOnlyEventsWithHitInDetID=0;
G4double musrParameters::signalSeparationTime=100*nanosecond;
G4double musrParameters::signalSeparationTime=100*CLHEP::nanosecond;
G4bool musrParameters::storeOnlyTheFirstTimeHit=false;
G4int musrParameters::storeOnlyEventsWithMuonsDecayedInDetID=0;
G4bool musrParameters::field_DecayWithSpin=false;

View File

@ -46,16 +46,20 @@
#include "G4StepLimiter.hh"
#include "G4UserSpecialCuts.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4OpWLS.hh"
#include "G4OpticalPhysics.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
musrPhysicsList::musrPhysicsList(): G4VUserPhysicsList()
{
defaultCutValue = 0.1*mm;
cutForGamma = 0.1*mm;
cutForElectron = 0.1*mm;
cutForMuon = 0.01*mm;
defaultCutValue = 0.1*CLHEP::mm;
cutForGamma = 0.1*CLHEP::mm;
cutForElectron = 0.1*CLHEP::mm;
cutForMuon = 0.01*CLHEP::mm;
SetVerboseLevel(0);
if (musrParameters::boolG4OpticalPhotons) {
@ -269,9 +273,10 @@ void musrPhysicsList::ConstructProcess()
// For models
#include "G4ProcessTable.hh"
#include "G4WentzelVIModel.hh"
#include "G4UrbanMscModel90.hh"
//#include "G4UrbanMscModel90.hh"
//cks 14.12.2011 #include "G4UrbanMscModel92.hh"
#include "G4UrbanMscModel93.hh"
//#include "G4UrbanMscModel93.hh"
#include "G4UrbanMscModel.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@ -448,18 +453,18 @@ void musrPhysicsList::ConstructEM()
G4MuMultipleScattering* mmm = (G4MuMultipleScattering*) processTable->FindProcess("muMsc",particleDefinition);
mmm->AddEmModel(modelPriority, new G4WentzelVIModel());
}
else if ((stringModelName=="G4UrbanMscModel90")&&(stringProcessName=="G4MuMultipleScattering")) {
else if ((stringModelName=="G4UrbanMscModel")&&(stringProcessName=="G4MuMultipleScattering")) {
G4MuMultipleScattering* mmm = (G4MuMultipleScattering*) processTable->FindProcess("muMsc",particleDefinition);
mmm->AddEmModel(modelPriority, new G4UrbanMscModel90());
mmm->AddEmModel(modelPriority, new G4UrbanMscModel());
}
//cks 14.12.2011 else if ((stringModelName=="G4UrbanMscModel92")&&(stringProcessName=="G4MuMultipleScattering")) {
//cks 14.12.2011 G4MuMultipleScattering* mmm = (G4MuMultipleScattering*) processTable->FindProcess("muMsc",particleDefinition);
//cks 14.12.2011 mmm->AddEmModel(modelPriority, new G4UrbanMscModel92());
//cks 14.12.2011 }
else if ((stringModelName=="G4UrbanMscModel93")&&(stringProcessName=="G4MuMultipleScattering")) {
G4MuMultipleScattering* mmm = (G4MuMultipleScattering*) processTable->FindProcess("muMsc",particleDefinition);
mmm->AddEmModel(modelPriority, new G4UrbanMscModel93());
}
// else if ((stringModelName=="G4UrbanMscModel93")&&(stringProcessName=="G4MuMultipleScattering")) {
// G4MuMultipleScattering* mmm = (G4MuMultipleScattering*) processTable->FindProcess("muMsc",particleDefinition);
// mmm->AddEmModel(modelPriority, new G4UrbanMscModel93());
// }
else {
sprintf(eMessage,"musrPhysicsList: Model \"%s\" is not implemented for \"%s\" in musrPhysicsList.cc for addModel. It can be easily added.",
charModelName,charProcessName);

View File

@ -57,18 +57,18 @@ std::vector<int> * musrPrimaryGeneratorAction::GetPointerToSeedVector() {
musrPrimaryGeneratorAction::musrPrimaryGeneratorAction(
musrDetectorConstruction* musrDC)
:musrDetector(musrDC), x0(0), y0(0), z0(-10*cm), xSigma(0), ySigma(0), zSigma(0),
rMaxAllowed(1e10*mm), zMinAllowed(-1e10*mm), zMaxAllowed(1e10*mm),
meanArrivalTime(1./30000.*second), t0(0), tSigma(0),
relativeRMaxAllowed(1e10*mm),
:musrDetector(musrDC), x0(0), y0(0), z0(-10*CLHEP::cm), xSigma(0), ySigma(0), zSigma(0),
rMaxAllowed(1e10*CLHEP::mm), zMinAllowed(-1e10*CLHEP::mm), zMaxAllowed(1e10*CLHEP::mm),
meanArrivalTime(1./30000.*CLHEP::second), t0(0), tSigma(0),
relativeRMaxAllowed(1e10*CLHEP::mm),
xMaxSource0(0), yMaxSource0(0), zMaxSource0(0),
xMaxSource(1e10*mm), yMaxSource(1e10*mm), zMaxSource(1e10*mm),
p0(0), pSigma(0), pMinAllowed(0), pMaxAllowed(1e10*mm),
xMaxSource(1e10*CLHEP::mm), yMaxSource(1e10*CLHEP::mm), zMaxSource(1e10*CLHEP::mm),
p0(0), pSigma(0), pMinAllowed(0), pMaxAllowed(1e10*CLHEP::mm),
xangle0(0), yangle0(0), xangleSigma(0), yangleSigma(0), pitch(0),
UnpolarisedMuonBeam(false), TransversalyUnpolarisedMuonBeam(false), xPolarisIni(1.), yPolarisIni(0.), zPolarisIni(0.),
xDirection(0), yDirection(0), zDirection(1.),
polarisFraction(1.),
muonDecayTimeMin(-1), muonDecayTimeMax(-1), muonMeanLife(2197.03*ns),
muonDecayTimeMin(-1), muonDecayTimeMax(-1), muonMeanLife(2197.03*CLHEP::ns),
takeMuonsFromTurtleFile(false), z0_InitialTurtle(0),
numberOfGeneratedEvents(0),
turtleMomentumBite(false), turtleMomentumP0(0.), turtleSmearingFactor(0.), turtleMomentumScalingFactor(1.)
@ -171,11 +171,11 @@ void musrPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
exit(1);
}
//csk
xangle = xAngleTmp*mrad;
yangle = yAngleTmp*mrad;
x = xTmp*cm + (z0-z0_InitialTurtle)*tan(xangle) ; // usually z0 is negative
y = yTmp*cm + (z0-z0_InitialTurtle)*tan(yangle) ; // z0_InitialTurtle is the z0 at whith the turtle file was generated.
p = pTmp*GeV*turtleMomentumScalingFactor;
xangle = xAngleTmp*CLHEP::mrad;
yangle = yAngleTmp*CLHEP::mrad;
x = xTmp*CLHEP::cm + (z0-z0_InitialTurtle)*tan(xangle) ; // usually z0 is negative
y = yTmp*CLHEP::cm + (z0-z0_InitialTurtle)*tan(yangle) ; // z0_InitialTurtle is the z0 at whith the turtle file was generated.
p = pTmp*CLHEP::GeV*turtleMomentumScalingFactor;
// add some offset, if requested:
x = x + x0;
y = y + y0;
@ -308,9 +308,9 @@ void musrPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
G4double xpolaris=0, ypolaris=0, zpolaris=0;
if (UnpolarisedMuonBeam) {
// for genarating random numbers on the sphere see http://mathworld.wolfram.com/SpherePointPicking.html
G4double thetaTMP=pi/2;
G4double thetaTMP=CLHEP::pi/2;
if(!TransversalyUnpolarisedMuonBeam) thetaTMP = acos(2. * G4UniformRand()-1);
G4double phiTMP = 2. * pi * G4UniformRand();
G4double phiTMP = 2. * CLHEP::pi * G4UniformRand();
xpolaris = std::sin(thetaTMP) * std::cos(phiTMP);;
ypolaris = std::sin(thetaTMP) * std::sin(phiTMP);
@ -432,9 +432,9 @@ void musrPrimaryGeneratorAction::SetMuonDecayTimeLimits(G4ThreeVector decayTimeL
muonMeanLife = decayTimeLimits[2];
// store the muon decay time parameters to the Root output
musrRootOutput* myRootOutput = musrRootOutput::GetRootInstance();
myRootOutput->StoreGeantParameter(2,muonDecayTimeMin/microsecond);
myRootOutput->StoreGeantParameter(3,muonDecayTimeMax/microsecond);
myRootOutput->StoreGeantParameter(4,muonMeanLife/microsecond);
myRootOutput->StoreGeantParameter(2,muonDecayTimeMin/CLHEP::microsecond);
myRootOutput->StoreGeantParameter(3,muonDecayTimeMax/CLHEP::microsecond);
myRootOutput->StoreGeantParameter(4,muonMeanLife/CLHEP::microsecond);
}
//===============================================================================

View File

@ -51,11 +51,11 @@ musrQuadrupole::musrQuadrupole(G4double halflengthVal, G4double fieldRadiusVal,
}
}
G4cout << " Field gradient set to "<< gradient/(tesla/m) << " T/m"<< G4endl;
G4cout << " Field radius set to " << fieldRadius/mm << " mm"<< G4endl;
G4cout << " Field halflength set to " << halflength/mm << " mm"<<G4endl;
G4cout << " Field fringeDepth set to " << fringeDepth/mm << " mm"<<G4endl;
G4cout << " Field fringeMaxZ set to " << fringeMaxZ/mm << " mm"<<G4endl;
G4cout << " Field gradient set to "<< gradient/(CLHEP::tesla/CLHEP::m) << " T/m"<< G4endl;
G4cout << " Field radius set to " << fieldRadius/CLHEP::mm << " mm"<< G4endl;
G4cout << " Field halflength set to " << halflength/CLHEP::mm << " mm"<<G4endl;
G4cout << " Field fringeDepth set to " << fringeDepth/CLHEP::mm << " mm"<<G4endl;
G4cout << " Field fringeMaxZ set to " << fringeMaxZ/CLHEP::mm << " mm"<<G4endl;
G4cout << "\n-----------------------------------------------------------" << G4endl;
}
@ -104,6 +104,6 @@ G4double musrQuadrupole::GetNominalFieldValue() {
void musrQuadrupole::SetNominalFieldValue(G4double newFieldValue) {
// // Rescale the magnetic field for a new value of the magnetic field
gradient=newFieldValue;
G4cout<<"musrQuadrupole.cc: gradient changed to="<< gradient/(tesla/m)<<" T/m"<<G4endl;
G4cout<<"musrQuadrupole.cc: gradient changed to="<< gradient/(CLHEP::tesla/CLHEP::m)<<" T/m"<<G4endl;
}

View File

@ -580,14 +580,14 @@ void musrRootOutput::SetSaveDetectorInfo (G4int ID, G4int particleID, G4double k
else {
save_detID[save_n]=ID;
save_particleID[save_n]=particleID;
save_ke[save_n]=ke/MeV;
save_x[save_n]=x/mm;
save_y[save_n]=y/mm;
save_z[save_n]=z/mm;
save_time[save_n]=time/microsecond;
save_px[save_n]=px/MeV;
save_py[save_n]=py/MeV;
save_pz[save_n]=pz/MeV;
save_ke[save_n]=ke/CLHEP::MeV;
save_x[save_n]=x/CLHEP::mm;
save_y[save_n]=y/CLHEP::mm;
save_z[save_n]=z/CLHEP::mm;
save_time[save_n]=time/CLHEP::microsecond;
save_px[save_n]=px/CLHEP::MeV;
save_py[save_n]=py/CLHEP::MeV;
save_pz[save_n]=pz/CLHEP::MeV;
save_polx[save_n]=polx;
save_poly[save_n]=poly;
save_polz[save_n]=polz;
@ -599,7 +599,7 @@ void musrRootOutput::SetFieldNomVal(G4int i, G4double value) {
if (i<maxNFieldnNominalValues) {
// cks the following will probably not be correct for electric field,
// because the units are tesla. Should be modified.
fieldNomVal[i]=value/tesla;
fieldNomVal[i]=value/CLHEP::tesla;
}
else {
char message[200];
@ -627,23 +627,23 @@ void musrRootOutput::SetDetectorInfo (G4int nDetectors, G4int ID, G4int particle
else {
det_n=nDetectors+1;
det_ID[nDetectors]=ID;
det_edep[nDetectors]=edep/MeV;
det_edep_el[nDetectors]=edep_el/MeV;
det_edep_pos[nDetectors]=edep_pos/MeV;
det_edep_gam[nDetectors]=edep_gam/MeV;
det_edep_mup[nDetectors]=edep_mup/MeV;
det_edep[nDetectors]=edep/CLHEP::MeV;
det_edep_el[nDetectors]=edep_el/CLHEP::MeV;
det_edep_pos[nDetectors]=edep_pos/CLHEP::MeV;
det_edep_gam[nDetectors]=edep_gam/CLHEP::MeV;
det_edep_mup[nDetectors]=edep_mup/CLHEP::MeV;
det_nsteps[nDetectors]=nsteps;
det_length[nDetectors]=length/mm;
det_time_start[nDetectors]=t1/microsecond;
det_time_end[nDetectors]=t2/microsecond;
det_x[nDetectors]=x/mm;
det_y[nDetectors]=y/mm;
det_z[nDetectors]=z/mm;
det_kine[nDetectors]=ek/MeV;
det_VrtxKine[nDetectors]=ekVertex/MeV;
det_VrtxX[nDetectors]=xVertex/mm;
det_VrtxY[nDetectors]=yVertex/mm;
det_VrtxZ[nDetectors]=zVertex/mm;
det_length[nDetectors]=length/CLHEP::mm;
det_time_start[nDetectors]=t1/CLHEP::microsecond;
det_time_end[nDetectors]=t2/CLHEP::microsecond;
det_x[nDetectors]=x/CLHEP::mm;
det_y[nDetectors]=y/CLHEP::mm;
det_z[nDetectors]=z/CLHEP::mm;
det_kine[nDetectors]=ek/CLHEP::MeV;
det_VrtxKine[nDetectors]=ekVertex/CLHEP::MeV;
det_VrtxX[nDetectors]=xVertex/CLHEP::mm;
det_VrtxY[nDetectors]=yVertex/CLHEP::mm;
det_VrtxZ[nDetectors]=zVertex/CLHEP::mm;
det_VrtxVolID[nDetectors]=idVolVertex;
det_VrtxProcID[nDetectors]=idProcVertex;
det_VrtxTrackID[nDetectors]=idTrackVertex;
@ -661,10 +661,10 @@ void musrRootOutput::SetDetectorInfoVvv (G4int nDetectors,
return;
}
else {
det_VvvKine[nDetectors]=ekVertex/MeV;
det_VvvX[nDetectors]=xVertex/mm;
det_VvvY[nDetectors]=yVertex/mm;
det_VvvZ[nDetectors]=zVertex/mm;
det_VvvKine[nDetectors]=ekVertex/CLHEP::MeV;
det_VvvX[nDetectors]=xVertex/CLHEP::mm;
det_VvvY[nDetectors]=yVertex/CLHEP::mm;
det_VvvZ[nDetectors]=zVertex/CLHEP::mm;
det_VvvVolID[nDetectors]=idVolVertex;
det_VvvProcID[nDetectors]=idProcVertex;
det_VvvTrackID[nDetectors]=idTrackVertex;
@ -688,130 +688,130 @@ void musrRootOutput::SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4
odet_ID[nDetectors]=ID;
odet_nPhot[nDetectors]=nPhot;
odet_nPhotPrim[nDetectors]=nPhotPrim;
odet_timeFirst[nDetectors]=timeFirst/microsecond;
odet_timeSecond[nDetectors]=timeSecond/microsecond;
odet_timeThird[nDetectors]=timeThird/microsecond;
odet_timeA[nDetectors]=timeA/microsecond;
odet_timeB[nDetectors]=timeB/microsecond;
odet_timeC[nDetectors]=timeC/microsecond;
odet_timeD[nDetectors]=timeD/microsecond;
odet_timeMean[nDetectors]=timeMean/microsecond;
odet_timeLast[nDetectors]=timeLast/microsecond;
odet_timeCFD[nDetectors]=timeCFD/microsecond;
odet_timeFirst[nDetectors]=timeFirst/CLHEP::microsecond;
odet_timeSecond[nDetectors]=timeSecond/CLHEP::microsecond;
odet_timeThird[nDetectors]=timeThird/CLHEP::microsecond;
odet_timeA[nDetectors]=timeA/CLHEP::microsecond;
odet_timeB[nDetectors]=timeB/CLHEP::microsecond;
odet_timeC[nDetectors]=timeC/CLHEP::microsecond;
odet_timeD[nDetectors]=timeD/CLHEP::microsecond;
odet_timeMean[nDetectors]=timeMean/CLHEP::microsecond;
odet_timeLast[nDetectors]=timeLast/CLHEP::microsecond;
odet_timeCFD[nDetectors]=timeCFD/CLHEP::microsecond;
odet_amplCFD[nDetectors]=amplCFD;
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void musrRootOutput::SetCFDSpecialInfo (G4int n, G4double time) {
if (n==100) {odet_timeCFD100[odet_n-1] = time/microsecond;} // G4cout<<"OKKKKK odet_n-1="<<odet_n-1<<G4endl;}
else if (n==101) {odet_timeCFD101[odet_n-1] = time/microsecond;}
else if (n==102) {odet_timeCFD102[odet_n-1] = time/microsecond;}
else if (n==103) {odet_timeCFD103[odet_n-1] = time/microsecond;}
else if (n==104) {odet_timeCFD104[odet_n-1] = time/microsecond;}
else if (n==105) {odet_timeCFD105[odet_n-1] = time/microsecond;}
else if (n==106) {odet_timeCFD106[odet_n-1] = time/microsecond;}
else if (n==107) {odet_timeCFD107[odet_n-1] = time/microsecond;}
else if (n==108) {odet_timeCFD108[odet_n-1] = time/microsecond;}
else if (n==109) {odet_timeCFD109[odet_n-1] = time/microsecond;}
else if (n==110) {odet_timeCFD110[odet_n-1] = time/microsecond;}
else if (n==111) {odet_timeCFD111[odet_n-1] = time/microsecond;}
else if (n==112) {odet_timeCFD112[odet_n-1] = time/microsecond;}
else if (n==200) {odet_timeCFD200[odet_n-1] = time/microsecond;}
else if (n==201) {odet_timeCFD201[odet_n-1] = time/microsecond;}
else if (n==202) {odet_timeCFD202[odet_n-1] = time/microsecond;}
else if (n==203) {odet_timeCFD203[odet_n-1] = time/microsecond;}
else if (n==204) {odet_timeCFD204[odet_n-1] = time/microsecond;}
else if (n==205) {odet_timeCFD205[odet_n-1] = time/microsecond;}
else if (n==206) {odet_timeCFD206[odet_n-1] = time/microsecond;}
else if (n==207) {odet_timeCFD207[odet_n-1] = time/microsecond;}
else if (n==208) {odet_timeCFD208[odet_n-1] = time/microsecond;}
else if (n==209) {odet_timeCFD209[odet_n-1] = time/microsecond;}
else if (n==210) {odet_timeCFD210[odet_n-1] = time/microsecond;}
else if (n==211) {odet_timeCFD211[odet_n-1] = time/microsecond;}
else if (n==212) {odet_timeCFD212[odet_n-1] = time/microsecond;}
else if (n==300) {odet_timeCFD300[odet_n-1] = time/microsecond;}
else if (n==301) {odet_timeCFD301[odet_n-1] = time/microsecond;}
else if (n==302) {odet_timeCFD302[odet_n-1] = time/microsecond;}
else if (n==303) {odet_timeCFD303[odet_n-1] = time/microsecond;}
else if (n==304) {odet_timeCFD304[odet_n-1] = time/microsecond;}
else if (n==305) {odet_timeCFD305[odet_n-1] = time/microsecond;}
else if (n==306) {odet_timeCFD306[odet_n-1] = time/microsecond;}
else if (n==307) {odet_timeCFD307[odet_n-1] = time/microsecond;}
else if (n==308) {odet_timeCFD308[odet_n-1] = time/microsecond;}
else if (n==309) {odet_timeCFD309[odet_n-1] = time/microsecond;}
else if (n==310) {odet_timeCFD310[odet_n-1] = time/microsecond;}
else if (n==311) {odet_timeCFD311[odet_n-1] = time/microsecond;}
else if (n==312) {odet_timeCFD312[odet_n-1] = time/microsecond;}
else if (n==400) {odet_timeCFD400[odet_n-1] = time/microsecond;}
else if (n==401) {odet_timeCFD401[odet_n-1] = time/microsecond;}
else if (n==402) {odet_timeCFD402[odet_n-1] = time/microsecond;}
else if (n==403) {odet_timeCFD403[odet_n-1] = time/microsecond;}
else if (n==404) {odet_timeCFD404[odet_n-1] = time/microsecond;}
else if (n==405) {odet_timeCFD405[odet_n-1] = time/microsecond;}
else if (n==406) {odet_timeCFD406[odet_n-1] = time/microsecond;}
else if (n==407) {odet_timeCFD407[odet_n-1] = time/microsecond;}
else if (n==408) {odet_timeCFD408[odet_n-1] = time/microsecond;}
else if (n==409) {odet_timeCFD409[odet_n-1] = time/microsecond;}
else if (n==410) {odet_timeCFD410[odet_n-1] = time/microsecond;}
else if (n==411) {odet_timeCFD411[odet_n-1] = time/microsecond;}
else if (n==412) {odet_timeCFD412[odet_n-1] = time/microsecond;}
else if (n==500) {odet_timeCFD500[odet_n-1] = time/microsecond;}
else if (n==501) {odet_timeCFD501[odet_n-1] = time/microsecond;}
else if (n==502) {odet_timeCFD502[odet_n-1] = time/microsecond;}
else if (n==503) {odet_timeCFD503[odet_n-1] = time/microsecond;}
else if (n==504) {odet_timeCFD504[odet_n-1] = time/microsecond;}
else if (n==505) {odet_timeCFD505[odet_n-1] = time/microsecond;}
else if (n==506) {odet_timeCFD506[odet_n-1] = time/microsecond;}
else if (n==507) {odet_timeCFD507[odet_n-1] = time/microsecond;}
else if (n==508) {odet_timeCFD508[odet_n-1] = time/microsecond;}
else if (n==509) {odet_timeCFD509[odet_n-1] = time/microsecond;}
else if (n==510) {odet_timeCFD510[odet_n-1] = time/microsecond;}
else if (n==511) {odet_timeCFD511[odet_n-1] = time/microsecond;}
else if (n==512) {odet_timeCFD512[odet_n-1] = time/microsecond;}
if (n==100) {odet_timeCFD100[odet_n-1] = time/CLHEP::microsecond;} // G4cout<<"OKKKKK odet_n-1="<<odet_n-1<<G4endl;}
else if (n==101) {odet_timeCFD101[odet_n-1] = time/CLHEP::microsecond;}
else if (n==102) {odet_timeCFD102[odet_n-1] = time/CLHEP::microsecond;}
else if (n==103) {odet_timeCFD103[odet_n-1] = time/CLHEP::microsecond;}
else if (n==104) {odet_timeCFD104[odet_n-1] = time/CLHEP::microsecond;}
else if (n==105) {odet_timeCFD105[odet_n-1] = time/CLHEP::microsecond;}
else if (n==106) {odet_timeCFD106[odet_n-1] = time/CLHEP::microsecond;}
else if (n==107) {odet_timeCFD107[odet_n-1] = time/CLHEP::microsecond;}
else if (n==108) {odet_timeCFD108[odet_n-1] = time/CLHEP::microsecond;}
else if (n==109) {odet_timeCFD109[odet_n-1] = time/CLHEP::microsecond;}
else if (n==110) {odet_timeCFD110[odet_n-1] = time/CLHEP::microsecond;}
else if (n==111) {odet_timeCFD111[odet_n-1] = time/CLHEP::microsecond;}
else if (n==112) {odet_timeCFD112[odet_n-1] = time/CLHEP::microsecond;}
else if (n==200) {odet_timeCFD200[odet_n-1] = time/CLHEP::microsecond;}
else if (n==201) {odet_timeCFD201[odet_n-1] = time/CLHEP::microsecond;}
else if (n==202) {odet_timeCFD202[odet_n-1] = time/CLHEP::microsecond;}
else if (n==203) {odet_timeCFD203[odet_n-1] = time/CLHEP::microsecond;}
else if (n==204) {odet_timeCFD204[odet_n-1] = time/CLHEP::microsecond;}
else if (n==205) {odet_timeCFD205[odet_n-1] = time/CLHEP::microsecond;}
else if (n==206) {odet_timeCFD206[odet_n-1] = time/CLHEP::microsecond;}
else if (n==207) {odet_timeCFD207[odet_n-1] = time/CLHEP::microsecond;}
else if (n==208) {odet_timeCFD208[odet_n-1] = time/CLHEP::microsecond;}
else if (n==209) {odet_timeCFD209[odet_n-1] = time/CLHEP::microsecond;}
else if (n==210) {odet_timeCFD210[odet_n-1] = time/CLHEP::microsecond;}
else if (n==211) {odet_timeCFD211[odet_n-1] = time/CLHEP::microsecond;}
else if (n==212) {odet_timeCFD212[odet_n-1] = time/CLHEP::microsecond;}
else if (n==300) {odet_timeCFD300[odet_n-1] = time/CLHEP::microsecond;}
else if (n==301) {odet_timeCFD301[odet_n-1] = time/CLHEP::microsecond;}
else if (n==302) {odet_timeCFD302[odet_n-1] = time/CLHEP::microsecond;}
else if (n==303) {odet_timeCFD303[odet_n-1] = time/CLHEP::microsecond;}
else if (n==304) {odet_timeCFD304[odet_n-1] = time/CLHEP::microsecond;}
else if (n==305) {odet_timeCFD305[odet_n-1] = time/CLHEP::microsecond;}
else if (n==306) {odet_timeCFD306[odet_n-1] = time/CLHEP::microsecond;}
else if (n==307) {odet_timeCFD307[odet_n-1] = time/CLHEP::microsecond;}
else if (n==308) {odet_timeCFD308[odet_n-1] = time/CLHEP::microsecond;}
else if (n==309) {odet_timeCFD309[odet_n-1] = time/CLHEP::microsecond;}
else if (n==310) {odet_timeCFD310[odet_n-1] = time/CLHEP::microsecond;}
else if (n==311) {odet_timeCFD311[odet_n-1] = time/CLHEP::microsecond;}
else if (n==312) {odet_timeCFD312[odet_n-1] = time/CLHEP::microsecond;}
else if (n==400) {odet_timeCFD400[odet_n-1] = time/CLHEP::microsecond;}
else if (n==401) {odet_timeCFD401[odet_n-1] = time/CLHEP::microsecond;}
else if (n==402) {odet_timeCFD402[odet_n-1] = time/CLHEP::microsecond;}
else if (n==403) {odet_timeCFD403[odet_n-1] = time/CLHEP::microsecond;}
else if (n==404) {odet_timeCFD404[odet_n-1] = time/CLHEP::microsecond;}
else if (n==405) {odet_timeCFD405[odet_n-1] = time/CLHEP::microsecond;}
else if (n==406) {odet_timeCFD406[odet_n-1] = time/CLHEP::microsecond;}
else if (n==407) {odet_timeCFD407[odet_n-1] = time/CLHEP::microsecond;}
else if (n==408) {odet_timeCFD408[odet_n-1] = time/CLHEP::microsecond;}
else if (n==409) {odet_timeCFD409[odet_n-1] = time/CLHEP::microsecond;}
else if (n==410) {odet_timeCFD410[odet_n-1] = time/CLHEP::microsecond;}
else if (n==411) {odet_timeCFD411[odet_n-1] = time/CLHEP::microsecond;}
else if (n==412) {odet_timeCFD412[odet_n-1] = time/CLHEP::microsecond;}
else if (n==500) {odet_timeCFD500[odet_n-1] = time/CLHEP::microsecond;}
else if (n==501) {odet_timeCFD501[odet_n-1] = time/CLHEP::microsecond;}
else if (n==502) {odet_timeCFD502[odet_n-1] = time/CLHEP::microsecond;}
else if (n==503) {odet_timeCFD503[odet_n-1] = time/CLHEP::microsecond;}
else if (n==504) {odet_timeCFD504[odet_n-1] = time/CLHEP::microsecond;}
else if (n==505) {odet_timeCFD505[odet_n-1] = time/CLHEP::microsecond;}
else if (n==506) {odet_timeCFD506[odet_n-1] = time/CLHEP::microsecond;}
else if (n==507) {odet_timeCFD507[odet_n-1] = time/CLHEP::microsecond;}
else if (n==508) {odet_timeCFD508[odet_n-1] = time/CLHEP::microsecond;}
else if (n==509) {odet_timeCFD509[odet_n-1] = time/CLHEP::microsecond;}
else if (n==510) {odet_timeCFD510[odet_n-1] = time/CLHEP::microsecond;}
else if (n==511) {odet_timeCFD511[odet_n-1] = time/CLHEP::microsecond;}
else if (n==512) {odet_timeCFD512[odet_n-1] = time/CLHEP::microsecond;}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void musrRootOutput::SetTimeC1SpecialInfo (G4double* time) {
odet_timeC1[odet_n-1] = time[1]/microsecond;
odet_timeC2[odet_n-1] = time[2]/microsecond;
odet_timeC3[odet_n-1] = time[3]/microsecond;
odet_timeC4[odet_n-1] = time[4]/microsecond;
odet_timeC5[odet_n-1] = time[5]/microsecond;
odet_timeC6[odet_n-1] = time[6]/microsecond;
odet_timeC7[odet_n-1] = time[7]/microsecond;
odet_timeC8[odet_n-1] = time[8]/microsecond;
odet_timeC9[odet_n-1] = time[9]/microsecond;
odet_timeC10[odet_n-1] = time[10]/microsecond;
odet_timeC11[odet_n-1] = time[11]/microsecond;
odet_timeC12[odet_n-1] = time[12]/microsecond;
odet_timeC13[odet_n-1] = time[13]/microsecond;
odet_timeC14[odet_n-1] = time[14]/microsecond;
odet_timeC15[odet_n-1] = time[15]/microsecond;
odet_timeC16[odet_n-1] = time[16]/microsecond;
odet_timeC17[odet_n-1] = time[17]/microsecond;
odet_timeC18[odet_n-1] = time[18]/microsecond;
odet_timeC19[odet_n-1] = time[19]/microsecond;
odet_timeC20[odet_n-1] = time[20]/microsecond;
odet_timeC21[odet_n-1] = time[21]/microsecond;
odet_timeC22[odet_n-1] = time[22]/microsecond;
odet_timeC23[odet_n-1] = time[23]/microsecond;
odet_timeC24[odet_n-1] = time[24]/microsecond;
odet_timeC25[odet_n-1] = time[25]/microsecond;
odet_timeC26[odet_n-1] = time[26]/microsecond;
odet_timeC27[odet_n-1] = time[27]/microsecond;
odet_timeC28[odet_n-1] = time[28]/microsecond;
odet_timeC29[odet_n-1] = time[29]/microsecond;
odet_timeC30[odet_n-1] = time[30]/microsecond;
odet_timeC31[odet_n-1] = time[31]/microsecond;
odet_timeC32[odet_n-1] = time[32]/microsecond;
odet_timeC33[odet_n-1] = time[33]/microsecond;
odet_timeC34[odet_n-1] = time[34]/microsecond;
odet_timeC35[odet_n-1] = time[35]/microsecond;
odet_timeC36[odet_n-1] = time[36]/microsecond;
odet_timeC37[odet_n-1] = time[37]/microsecond;
odet_timeC38[odet_n-1] = time[38]/microsecond;
odet_timeC39[odet_n-1] = time[39]/microsecond;
odet_timeC40[odet_n-1] = time[40]/microsecond;
odet_timeC1[odet_n-1] = time[1]/CLHEP::microsecond;
odet_timeC2[odet_n-1] = time[2]/CLHEP::microsecond;
odet_timeC3[odet_n-1] = time[3]/CLHEP::microsecond;
odet_timeC4[odet_n-1] = time[4]/CLHEP::microsecond;
odet_timeC5[odet_n-1] = time[5]/CLHEP::microsecond;
odet_timeC6[odet_n-1] = time[6]/CLHEP::microsecond;
odet_timeC7[odet_n-1] = time[7]/CLHEP::microsecond;
odet_timeC8[odet_n-1] = time[8]/CLHEP::microsecond;
odet_timeC9[odet_n-1] = time[9]/CLHEP::microsecond;
odet_timeC10[odet_n-1] = time[10]/CLHEP::microsecond;
odet_timeC11[odet_n-1] = time[11]/CLHEP::microsecond;
odet_timeC12[odet_n-1] = time[12]/CLHEP::microsecond;
odet_timeC13[odet_n-1] = time[13]/CLHEP::microsecond;
odet_timeC14[odet_n-1] = time[14]/CLHEP::microsecond;
odet_timeC15[odet_n-1] = time[15]/CLHEP::microsecond;
odet_timeC16[odet_n-1] = time[16]/CLHEP::microsecond;
odet_timeC17[odet_n-1] = time[17]/CLHEP::microsecond;
odet_timeC18[odet_n-1] = time[18]/CLHEP::microsecond;
odet_timeC19[odet_n-1] = time[19]/CLHEP::microsecond;
odet_timeC20[odet_n-1] = time[20]/CLHEP::microsecond;
odet_timeC21[odet_n-1] = time[21]/CLHEP::microsecond;
odet_timeC22[odet_n-1] = time[22]/CLHEP::microsecond;
odet_timeC23[odet_n-1] = time[23]/CLHEP::microsecond;
odet_timeC24[odet_n-1] = time[24]/CLHEP::microsecond;
odet_timeC25[odet_n-1] = time[25]/CLHEP::microsecond;
odet_timeC26[odet_n-1] = time[26]/CLHEP::microsecond;
odet_timeC27[odet_n-1] = time[27]/CLHEP::microsecond;
odet_timeC28[odet_n-1] = time[28]/CLHEP::microsecond;
odet_timeC29[odet_n-1] = time[29]/CLHEP::microsecond;
odet_timeC30[odet_n-1] = time[30]/CLHEP::microsecond;
odet_timeC31[odet_n-1] = time[31]/CLHEP::microsecond;
odet_timeC32[odet_n-1] = time[32]/CLHEP::microsecond;
odet_timeC33[odet_n-1] = time[33]/CLHEP::microsecond;
odet_timeC34[odet_n-1] = time[34]/CLHEP::microsecond;
odet_timeC35[odet_n-1] = time[35]/CLHEP::microsecond;
odet_timeC36[odet_n-1] = time[36]/CLHEP::microsecond;
odet_timeC37[odet_n-1] = time[37]/CLHEP::microsecond;
odet_timeC38[odet_n-1] = time[38]/CLHEP::microsecond;
odet_timeC39[odet_n-1] = time[39]/CLHEP::microsecond;
odet_timeC40[odet_n-1] = time[40]/CLHEP::microsecond;
// std::cout<<"odet_timeC1["<<odet_n-1<<"]="<<odet_timeC1[odet_n-1]<<std::endl;
}

View File

@ -146,9 +146,9 @@ void musrScintHit::Print()
if(!fMgr->DoesFieldChangeEnergy()) { //then we have a magnetic field
mfield = fMgr->GetDetectorField();
mfield->GetFieldValue(point,B);
B[0]=B[0]/tesla;
B[1]=B[1]/tesla;
B[2]=B[2]/tesla;
B[0]=B[0]/CLHEP::tesla;
B[1]=B[1]/CLHEP::tesla;
B[2]=B[2]/CLHEP::tesla;
}
// G4cout << " Segment: " << IBchamberNb << G4endl;
// G4cout <<"Position " << pos.x()/cm<<" "<<pos.y()/cm <<" "<< pos.z()/cm <<G4endl;
@ -161,8 +161,8 @@ void musrScintHit::Print()
<< " " << ScintMultihitSwitch
<<" " << edep
<< " " << fabs(B[2])
<<" "<< pre_pos.x()/cm<<" "<<pre_pos.y()/cm <<" "<< pre_pos.z()/cm
<< " " << globalTime/s
<<" "<< pre_pos.x()/CLHEP::cm<<" "<<pre_pos.y()/CLHEP::cm <<" "<< pre_pos.z()/CLHEP::cm
<< " " << globalTime/CLHEP::s
// << " " << IBchamberNb
// << " first=" << firstStepInVolume << " last=" << lastStepInVolume
<< G4endl;

View File

@ -40,7 +40,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
// 2DB ... 2D field , magnetic, Toni-like
// 3DBQuadVrankovic ... 3D field of a quadrupole magnet asymmetric in z but with the symmetric octants in (x,y) plane
G4double lenUnit = 1*m; // length unit of the field map grid coordinates
G4double lenUnit = 1*CLHEP::m; // length unit of the field map grid coordinates
G4double fieldNormalisation = 1.; // Normalisation factor by which the the field map has to be multiplied
// in order to get 1T (in the case of magnetic field)
// "lenUnit" and "fieldNormalisation" are needed only if not specified
@ -48,11 +48,11 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
strcpy(fieldTableType,fldTableType);
fldType = 'B';
fUnit = "T";
fieUnit = tesla;
fieUnit = CLHEP::tesla;
if (fieldTableType[2]=='E') {
fldType = 'E';
fUnit = "kV/mm";
fieUnit= kilovolt/mm;
fieUnit= CLHEP::kilovolt/ CLHEP::mm;
}
symmetryType=0;
@ -115,7 +115,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
||(strcmp(fieldTableType,"3DBQuadVrankovic")==0)) {
// OPERA format of the input file:
// Read table dimensions
lenUnit = 1*m;
lenUnit = 1*CLHEP::m;
fieldNormalisation = 1.;
if (strcmp(fieldTableType,"3DBQuadVrankovic")==0) {
G4cout<<"3D field of a quadrupole defined by Vjeran Vrankovic."<<G4endl;
@ -156,7 +156,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
strcpy(variableIncreasingOrder,tmpString2);
}
sscanf(&buffer[0],"%s %s",tmpString1,tmpString2);
if (strcmp(tmpString2,"[CENTIMETRE]")==0) {lenUnit=1*cm;}
if (strcmp(tmpString2,"[CENTIMETRE]")==0) {lenUnit=1*CLHEP::cm;}
} while ( buffer[1]!='0');
}
else if ((strcmp(fieldTableType,"2DE")==0)||(strcmp(fieldTableType,"2DB")==0)||(strcmp(fieldTableType,"2DEf")==0)) {
@ -174,7 +174,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
}
else if ((strcmp(fieldTableType,"2D_OperaXY")==0)||(strcmp(fieldTableType,"2DBOperaXY")==0)) {
int nDummy;
lenUnit = 1*cm;
lenUnit = 1*CLHEP::cm;
fieldNormalisation = 0.00001;
G4cout << "2D, field-map file format from OPERA with X,Y components (Kamil)" << G4endl;
G4cout << " ---> Assumed order (6 col.): r, z, dummy, "<<fldType<<"r, "<<fldType<<"z, Dummy"<<G4endl;
@ -190,7 +190,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
}
else if ((strcmp(fieldTableType,"2D")==0)||(strcmp(fieldTableType,"2DBOpera")==0)) {
int nDummy;
lenUnit = 1*cm;
lenUnit = 1*CLHEP::cm;
fieldNormalisation = 0.00001;
G4cout << "2D, field-map file format from OPERA with X,Z components (Kamil)" << G4endl;
G4cout << " ---> Assumed order (6 col.): r, dummy, z, "<<fldType<<"r, "<<fldType<<"z, Dummy"<<G4endl;
@ -217,7 +217,7 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
int ix, iy, iz;
if (fldDim==3) {
G4cout << " The grid consists of [" << nx << " x " << ny << " x " << nz << "] x, y, z values" << G4endl;
G4cout << " Field map length unit = " << lenUnit/mm<<" mm"<< G4endl;
G4cout << " Field map length unit = " << lenUnit/CLHEP::mm<<" mm"<< G4endl;
G4cout << " Field map normalisation factor = " << fieldNormalisation << G4endl;
// Set up storage space for the table
xField.resize( nx );
@ -367,14 +367,14 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
if (fldDim==3) G4cout<<" ---> Min values of x,y,z: ";
else G4cout<<" ---> Min values of R,z: ";
G4cout << minimumx/cm << ", ";
if (fldDim==3) G4cout<< minimumy/cm << ", " ;
G4cout << minimumz/cm << " cm "<<G4endl;
G4cout << minimumx/CLHEP::cm << ", ";
if (fldDim==3) G4cout<< minimumy/CLHEP::cm << ", " ;
G4cout << minimumz/CLHEP::cm << " cm "<<G4endl;
if (fldDim==3) G4cout<<" ---> Max values of x,y,z: ";
else G4cout<<" ---> Max values of R,z: ";
G4cout << maximumx/cm << ", ";
if (fldDim==3) G4cout<< maximumy/cm << ", " ;
G4cout << maximumz/cm << " cm " << G4endl;
G4cout << maximumx/CLHEP::cm << ", ";
if (fldDim==3) G4cout<< maximumy/CLHEP::cm << ", " ;
G4cout << maximumz/CLHEP::cm << " cm " << G4endl;
// Should really check that the limits are not the wrong way around.
@ -387,14 +387,14 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
G4cout << "\n Reordering of the field grid was neccessary - after reordering:"<<G4endl;
if (fldDim==3) G4cout<<" ---> Min values of x,y,z: ";
else G4cout<<" ---> Min values of R,z: ";
G4cout << minimumx/cm << ", ";
if (fldDim==3) G4cout<< minimumy/cm << ", " ;
G4cout << minimumz/cm << " cm "<<G4endl;
G4cout << minimumx/CLHEP::cm << ", ";
if (fldDim==3) G4cout<< minimumy/CLHEP::cm << ", " ;
G4cout << minimumz/CLHEP::cm << " cm "<<G4endl;
if (fldDim==3) G4cout<<" ---> Max values of x,y,z: ";
else G4cout<<" ---> Max values of R,z: ";
G4cout << maximumx/cm << ", ";
if (fldDim==3) G4cout<< maximumy/cm << ", " ;
G4cout << maximumz/cm << " cm " << G4endl;
G4cout << maximumx/CLHEP::cm << ", ";
if (fldDim==3) G4cout<< maximumy/CLHEP::cm << ", " ;
G4cout << maximumz/CLHEP::cm << " cm " << G4endl;
}
dx = maximumx - minimumx;
@ -402,9 +402,9 @@ musrTabulatedElementField::musrTabulatedElementField( const char* filename, cons
dz = maximumz - minimumz;
if (fldDim==3) G4cout << "\n ---> Dif values x,y,z (range): ";
else G4cout << "\n ---> Dif values R,z (range): ";
G4cout << dx/cm << ", ";
if (fldDim==3) G4cout << dy/cm << ", ";
G4cout << dz/cm << " cm."<<G4endl;
G4cout << dx/CLHEP::cm << ", ";
if (fldDim==3) G4cout << dy/CLHEP::cm << ", ";
G4cout << dz/CLHEP::cm << " cm."<<G4endl;
G4cout << "-----------------------------------------------------------" << G4endl;